desktop/ghc/PKGBUILD

138 lines
4.6 KiB
Bash

# $Id: PKGBUILD 168343 2012-10-09 04:08:52Z tdziedzic $
# Special note for devs looking to upgrade this package:
# ghc places a unique hash for each library when it is built.
# Libraries depend on versions specified by those hashes.
# This implies that all libraries need to be rebuilt when ghc is rebuilt.
pkgname=ghc
pkgver=8.2.1
pkgrel=2
pkgdesc='The Glasgow Haskell Compiler'
arch=('i686' 'x86_64')
url='http://www.haskell.org/ghc/'
license=('custom')
depends=('perl' 'gmp>=5.0' 'gcc' 'libffi')
makedepends=('ghc' 'libxslt' 'docbook-xsl' 'python3-sphinx')
checkdepends=('python2')
install='ghc.install'
options=('staticlibs')
# missing rtl?
# missing integer-gmp2
provides=('haskell-array=0.5.2.0'
'haskell-base=4.10.0.0'
'haskell-binary=0.8.5.1'
'haskell-bytestring=0.10.8.2'
'haskell-containers=0.5.10.2'
'haskell-deepseq=1.4.3.0'
'haskell-directory=1.3.0.2'
'haskell-filepath=1.4.1.2'
'haskell-ghc-boot-th=8.2.1'
'haskell-ghc-boot=8.2.1'
'haskell-ghc-compact=0.1.0.0'
'haskell-ghc-prim=0.5.1.0'
'haskell-haskeline=0.7.4.0'
'haskell-hoopl=3.10.2.2'
'haskell-hpc=0.6.0.3'
'haskell-integer-gmp=1.0.1.0'
'haskell-pretty=1.1.3.3'
'haskell-process=1.6.1.0'
'haskell-template-haskell=2.12.0.0'
'haskell-terminfo=0.4.1.0'
'haskell-time=1.8.0.2'
'haskell-transformers=0.5.2.0'
'haskell-unix=2.7.2.2'
'haskell-xhtml=3000.2.2'
'haskell-cabal=2.0.0.2'
)
replaces=('haskell-array<0.5.2.0'
'haskell-base<4.10.0.0'
'haskell-binary<0.8.5.1'
'haskell-bytestring<0.10.8.2'
'haskell-containers<0.5.10.2'
'haskell-deepseq<1.4.3.0'
'haskell-directory<1.3.0.2'
'haskell-filepath<1.4.1.2'
'haskell-ghc-boot-th<8.2.1'
'haskell-ghc-boot<8.2.1'
'haskell-ghc-compact<0.1.0.0'
'haskell-ghc-prim<0.5.1.0'
'haskell-haskeline<0.7.4.0'
'haskell-hoopl<3.10.2.2'
'haskell-hpc<0.6.0.3'
'haskell-integer-gmp<1.0.1.0'
'haskell-pretty<1.1.3.3'
'haskell-process<1.6.1.0'
'haskell-template-haskell<2.12.0.0'
'haskell-terminfo<0.4.1.0'
'haskell-time<1.8.0.2'
'haskell-transformers<0.5.2.0'
'haskell-unix<2.7.2.2'
'haskell-xhtml<3000.2.2'
'haskell-cabal<2.0.0.2'
)
source=("http://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-src.tar.xz"
"http://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-testsuite.tar.xz")
md5sums=('8942b6fb393984aeb8304d09bc326851'
'4a0d3c147d2027657f49c5a7a4a3f4fe')
prepare() {
cd ghc-${pkgver}
cp mk/build.mk{.sample,}
sed -i '1iBuildFlavour = perf' mk/build.mk
}
build() {
cd ghc-${pkgver}
./configure \
--prefix=/usr \
--docdir=/usr/share/doc/ghc \
--with-system-libffi \
--with-ffi-includes=$(pkg-config --variable=includedir libffi)
make
}
check() {
# keep this otherwise a lot of tests will show as unexpected failures... need to investigate why using -jn for n > 1 does this...
unset MAKEFLAGS
cd ghc-${pkgver}
# python2 rename
#sed -e 's/PYTHON = python/&2/' -i testsuite/mk/boilerplate.mk
sed -e 's_#!/usr/bin/env python$_&2_' -i testsuite/timeout/calibrate testsuite/timeout/timeout.py
# upstream known failures on both i686 and x86_64:
# ghci.debugger/scripts break011 [bad stderr] (ghci)
# perf/compiler parsing001 [stat not good enough] (normal)
# simplCore/should_compile spec-inline [stderr mismatch] (optasm)
# upstream known failures on i686 only:
# numrun012 test fails on i686 works on x86_64 - http://hackage.haskell.org/trac/ghc/ticket/5856
make test
# enabling threads to speed up
# causes more failures than make test, need to investigate
# upstream known failures on both i686 and x86_64:
# perf/compiler parsing001 [stat not good enough] (normal)
# simplCore/should_compile spec-inline [stderr mismatch] (optasm)
# upstream known failures on i686 only:
# numrun012 test fails on i686 works on x86_64 - http://hackage.haskell.org/trac/ghc/ticket/5856
#make THREADS=9 test
# will most likely cause lots of failures
# enable this when upstream has 0 test failures from a simple 'make test'
# zero unexpected failures on all tier 1 platforms - http://hackage.haskell.org/trac/ghc/ticket/5757
#make fulltest
}
package() {
cd ghc-${pkgver}
make DESTDIR=${pkgdir} install
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/ghc/LICENSE
}