games/glbsp: Better icons and .desktop.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2021-10-08 16:48:30 -04:00 committed by Willy Sudiarto Raharjo
parent cc31d14ea9
commit 39ca421fbd
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
10 changed files with 55 additions and 27 deletions

View File

@ -1,5 +1,7 @@
glbsp (OpenGL node builder for Doom engines)
glBSP is a node builder specially designed for OpenGL ports of the
DOOM game engine. It adheres to the "GL-Nodes Specification", which
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.
@ -8,13 +10,13 @@ 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. 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.
Optional dependency: fltk. If you need the GUI (glBSPX), install fltk
before running this script. If you have fltk installed but don't want
glBSPX, export FLTK=no in the 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,
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!)

View File

@ -2,3 +2,8 @@ if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View File

@ -6,6 +6,11 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20211008 bkw: BUILD=2
# - include missing *.txt docs.
# - make fltk an optional dep.
# - include new-style icons.
# - add .desktop for nodeview.
# 20170621 bkw: fix build for -current (post-14.2)
# 20151126 bkw: fix build for -current (preparing for 14.2)
@ -13,7 +18,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=glbsp
VERSION=${VERSION:-2.24}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -25,9 +30,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -62,11 +64,8 @@ rm -rf $PRGNAM-$VERSION-source
tar xvf $CWD/${PRGNAM}_src_${SRCVER}.tar.gz
cd $PRGNAM-$VERSION-source
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# Use fltk-config --cflags and --ldflags instead of hardcoded values
patch -p1 < $CWD/fltkconf.diff
@ -90,7 +89,8 @@ make -f Makefile.unx install \
gzip -9 $PKG/usr/man/man1/$PRGNAM.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $PRGNAM.txt $PKG/usr/doc/$PRGNAM-$VERSION
rm INSTALL.txt
cp -a *.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
@ -105,24 +105,37 @@ fi
# /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
INCLUDES="does not include"
# Build with FLTK=no if have fltk but don't need the GUI.
if [ "${FLTK:-yes}" = "yes" ] && [ -x /usr/bin/fltk-config ]; then
INCLUDES="includes"
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 $CWD/nodeview.desktop > $PKG/usr/share/applications/nodeview.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
make -f Makefile.unx bin
cp nodeview $PKG/usr/bin
cat README.txt TODO.txt > $PKG/usr/doc/$PRGNAM-$VERSION/nodeview.txt
cd ..
# 20211008 bkw: icons were extracted from included OSX icons with
# libicns, like so:
# icns2png -x gui/glBSPX.app/Contents/Resources/glbspx.icns
# rm -f *x1.png
for i in 16 32 48 128; do
size=${i}x${i}
dir=$PKG/usr/share/icons/hicolor/$size/apps
mkdir -p $dir
cat $CWD/icons/glbspx_${size}x32.png > $dir/$PRGNAM.png
done
fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
sed "s,@INCLUDES@,$INCLUDES," < $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG

View File

@ -1,10 +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"
DOWNLOAD="https://downloads.sourceforge.net/project/glbsp/glbsp/2.24/glbsp_src_224.tar.gz"
MD5SUM="3f33320cd9cb58075e5e9d76f92940a5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="fltk"
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=NodeView
GenericName=Doom Node Viewer
Icon=glbsp
Exec=nodeview %f
Terminal=false
Categories=Game;ActionGame;

View File

@ -14,6 +14,6 @@ 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: This package @INCLUDES@ glBSPX and nodeview (fltk GUIs).
glbsp:
glbsp: