Skip to content

Commit

Permalink
ghc: introduce a bootstrap for ghc
Browse files Browse the repository at this point in the history
Ladies and Gentleman, we got haskell support.
  • Loading branch information
v4hn committed Jul 14, 2013
1 parent e66290f commit dee7789
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
29 changes: 29 additions & 0 deletions compilers/ghc/BUILD
@@ -0,0 +1,29 @@
cd ghc-bin &&

# prepare binaries for use
./configure --prefix=$SOURCE_DIRECTORY/install &&
make install &&

# compile the sources using these binaries
OPTS+=" --with-ghc=$SOURCE_DIRECTORY/install/bin/ghc" &&
cd .. &&

cd ghc-$VERSION &&

default_config &&

cp mk/build.mk{.sample,} &&

if in_depends $MODULE llvm; then
sedit "s:#\(BuildFlavour = perf-llvm\)$:\1:" mk/build.mk
else
sedit "s:#\(BuildFlavour = perf\)$:\1:" mk/build.mk
fi &&

default_make &&

# these are for some reason not created automatically
for f in /usr/bin/*-*-*-{ghc,ghc-$VERSION,ghc-pkg,ghc-pkg-$VERSION,haddock-ghc-$VERSION,hsc2hs,runghc-$VERSION}; do
file=$(basename "$f")
ln -s $file /usr/bin/${file#*-*-*-}
done
2 changes: 2 additions & 0 deletions compilers/ghc/DEPENDS
@@ -0,0 +1,2 @@
# fails with llvm 3.3
#optional_depends llvm "" " " "build ghc using the LLVM backend"
19 changes: 19 additions & 0 deletions compilers/ghc/DETAILS
@@ -0,0 +1,19 @@
MODULE=ghc
VERSION=7.6.3
SOURCE=$MODULE-$VERSION-src.tar.bz2
SOURCE2=$MODULE-$VERSION-i386-unknown-linux.tar.bz2
SOURCE_URL=http://www.haskell.org/ghc/dist/$VERSION/
SOURCE2_URL=$SOURCE_URL
SOURCE_VFY=sha1:8938e1ef08b37a4caa071fa169e79a3001d065ff
SOURCE2_VFY=sha1:f042b4171a2d4745137f2e425e6949c185f8ea14
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
WEB_SITE=http://www.haskell.org
ENTERED=20130714
UPDATED=20130714
SHORT="The Glasgow Haskell Compiler"

cat << EOF
The Glasgow Haskell Compiler is a state-of-the-art,
open source compiler and interactive environment
for the functional language Haskell.
EOF
19 changes: 19 additions & 0 deletions compilers/ghc/DETAILS.x86_64
@@ -0,0 +1,19 @@
MODULE=ghc
VERSION=7.6.3
SOURCE=$MODULE-$VERSION-src.tar.bz2
SOURCE2=$MODULE-$VERSION-x86_64-unknown-linux.tar.bz2
SOURCE_URL=http://www.haskell.org/ghc/dist/$VERSION/
SOURCE2_URL=$SOURCE_URL
SOURCE_VFY=sha1:8938e1ef08b37a4caa071fa169e79a3001d065ff
SOURCE2_VFY=sha1:46ec3f3352ff57fba0dcbc8d9c20f7bcb6924b77
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
WEB_SITE=http://www.haskell.org
ENTERED=20130714
UPDATED=20130714
SHORT="The Glasgow Haskell Compiler"

cat << EOF
The Glasgow Haskell Compiler is a state-of-the-art,
open source compiler and interactive environment
for the functional language Haskell.
EOF
6 changes: 6 additions & 0 deletions compilers/ghc/PRE_BUILD
@@ -0,0 +1,6 @@
mk_source_dir $SOURCE_DIRECTORY &&
cd $SOURCE_DIRECTORY &&

unpack $SOURCE2 &&
mv ghc-$VERSION ghc-bin &&
unpack $SOURCE

0 comments on commit dee7789

Please sign in to comment.