void-packages/srcpkgs/ghc-bin/template
2016-09-16 11:50:05 +02:00

40 lines
1.2 KiB
Bash

# Template file for 'ghc-bin'
pkgname=ghc-bin
version=8.0.1
revision=1
wrksrc="ghc-${version%[!0-9]}"
hostmakedepends="ncurses perl"
depends="ncurses perl gcc libffi-devel gmp-devel"
short_desc="Glorious Haskell Compiler - precompiled binaries"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="BSD"
homepage="http://www.haskell.org/ghc/"
only_for_archs="i686 x86_64"
nostrip=yes
conflicts="ghc>=0 ghc-doc>=0"
case "$XBPS_TARGET_MACHINE" in
x86_64*)
distfiles="https://downloads.haskell.org/~ghc/${version%[!0-9]}/ghc-${version}-x86_64-deb8-linux.tar.xz"
checksum=b1c06af49b29521d5b122ef3311f5843e342db8b1769ea7c602cc16d66098ced
;;
i686*)
distfiles="https://downloads.haskell.org/~ghc/${version%[!0-9]}/ghc-${version}-i386-deb8-linux.tar.xz"
checksum=81c27c59f4c4efd7458f308d6a8e130b67c6c156999b78bad42caf78a7453ab1
;;
esac
do_configure() {
./configure --prefix=/usr
}
do_install() {
ln -sf /usr/lib/libncursesw.so.6 libtinfo.so.5
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
make install DESTDIR="$DESTDIR"
# Fake libtinfo into rpath of ghc:
ln -sf /usr/lib/libncursesw.so.6 \
$DESTDIR/usr/lib/ghc-${version%[!0-9]}/rts/libtinfo.so.5
vlicense LICENSE
}