Date: Tuesday, May 7, 2019 @ 20:12:50 Author: felixonmars Revision: 462470
archrelease: copy trunk to community-staging-x86_64 Added: idris/repos/community-staging-x86_64/ idris/repos/community-staging-x86_64/PKGBUILD (from rev 462469, idris/trunk/PKGBUILD) ----------+ PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) Copied: idris/repos/community-staging-x86_64/PKGBUILD (from rev 462469, idris/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-05-07 20:12:50 UTC (rev 462470) @@ -0,0 +1,61 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +pkgname=idris +pkgver=1.3.1 +pkgrel=65 +pkgdesc="Functional Programming Language with Dependent Types" +url="http://www.idris-lang.org/" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-annotated-wl-pprint' 'haskell-ansi-terminal' + 'haskell-ansi-wl-pprint' 'haskell-async' 'haskell-base64-bytestring' 'haskell-blaze-html' + 'haskell-blaze-markup' 'haskell-cheapskate' 'haskell-code-page' 'haskell-fingertree' + 'haskell-fsnotify' 'haskell-ieee754' 'haskell-libffi' 'haskell-megaparsec6' + 'haskell-network' 'haskell-optparse-applicative' 'haskell-regex-tdfa' 'haskell-safe' + 'haskell-split' 'haskell-terminal-size' 'haskell-uniplate' 'haskell-unordered-containers' + 'haskell-utf8-string' 'haskell-vector' 'haskell-vector-binary-instances' + 'haskell-zip-archive') +makedepends=('ghc' 'haskell-tagged' 'haskell-tasty' 'haskell-tasty-golden' 'haskell-tasty-rerun' + 'nodejs') +source=("$pkgname-$pkgver.tar.gz::https://github.com/idris-lang/Idris-dev/archive/v$pkgver.tar.gz") +sha512sums=('555c7fdfad7e4f69b1aa4f6237cf4432831cd74e33342bd802ff3bc763118178b742b386035f8c071820b5e2bc71c5372c4acb356835155677046d360b722746') + +prepare() { + cd Idris-dev-$pkgver + + sed -i '1ioverride IDRIS := env LD_PRELOAD=$(shell ls ../../dist/build/libHSidris-*-ghc*.so) $(IDRIS)' \ + libs/*/Makefile + sed -i -e 's/< *1.4/<2/' -e 's/< *0.6/<1/' -e 's/< *0.2/<1/' -e 's/< *0.4/<1/' -e 's/< *2.8/<4/' idris.cabal + sed -i '1i{-# language NoMonadFailDesugaring #-}' src/Idris/Core/CaseTree.hs src/Idris/Parser/Stack.hs src/Idris/Elab/Term.hs +} + +build() { + cd Idris-dev-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + -fFFI -fGMP -f-release -f-freestanding -f-CI -f-execonly + LC_CTYPE=en_US.UTF-8 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 Idris-dev-$pkgver + # TODO: figure out the tests + PATH="$PWD/dist/build:$PATH" LD_LIBRARY_PATH="$PWD/dist/build" runhaskell Setup test || warning "Tests failed" +} + +package() { + cd Idris-dev-$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" +}