2014-01-25 00:29:01 +11:00
|
|
|
# Description: Glasgow Haskell compiler.
|
|
|
|
# URL: http://www.haskell.org/haskellwiki/Glasgow_Haskell_Compiler
|
2014-11-10 23:30:49 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2014-01-25 00:29:01 +11:00
|
|
|
# Packager: Moritz Wilhelmy, moritz plus crux at wzff dot de
|
2014-11-29 17:29:43 +11:00
|
|
|
# Depends on: docbook-xsl libedit libffi libgmp readline
|
2014-01-25 00:29:01 +11:00
|
|
|
|
|
|
|
name=ghc
|
|
|
|
version=7.6.3
|
|
|
|
release=1
|
|
|
|
source=(http://www.haskell.org/ghc/dist/$version/$name-$version-src.tar.bz2)
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# if ghc is not previously installed bootstrap it
|
|
|
|
if [ ! -e /usr/bin/ghc ]; then
|
|
|
|
|
|
|
|
# download binary bootstrap file if it does not exist
|
|
|
|
if [ ! -f "$PKGMK_SOURCE_DIR/$name-$version-x86_64-unknown-linux.tar.bz2" ]; then
|
|
|
|
|
|
|
|
wget http://www.haskell.org/ghc/dist/$version/$name-$version-x86_64-unknown-linux.tar.bz2 \
|
|
|
|
--output-document="$PKGMK_SOURCE_DIR/$name-$version-x86_64-unknown-linux.tar.bz2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
install -d tmp
|
|
|
|
cd tmp
|
|
|
|
bsdtar -xf "$PKGMK_SOURCE_DIR/$name-$version-x86_64-unknown-linux.tar.bz2"
|
|
|
|
mv $name-$version ../$name-$version-binary
|
|
|
|
cd -
|
|
|
|
rmdir tmp
|
|
|
|
|
|
|
|
cd $name-$version-binary
|
|
|
|
|
|
|
|
# hack for gmp 5
|
|
|
|
ln -s /usr/lib/libgmp.so.10 libgmp.so.3
|
|
|
|
export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH"
|
|
|
|
|
|
|
|
./configure --prefix=$SRC/binary
|
|
|
|
make install
|
|
|
|
cd $SRC
|
|
|
|
|
|
|
|
export PATH="$SRC/binary/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $name-$version
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--mandir=/usr/man
|
|
|
|
|
|
|
|
make
|
|
|
|
make -j1 DESTDIR=$PKG install
|
|
|
|
rm -r $PKG/usr/share/doc
|
|
|
|
}
|