Skip to content
Browse files

ghc: introduce a bootstrap for ghc

Ladies and Gentleman, we got haskell support.
  • Loading branch information...
1 parent e66290f commit dee778977be9496a434fae401266b3bc396b1817 @v4hn v4hn committed
Showing with 75 additions and 0 deletions.
  1. +29 −0 compilers/ghc/BUILD
  2. +2 −0 compilers/ghc/DEPENDS
  3. +19 −0 compilers/ghc/DETAILS
  4. +19 −0 compilers/ghc/DETAILS.x86_64
  5. +6 −0 compilers/ghc/PRE_BUILD
View
29 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
View
2 compilers/ghc/DEPENDS
@@ -0,0 +1,2 @@
+# fails with llvm 3.3
+#optional_depends llvm "" " " "build ghc using the LLVM backend"
View
19 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
View
19 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
View
6 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.
Something went wrong with that request. Please try again.