aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-03-05 01:27:10 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-03-05 01:27:10 +0000
commitccf14045e329ee5767bc9c2ab95fbba198c0ff15 (patch)
treeb6910ec27f52c35b9b0f0cf04b8119d22b39e74f
parentba9a2d48469247486ae1f37dd64f63b12bf0b3d2 (diff)
downloadports-ccf14045e329ee5767bc9c2ab95fbba198c0ff15.tar.gz
ports-ccf14045e329ee5767bc9c2ab95fbba198c0ff15.zip
MFH: r567351
games/zdoom: fix build on non-x86 gme needs the same patching as for other ports. p_spec.cpp uses chars, which are unsigned on ARM and POWER by default. Approved by: tier 2 blanket
Notes
Notes: svn path=/branches/2021Q1/; revision=567352
-rw-r--r--games/zdoom/Makefile5
-rw-r--r--games/zdoom/files/patch-game-music-emu_gme_blargg__endian.h13
-rw-r--r--games/zdoom/files/patch-src_p__spec.cpp11
3 files changed, 26 insertions, 3 deletions
diff --git a/games/zdoom/Makefile b/games/zdoom/Makefile
index 3693d63ba69b..f8fe51ba4d52 100644
--- a/games/zdoom/Makefile
+++ b/games/zdoom/Makefile
@@ -19,8 +19,6 @@ LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libsndfile.so:audio/libsndfile
-BROKEN_powerpc64= fails to compile: invokes x86 assembly
-
USE_GITHUB= yes
GH_ACCOUNT= rheit
@@ -28,7 +26,8 @@ PORTSCOUT= limit:^.+\.[1-9]{1,3}[1-8]?$$
DATADIR= ${DMDIR}/${PORTNAME}
-USES= cmake gettext gnome jpeg openal pkgconfig sdl
+USES= cmake dos2unix gettext gnome jpeg openal pkgconfig sdl
+DOS2UNIX_FILES= src/p_spec.cpp
USE_GNOME= atk cairo gdkpixbuf2 gtk20 pango
USE_SDL= sdl2
CMAKE_ARGS= -DNO_FMOD:BOOL=ON
diff --git a/games/zdoom/files/patch-game-music-emu_gme_blargg__endian.h b/games/zdoom/files/patch-game-music-emu_gme_blargg__endian.h
new file mode 100644
index 000000000000..7a65b79b9d47
--- /dev/null
+++ b/games/zdoom/files/patch-game-music-emu_gme_blargg__endian.h
@@ -0,0 +1,13 @@
+--- game-music-emu/gme/blargg_endian.h.orig 2021-02-10 16:11:06 UTC
++++ game-music-emu/gme/blargg_endian.h
+@@ -33,9 +33,7 @@
+ #if defined (LSB_FIRST) || defined (__LITTLE_ENDIAN__) || BLARGG_CPU_X86 || \
+ (defined (LITTLE_ENDIAN) && LITTLE_ENDIAN+0 != 1234)
+ #define BLARGG_LITTLE_ENDIAN 1
+-#endif
+-
+-#if defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \
++#elif defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \
+ defined (__sparc__) || BLARGG_CPU_POWERPC || \
+ (defined (BIG_ENDIAN) && BIG_ENDIAN+0 != 4321)
+ #define BLARGG_BIG_ENDIAN 1
diff --git a/games/zdoom/files/patch-src_p__spec.cpp b/games/zdoom/files/patch-src_p__spec.cpp
new file mode 100644
index 000000000000..d2d1d93d7e48
--- /dev/null
+++ b/games/zdoom/files/patch-src_p__spec.cpp
@@ -0,0 +1,11 @@
+--- src/p_spec.cpp.orig 2021-03-05 01:22:24 UTC
++++ src/p_spec.cpp
+@@ -1269,7 +1269,7 @@ void P_InitSectorSpecial(sector_t *sector, int special
+ if (sector->special >= Scroll_North_Slow &&
+ sector->special <= Scroll_SouthWest_Fast)
+ { // Hexen scroll special
+- static const char hexenScrollies[24][2] =
++ static const signed char hexenScrollies[24][2] =
+ {
+ { 0, 1 }, { 0, 2 }, { 0, 4 },
+ { -1, 0 }, { -2, 0 }, { -4, 0 },