Date: Sunday, June 18, 2017 @ 15:20:26 Author: felixonmars Revision: 238074
upgpkg: stack 1.4.0-80 rebuild with ghc,8.0.2 Modified: stack/trunk/PKGBUILD ----------+ PKGBUILD | 93 +++++++++++++++++++++++++++---------------------------------- 1 file changed, 42 insertions(+), 51 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-06-18 14:14:48 UTC (rev 238073) +++ PKGBUILD 2017-06-18 15:20:26 UTC (rev 238074) @@ -2,51 +2,53 @@ # Maintainer: Felix Yan <[email protected]> # Contributor: Arch Haskell Team <[email protected]> -pkgbase=stack -pkgname=(stack haskell-stack) +pkgname=stack pkgver=1.4.0 -pkgrel=79 +pkgrel=80 pkgdesc="The Haskell Tool Stack" url="https://github.com/commercialhaskell/stack" license=("custom:BSD3") arch=('i686' 'x86_64') -makedepends=("ghc=8.0.1" "haskell-aeson" "haskell-annotated-wl-pprint" "haskell-ansi-terminal" - "haskell-async" "haskell-attoparsec" "haskell-base-compat" "haskell-base64-bytestring" - "haskell-binary-tagged" "haskell-blaze-builder" "haskell-clock" "haskell-conduit" - "haskell-conduit-extra" "haskell-cryptonite" "haskell-cryptonite-conduit" - "haskell-either" "haskell-errors" "haskell-exceptions" "haskell-extra" - "haskell-fast-logger" "haskell-file-embed" "haskell-filelock" "haskell-fsnotify" - "haskell-generic-deriving" "haskell-gitrev" "haskell-hackage-security" - "haskell-hashable" "haskell-hastache" "haskell-hit" "haskell-http-client" - "haskell-http-client-tls" "haskell-http-conduit" "haskell-http-types" "haskell-hpack" - "haskell-lifted-async" "haskell-lifted-base" "haskell-memory" "haskell-microlens" - "haskell-microlens-mtl" "haskell-monad-control" "haskell-monad-logger" - "haskell-monad-unlift" "haskell-mtl" "haskell-network-uri" "haskell-open-browser" - "haskell-optparse-applicative" "haskell-optparse-simple" "haskell-path" - "haskell-path-io" "haskell-persistent" "haskell-persistent-sqlite" - "haskell-persistent-template" "haskell-pid1" "haskell-project-template" - "haskell-regex-applicative-text" "haskell-resourcet" "haskell-retry" "haskell-safe" - "haskell-safe-exceptions" "haskell-semigroups" "haskell-split" "haskell-stm" - "haskell-store" "haskell-streaming-commons" "haskell-tar" "haskell-temporary" - "haskell-text" "haskell-text-binary" "haskell-text-metrics" "haskell-tls" - "haskell-transformers-base" "haskell-unicode-transforms" "haskell-unix-compat" - "haskell-unordered-containers" "haskell-vector" "haskell-vector-binary-instances" - "haskell-yaml" "haskell-zip-archive" "haskell-zlib") -source=("$pkgbase-$pkgver.tar.gz::https://github.com/commercialhaskell/stack/archive/v$pkgver.tar.gz" +depends=("ghc" "haskell-aeson" "haskell-annotated-wl-pprint" "haskell-ansi-terminal" + "haskell-async" "haskell-attoparsec" "haskell-base-compat" "haskell-base64-bytestring" + "haskell-binary-tagged" "haskell-blaze-builder" "haskell-clock" "haskell-conduit" + "haskell-conduit-extra" "haskell-cryptonite" "haskell-cryptonite-conduit" + "haskell-either" "haskell-errors" "haskell-exceptions" "haskell-extra" + "haskell-fast-logger" "haskell-file-embed" "haskell-filelock" "haskell-fsnotify" + "haskell-generic-deriving" "haskell-gitrev" "haskell-hackage-security" + "haskell-hashable" "haskell-hastache" "haskell-hit" "haskell-http-client" + "haskell-http-client-tls" "haskell-http-conduit" "haskell-http-types" "haskell-hpack" + "haskell-lifted-async" "haskell-lifted-base" "haskell-memory" "haskell-microlens" + "haskell-microlens-mtl" "haskell-monad-control" "haskell-monad-logger" + "haskell-monad-unlift" "haskell-mtl" "haskell-network-uri" "haskell-open-browser" + "haskell-optparse-applicative" "haskell-optparse-simple" "haskell-path" + "haskell-path-io" "haskell-persistent" "haskell-persistent-sqlite" + "haskell-persistent-template" "haskell-pid1" "haskell-project-template" + "haskell-regex-applicative-text" "haskell-resourcet" "haskell-retry" "haskell-safe" + "haskell-safe-exceptions" "haskell-semigroups" "haskell-split" "haskell-stm" + "haskell-store" "haskell-streaming-commons" "haskell-tar" "haskell-temporary" + "haskell-text" "haskell-text-binary" "haskell-text-metrics" "haskell-tls" + "haskell-transformers-base" "haskell-unicode-transforms" "haskell-unix-compat" + "haskell-unordered-containers" "haskell-vector" "haskell-vector-binary-instances" + "haskell-yaml" "haskell-zip-archive" "haskell-zlib") +conflicts=('haskell-stack') +replaces=('haskell-stack') +install="stack.install" +source=("$pkgname-$pkgver.tar.gz::https://github.com/commercialhaskell/stack/archive/v$pkgver.tar.gz" "store-0.4.patch::https://github.com/commercialhaskell/stack/commit/d3637126b9045b266d2e53387e183915cb4a912d.patch") sha256sums=('595d311ad117e41ad908b7065743917542b40f343d1334673e98171ee74d36e6' '63d0f620dcbde3a7f236aadab32f5fa3e2b93741dcf462392624bb30b6b49c16') prepare() { - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/${pkgname}-${pkgver}" patch -p1 -i ../store-0.4.patch } build() { - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/${pkgname}-${pkgver}" - runhaskell Setup configure -O --enable-library-profiling --enable-shared \ - --prefix=/usr --docdir="/usr/share/doc/${pkgbase}" \ + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic \ + --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \ --libsubdir=\$compiler/site-local/\$pkgid \ -f-disable-git-info -f-integration-tests -f-static -f-hide-dependency-versions runhaskell Setup build @@ -57,31 +59,20 @@ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh } -package_stack() { - depends=('gmp' 'libffi' 'zlib') - optdepends=('ghc') - install="stack.install" +package() { + cd "${srcdir}/${pkgname}-${pkgver}" - cd "${srcdir}/${pkgbase}-${pkgver}" - runhaskell Setup copy --destdir="${pkgdir}" - rm -r "$pkgdir"/usr/{lib,share/doc} - install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - "${pkgdir}"/usr/bin/stack --bash-completion-script /usr/bin/stack > stack_completion_script - install -Dm644 stack_completion_script "${pkgdir}/usr/share/bash-completion/completions/stack" -} - -package_haskell-stack() { - pkgdesc="The Haskell Tool Stack (docs and libraries)" - depends=("${makedepends[@]}" 'stack') - - cd "${srcdir}/${pkgbase}-${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" install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries" - ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${pkgbase}" + ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${pkgname}" runhaskell Setup copy --destdir="${pkgdir}" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" - rm -rf "${pkgdir}/usr/bin" + + LD_PRELOAD=$(ls "$pkgdir"/usr/lib/*-linux-ghc-*/libHSstack-*-ghc*.so) "${pkgdir}"/usr/bin/stack --bash-completion-script /usr/bin/stack > stack_completion_script + install -Dm644 stack_completion_script "${pkgdir}/usr/share/bash-completion/completions/stack" + + # Remove static libs + find "$pkgdir"/usr/lib -name "*.a" -delete }
