pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
opentyrian: fix build
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Thu Dec 24 13:42:34 2020 +0200
Changeset: 8f7db7dfe2bfa620a490e13e5ba9dd7b61a0edaa
Modified Files:
opentyrian/Makefile
opentyrian/distinfo
opentyrian/patches/patch-src_destruct.c
Added Files:
opentyrian/patches/patch-src_game__menu.c
opentyrian/patches/patch-src_video__scale__hqNx.c
Log Message:
opentyrian: fix build
These patches work around some errors when building with gcc.
Bump PKGREVISION because the code behaviour may have changed
with these patches (in which case the unpatched code was probably
incorrect).
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8f7db7dfe2bfa620a490e13e5ba9dd7b61a0edaa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
opentyrian/Makefile | 1 +
opentyrian/distinfo | 5 +++--
opentyrian/patches/patch-src_destruct.c | 10 ++++++++++
opentyrian/patches/patch-src_game__menu.c | 18 ++++++++++++++++++
opentyrian/patches/patch-src_video__scale__hqNx.c | 19 +++++++++++++++++++
5 files changed, 51 insertions(+), 2 deletions(-)
diffs:
diff --git a/opentyrian/Makefile b/opentyrian/Makefile
index fe663a4ff0..17e6147f1e 100644
--- a/opentyrian/Makefile
+++ b/opentyrian/Makefile
@@ -2,6 +2,7 @@
DISTNAME= opentyrian-2.1.20130907-src
PKGNAME= opentyrian-2.1
+PKGREVISION= 1
CATEGORIES= games
MASTER_SITES= http://www.camanis.net/opentyrian/releases/
diff --git a/opentyrian/distinfo b/opentyrian/distinfo
index 10ab8147f9..ef76e1bf01 100644
--- a/opentyrian/distinfo
+++ b/opentyrian/distinfo
@@ -2,12 +2,12 @@ $NetBSD: distinfo,v 1.1 2015/08/19 19:36:55 yhardy Exp $
SHA1 (opentyrian-2.1.20130907-src.tar.gz) = c5b97aea3931db6889acb639e59e619162b05183
RMD160 (opentyrian-2.1.20130907-src.tar.gz) = d6e892ebc6b865fbb4e622f5fe32f6e4a7a336a3
-SHA512 (opentyrian-2.1.20130907-src.tar.gz) = 1a560f2061496fbbb57b6334ab207b00a6b2e6a4d6164c6df6ad535ae9d0435c32c3db51d3ce2a0a79eb66d72723d112c1993f59b781750f9bd97afb643a0b67
Size (opentyrian-2.1.20130907-src.tar.gz) = 297517 bytes
SHA1 (patch-Makefile) = 4436577f10ff642d2fc882cf09e0ac0c871533d9
SHA1 (patch-src_cJSON.c) = 29983bcaab8e0bc501541db784ff8f8e8428f891
-SHA1 (patch-src_destruct.c) = 62a1ece164a1e336468b5401ad4f4a0243f4b0dd
+SHA1 (patch-src_destruct.c) = 609a21fe4aa5526ed78a87edf830d2eb0d84140d
SHA1 (patch-src_episodes.c) = c279e1210c664105815dcdf98bf9d6b4f09f9bc0
+SHA1 (patch-src_game__menu.c) = d35c2a786a40e533428dce73f2aa0641ed6c077c
SHA1 (patch-src_joystick.c) = 29586d78c87e5f86286a2e83f5188b0b8ee2d998
SHA1 (patch-src_keyboard.c) = 9a530c03a774ba0cefc12f68c86f1dfa9caaa568
SHA1 (patch-src_mainint.c) = 6fa7ca305b4721c674bea8a1f38a0019a26d0ad9
@@ -15,3 +15,4 @@ SHA1 (patch-src_network.c) = 35943d11fbabcbcbdb2eb35d28c050678bff0f58
SHA1 (patch-src_opl.c) = c0767e456eeb7d3e73f111deb59ed186aa4cd099
SHA1 (patch-src_shots.c) = 94ecd4756622c99c1acf7d566a2009564e7110f6
SHA1 (patch-src_tyrian2.c) = 2095c9e699ed5f0ca40515c102c0ec4c30c297a4
+SHA1 (patch-src_video__scale__hqNx.c) = c7837aaa59ffc2b52d1996ef74f1f4a783bd5649
diff --git a/opentyrian/patches/patch-src_destruct.c b/opentyrian/patches/patch-src_destruct.c
index 877c2a2544..cde7ca6bfa 100644
--- a/opentyrian/patches/patch-src_destruct.c
+++ b/opentyrian/patches/patch-src_destruct.c
@@ -1,6 +1,7 @@
$NetBSD$
Add FALLTHROUGH for -Werror.
+Fix unsigned condition.
--- src/destruct.c.orig 2013-09-07 22:14:32.000000000 +0000
+++ src/destruct.c
@@ -12,3 +13,12 @@ Add FALLTHROUGH for -Werror.
default:
DE_GravityLowerUnit(unit);
+@@ -2240,7 +2241,7 @@ static void DE_RunTickAI( void )
+ ptrUnit = ptrTarget->unit;
+ for (j = 0; j < config.max_installations; j++, ptrUnit++)
+ {
+- if (abs(ptrUnit->unitX - ptrCurUnit->unitX) < 8)
++ if (ptrUnit->unitX < ptrCurUnit->unitX + 8)
+ {
+ /* I get it. This makes helicoptors hover over
+ * their enemies. */
diff --git a/opentyrian/patches/patch-src_game__menu.c b/opentyrian/patches/patch-src_game__menu.c
new file mode 100644
index 0000000000..679bb17893
--- /dev/null
+++ b/opentyrian/patches/patch-src_game__menu.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Fix absolute value for floating point values.
+
+--- src/game_menu.c.orig 2013-09-07 22:14:32.000000000 +0000
++++ src/game_menu.c
+@@ -1992,9 +1992,9 @@ void JE_updateNavScreen( void )
+ navX = navX + (newNavX - navX) / 2.0f;
+ navY = navY + (newNavY - navY) / 2.0f;
+
+- if (abs(newNavX - navX) < 1)
++ if (fabs(newNavX - navX) < 1)
+ navX = newNavX;
+- if (abs(newNavY - navY) < 1)
++ if (fabs(newNavY - navY) < 1)
+ navY = newNavY;
+
+ fill_rectangle_xy(VGAScreen, 314, 0, 319, 199, 230);
diff --git a/opentyrian/patches/patch-src_video__scale__hqNx.c b/opentyrian/patches/patch-src_video__scale__hqNx.c
new file mode 100644
index 0000000000..930ed59bb8
--- /dev/null
+++ b/opentyrian/patches/patch-src_video__scale__hqNx.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+Fix for unsigned comparisons.
+
+--- src/video_scale_hqNx.c.orig 2013-09-07 23:57:23.000000000 +0000
++++ src/video_scale_hqNx.c
+@@ -122,9 +122,9 @@ inline bool diff(unsigned int w1, unsign
+ {
+ Uint32 YUV1 = yuv_palette[w1];
+ Uint32 YUV2 = yuv_palette[w2];
+- return ( ( abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ) ||
+- ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) ||
+- ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) );
++ return ( ( ((YUV1 & Ymask) > (YUV2 & Ymask) + trY) && ((YUV2 & Ymask) > (YUV1 & Ymask) + trY)) ||
++ ( ((YUV1 & Umask) > (YUV2 & Umask) + trU) && ((YUV2 & Umask) > (YUV1 & Umask) + trU)) ||
++ ( ((YUV1 & Vmask) > (YUV2 & Vmask) + trV) && ((YUV2 & Vmask) > (YUV1 & Vmask) + trV)) );
+ }
+
+
Home |
Main Index |
Thread Index |
Old Index