diff options
Diffstat (limited to 'haskell')
-rw-r--r-- | haskell/hscolour/README | 10 | ||||
-rw-r--r-- | haskell/hscolour/hscolour.SlackBuild | 89 | ||||
-rw-r--r-- | haskell/hscolour/hscolour.info | 10 | ||||
-rw-r--r-- | haskell/hscolour/slack-desc | 19 |
4 files changed, 128 insertions, 0 deletions
diff --git a/haskell/hscolour/README b/haskell/hscolour/README new file mode 100644 index 0000000000000..2e63f23d09c93 --- /dev/null +++ b/haskell/hscolour/README @@ -0,0 +1,10 @@ +HsColour is a small Haskell script to colourise Haskell code. +It currently has six output formats: ANSI terminal codes +(optionally XTerm-256colour codes), HTML 3.2 with font tags, +HTML 4.01 with CSS, HTML 4.01 with CSS and mouseover annotations, +XHTML 1.0 with inline CSS styling, LaTeX, and mIRC chat codes. + +HsColour is an optional build requirement for haskell-platform +where it is used for documentation generation. + +This requires ghc. diff --git a/haskell/hscolour/hscolour.SlackBuild b/haskell/hscolour/hscolour.SlackBuild new file mode 100644 index 0000000000000..dfeca695b40ff --- /dev/null +++ b/haskell/hscolour/hscolour.SlackBuild @@ -0,0 +1,89 @@ +#!/bin/sh + +# Slackware build script for hscolour +# +# Written by Christoph Willing <c.willing @ uq.edu.au> + +PRGNAM=hscolour +VERSION=${VERSION:-1.20.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) 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 -eu + +GHC_VERSION=$(ghc --numeric-version) + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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" \ +runghc Setup configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --libsubdir=ghc-${GHC_VERSION}/$PRGNAM-$VERSION \ + --enable-shared \ + --enable-library-profiling + +runghc Setup build +runghc Setup haddock +runghc Setup copy --destdir=$PKG + +PKGCONFD=/usr/lib${LIBDIRSUFFIX}/ghc-${GHC_VERSION}/package.conf.d +mkdir -p $PKG/$PKGCONFD +runghc Setup register --gen-pkg-config +PKGID=$( grep -E "^id: " $PRGNAM-$VERSION.conf | cut -d" " -f2 ) +mv $PRGNAM-$VERSION.conf $PKG/$PKGCONFD/$PKGID.conf + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENCE-GPL $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.${PKGTYPE:-tgz} diff --git a/haskell/hscolour/hscolour.info b/haskell/hscolour/hscolour.info new file mode 100644 index 0000000000000..de958ffee45d3 --- /dev/null +++ b/haskell/hscolour/hscolour.info @@ -0,0 +1,10 @@ +PRGNAM="hscolour" +VERSION="1.20.2" +HOMEPAGE="http://hackage.haskell.org/package/hscolour/" +DOWNLOAD="http://hackage.haskell.org/packages/archive/hscolour/1.20.2/hscolour-1.20.2.tar.gz" +MD5SUM="8e87d0e9c4cb930a31f364baf2e72ebc" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Christoph Willing" +EMAIL="c.willing@uq.edu.au" +APPROVED="rworkman" diff --git a/haskell/hscolour/slack-desc b/haskell/hscolour/slack-desc new file mode 100644 index 0000000000000..d5f77e5599154 --- /dev/null +++ b/haskell/hscolour/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------------------------------------------------------| +hscolour: hscolour (Haskell code colouriser) +hscolour: +hscolour: hscolour is a small Haskell script to colourise Haskell code. +hscolour: It currently has six output formats: ANSI terminal codes (optionally +hscolour: XTerm-256colour codes), HTML 3.2 with font tags, HTML 4.01 with CSS, +hscolour: HTML 4.01 with CSS and mouseover annotations, XHTML 1.0 with inline +hscolour: CSS styling, LaTeX, and mIRC chat codes. +hscolour: +hscolour: +hscolour: +hscolour: |