void-packages/srcpkgs/ghc-bin/template
Đoàn Trần Công Danh 3051d0619a srcpkgs: remove ncurses from {hostmake,make,check}depends
xbps-src will remove ncurses in do_clean, which removes base-chroot
2021-01-05 06:40:27 +07:00

54 lines
1.8 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
;;
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
}