diff --git a/compilers/ghc/BUILD b/compilers/ghc/BUILD new file mode 100644 index 00000000000..01126455292 --- /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 diff --git a/compilers/ghc/DEPENDS b/compilers/ghc/DEPENDS new file mode 100644 index 00000000000..b154be5676c --- /dev/null +++ b/compilers/ghc/DEPENDS @@ -0,0 +1,2 @@ +# fails with llvm 3.3 +#optional_depends llvm "" " " "build ghc using the LLVM backend" diff --git a/compilers/ghc/DETAILS b/compilers/ghc/DETAILS new file mode 100644 index 00000000000..13a5e0e2658 --- /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 diff --git a/compilers/ghc/DETAILS.x86_64 b/compilers/ghc/DETAILS.x86_64 new file mode 100644 index 00000000000..13cd1d3925c --- /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 diff --git a/compilers/ghc/PRE_BUILD b/compilers/ghc/PRE_BUILD new file mode 100644 index 00000000000..e231f771785 --- /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