void-packages/srcpkgs/ghc/template

44 lines
1.3 KiB
Bash

# Template file for 'ghc'
pkgname=ghc
version=7.10.1
revision=1
patch_args="-Np1"
build_style=gnu-configure
configure_args="--with-system-libffi"
hostmakedepends="ghc-bin docbook-xsl libxslt llvm"
makedepends="libffi-devel gmp-devel ncurses-devel llvm"
depends="perl gcc libffi-devel gmp-devel"
short_desc="Glorious Haskell Compiler"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="custom"
homepage="http://www.haskell.org/ghc/"
distfiles="http://www.haskell.org/ghc/dist/$version/$pkgname-$version-src.tar.xz"
checksum=92f3e3d67a637c587c49b61c704a670953509eb4b17a93c0c2ac153da4cd3aa0
nocross=yes # ask chris2 before wasting time trying to do that
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
}
post_install() {
sed -i 's#/usr/lib/ccache/bin/##g' ${DESTDIR}/usr/lib/ghc-${version}/settings
vlicense LICENSE
}
ghc-doc_package() {
noarch=yes
short_desc+=" -- documentation"
pkg_install() {
vmove usr/share/doc
}
}