void-packages/srcpkgs/ghc-bin/template

59 lines
2.0 KiB
Bash

# Template file for 'ghc-bin'
pkgname=ghc-bin
version=8.8.4
revision=1
archs="i686* x86_64* ppc64le*"
wrksrc="ghc-${version%[!0-9]}"
hostmakedepends="perl libffi libnuma"
depends="ncurses perl gcc libffi-devel gmp-devel"
short_desc="Glorious Haskell Compiler - precompiled binaries"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://www.haskell.org/ghc/"
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=51a36892f1264744195274187298d13ac62bce2da86d4ddf76d8054ab90f2feb
;;
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=779647d3f4e6e39da9e13b2559319ede76b4fff1107e4dc369a09aadeecad971
;;
i686)
distfiles="https://downloads.haskell.org/~ghc/${version%[!0-9]}/ghc-${version}-i386-deb9-linux.tar.xz"
checksum=43dd954910c9027694312cef0aabc7774d102d0422b7172802cfb72f7d5da3a0
;;
i686-musl)
distfiles="https://distfiles.voidlinux.de/ghc-${version}-i386-unknown-linux-musl.tar.xz"
checksum=8d84fbab62b3712bdcfb92f7d258a0d15d8295397d84b48716a3c625f09be782
;;
ppc64le)
distfiles="https://alpha.de.repo.voidlinux.org/distfiles/ghc-${version}-powerpc64le-void-linux.tar.xz"
checksum=4a13d36a3e3d605db02b89269ed727c3ba23c9d03b84b72c1716a910a28f8074
;;
ppc64le-musl)
distfiles="https://alpha.de.repo.voidlinux.org/distfiles/ghc-${version}-powerpc64le-void-linux-musl.tar.xz"
checksum=b35ba0cb20a05555ac6c2c92f9f090c665e55b3d295d58a801eb88bd4f6baab3
;;
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
}