summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradaptr <jeroen@adaptr.nl>2010-12-17 22:15:53 -0200
committerRobby Workman <rworkman@slackbuilds.org>2010-12-20 22:44:01 -0600
commitcd5b3e7101e064b071bec805c5e376af682c0540 (patch)
tree0d7b80b87e7f1fa5e390689342299b7086808f59
parent7499f302724902ecdb22bbc5188380e4912ebb47 (diff)
downloadslackbuilds-cd5b3e7101e064b071bec805c5e376af682c0540.tar.gz
development/camlp5: Added (ocaml preprocessor and pretty-printer)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r--development/camlp5/README8
-rw-r--r--development/camlp5/camlp5.SlackBuild92
-rw-r--r--development/camlp5/camlp5.info10
-rw-r--r--development/camlp5/slack-desc19
4 files changed, 129 insertions, 0 deletions
diff --git a/development/camlp5/README b/development/camlp5/README
new file mode 100644
index 0000000000..66d38227ef
--- /dev/null
+++ b/development/camlp5/README
@@ -0,0 +1,8 @@
+Camlp5 is the successor to camlp4 (included in the ocaml SlackBuild)
+and offers pretty-printing and preprocessing for the ocaml language.
+
+The source can be compiled in two "modes": transitional or strict.
+This slackbuild compiles it in the default "transitional" mode, to
+maintain compatibility with camlp4.
+
+This requires ocaml.
diff --git a/development/camlp5/camlp5.SlackBuild b/development/camlp5/camlp5.SlackBuild
new file mode 100644
index 0000000000..c1ba12a559
--- /dev/null
+++ b/development/camlp5/camlp5.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for camlp5
+
+# Written by adaptr (jeroen@adaptr.nl)
+
+PRGNAM=camlp5
+VERSION=${VERSION:-6.01}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
+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 {} \;
+
+## libdir must be under the ocaml install dir!
+./configure \
+ --prefix /usr \
+ --libdir /usr/lib${LIBDIRSUFFIX}/ocaml
+
+# Compile the application and install it into the $PKG directory
+make world.opt
+make install DESTDIR=$PKG
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+## Copy ancillary documents
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES INSTALL LICENSE MODE README $PKG/usr/doc/$PRGNAM-$VERSION/
+
+## Build TeX, PS, PDF, TeXinfo and HTML Documentation
+cd doc/htmlp
+
+# these helpers are chatty; suppress output
+make all tex pdf ps info 2> /dev/null
+cp -a camlp5.dvi camlp5.ps camlp5.pdf camlp5.tex $PKG/usr/doc/$PRGNAM-$VERSION/
+
+mkdir -p $PKG/usr/info
+cp -a camlp5.info* $PKG/usr/info/
+gzip -9 $PKG/usr/info/*.info*
+
+cd ..
+cp -a html $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
+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.${PKGTYPE:-tgz}
diff --git a/development/camlp5/camlp5.info b/development/camlp5/camlp5.info
new file mode 100644
index 0000000000..97d2776ec2
--- /dev/null
+++ b/development/camlp5/camlp5.info
@@ -0,0 +1,10 @@
+PRGNAM="camlp5"
+VERSION="6.01"
+HOMEPAGE="http://pauillac.inria.fr/~ddr/camlp5/"
+DOWNLOAD="http://pauillac.inria.fr/~ddr/camlp5/distrib/src/camlp5-6.01.tgz"
+MD5SUM="9afd1eea5f18c568d08cf2335094a905"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="adaptr"
+EMAIL="jeroen@adaptr.nl"
+APPROVED="Niels Horn"
diff --git a/development/camlp5/slack-desc b/development/camlp5/slack-desc
new file mode 100644
index 0000000000..0847a096aa
--- /dev/null
+++ b/development/camlp5/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+camlp5: camlp5 (an ocaml preprocessor and pretty-printer)
+camlp5:
+camlp5: Camlp5 offers pretty-printing and preprocessing for the ocaml
+camlp5: language.
+camlp5:
+camlp5: Homepage: http://pauillac.inria.fr/~ddr/camlp5/
+camlp5:
+camlp5:
+camlp5:
+camlp5:
+camlp5: