[arch-commits] Commit in haskell-bzlib/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sun Jun 6 22:23:01 UTC 2021


    Date: Sunday, June 6, 2021 @ 22:23:01
  Author: felixonmars
Revision: 956414

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-bzlib/repos/community-staging-x86_64/
  haskell-bzlib/repos/community-staging-x86_64/PKGBUILD
    (from rev 956413, haskell-bzlib/trunk/PKGBUILD)
  haskell-bzlib/repos/community-staging-x86_64/ghc-8.8.patch
    (from rev 956413, haskell-bzlib/trunk/ghc-8.8.patch)

---------------+
 PKGBUILD      |   38 ++++++++++++++++++++++++++++++++++
 ghc-8.8.patch |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

Copied: haskell-bzlib/repos/community-staging-x86_64/PKGBUILD (from rev 956413, haskell-bzlib/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-06-06 22:23:01 UTC (rev 956414)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Dziedzic <gostrc at gmail.com>
+
+_hkgname=bzlib
+pkgname=haskell-bzlib
+pkgver=0.5.1.0
+pkgrel=6
+pkgdesc="Compression and decompression in the bzip2 format"
+url="https://hackage.haskell.org/package/${_hkgname}"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'bzip2')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+sha512sums=('2d4e200abc8ef7f158b4b726e81a389d5018615dd04f5704f50323498f5a1991e217a05abd10f86cab791326bc95802d22a17b55656e5289cb07ca93698a1537')
+
+build() {
+    cd $_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 $MAKEFLAGS
+    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 $_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-bzlib/repos/community-staging-x86_64/ghc-8.8.patch (from rev 956413, haskell-bzlib/trunk/ghc-8.8.patch)
===================================================================
--- community-staging-x86_64/ghc-8.8.patch	                        (rev 0)
+++ community-staging-x86_64/ghc-8.8.patch	2021-06-06 22:23:01 UTC (rev 956414)
@@ -0,0 +1,62 @@
+--- Codec/Compression/BZip/Stream.hsc.orig	2020-01-09 03:26:18.302155300 +0800
++++ Codec/Compression/BZip/Stream.hsc	2020-01-09 03:27:21.602183680 +0800
+@@ -21,7 +21,7 @@
+   finalise,
+ 
+   -- * Initialisation
+-  compressInit, 
++  compressInit,
+   decompressInit,
+ 
+   -- ** Initialisation parameters
+@@ -71,6 +71,7 @@
+ import System.IO (hPutStrLn, stderr)
+ import Control.Applicative (Applicative(..))
+ import Control.Monad (liftM, ap)
++import Control.Monad.Fail
+ import Control.Exception (assert)
+ 
+ import Prelude hiding (length)
+@@ -88,8 +89,8 @@
+   -- Now that we're setting a new input buffer, we can be sure that zlib no
+   -- longer has a reference to the old one. Therefore this is the last point
+   -- at which the old buffer had to be retained. It's safe to release now.
+-  inBuf <- getInBuf 
+-  unsafeLiftIO $ touchForeignPtr inBuf    
++  inBuf <- getInBuf
++  unsafeLiftIO $ touchForeignPtr inBuf
+ 
+   -- now set the available input buffer ptr and length
+   setInBuf   inBuf'
+@@ -177,11 +178,11 @@
+ 
+   result <- compress_ action
+   outFree' <- getOutFree
+-    
++
+   -- number of bytes of extra output there is available as a result of
+   -- the call to deflate:
+   let outExtra = outFree - outFree'
+-  
++
+   outAvail <- getOutAvail
+   setOutAvail (outAvail + outExtra)
+   return result
+@@ -233,6 +234,8 @@
+ --  m >>= f = (m `thenZ` \a -> consistencyCheck `thenZ_` returnZ a) `thenZ` f
+   (>>)   = thenZ_
+   return = returnZ
++
++instance MonadFail Stream where
+   fail   = (finalise >>) . failZ
+ 
+ returnZ :: a -> Stream a
+@@ -452,7 +455,7 @@
+ -- require about 3700k to decompress. To support decompression of any file in
+ -- less than 4Mb there is the option to decompress using approximately half
+ -- this amount of memory, about 2300k. Decompression speed is also halved,
+--- so you should use this option only where necessary. 
++-- so you should use this option only where necessary.
+ --
+ data MemoryLevel =
+     DefaultMemoryLevel -- ^ The default.



More information about the arch-commits mailing list