[Lunar-commits] <moonbase-other> ghc: introduce a bootstrap for ghc

v4hn me at v4hn.de
Mon Jul 15 00:19:56 CEST 2013


commit dee778977be9496a434fae401266b3bc396b1817
Author: v4hn <me at v4hn.de>
Date: Sun, 14 Jul 2013 15:18:01 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/dee778977be9496a434fae401266b3bc396b1817

ghc: introduce a bootstrap for ghc

Ladies and Gentleman, we got haskell support.
---
  compilers/ghc/BUILD          | +29/-0    
  compilers/ghc/DEPENDS        | +2/-0     
  compilers/ghc/DETAILS        | +19/-0    
  compilers/ghc/DETAILS.x86_64 | +19/-0    
  compilers/ghc/PRE_BUILD      | +6/-0     
  5 files changed, 75 insertions(+)

--- /dev/null
+++ b/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
--- /dev/null
+++ b/compilers/ghc/DEPENDS
@@ -0,0 +1,2 @@
+# fails with llvm 3.3
+#optional_depends llvm "" " " "build ghc using the LLVM backend"
--- /dev/null
+++ b/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
--- /dev/null
+++ b/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
--- /dev/null
+++ b/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




More information about the Lunar-commits mailing list