void-packages/srcpkgs/ghc-bin/template
2019-05-11 17:41:00 +02:00

46 lines
1.4 KiB
Bash

# Template file for 'ghc-bin'
pkgname=ghc-bin
version=8.6.5
revision=1
wrksrc="ghc-${version%[!0-9]}"
hostmakedepends="ncurses perl libffi libnuma"
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/"
archs="i686 x86_64*"
nostrip=yes
noshlibprovides=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=c419fd0aa9065fe4d2eb9a248e323860c696ddf3859749ca96a84938aee49107
;;
x86_64-musl)
# create with "make binary-dist"
distfiles="https://alpha.de.repo.voidlinux.org/distfiles/ghc-${version}-x86_64-void-linux-musl.tar.xz"
checksum=070f2abe8b0c08bf2db1833ed7f40195b72ee9ca8888855fb16a75c6e248f936
;;
i686)
distfiles="https://downloads.haskell.org/~ghc/${version%[!0-9]}/ghc-${version}-i386-deb9-linux.tar.xz"
checksum=1cddb907393a669342b1a922dd16d505d9d93d50bd9433a54a8162f8701250dc
;;
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
}