diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/glew/README | 4 | ||||
-rw-r--r-- | libraries/glew/glew.SlackBuild | 60 | ||||
-rw-r--r-- | libraries/glew/glew.info | 8 | ||||
-rw-r--r-- | libraries/glew/glew_glapientry.patch | 10 | ||||
-rw-r--r-- | libraries/glew/slack-desc | 19 |
5 files changed, 101 insertions, 0 deletions
diff --git a/libraries/glew/README b/libraries/glew/README new file mode 100644 index 0000000000..0b8070adee --- /dev/null +++ b/libraries/glew/README @@ -0,0 +1,4 @@ +The OpenGL Extension Wrangler Library (GLEW) is a cross-platform +open-source C/C++ extension loading library. GLEW provides efficient +run-time mechanisms for determining which OpenGL extensions are +supported on the target platform. diff --git a/libraries/glew/glew.SlackBuild b/libraries/glew/glew.SlackBuild new file mode 100644 index 0000000000..d14be26f22 --- /dev/null +++ b/libraries/glew/glew.SlackBuild @@ -0,0 +1,60 @@ +#!/bin/sh + +# Slackware build script for glew +# Written by David Spencer <nobbutl@yahoo.co.uk> +# This script is dedicated to the public domain + +PRGNAM=glew +VERSION=1.5.0 +ARCH=${ARCH:-i486} +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" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION-src.tgz +cd $PRGNAM +chown -R root:root . +chmod -R u+w,go+r-w,a-s . +chmod 0755 doc ; chmod a-x doc/* + +# This patch resolves a clash between Glew and Slackware 12's Mesa Glut +# (unpatched glew.h undefs a macro GLAPIENTRY defined by Mesa Glut's glu.h). +patch -p1 < $CWD/glew_glapientry.patch + +make OPT="$SLKCFLAGS" +make install GLEW_DEST=$PKG/usr + +( 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 +) + +# Kill the static library; we shouldn't need it. +rm $PKG/usr/lib/libGLEW.a + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE.txt README.txt doc/ \ + $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/libraries/glew/glew.info b/libraries/glew/glew.info new file mode 100644 index 0000000000..e99b558a78 --- /dev/null +++ b/libraries/glew/glew.info @@ -0,0 +1,8 @@ +PRGNAM="glew" +VERSION="1.5.0" +HOMEPAGE="http://glew.sourceforge.net/" +DOWNLOAD="http://download.sourceforge.net/glew/glew-1.5.0-src.tgz" +MD5SUM="3fececda0151b060c08ffd8a12892741" +MAINTAINER="David Spencer" +EMAIL="nobbutl@yahoo.co.uk" +APPROVED="rworkman,Erik Hanson" diff --git a/libraries/glew/glew_glapientry.patch b/libraries/glew/glew_glapientry.patch new file mode 100644 index 0000000000..95e21f6017 --- /dev/null +++ b/libraries/glew/glew_glapientry.patch @@ -0,0 +1,10 @@ +--- glew-1.5.0/include/GL/glew.h 2007-12-28 03:09:49.000000000 +0000 ++++ glew-patched/include/GL/glew.h 2008-01-26 11:45:27.000000000 +0000 +@@ -10764,7 +10764,6 @@ + #ifdef GLEW_APIENTRY_DEFINED + #undef GLEW_APIENTRY_DEFINED + #undef APIENTRY +-#undef GLAPIENTRY + #endif + + #ifdef GLEW_CALLBACK_DEFINED diff --git a/libraries/glew/slack-desc b/libraries/glew/slack-desc new file mode 100644 index 0000000000..5adb63318d --- /dev/null +++ b/libraries/glew/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------------------------------------------------------| +glew: glew (the OpenGL Extension Wrangler Library) +glew: +glew: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform +glew: open-source C/C++ extension loading library. GLEW provides efficient +glew: run-time mechanisms for determining which OpenGL extensions are +glew: supported on the target platform. +glew: +glew: Homepage: http://glew.sourceforge.net/ +glew: +glew: +glew: |