mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
games/glbsp: Added (node builder for DOOM)
This commit is contained in:
parent
e33c641b63
commit
875ae3ca03
7 changed files with 214 additions and 0 deletions
21
games/glbsp/README
Normal file
21
games/glbsp/README
Normal file
|
@ -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!)
|
4
games/glbsp/doinst.sh
Normal file
4
games/glbsp/doinst.sh
Normal file
|
@ -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
|
||||
|
55
games/glbsp/dynamic_libglbsp.diff
Normal file
55
games/glbsp/dynamic_libglbsp.diff
Normal file
|
@ -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
|
||||
|
97
games/glbsp/glbsp.SlackBuild
Executable file
97
games/glbsp/glbsp.SlackBuild
Executable file
|
@ -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}
|
8
games/glbsp/glbsp.desktop
Normal file
8
games/glbsp/glbsp.desktop
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=glBSPX
|
||||
GenericName=Doom Node Builder
|
||||
Icon=glbsp
|
||||
Exec=glBSPX %f
|
||||
Terminal=false
|
||||
Categories=ActionGame;Utility;
|
10
games/glbsp/glbsp.info
Normal file
10
games/glbsp/glbsp.info
Normal file
|
@ -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"
|
19
games/glbsp/slack-desc
Normal file
19
games/glbsp/slack-desc
Normal file
|
@ -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:
|
Loading…
Reference in a new issue