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

Felix Yan felixonmars at archlinux.org
Wed Jan 22 07:12:06 UTC 2020


    Date: Wednesday, January 22, 2020 @ 07:12:05
  Author: felixonmars
Revision: 553394

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 553393, haskell-bzlib/trunk/PKGBUILD)
  haskell-bzlib/repos/community-staging-x86_64/ghc-8.8.patch
    (from rev 553393, haskell-bzlib/trunk/ghc-8.8.patch)

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

Copied: haskell-bzlib/repos/community-staging-x86_64/PKGBUILD (from rev 553393, haskell-bzlib/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-01-22 07:12:05 UTC (rev 553394)
@@ -0,0 +1,45 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Dziedzic <gostrc at gmail.com>
+
+_hkgname=bzlib
+pkgname=haskell-bzlib
+pkgver=0.5.0.5
+pkgrel=13
+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"
+        ghc-8.8.patch)
+sha512sums=('fe4b6e1a4d67573a9ff72808cfd0bf47a127885593e98debcaa505c488c76af364bed31cdb8ee9308295514f154536e958ff5e2a1c3157eeb5b16f8011424819'
+            'ab5344deb9667b73ed3387d58abab5ee2fd6887fd78327d15b40ac8dc81165b6060517c29e8c7860e6e4e21119622182659d8f0e4491be2fbc1f5cf12aeab885')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p0 -i ../ghc-8.8.patch
+}
+
+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
+    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 553393, 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	2020-01-22 07:12:05 UTC (rev 553394)
@@ -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