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

Felix Yan felixonmars at archlinux.org
Thu Jun 7 11:51:12 UTC 2018


    Date: Thursday, June 7, 2018 @ 11:51:12
  Author: felixonmars
Revision: 341785

archrelease: copy trunk to community-staging-x86_64

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

---------------+
 PKGBUILD      |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 ghc-8.4.patch |   23 +++++++++++++++++++++++
 2 files changed, 71 insertions(+)

Copied: haskell-bytestring-tree-builder/repos/community-staging-x86_64/PKGBUILD (from rev 341784, haskell-bytestring-tree-builder/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-06-07 11:51:12 UTC (rev 341785)
@@ -0,0 +1,48 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=bytestring-tree-builder
+pkgname=haskell-bytestring-tree-builder
+pkgver=0.2.7.1
+pkgrel=17
+pkgdesc="A very efficient ByteString builder implementation based on the binary tree"
+url="https://github.com/nikita-volkov/bytestring-tree-builder"
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-base-prelude')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        ghc-8.4.patch)
+sha512sums=('cf522d6c13bb2fd6b23e0b78abec5836c20d19effcceb184646aa885df12c665738a9134b0cf6c8f5b30d05606c1a0880829600181342c678bb8ab32a9f3765d'
+            'dc21716549a6d0b35a564061130e058b1cd756895985385f16054dc5e4b47b59b71c4044aca14a1b651470cc788f5a1d60f495e534cc6360f992214aaa7e35fb')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p1 -i ../ghc-8.4.patch
+
+    sed -i '/semigroups/d' $_hkgname.cabal
+}
+
+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-bytestring-tree-builder/repos/community-staging-x86_64/ghc-8.4.patch (from rev 341784, haskell-bytestring-tree-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-06-07 11:51:12 UTC (rev 341785)
@@ -0,0 +1,23 @@
+diff --git a/library/ByteString/TreeBuilder.hs.orig b/library/ByteString/TreeBuilder.hs
+index 18c7f05..5f8ffbb 100644
+--- a/library/ByteString/TreeBuilder.hs.orig
++++ b/library/ByteString/TreeBuilder.hs
+@@ -43,9 +43,6 @@ instance Monoid Builder where
+   {-# INLINE mempty #-}
+   mempty =
+     Builder 0 A.Empty
+-  {-# INLINABLE mappend #-}
+-  mappend (Builder length1 tree1) (Builder length2 tree2) =
+-    Builder (length1 + length2) (A.Branch tree1 tree2)
+   {-# INLINE mconcat #-}
+   mconcat =
+     foldl' mappend mempty
+@@ -54,6 +51,8 @@ instance Semigroup Builder where
+   {-# INLINE sconcat #-}
+   sconcat =
+     foldl' mappend mempty
++  Builder length1 tree1 <> Builder length2 tree2 =
++    Builder (length1 + length2) (A.Branch tree1 tree2)
+ 
+ instance IsString Builder where
+   {-# INLINE fromString #-}



More information about the arch-commits mailing list