summaryrefslogtreecommitdiff
path: root/games/berusky2/berusky2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/berusky2/berusky2.SlackBuild')
-rw-r--r--games/berusky2/berusky2.SlackBuild25
1 files changed, 16 insertions, 9 deletions
diff --git a/games/berusky2/berusky2.SlackBuild b/games/berusky2/berusky2.SlackBuild
index 1eb6f1f0e3..5f74399217 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