diff options
Diffstat (limited to 'source/x/freeglut')
-rw-r--r-- | source/x/freeglut/RATIONALE | 14 | ||||
-rwxr-xr-x | source/x/freeglut/freeglut.SlackBuild | 97 | ||||
-rw-r--r-- | source/x/freeglut/slack-desc | 19 |
3 files changed, 130 insertions, 0 deletions
diff --git a/source/x/freeglut/RATIONALE b/source/x/freeglut/RATIONALE new file mode 100644 index 00000000..0e2c59ba --- /dev/null +++ b/source/x/freeglut/RATIONALE @@ -0,0 +1,14 @@ +From mesa-8.0 git log: + + commit 34a28ccbf459ed5710aafba5e7149e8291cb808c + Author: José Fonseca <jose.r.fonseca@gmail.com> + Date: Sat Jul 9 11:07:14 2011 +0100 + + glut: Remove GLUT source. + + Most distros ship freeglut, and most people don't care one vs the other, + and it hasn't been really maintained. + + So it is better to have Mesa GLUT be revisioned and built separately + from Mesa. + diff --git a/source/x/freeglut/freeglut.SlackBuild b/source/x/freeglut/freeglut.SlackBuild new file mode 100755 index 00000000..e209f82e --- /dev/null +++ b/source/x/freeglut/freeglut.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for freeglut + +# Copyright 2012 Robby Workman, Northport, Alabama, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=freeglut +VERSION=${VERSION:-2.8.0} +BUILD=${BUILD:-1} + +NUMJOBS=${NUMJOBS:-" -j7 "} + +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} +PKG=$TMP/package-$PRGNAM + +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 + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz || exit 1 +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" \ +./configure \ + --disable-static \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --build=$ARCH-slackware-linux || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +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/html +cp -a \ + AUTHORS COPYING* INSTALL NEWS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cp -a doc/*.{html,png} $PKG/usr/doc/$PRGNAM-$VERSION/html +find $PKG/usr/doc -type f -exec chmod 0644 {} \; + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/x/freeglut/slack-desc b/source/x/freeglut/slack-desc new file mode 100644 index 00000000..9fcda6f5 --- /dev/null +++ b/source/x/freeglut/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------------------------------------------------------| +freeglut: freeglut (alternative GLUT library) +freeglut: +freeglut: freeglut is a completely OpenSourced alternative to the OpenGL +freeglut: Utility Toolkit (GLUT) library. GLUT (and hence freeglut) allows +freeglut: the user to create and manage windows containing OpenGL contexts +freeglut: on a wide range of platforms and also read the mouse, keyboard, and +freeglut: joystick functions. +freeglut: +freeglut: Homepage: http://freeglut.sourceforge.net/ +freeglut: +freeglut: |