void-packages/srcpkgs/ghc/template
2015-08-03 17:11:19 +02:00

43 lines
1.3 KiB
Bash

# Template file for 'ghc'
pkgname=ghc
version=7.10.2
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=54cd73755b784d78e2f13d5eb161bfa38d3efee9e8a56f7eb6cd9f2d6e2615f5
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
}
}