[arch-commits] Commit in haskell-bytestring-strict-builder/trunk (2 files)
Felix Yan
felixonmars at archlinux.org
Fri May 18 06:34:29 UTC 2018
Date: Friday, May 18, 2018 @ 06:34:28
Author: felixonmars
Revision: 324213
upgpkg: haskell-bytestring-strict-builder 0.4.5-10
really fix for ghc 8.4
Added:
haskell-bytestring-strict-builder/trunk/ghc-8.4.patch
Modified:
haskell-bytestring-strict-builder/trunk/PKGBUILD
---------------+
PKGBUILD | 33 +++++++++++++++++++++++++--------
ghc-8.4.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-05-18 06:30:55 UTC (rev 324212)
+++ PKGBUILD 2018-05-18 06:34:28 UTC (rev 324213)
@@ -4,21 +4,33 @@
_hkgname=bytestring-strict-builder
pkgname=haskell-bytestring-strict-builder
pkgver=0.4.5
-pkgrel=9
+pkgrel=10
pkgdesc="An efficient strict bytestring builder"
url="https://github.com/nikita-volkov/bytestring-strict-builder"
license=('MIT')
arch=('x86_64')
-depends=('ghc-libs' 'haskell-base-prelude' 'haskell-semigroups')
-makedepends=('ghc')
-source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
-sha512sums=('b1e0a551abf663daeaf71cb36e883e5b3db0a5112d7190d0743a5ed26aa334d3fede5be8c35dc2821d24d1fd88eae1de7e4983cc31bdc5c14960defc0ce47bcd')
+depends=('ghc-libs' 'haskell-base-prelude')
+makedepends=('ghc' 'haskell-tasty' 'haskell-tasty-quickcheck' 'haskell-tasty-smallcheck'
+ 'haskell-tasty-hunit' 'haskell-quickcheck-instances' 'haskell-rerebase')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+ ghc-8.4.patch)
+sha512sums=('b1e0a551abf663daeaf71cb36e883e5b3db0a5112d7190d0743a5ed26aa334d3fede5be8c35dc2821d24d1fd88eae1de7e4983cc31bdc5c14960defc0ce47bcd'
+ '7ed27930fef2b2709dfa6a66a09cebd1300361ecc40aca4735984c6364eda70a176fc7dbad198c6b45ef6303e5fc8fdaecda1ef30de5eb45e68eec26f555009f')
+prepare() {
+ cd $_hkgname-$pkgver
+ patch -p1 -i ../ghc-8.4.patch
+
+ sed -e '/semigroups/d' \
+ -e 's/==.*,/,/' \
+ -i $_hkgname.cabal
+}
+
build() {
- cd "${srcdir}/${_hkgname}-${pkgver}"
+ cd $_hkgname-$pkgver
runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
- --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --enable-tests \
--dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build
runhaskell Setup register --gen-script
@@ -27,8 +39,13 @@
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
+check() {
+ cd $_hkgname-$pkgver
+ runhaskell Setup test
+}
+
package() {
- cd "${srcdir}/${_hkgname}-${pkgver}"
+ cd $_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"
Added: ghc-8.4.patch
===================================================================
--- ghc-8.4.patch (rev 0)
+++ ghc-8.4.patch 2018-05-18 06:34:28 UTC (rev 324213)
@@ -0,0 +1,44 @@
+diff --git a/library/ByteString/StrictBuilder/Population.hs.orig b/library/ByteString/StrictBuilder/Population.hs
+index 4134009..e423daf 100644
+--- a/library/ByteString/StrictBuilder/Population.hs.orig
++++ b/library/ByteString/StrictBuilder/Population.hs
+@@ -16,11 +16,10 @@ instance Monoid Population where
+ {-# INLINE mempty #-}
+ mempty =
+ Population return
+- {-# INLINE mappend #-}
+- mappend (Population leftPtrUpdate) (Population rightPtrUpdate) =
+- Population (leftPtrUpdate >=> rightPtrUpdate)
+
+-instance Semigroup Population
++instance Semigroup Population where
++ Population leftPtrUpdate <> Population rightPtrUpdate =
++ Population (leftPtrUpdate >=> rightPtrUpdate)
+
+
+ {-|
+diff --git a/library/ByteString/StrictBuilder.hs.orig b/library/ByteString/StrictBuilder.hs
+index b7f36b8..69921c0 100644
+--- a/library/ByteString/StrictBuilder.hs.orig
++++ b/library/ByteString/StrictBuilder.hs
+@@ -38,9 +38,6 @@ instance Monoid Builder where
+ {-# INLINE mempty #-}
+ mempty =
+ Builder 0 mempty
+- {-# INLINE mappend #-}
+- mappend (Builder leftSize leftPopulation) (Builder rightSize rightPopulation) =
+- Builder (leftSize + rightSize) (leftPopulation <> rightPopulation)
+ {-# INLINE mconcat #-}
+ mconcat builders =
+ Builder size population
+@@ -50,7 +47,9 @@ instance Monoid Builder where
+ population =
+ foldMap (\(Builder _ x) -> x) builders
+
+-instance Semigroup Builder
++instance Semigroup Builder where
++ Builder leftSize leftPopulation <> Builder rightSize rightPopulation =
++ Builder (leftSize + rightSize) (leftPopulation <> rightPopulation)
+
+ instance IsString Builder where
+ fromString =
More information about the arch-commits
mailing list