community/ghc to 8.0.2-2

This commit is contained in:
Jason Plum 2017-07-04 11:14:16 -04:00
parent 2493c39e10
commit 9c0b1c27d7

View file

@ -19,7 +19,7 @@ buildarch=4
pkgbase=ghc
pkgname=(ghc ghc-static)
pkgver=8.0.2
pkgrel=1
pkgrel=2
pkgdesc='The Glasgow Haskell Compiler'
arch=('i686' 'x86_64')
url='http://www.haskell.org/ghc/'
@ -42,10 +42,8 @@ prepare() {
cd ghc-$pkgver
# Disable profiling libraries since 8.0.2
cp mk/build.mk{.sample,}
sed -i '1iBuildFlavour = perf' mk/build.mk
sed -i 's/BUILD_PROF_LIBS = YES/BUILD_PROF_LIBS = NO/' mk/flavours/perf.mk
}
build() {
@ -67,8 +65,10 @@ package_ghc-static() {
make DESTDIR="$pkgdir" -j1 install
find "$pkgdir"/usr/lib ! -name "*.a" -type f -delete
mv "$pkgdir"/usr/lib/ghc-$pkgver/package.conf.d "$srcdir"/static-package.conf.d
find "$pkgdir"/usr/lib ! \( -name "*.a" -o -name "*.p_hi" \) -type f -delete
find "$pkgdir"/usr/lib -type d -empty -delete
mv "$srcdir"/static-package.conf.d "$pkgdir"/usr/lib/ghc-$pkgver/
rm -r "$pkgdir"/usr/share "$pkgdir"/usr/bin
}
@ -141,7 +141,7 @@ package_ghc() {
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Remove static libs and the compiler itself, but keep ghc-pkg for library (un)register
find "$pkgdir"/usr/lib -name "*.a" -delete
find "$pkgdir"/usr/lib \( -name "*.a" -o -name "*.p_hi" \) -delete
install -Dm644 utils/completion/ghc.bash \
"$pkgdir/usr/share/bash-completion/completions/ghc"