aboutsummaryrefslogtreecommitdiff
path: root/games/berusky2
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-22 22:18:16 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-23 20:10:26 +0700
commit6d76a41eca4d5ebc8de5b819972780d0811b2c76 (patch)
tree04266f06037e4aa95dbdd855b71e5c0ee4763e53 /games/berusky2
parent002efb57d228b3bae52b6c399ef6ab6812ab4803 (diff)
games/berusky2: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/berusky2')
-rw-r--r--games/berusky2/berusky2.SlackBuild25
-rw-r--r--games/berusky2/berusky2.desktop11
2 files changed, 27 insertions, 9 deletions
diff --git a/games/berusky2/berusky2.SlackBuild b/games/berusky2/berusky2.SlackBuild
index 1eb6f1f0e3c70..5f74399217a9c 100644
--- a/games/berusky2/berusky2.SlackBuild
+++ b/games/berusky2/berusky2.SlackBuild
@@ -22,6 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - fix build on 15.0.
+# - binary in /usr/games.
+# - fix .desktop.
+
+# Note: tried updating to v0.12, it builds but segfaults on startup.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=berusky2
@@ -38,9 +45,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
@@ -70,7 +74,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -79,12 +83,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# 20220222 bkw: ordered comparison of pointer and int. in later
+# versions of berusky2, the code in the body of this "if" always
+# executes, so "if(1)" does the same thing here.
+sed -i 's,if (iPos >= 0),if(1),' src/kofola/game_logic.cpp
+
autoreconf -fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --bindir=/usr/games \
--sysconfdir=/etc \
--localstatedir=/var \
--with-ini-file-global-dir=\"/usr/share/$PRGNAM\" \
@@ -92,13 +102,10 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
-
-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
+make install-strip DESTDIR=$PKG
mkdir -p $PKG/usr/share/applications
-install -D -m644 data/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
+install -oroot -groot -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps/
install -D -m644 data/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
diff --git a/games/berusky2/berusky2.desktop b/games/berusky2/berusky2.desktop
new file mode 100644
index 0000000000000..d748946fc9731
--- /dev/null
+++ b/games/berusky2/berusky2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Name=Berusky2
+Comment=Rescue the bugs!
+Exec=/usr/games/berusky2
+StartupNotify=false
+Terminal=false
+Type=Application
+Icon=/usr/share/pixmaps/berusky2.png
+Categories=Game;LogicGame;
+Keywords=logic;game;bugs;3D;camera;level;zooming;