aboutsummaryrefslogtreecommitdiff
path: root/games/SLADE/SLADE.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/SLADE/SLADE.SlackBuild')
-rw-r--r--games/SLADE/SLADE.SlackBuild56
1 files changed, 39 insertions, 17 deletions
diff --git a/games/SLADE/SLADE.SlackBuild b/games/SLADE/SLADE.SlackBuild
index 35c37ca39c808..1108a86711c3d 100644
--- a/games/SLADE/SLADE.SlackBuild
+++ b/games/SLADE/SLADE.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for SLADE
# Copyright 2015 Dugan Chen Canada
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200416 bkw:
+# - take over maintenance
+# - update for v3.1.11
+# - binary in /usr/games
+# - install icon in right place, symlink to old location
+# - get rid of our .desktop file (upstream provides one now)
+
PRGNAM=SLADE
-VERSION=${VERSION:-3.1.1.5}
+VERSION=${VERSION:-3.1.11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,37 +68,51 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
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 640 -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 {} \+
+
+# 20200416 bkw: game binaries do not belong in /usr/bin.
+sed -i 's,\<bin\>,games,' src/CMakeLists.txt
-mkdir -p build
+# 20200416 bkw: don't depend on unstable /usr/bin/wx-config symlink.
+# stupid thing insists on searching for wx-config in PATH, instead of
+# allowing us to explicitly give a full path and name for the script, so:
+WXCONF=/usr/lib$LIBDIRSUFFIX/wx/config/gtk2-unicode-3.0
+WXTMP=$( pwd )/wxtmp
+mkdir -p $WXTMP
+ln -s $WXCONF $WXTMP/wx-config
+
+# 20200416 bkw: our wxGTK3 package doesn't include wxWebView, and it's built
+# with gtk+-2, not 3. This stuff isn't autodetected so we help it along.
cd build
cmake \
+ -DWITH_WXPATH=$WXTMP \
+ -DNO_WEBVIEW=ON \
+ -DWX_GTK3=OFF \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
-mkdir -p $PKG/usr/share/applications
-cp $CWD/SLADE.desktop $PKG/usr/share/applications
-
-mkdir -p $PKG/usr/share/pixmaps
-convert dist/res/slade.ico[3] $PKG/usr/share/pixmaps/${PRGNAM}.ico
+mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps \
+ $PKG/usr/share/pixmaps
-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
+# 20200416 bkw: don't want to hardcode the icon name here.
+cd $PKG/usr/share/icons
+ icon="$( /bin/ls *$PRGNAM.png | head -1 )"
+ mv $icon hicolor/128x128/apps
+ ln -s hicolor/128x128/apps/$icon .
+ ln -s ../icons/hicolor/128x128/apps/$icon ../pixmaps/$PRGNAM.png
+cd -
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README* *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README* gpl-2.0.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install