diff options
author | B. Watson <yalhcru@gmail.com> | 2010-04-08 22:40:57 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-15 10:25:37 +0200 |
commit | 875ae3ca0352790a2d4ee699f4c6870e8e12f501 (patch) | |
tree | 5667e041a8f714e18ef4700b7f8b99889846e4f3 /games | |
parent | e33c641b630ab8d7150403793685f2eccee0ce60 (diff) |
games/glbsp: Added (node builder for DOOM)
Diffstat (limited to 'games')
-rw-r--r-- | games/glbsp/README | 21 | ||||
-rw-r--r-- | games/glbsp/doinst.sh | 4 | ||||
-rw-r--r-- | games/glbsp/dynamic_libglbsp.diff | 55 | ||||
-rwxr-xr-x | games/glbsp/glbsp.SlackBuild | 97 | ||||
-rw-r--r-- | games/glbsp/glbsp.desktop | 8 | ||||
-rw-r--r-- | games/glbsp/glbsp.info | 10 | ||||
-rw-r--r-- | games/glbsp/slack-desc | 19 |
7 files changed, 214 insertions, 0 deletions
diff --git a/games/glbsp/README b/games/glbsp/README new file mode 100644 index 0000000000000..b02b8cfd9e8bc --- /dev/null +++ b/games/glbsp/README @@ -0,0 +1,21 @@ +glBSP is a node builder specially designed for OpenGL ports of the DOOM +game engine. It adheres to the "GL-Nodes Specification", which means it +adds some new special lumps to a WAD file that makes it easy and fast +for an OpenGL DOOM engine to compute the polygons needed for drawing +the levels. + +There are many DOOM ports that understand the GL-Nodes which glBSP +creates, including: EDGE, the Doomsday engine (JDOOM), PrBoom, Legacy 2.0, +Vavoom, Doom3D and ZDoomGL. + +This script builds both the command-line (glbsp) and GUI (glBSPX) binaries +of glBSP. The GUI requires fltk (available at slackbuilds.org). If you +don't need the GUI and/or don't want to install fltk, "export OMIT_GUI=yes" +in the build script's environment. + +The package also includes a C header and a library (what would be known +as libglbsp-dev on other Linux distributions). By default, a dynamic +library is created. This works on x86 and x86_64 systems, but is untested +on others. If you have trouble with the shared library, "export STATIC=yes" +in the build script's environment (and please contact the maintainer of +this SlackBuild!) diff --git a/games/glbsp/doinst.sh b/games/glbsp/doinst.sh new file mode 100644 index 0000000000000..4e8ba7071dea7 --- /dev/null +++ b/games/glbsp/doinst.sh @@ -0,0 +1,4 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + diff --git a/games/glbsp/dynamic_libglbsp.diff b/games/glbsp/dynamic_libglbsp.diff new file mode 100644 index 0000000000000..69f68aaa4c48a --- /dev/null +++ b/games/glbsp/dynamic_libglbsp.diff @@ -0,0 +1,55 @@ +diff -Naur glbsp-2.24-source.orig/Makefile.unx glbsp-2.24-source/Makefile.unx +--- glbsp-2.24-source.orig/Makefile.unx 2007-07-25 23:14:34.000000000 -0400 ++++ glbsp-2.24-source/Makefile.unx 2010-03-01 08:37:23.000000000 -0500 +@@ -13,7 +13,11 @@ + # clean : removes targets and intermediate files + # + +-LIB_NAME=libglbsp.a ++libver=3.0.0 ++libmajorver=3 ++ ++LIB_SHORTNAME=libglbsp.so ++LIB_NAME=$(LIB_SHORTNAME).$(libver) + CMD_NAME=glbsp + GUI_NAME=glBSPX + DOC_NAME=glbsp.txt +@@ -24,13 +28,13 @@ + RANLIB=ranlib + STRIP=strip --strip-unneeded + +-BASE_FLAGS=-Wall -O2 -I./src -DUNIX -DINLINE_G=inline ++BASE_FLAGS=-Wall -O2 -fPIC -I./src -DUNIX -DINLINE_G=inline + + FLTK_DIR=./fltk-1.1.7 + + INSTALL_PREFIX=/usr/local + MAN_PREFIX=$(INSTALL_PREFIX)/share/man +- ++LIBDIR=$(INSTALL_PREFIX)/usr/lib + + # ----- GENERAL STUFF ---------------------------------------------- + +@@ -64,9 +68,7 @@ + $(CC) $(LIB_FLAGS) -c $^ -o $@ + + $(LIB_NAME): $(LIB_OBJS) +- $(AR) $@ $(LIB_OBJS) +- $(RANLIB) $@ +- ++ $(CC) $^ -o $@ -shared -fPIC -Wl,-soname,$(LIB_SHORTNAME).$(libmajorver) + + # ----- CMDLINE PROGRAM --------------------------------------------- + +@@ -88,6 +90,11 @@ + chmod 755 $(INSTALL_PREFIX)/bin/$(CMD_NAME) + cp glbsp.1 $(MAN_PREFIX)/man1/ + chmod 644 $(MAN_PREFIX)/man1/glbsp.1 ++ mkdir -p $(LIBDIR) ++ strip $(LIB_NAME) ++ install -m0755 $(LIB_NAME) $(LIBDIR) ++ ln -s $(LIB_NAME) $(LIBDIR)/$(LIB_SHORTNAME).$(libmajorver) ++ ln -s $(LIB_SHORTNAME).$(libmajorver) $(LIBDIR)/$(LIB_SHORTNAME) + + .PHONY: install + diff --git a/games/glbsp/glbsp.SlackBuild b/games/glbsp/glbsp.SlackBuild new file mode 100755 index 0000000000000..a9599ffe8ac0b --- /dev/null +++ b/games/glbsp/glbsp.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for glbsp + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=glbsp +VERSION=${VERSION:-2.24} +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" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +SRCVER=$( echo $VERSION | sed 's/\.//g' ) + +rm -rf $PKG +mkdir -p $TMP $PKG/usr/bin $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/man/man1 $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION-source +tar xvf $CWD/${PRGNAM}_src_${SRCVER}.tar.gz +cd $PRGNAM-$VERSION-source +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 {} \; + +# Upstream doesn't build a shared lib, but we will by default. +if [ "${STATIC:-no}" != "yes" ]; then + patch -p1 < $CWD/dynamic_libglbsp.diff +fi + +sed -i "s/-O2/$SLKCFLAGS/" Makefile.unx +make -f Makefile.unx +make -f Makefile.unx install \ + INSTALL_PREFIX=$PKG/usr \ + MAN_PREFIX=$PKG/usr/man \ + LIBDIR=$PKG/usr/lib$LIBDIRSUFFIX + +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $PRGNAM.txt $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/include/$PRGNAM +cat src/$PRGNAM.h > $PKG/usr/include/$PRGNAM/$PRGNAM.h + +if [ "${STATIC:-no}" = "yes" ]; then + cat lib$PRGNAM.a > $PKG/usr/lib$LIBDIRSUFFIX/lib$PRGNAM.a +fi + +# I don't know whether apps including this header normally #include +# <glbsp.h> or <glbsp/glbsp.h>. The Debian package has both (with +# /usr/include/glbsp.h as a symlink), I will do likewise. +( cd $PKG/usr/include ; ln -s $PRGNAM/$PRGNAM.h $PRGNAM.h ) || exit 1 + +# Build with OMIT_GUI=yes if you don't need the GUI (otherwise, fltk is +# a build dep). +if [ "${OMIT_GUI:-no}" = "no" ]; then + make -f Makefile.unx glBSPX + cp glBSPX $PKG/usr/bin + mkdir -p $PKG/usr/share/pixmaps $PKG/usr/share/applications + cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + cat gui/icon.xpm > $PKG/usr/share/pixmaps/$PRGNAM.xpm + cd nodeview + sed -i "s/-O -g3/$SLKCFLAGS/" Makefile.unx + make -f Makefile.unx + cp nodeview $PKG/usr/bin + cat README.txt TODO.txt > $PKG/usr/doc/$PRGNAM-$VERSION/nodeview.txt + cd .. +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/glbsp/glbsp.desktop b/games/glbsp/glbsp.desktop new file mode 100644 index 0000000000000..a57430281c14d --- /dev/null +++ b/games/glbsp/glbsp.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=glBSPX +GenericName=Doom Node Builder +Icon=glbsp +Exec=glBSPX %f +Terminal=false +Categories=ActionGame;Utility; diff --git a/games/glbsp/glbsp.info b/games/glbsp/glbsp.info new file mode 100644 index 0000000000000..8c552547863d4 --- /dev/null +++ b/games/glbsp/glbsp.info @@ -0,0 +1,10 @@ +PRGNAM="glbsp" +VERSION="2.24" +HOMEPAGE="http://glbsp.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/project/glbsp/glbsp/2.24/glbsp_src_224.tar.gz" +MD5SUM="3f33320cd9cb58075e5e9d76f92940a5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" +APPROVED="rworkman" diff --git a/games/glbsp/slack-desc b/games/glbsp/slack-desc new file mode 100644 index 0000000000000..4cffd89692d41 --- /dev/null +++ b/games/glbsp/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------------------------------------------------------| +glbsp: glBSP is a node builder specially designed for OpenGL ports of +glbsp: the DOOM game engine. It adheres to the "GL-Nodes Specification", +glbsp: which means it adds some new special lumps to a WAD file that makes +glbsp: it easy and fast for an OpenGL DOOM engine to compute the polygons +glbsp: needed for drawing the levels. +glbsp: +glbsp: There are many DOOM ports that understand the GL-Nodes which glBSP +glbsp: creates, including: EDGE, the Doomsday engine (JDOOM), PrBoom, Legacy +glbsp: 2.0, Vavoom, Doom3D and ZDoomGL. +glbsp: +glbsp: |