summaryrefslogtreecommitdiffstats
path: root/games/hedgewars
diff options
context:
space:
mode:
author B. Watson2021-09-05 20:22:39 +0200
committer Willy Sudiarto Raharjo2021-10-12 19:51:59 +0200
commita69b0c879250b4edc0126c31121f031a6b45bd1d (patch)
tree846b9e78797ddeac12b36934bf9b07cdc2ee16e0 /games/hedgewars
parent4bf8251ac9292eff2e7d722f502be2582c7cc96c (diff)
downloadslackbuilds-a69b0c879250b4edc0126c31121f031a6b45bd1d.tar.gz
games/hedgewars: Fix build on -current.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/hedgewars')
-rw-r--r--games/hedgewars/fpc-3.2.0.patch20
-rw-r--r--games/hedgewars/hedgewars.SlackBuild7
-rw-r--r--games/hedgewars/include.qpainterpath.diff21
3 files changed, 48 insertions, 0 deletions
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 23cdb298b0..70ea97aafa 100644
--- a/games/hedgewars/hedgewars.SlackBuild
+++ b/games/hedgewars/hedgewars.SlackBuild
@@ -22,6 +22,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 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
@@ -79,6 +83,9 @@ 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 {} \;
+patch -p1 < $CWD/fpc-3.2.0.patch
+patch -p1 < $CWD/include.qpainterpath.diff
+
mkdir -p build
cd build
cmake \
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"