void-packages/srcpkgs/ghc/template
2020-03-24 01:01:16 +01:00

61 lines
1.7 KiB
Bash

# Template file for 'ghc'
pkgname=ghc
# Keep this synchronized with http://www.stackage.org/lts
version=8.6.5
revision=2
wrksrc="ghc-${version%[!0-9]}"
build_style=gnu-configure
configure_args="--with-system-libffi"
hostmakedepends="automake docbook-xsl ghc-bin libxslt python3-Sphinx"
makedepends="gmp-devel libffi-devel libnuma-devel ncurses-devel"
depends="perl gcc libffi-devel gmp-devel libnuma-devel"
short_desc="Glorious Haskell Compiler"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="BSD-3-Clause"
homepage="http://www.haskell.org/ghc/"
distfiles="http://www.haskell.org/ghc/dist/${version%[!0-9]}/${pkgname}-${version%[!0-9]}-src.tar.xz"
checksum=4d4aa1e96f4001b934ac6193ab09af5d6172f41f5a5d39d8e43393b9aafee361
patch_args="-Np1"
nocross=yes # ask leah2 before wasting time trying to do that
_bindir="/usr/lib/${pkgname}-${version}/bin"
nopie_files="
${_bindir}/ghc
${_bindir}/ghc-iserv
${_bindir}/ghc-iserv-dyn
${_bindir}/ghc-iserv-prof
${_bindir}/ghc-pkg
${_bindir}/haddock
${_bindir}/hp2ps
${_bindir}/hpc
${_bindir}/hsc2hs
${_bindir}/runghc
${_bindir}/unlit
"
pre_configure() {
export CONF_CC_OPTS_STAGE0=$CFLAGS_FOR_BUILD
export CONF_CC_OPTS_STAGE1=$CFLAGS
export CONF_CC_OPTS_STAGE2=$CFLAGS
export CONF_GCC_LINKER_OPTS_STAGE0=$LDFLAGS_FOR_BUILD
export CONF_GCC_LINKER_OPTS_STAGE1=$LDFLAGS
export CONF_GCC_LINKER_OPTS_STAGE2=$LDFLAGS
export CONF_CPP_OPTS_STAGE0=$CPPFLAGS_FOR_BUILD
export CONF_CPP_OPTS_STAGE1=$CPPFLAGS
export CONF_CPP_OPTS_STAGE2=$CPPFLAGS
autoreconf -fi
}
post_install() {
sed -i 's#/usr/lib/ccache/bin/##g' ${DESTDIR}/usr/lib/ghc-${version%[!0-9]}/settings
vlicense LICENSE
}
ghc-doc_package() {
archs=noarch
short_desc+=" -- documentation"
pkg_install() {
vmove usr/share/doc
}
}