aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorMikko Varri <vmj@linuxbox.fi>2010-05-12 23:28:41 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 23:28:41 +0200
commit862e75d5898516d3475187016cfb213eb0e7cc3c (patch)
tree81edb38665ad184f756d4f72fe90021b094b7a62 /development
parent93facb5fa020e66ae489879782fc9e53109a3a52 (diff)
development/ghc: Added to 12.2 repository
Diffstat (limited to 'development')
-rw-r--r--development/ghc/README9
-rw-r--r--development/ghc/docs_ext-core_Makefile.patch13
-rw-r--r--development/ghc/ghc.SlackBuild78
-rw-r--r--development/ghc/ghc.info8
-rw-r--r--development/ghc/slack-desc19
5 files changed, 127 insertions, 0 deletions
diff --git a/development/ghc/README b/development/ghc/README
new file mode 100644
index 0000000000000..9765fd2b85b35
--- /dev/null
+++ b/development/ghc/README
@@ -0,0 +1,9 @@
+ghc (The Glasgow Haskell Compiler)
+
+GHC is a state-of-the-art, open source, compiler and interactive
+environment for the functional language Haskell.
+This is a complete build, including interactive system, profiling
+libraries and documentation.
+This is packaged from a generic i386 linux binary distribution.
+
+This requires libedit from SlackBuilds.org.
diff --git a/development/ghc/docs_ext-core_Makefile.patch b/development/ghc/docs_ext-core_Makefile.patch
new file mode 100644
index 0000000000000..d1e558f438c88
--- /dev/null
+++ b/development/ghc/docs_ext-core_Makefile.patch
@@ -0,0 +1,13 @@
+--- docs/ext-core/Makefile~ 2008-11-24 17:42:37.000000000 +0200
++++ docs/ext-core/Makefile 2008-11-24 17:43:09.000000000 +0200
+@@ -5,8 +5,8 @@
+ all: pdf
+
+ install-docs:
+- -mkdir $(docdir)/ext-core
+- cp core.pdf $(docdir)/ext-core/
++ -mkdir $(DESTDIR)/$(docdir)/ext-core
++ cp core.pdf $(DESTDIR)/$(docdir)/ext-core/
+ else
+ all:
+ install-docs:
diff --git a/development/ghc/ghc.SlackBuild b/development/ghc/ghc.SlackBuild
new file mode 100644
index 0000000000000..2aba3baa2c0b2
--- /dev/null
+++ b/development/ghc/ghc.SlackBuild
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Slackware build script for ghc
+
+# Written by Mikko Varri (vmj@linuxbox.fi)
+# Public domain.
+
+PRGNAM=ghc
+VERSION=${VERSION:-6.10.1}
+ARCH=${ARCH:-i386}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-$ARCH-unknown-linux.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr
+
+# docs/ext-core/Makefile is missing DESTDIR
+patch -p0 < $CWD/docs_ext-core_Makefile.patch
+
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Fix paths
+mv $PKG/usr/share/man $PKG/usr/man
+mv $PKG/usr/share/doc $PKG/usr/doc
+mv $PKG/usr/doc/ghc $PKG/usr/doc/ghc-$VERSION
+( cd $PKG/usr/doc ; ln -s ghc-$VERSION ghc )
+rmdir $PKG/usr/share 2>/dev/null # Should be empty now
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+cp -a ANNOUNCE INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/development/ghc/ghc.info b/development/ghc/ghc.info
new file mode 100644
index 0000000000000..c11431f58e9da
--- /dev/null
+++ b/development/ghc/ghc.info
@@ -0,0 +1,8 @@
+PRGNAM="ghc"
+VERSION="6.10.1"
+HOMEPAGE="http://haskell.org/ghc/"
+DOWNLOAD="http://haskell.org/ghc/dist/6.10.1/ghc-6.10.1-i386-unknown-linux.tar.bz2"
+MD5SUM="1895a81c7788604579b5bbd01a566303"
+MAINTAINER="Mikko Varri"
+EMAIL="vmj@linuxbox.fi"
+APPROVED="rworkman"
diff --git a/development/ghc/slack-desc b/development/ghc/slack-desc
new file mode 100644
index 0000000000000..9d7682a947321
--- /dev/null
+++ b/development/ghc/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler----------------------------------------------------------|
+ghc: ghc (The Glasgow Haskell Compiler)
+ghc:
+ghc: GHC is a state-of-the-art, open source, compiler and interactive
+ghc: environment for the functional language Haskell.
+ghc: This is a complete build, including interactive system, profiling
+ghc: libraries and documentation.
+ghc:
+ghc: This is packaged from a generic i386 linux binary distribution.
+ghc:
+ghc: http://haskell.org/ghc/
+ghc: