[arch-commits] Commit in haskell-patience/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Sun Oct 14 18:38:06 UTC 2018
Date: Sunday, October 14, 2018 @ 18:38:06
Author: felixonmars
Revision: 393773
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-patience/repos/community-staging-x86_64/
haskell-patience/repos/community-staging-x86_64/PKGBUILD
(from rev 393772, haskell-patience/trunk/PKGBUILD)
haskell-patience/repos/community-staging-x86_64/container-0.6.patch
(from rev 393772, haskell-patience/trunk/container-0.6.patch)
---------------------+
PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++++++++
container-0.6.patch | 21 +++++++++++++++++++++
2 files changed, 66 insertions(+)
Copied: haskell-patience/repos/community-staging-x86_64/PKGBUILD (from rev 393772, haskell-patience/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2018-10-14 18:38:06 UTC (rev 393773)
@@ -0,0 +1,45 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=patience
+pkgname=haskell-patience
+pkgver=0.1.1
+pkgrel=8
+pkgdesc="Patience diff and longest increasing subsequence"
+url="https://hackage.haskell.org/package/${_hkgname}"
+license=("custom:BSD3")
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+ container-0.6.patch)
+sha512sums=('dac94580d9b82023841b5406509f8cd0e58148756e4259708c21b78b480fb4fb67b21a82c81e702275f49d90bcd1d2b46d20bb96267131d4ff57334f110e14f7'
+ '180ad3b4427207fb6e46e205daf49891554068a1e698b6a13a3c41e0e36c95327742baff2f2821d23a8d81a0927ff427d864913bed3ac626e4337972573982af')
+
+prepare() {
+ cd $_hkgname-$pkgver
+ patch -p1 -i ../container-0.6.patch
+}
+
+build() {
+ cd "${srcdir}/${_hkgname}-${pkgver}"
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd "${srcdir}/${_hkgname}-${pkgver}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}
Copied: haskell-patience/repos/community-staging-x86_64/container-0.6.patch (from rev 393772, haskell-patience/trunk/container-0.6.patch)
===================================================================
--- community-staging-x86_64/container-0.6.patch (rev 0)
+++ community-staging-x86_64/container-0.6.patch 2018-10-14 18:38:06 UTC (rev 393773)
@@ -0,0 +1,21 @@
+diff --git a/Data/Algorithm/Patience.hs.orig b/Data/Algorithm/Patience.hs
+index f987659..c7ccfba 100644
+--- a/Data/Algorithm/Patience.hs.orig
++++ b/Data/Algorithm/Patience.hs
+@@ -15,6 +15,7 @@ import qualified Data.Sequence as S
+ import Data.Sequence ( (<|), (|>), (><), ViewL(..), ViewR(..) )
+ import qualified Data.Foldable as F
+ import qualified Data.Map as M
++import qualified Data.Map.Strict as MS
+ import qualified Data.IntMap as IM
+
+ import Data.List
+@@ -68,7 +69,7 @@ longestIncreasing = extract . foldl' ins IM.empty where
+ -- Elements whose second component appears exactly once.
+ unique :: (Ord t) => S.Seq (a,t) -> M.Map t a
+ unique = M.mapMaybe id . F.foldr ins M.empty where
+- ins (a,x) = M.insertWith' (\_ _ -> Nothing) x (Just a)
++ ins (a,x) = MS.insertWith (\_ _ -> Nothing) x (Just a)
+
+ -- Given two sequences of numbered "lines", returns a list of points
+ -- where unique lines match up.
More information about the arch-commits
mailing list