void-packages/srcpkgs/ghc-bin/template

46 lines
1.4 KiB
Bash

# Template file for 'ghc-bin'
pkgname=ghc-bin
version=8.2.2
revision=1
wrksrc="ghc-${version%[!0-9]}"
hostmakedepends="ncurses perl libffi"
depends="ncurses perl gcc libffi-devel gmp-devel"
short_desc="Glorious Haskell Compiler - precompiled binaries"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="BSD"
homepage="http://www.haskell.org/ghc/"
only_for_archs="i686 x86_64 x86_64-musl"
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=48e205c62b9dc1ccf6739a4bc15a71e56dde2f891a9d786a1b115f0286111b2a
;;
x86_64-musl)
# create with "make binary-dist"
distfiles="https://repo.voidlinux.eu/distfiles/ghc-${version}-x86_64-void-linux-musl.tar.xz"
checksum=d4d613725ab62a11e49e66786a99c5baff314ef3f28eea66c1574b6da0043ef4
;;
i686)
distfiles="https://downloads.haskell.org/~ghc/${version%[!0-9]}/ghc-${version}-i386-deb8-linux.tar.xz"
checksum=9e67d72d76482e0ba91c718e727b00386a1a12a32ed719714976dc56ca8c8223
;;
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
}