From 2593b67533016d8b76481c83caa6bae4c2467add Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 26 Feb 2013 22:56:04 +0100 Subject: [PATCH] add nqp --- d/nqp/nqp.SlackBuild | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 d/nqp/nqp.SlackBuild diff --git a/d/nqp/nqp.SlackBuild b/d/nqp/nqp.SlackBuild new file mode 100755 index 00000000..60cc1726 --- /dev/null +++ b/d/nqp/nqp.SlackBuild @@ -0,0 +1,80 @@ +#!/bin/sh + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +BRANCH=trunk +VERSION=$BRANCH$(date +%Y.%m.%d_%H.%M) +BUILD=1 + +ARCH=$(uname -m) + +REPOSITORIES=/home/installs/SlackBuilds/repositories + +TAG=cyco +TMP=/tmp/$TAG +PKG=$TMP/pkg-$PRGNAM +OUTPUT=/tmp + +PREFIX=/usr + +# cleaning +rm -fr $PKG + +# get sources +[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES +( cd $REPOSITORIES + if [ -e $REPOSITORIES/$PRGNAM ] ; then + ( cd $REPOSITORIES/$PRGNAM + git pull + ) + else + git clone http://github.com/perl6/nqp.git nqp + fi +) + +mkdir -p $TMP +( cd $TMP + rm -fr $PRGNAM-$VERSION && cp -R $REPOSITORIES/$PRGNAM $PRGNAM-$VERSION + ( cd $PRGNAM-$VERSION + perl Configure.pl \ + --prefix=$PREFIX \ + --libdir=$PREFIX/lib$(echo $ARCH | grep -o 64) \ + --mandir=$PREFIX/man \ + --infodir=$PREFIX/info + make + make DESTDIR=$PKG install + mkdir -p $PKG/$PREFIX/doc/ + ( cd $PKG/$PREFIX/doc + ln -s ../share/doc/parrot $PRGNAM-$VERSION + ) + ) +) + +( cd $PKG + mkdir -p install + cat < install/slack-desc +$PRGNAM: $PRGNAM (Not Quite Perl) +$PRGNAM: +$PRGNAM: a lightweight Perl 6-like environment for virtual machines. The key feature +$PRGNAM: of NQP is that it's designed to be a very small environment (as compared with, +$PRGNAM: say, perl6 or Rakudo) and is focused on being a high-level way to create +$PRGNAM: compilers and libraries for virtual machines (such as the Parrot Virtual +$PRGNAM: Machine [1]). Unlike a full-fledged implementation of Perl 6, NQP strives to +$PRGNAM: have as small a runtime footprint as it can, while still providing a Perl 6 +$PRGNAM: object model and regular expression engine for the virtual machine. +$PRGNAM: +$PRGNAM: https://github.com/perl6/nqp +EOF + + chown -R root:root * + + [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; + + ( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + ) + + makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz +)