diff options
author | hollywoodb <hollywoodb@fastmail.fm> | 2010-05-11 14:05:53 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 14:05:53 +0200 |
commit | a1ee41f337e2fd182047b822c2ff4a4943b2417c (patch) | |
tree | 6ef230b67a2dbeb09fd5e0d2a2fa6ee541d288f4 | |
parent | 529ccd9e1f5ab98bfca9c2a48347333c158d06ba (diff) | |
download | slackbuilds-a1ee41f337e2fd182047b822c2ff4a4943b2417c.tar.gz |
development/swig: Initial import
-rw-r--r-- | development/swig/README | 17 | ||||
-rw-r--r-- | development/swig/slack-desc | 11 | ||||
-rw-r--r-- | development/swig/swig.SlackBuild | 69 | ||||
-rw-r--r-- | development/swig/swig.info | 8 |
4 files changed, 105 insertions, 0 deletions
diff --git a/development/swig/README b/development/swig/README new file mode 100644 index 0000000000..61c0607421 --- /dev/null +++ b/development/swig/README @@ -0,0 +1,17 @@ +SWIG is a software development tool that connects programs written +in C and C++ with a variety of high-level programming languages. + +SWIG is used with different types of languages including common scripting +languages such as Perl, PHP, Python, Tcl, Ruby and PHP. The list of supported +languages also includes non-scripting languages such as C#, Common Lisp +(CLISP, Allegro CL, CFFI, UFFI), Java, Modula-3 and OCAML. Also several +interpreted and compiled Scheme implementations (Guile, MzScheme, Chicken) are +supported. SWIG is most commonly used to create high-level interpreted or +compiled programming environments, user interfaces, and as a tool for testing +and prototyping C/C++ software. SWIG can also export its parse tree in the +form of XML and Lisp s-expressions. + +swig may build with support for the following: + Tcl, Python, Perl, Java, GCJ, Guile, MzScheme, Ruby, PHP4, ocaml, Pike + Chicken (csc/csi), C#, Lua, Allegro CL, clisp, R + diff --git a/development/swig/slack-desc b/development/swig/slack-desc new file mode 100644 index 0000000000..c3abcedb35 --- /dev/null +++ b/development/swig/slack-desc @@ -0,0 +1,11 @@ +swig: swig (interface compiler to connect C/C++ with scripting languages) +swig: +swig: SWIG is an interface compiler that connects programs written in C and +swig: C++ with scripting languages such as Perl, Python, Ruby, and Tcl. It +swig: works by taking the declarations found in C/C++ header files and using +swig: them to generate the wrapper code that scripting languages need to +swig: access the underlying C/C++ code. In addition, SWIG provides a variety +swig: of customization features that let you tailor the wrapping process to +swig: suit your application. +swig: +swig: diff --git a/development/swig/swig.SlackBuild b/development/swig/swig.SlackBuild new file mode 100644 index 0000000000..508e44b7aa --- /dev/null +++ b/development/swig/swig.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh + +## Written by hollywoodb (hollywoodb@fastmail.fm) + +## Feel free to use, modify, redistribute this script. +## If you make changes please modify the "Written by" +## so that I don't recieve emails about a script I +## did not write. Thanks. + +# Modified by the SlackBuilds.org project + +if [ "$(id -u)" != "0" ]; then + echo "This script must be run as root!" + exit +fi + +NAME=swig +VERSION=1.3.31 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=`pwd` +TMP=${TMP:-/tmp/SBo} +PKG=${PKG:-$TMP/package-$NAME} +OUTPUT=${OUTPUT:-/tmp} + +rm -rf $PKG $TMP/$NAME-$VERSION +mkdir -p $TMP $PKG $OUTPUT +cd $TMP || exit 1 +tar -zxvf $CWD/$NAME-$VERSION.tar.gz || exit 1 +cd $NAME-$VERSION || exit 1 + +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + || exit 1 + +make || exit 1 +make install DESTDIR=$PKG || exit 1 + +find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +mkdir -p $PKG/usr/doc/$NAME-$VERSION +cp -a ANNOUNCE CHANGES* FUTURE INSTALL LICENSE NEW README TODO Examples/ \ + Doc/Manual Doc/Devel $PKG/usr/doc/$NAME-$VERSION +cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild +# Fix permissions and wipe the pdf bloat +find $PKG/usr/doc/$NAME-$VERSION -type f -exec chmod 0644 {} \; +find $PKG/usr/doc/$NAME-$VERSION -name "*.pdf" -exec rm {} \; + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$NAME-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/development/swig/swig.info b/development/swig/swig.info new file mode 100644 index 0000000000..dedd29657a --- /dev/null +++ b/development/swig/swig.info @@ -0,0 +1,8 @@ +PRGNAM="swig" +VERSION="1.3.31" +HOMEPAGE="http://www.swig.org/" +DOWNLOAD="http://dl.sourceforge.net/swig/swig-1.3.31.tar.gz" +MD5SUM="4a0bae63e3713e89b26db7209b6a7e05" +MAINTAINER="hollywoodb" +EMAIL="hollywoodb@fastmail.fm" +APPROVED="robw810,BP{k}" |