53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
|
# Description: Glasgow Haskell compiler.
|
||
|
# URL: http://www.haskell.org/haskellwiki/Glasgow_Haskell_Compiler
|
||
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot co
|
||
|
# Packager: Moritz Wilhelmy, moritz plus crux at wzff dot de
|
||
|
# Depends on: libedit libffi libgmp ncurses readline
|
||
|
|
||
|
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
|
||
|
}
|