summaryrefslogtreecommitdiffstats
path: root/games/hedgewars
diff options
context:
space:
mode:
Diffstat (limited to 'games/hedgewars')
-rw-r--r--games/hedgewars/README4
-rw-r--r--games/hedgewars/doinst.sh6
-rw-r--r--games/hedgewars/fpc-3.2.0.patch20
-rw-r--r--games/hedgewars/hedgewars.SlackBuild80
-rw-r--r--games/hedgewars/hedgewars.info12
-rw-r--r--games/hedgewars/icons/128.pngbin0 -> 14705 bytes
-rw-r--r--games/hedgewars/icons/16.pngbin0 -> 1035 bytes
-rw-r--r--games/hedgewars/icons/22.pngbin0 -> 1713 bytes
-rw-r--r--games/hedgewars/icons/256.pngbin0 -> 34358 bytes
-rw-r--r--games/hedgewars/icons/32.pngbin0 -> 2714 bytes
-rw-r--r--games/hedgewars/icons/48.pngbin0 -> 4293 bytes
-rw-r--r--games/hedgewars/icons/64.pngbin0 -> 6172 bytes
-rw-r--r--games/hedgewars/include.qpainterpath.diff21
13 files changed, 117 insertions, 26 deletions
diff --git a/games/hedgewars/README b/games/hedgewars/README
index d32c07bf3f..6d54b8b29f 100644
--- a/games/hedgewars/README
+++ b/games/hedgewars/README
@@ -10,3 +10,7 @@ excessive thinking or moving.
This SlackBuild packages only the game itself. If you want to compile
the server, you will need to provide additional dependencies.
Please, refer to the documentation in the source tarball.
+
+Note for 32-bit users: on x86, ignore the fpc in the .info file's
+REQUIRES. For 32-bit builds, hedgewars requires ghc, not fpc. Yes,
+this is weird, but it's true.
diff --git a/games/hedgewars/doinst.sh b/games/hedgewars/doinst.sh
index 5fb28930db..65c7e2eeb9 100644
--- a/games/hedgewars/doinst.sh
+++ b/games/hedgewars/doinst.sh
@@ -1,3 +1,9 @@
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 -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/hedgewars/fpc-3.2.0.patch b/games/hedgewars/fpc-3.2.0.patch
new file mode 100644
index 0000000000..042997cf3c
--- /dev/null
+++ b/games/hedgewars/fpc-3.2.0.patch
@@ -0,0 +1,20 @@
+Description: Fix/Workaround build failure with newer fpc 3.2.0
+Origin: http://hg.hedgewars.org/hedgewars/rev/6832dab555ae
+Bug-Debian: https://bugs.debian.org/968125
+Last-Update: 2020-08-10
+
+--- a/hedgewars/uWorld.pas Sun Aug 09 14:43:02 2020 +0200
++++ b/hedgewars/uWorld.pas Mon Aug 10 12:56:53 2020 +0300
+@@ -1129,8 +1129,8 @@
+ procedure ShiftWorld(Dir: LongInt); inline;
+ begin
+ preShiftWorldDx:= WorldDx;
+- WorldDx:= WorldDx + LongInt(Dir * LongInt(playWidth));
+-
++ Dir := Dir * LongInt(playWidth);
++ WorldDx:= WorldDx + Dir;
+ end;
+
+ procedure UnshiftWorld(); inline;
+
+
diff --git a/games/hedgewars/hedgewars.SlackBuild b/games/hedgewars/hedgewars.SlackBuild
index 6d848bad1d..5a004ef5f1 100644
--- a/games/hedgewars/hedgewars.SlackBuild
+++ b/games/hedgewars/hedgewars.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for Hedgewars.
-# Rubén Llorente <porting@use.startmail.com>
+# Original author: Rubén Llorente
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,29 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230902 bkw: update for v1.0.2.
+
+# 20230808 bkw: BUILD=2
+# - take over maintenance.
+# - binary in /usr/games.
+# - strip bin and shared lib.
+# - fix permission on appdata.
+# - include prescaled icons.
+
+# 20220320 bkw: Modified by SlackBuilds.org: fix 32-bit build.
+# The deps are different on 32-bit and 64-bit; see README.
+
+# 20210905 bkw: Modified by SlackBuilds.org:
+# - add fpc-3.2.0.patch for recent fpc upgrade
+# - add include.qpainterpath.diff to fix compile on -current
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=hedgewars
-VERSION=${VERSION:-1.0.0}
+VERSION=${VERSION:-1.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +54,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -63,11 +86,10 @@ rm -rf $PRGNAM-src-$VERSION
tar xvjf $CWD/$PRGNAM-src-$VERSION.tar.bz2
cd $PRGNAM-src-$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 . -type f -a -exec chmod 644 {} + \
+ -o -type d -a -exec chmod 755 {} +
+
+SLKCFLAGS+=" -fcommon"
mkdir -p build
cd build
@@ -76,28 +98,46 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DNOVIDEOREC=1 \
- -DPHYSFS_SYSTEM=off \
- -DNOSERVER=1 \
+ -DNOVIDEOREC=ON \
+ -DNOSERVER=ON \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
+# It's a game, so:
+mv $PKG/usr/bin $PKG/usr/games
+
+# Cleanup on aisle 6:
+strip $PKG/usr/games/*
+sed -i '/^Exec/s,=,=/usr/games/,' $PKG/usr/share/applications/$PRGNAM.desktop
+chmod -x $PKG/usr/share/appdata/*
+
# Include the man page.
mkdir -p $PKG/usr/man/man6
-cp $TMP/$PRGNAM-src-$VERSION/man/hedgewars.6 $PKG/usr/man/man6
+gzip -9c < man/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
+
+# Don't need tiny XPM icon.
+rm -f $PKG/usr/share/pixmaps/*
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+# Icons extracted from share/Icon.icns with icns2png.
+for i in $CWD/icons/*.png; do
+ px="$( basename $i .png )"
+ sz="${px}x${px}"
+ dir=$PKG/usr/share/icons/hicolor/$sz/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING INSTALL.md CREDITS README.md Fonts_LICENSE.txt ChangeLog.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a COPYING CREDITS README.md Fonts_LICENSE.txt ChangeLog.txt $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/hedgewars/hedgewars.info b/games/hedgewars/hedgewars.info
index e5515a7ab8..8e52fa0217 100644
--- a/games/hedgewars/hedgewars.info
+++ b/games/hedgewars/hedgewars.info
@@ -1,10 +1,10 @@
PRGNAM="hedgewars"
-VERSION="1.0.0"
+VERSION="1.0.2"
HOMEPAGE="http://www.hedgewars.org"
-DOWNLOAD="https://hedgewars.org/download/releases/hedgewars-src-1.0.0.tar.bz2"
-MD5SUM="5463c05cd69abe2a256d9bbd41d4c923"
+DOWNLOAD="https://www.hedgewars.org/download/releases/hedgewars-src-1.0.2.tar.bz2"
+MD5SUM="1a91a973201c91bba2a494d428cadfbf"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="fpc lua physfs qt5 SDL2_image SDL2_mixer SDL2_net SDL2_ttf"
-MAINTAINER="Rubén Llorente"
-EMAIL="porting@use.startmail.com"
+REQUIRES="fpc lua physfs"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/hedgewars/icons/128.png b/games/hedgewars/icons/128.png
new file mode 100644
index 0000000000..6193f5aee5
--- /dev/null
+++ b/games/hedgewars/icons/128.png
Binary files differ
diff --git a/games/hedgewars/icons/16.png b/games/hedgewars/icons/16.png
new file mode 100644
index 0000000000..a33d108188
--- /dev/null
+++ b/games/hedgewars/icons/16.png
Binary files differ
diff --git a/games/hedgewars/icons/22.png b/games/hedgewars/icons/22.png
new file mode 100644
index 0000000000..cae5bf715c
--- /dev/null
+++ b/games/hedgewars/icons/22.png
Binary files differ
diff --git a/games/hedgewars/icons/256.png b/games/hedgewars/icons/256.png
new file mode 100644
index 0000000000..40963d20aa
--- /dev/null
+++ b/games/hedgewars/icons/256.png
Binary files differ
diff --git a/games/hedgewars/icons/32.png b/games/hedgewars/icons/32.png
new file mode 100644
index 0000000000..f9f8e7bbef
--- /dev/null
+++ b/games/hedgewars/icons/32.png
Binary files differ
diff --git a/games/hedgewars/icons/48.png b/games/hedgewars/icons/48.png
new file mode 100644
index 0000000000..96faf9d5e4
--- /dev/null
+++ b/games/hedgewars/icons/48.png
Binary files differ
diff --git a/games/hedgewars/icons/64.png b/games/hedgewars/icons/64.png
new file mode 100644
index 0000000000..4942defdfd
--- /dev/null
+++ b/games/hedgewars/icons/64.png
Binary files differ
diff --git a/games/hedgewars/include.qpainterpath.diff b/games/hedgewars/include.qpainterpath.diff
new file mode 100644
index 0000000000..430edc2da7
--- /dev/null
+++ b/games/hedgewars/include.qpainterpath.diff
@@ -0,0 +1,21 @@
+From 0eb95ff5c1c29887f14ecb2bb5f9c3cdd8b3ff29 Mon Sep 17 00:00:00 2001
+From: felixonmars <felixonmars@archlinux.org>
+Date: Thu, 4 Jun 2020 12:33:24 +0200
+Subject: [PATCH] Fix build with Qt 5.15+
+
+---
+ QTfrontend/ui/page/pagegamestats.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/QTfrontend/ui/page/pagegamestats.cpp b/QTfrontend/ui/page/pagegamestats.cpp
+index c0ad9a974f..655b70d37b 100644
+--- a/QTfrontend/ui/page/pagegamestats.cpp
++++ b/QTfrontend/ui/page/pagegamestats.cpp
+@@ -22,6 +22,7 @@
+ #include <QGraphicsScene>
+ #include <QGroupBox>
+ #include <QSizePolicy>
++#include <QPainterPath>
+
+ #include "pagegamestats.h"
+ #include "team.h"