summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2021-10-08 22:48:30 +0200
committer Willy Sudiarto Raharjo2021-10-12 19:52:39 +0200
commit39ca421fbd84691d04b3e843777d6f943fad6e9e (patch)
tree22a17b8b46ee05ae91bb7d57f58848a79579dc09
parentcc31d14ea9e2c1ae9e4416f930e7644a655b2b9b (diff)
downloadslackbuilds-39ca421fbd84691d04b3e843777d6f943fad6e9e.tar.gz
games/glbsp: Better icons and .desktop.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/glbsp/README16
-rw-r--r--games/glbsp/doinst.sh5
-rw-r--r--games/glbsp/glbsp.SlackBuild43
-rw-r--r--games/glbsp/glbsp.info4
-rw-r--r--games/glbsp/icons/glbspx_128x128x32.pngbin0 -> 13370 bytes
-rw-r--r--games/glbsp/icons/glbspx_16x16x32.pngbin0 -> 756 bytes
-rw-r--r--games/glbsp/icons/glbspx_32x32x32.pngbin0 -> 2053 bytes
-rw-r--r--games/glbsp/icons/glbspx_48x48x32.pngbin0 -> 3288 bytes
-rw-r--r--games/glbsp/nodeview.desktop8
-rw-r--r--games/glbsp/slack-desc6
10 files changed, 55 insertions, 27 deletions
diff --git a/games/glbsp/README b/games/glbsp/README
index bacd32a642..d132e484ad 100644
--- a/games/glbsp/README
+++ b/games/glbsp/README
@@ -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!)
diff --git a/games/glbsp/doinst.sh b/games/glbsp/doinst.sh
index 4e8ba7071d..3e5691a052 100644
--- a/games/glbsp/doinst.sh
+++ b/games/glbsp/doinst.sh
@@ -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
diff --git a/games/glbsp/glbsp.SlackBuild b/games/glbsp/glbsp.SlackBuild
index 5b4526c493..8ff894c6c7 100644
--- a/games/glbsp/glbsp.SlackBuild
+++ b/games/glbsp/glbsp.SlackBuild
@@ -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
diff --git a/games/glbsp/glbsp.info b/games/glbsp/glbsp.info
index 4a25bbe30b..6fb4262c42 100644
--- a/games/glbsp/glbsp.info
+++ b/games/glbsp/glbsp.info
@@ -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"
diff --git a/games/glbsp/icons/glbspx_128x128x32.png b/games/glbsp/icons/glbspx_128x128x32.png
new file mode 100644
index 0000000000..b4bb3c3c76
--- /dev/null
+++ b/games/glbsp/icons/glbspx_128x128x32.png
Binary files differ
diff --git a/games/glbsp/icons/glbspx_16x16x32.png b/games/glbsp/icons/glbspx_16x16x32.png
new file mode 100644
index 0000000000..54494870b6
--- /dev/null
+++ b/games/glbsp/icons/glbspx_16x16x32.png
Binary files differ
diff --git a/games/glbsp/icons/glbspx_32x32x32.png b/games/glbsp/icons/glbspx_32x32x32.png
new file mode 100644
index 0000000000..cbd43028a8
--- /dev/null
+++ b/games/glbsp/icons/glbspx_32x32x32.png
Binary files differ
diff --git a/games/glbsp/icons/glbspx_48x48x32.png b/games/glbsp/icons/glbspx_48x48x32.png
new file mode 100644
index 0000000000..81267528d1
--- /dev/null
+++ b/games/glbsp/icons/glbspx_48x48x32.png
Binary files differ
diff --git a/games/glbsp/nodeview.desktop b/games/glbsp/nodeview.desktop
new file mode 100644
index 0000000000..0561b44e03
--- /dev/null
+++ b/games/glbsp/nodeview.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=NodeView
+GenericName=Doom Node Viewer
+Icon=glbsp
+Exec=nodeview %f
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/games/glbsp/slack-desc b/games/glbsp/slack-desc
index ed389edffa..27810a6597 100644
--- a/games/glbsp/slack-desc
+++ b/games/glbsp/slack-desc
@@ -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: