2017-10-27 20:46:27 +02:00
|
|
|
|
# Tanım: Glasgow Haskell derleyicisi
|
2017-09-08 00:24:35 +02:00
|
|
|
|
# URL: http://www.haskell.org/haskellwiki/Glasgow_Haskell_Compiler
|
2017-10-27 20:46:27 +02:00
|
|
|
|
# Paketçi: milisarge
|
|
|
|
|
# Gerekler: docbook-xsl libedit libffi
|
2018-08-09 14:32:53 +02:00
|
|
|
|
# Grup: geliştirme
|
2017-09-08 00:24:35 +02:00
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
isim=ghc
|
|
|
|
|
surum=8.0.2
|
|
|
|
|
devir=1
|
|
|
|
|
kaynak=(https://downloads.haskell.org/~ghc/$surum/$isim-$surum-src.tar.xz)
|
2017-09-08 00:24:35 +02:00
|
|
|
|
|
2017-10-27 23:59:41 +02:00
|
|
|
|
derle() {
|
2017-09-08 00:24:35 +02:00
|
|
|
|
# if ghc is not previously installed bootstrap it
|
|
|
|
|
if [ ! -e /usr/bin/ghc ]; then
|
|
|
|
|
|
|
|
|
|
# download binary bootstrap file if it does not exist
|
2017-10-28 14:10:23 +02:00
|
|
|
|
if [ ! -f "$DERLEME_KAYNAKDIZIN/$isim-$surum-x86_64-centos67-linux.tar.xz" ]; then
|
2017-09-08 00:24:35 +02:00
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
wget http://downloads.haskell.org/~ghc/$surum/$isim-$surum-x86_64-centos67-linux.tar.xz \
|
|
|
|
|
--output-document="$DERLEME_KAYNAKDIZIN/$isim-$surum-x86_64-centos67-linux.tar.xz"
|
2017-09-08 00:24:35 +02:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
install -d tmp
|
|
|
|
|
cd tmp
|
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
bsdtar -xf "$DERLEME_KAYNAKDIZIN/$isim-$surum-x86_64-centos67-linux.tar.xz"
|
|
|
|
|
mv $isim-$surum ../$isim-$surum-binary
|
2017-09-08 00:24:35 +02:00
|
|
|
|
cd -
|
|
|
|
|
rmdir tmp
|
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
cd $isim-$surum-binary
|
2017-09-08 00:24:35 +02:00
|
|
|
|
|
|
|
|
|
# hack for gmp and ncurses for bootstrap binary ghc
|
|
|
|
|
ln -s /lib/libgmp.so.10 libgmp.so.3
|
|
|
|
|
ln -s /lib/libncurses.so.6 libtinfo.so.5
|
|
|
|
|
export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH"
|
|
|
|
|
|
|
|
|
|
./configure --prefix=$SRC/binary
|
|
|
|
|
make install
|
|
|
|
|
cd $SRC
|
|
|
|
|
|
|
|
|
|
export PATH="$SRC/binary/bin:$PATH"
|
|
|
|
|
fi
|
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
cd $isim-$surum
|
2017-09-08 00:24:35 +02:00
|
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
|
--prefix=/usr \
|
|
|
|
|
--docdir=/usr/share/doc/ghc \
|
|
|
|
|
--with-system-libffi \
|
|
|
|
|
--with-ffi-includes=$(pkg-config --variable=includedir libffi)
|
|
|
|
|
|
|
|
|
|
make
|
|
|
|
|
make -j1 DESTDIR=$PKG install
|
|
|
|
|
|
|
|
|
|
rm -r $PKG/usr/share/doc
|
|
|
|
|
}
|