[arch-commits] Commit in haskell-bytestring-strict-builder/repos (3 files)

Felix Yan felixonmars at archlinux.org
Thu May 31 01:54:48 UTC 2018


    Date: Thursday, May 31, 2018 @ 01:54:47
  Author: felixonmars
Revision: 333789

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-bytestring-strict-builder/repos/community-staging-x86_64/
  haskell-bytestring-strict-builder/repos/community-staging-x86_64/PKGBUILD
    (from rev 333788, haskell-bytestring-strict-builder/trunk/PKGBUILD)
  haskell-bytestring-strict-builder/repos/community-staging-x86_64/ghc-8.4.patch
    (from rev 333788, haskell-bytestring-strict-builder/trunk/ghc-8.4.patch)

---------------+
 PKGBUILD      |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ghc-8.4.patch |   44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)

Copied: haskell-bytestring-strict-builder/repos/community-staging-x86_64/PKGBUILD (from rev 333788, haskell-bytestring-strict-builder/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-05-31 01:54:47 UTC (rev 333789)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=bytestring-strict-builder
+pkgname=haskell-bytestring-strict-builder
+pkgver=0.4.5
+pkgrel=20
+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')
+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 $_hkgname-$pkgver
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --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
+    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
+}
+
+check() {
+    cd $_hkgname-$pkgver
+    runhaskell Setup test
+}
+
+package() {
+    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"
+    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-bytestring-strict-builder/repos/community-staging-x86_64/ghc-8.4.patch (from rev 333788, haskell-bytestring-strict-builder/trunk/ghc-8.4.patch)
===================================================================
--- community-staging-x86_64/ghc-8.4.patch	                        (rev 0)
+++ community-staging-x86_64/ghc-8.4.patch	2018-05-31 01:54:47 UTC (rev 333789)
@@ -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