pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

doomlegacy: Update to SVN revision 1453



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Wed Aug 21 12:30:00 2019 +0200
Changeset:	a74c5e1045d55a625792140c5430ae5e5eacbd39

Modified Files:
	doomlegacy-devel/Makefile
	doomlegacy-devel/TODO
	doomlegacy-devel/distinfo
Added Files:
	doomlegacy-devel/patches/patch-src_am__map.c
	doomlegacy-devel/patches/patch-src_d__main.c
	doomlegacy-devel/patches/patch-src_p__setup.c

Log Message:
doomlegacy: Update to SVN revision 1453

- Add patches for launcher and automap zoom again (rejected by upstream)
- Add patch for Blockmap index overflow on big endian machines

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a74c5e1045d55a625792140c5430ae5e5eacbd39

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 doomlegacy-devel/Makefile                     |  2 +-
 doomlegacy-devel/TODO                         | 36 ++++++++++++++++++++++++--
 doomlegacy-devel/distinfo                     |  3 +++
 doomlegacy-devel/patches/patch-src_am__map.c  | 20 +++++++++++++++
 doomlegacy-devel/patches/patch-src_d__main.c  | 21 +++++++++++++++
 doomlegacy-devel/patches/patch-src_p__setup.c | 37 +++++++++++++++++++++++++++
 6 files changed, 116 insertions(+), 3 deletions(-)

diffs:
diff --git a/doomlegacy-devel/Makefile b/doomlegacy-devel/Makefile
index 2c65ef187a..b0df2ae3cc 100644
--- a/doomlegacy-devel/Makefile
+++ b/doomlegacy-devel/Makefile
@@ -2,7 +2,7 @@
 
 VERS=		1.47.2
 #PKGNAME=	doomlegacy-${VERS}
-SVNVERS=	1448
+SVNVERS=	1453
 DISTNAME=	doomlegacy-devel-r${SVNVERS}
 CATEGORIES=	games
 
diff --git a/doomlegacy-devel/TODO b/doomlegacy-devel/TODO
index dcf2f3d9d1..6e6b801377 100644
--- a/doomlegacy-devel/TODO
+++ b/doomlegacy-devel/TODO
@@ -1,3 +1,7 @@
+Part 1: Port to NetBSD
+======================
+Build system doesn't support NetBSD.
+
 [X] Sent patches to upstream
 [X] Imported proposed patchset from upstream
     => PKGREVISION not bumped, because binary package has not changed
@@ -6,5 +10,33 @@
 [X] Move man page to section 6 (it's a game)
    => Bump PKGREVISION
 [X] Test building of the package again
-    => Tested to work with SVN revision r1448
-[X] Remove patches after upstream integration
+    => Tested to work with SVN revision 1448
+[X] Remove NetBSD specific patches after upstream integration
+
+
+Part 2: Fix large blockmaps on big endian machines
+==================================================
+On my Apple Power Mac G5 some modern (large) maps fail to load with errors like:
+| 
+| Error: Blockmap offset[5556]= -32745, exceeds bounds.
+
+This bug looks not security relevant, because the code catches it and gracefully
+terminate the engine.
+
+[X] Update to SVN revision 1453
+    => Problem still exist
+[X] Rework pkgsrc patches rejected by upstream (disable launcher and keyboard
+    setup +/- for automap zoom) for SVN revision 1453
+[X] Add patch for (int16_t) integer overflow while loading Blockmap
+    Note: This should never happen on little endian machines
+    => PKGREVISION not bumped (SVN based packages use build date in version)
+[ ] Sent Blockmap patch to upstream
+
+
+Part 3: Torches are displayed crippled with software renderer
+=============================================================
+This problem was not present in 1.47.2, maybe a side effect of OpenGL corona
+changes since last release.
+
+
+EOF
diff --git a/doomlegacy-devel/distinfo b/doomlegacy-devel/distinfo
index 0a9e6286eb..fd70ce465e 100644
--- a/doomlegacy-devel/distinfo
+++ b/doomlegacy-devel/distinfo
@@ -4,3 +4,6 @@ SHA1 (doomlegacy_1.47.2_common.zip) = 9e6faaea797b988565a078a47e80bbe2119d78b9
 RMD160 (doomlegacy_1.47.2_common.zip) = 1ac1f47563ad2c0d7c5c1bea93a2aaeb1c001c10
 SHA512 (doomlegacy_1.47.2_common.zip) = 7c7c2a0cbab5b9b4645a3fe166addd597de533db7ab41f8011c6c526a868bb04c8dd6b0d27b48765406fbab328bf64fc7827770b395e6c0e5d861d99c4d3865a
 Size (doomlegacy_1.47.2_common.zip) = 981654 bytes
+SHA1 (patch-src_am__map.c) = 8d7d17d29c0934c92ca933e8976a5ecc692e465d
+SHA1 (patch-src_d__main.c) = 3311e44522e863fa3e1a855754b876c03c96f128
+SHA1 (patch-src_p__setup.c) = 615fda1d190ae20d2ee8fe662a13fd9ee6aff70d
diff --git a/doomlegacy-devel/patches/patch-src_am__map.c b/doomlegacy-devel/patches/patch-src_am__map.c
new file mode 100644
index 0000000000..f0aa0afe88
--- /dev/null
+++ b/doomlegacy-devel/patches/patch-src_am__map.c
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Set automap "zoom in" key to '+'.
+
+This patch was rejected upstream, because it works for my german keyboard
+but not for any other layout (patch is as broken as the original code).
+
+--- src/am_map.c.orig	2018-07-16 09:17:06.000000000 +0000
++++ src/am_map.c
+@@ -118,7 +118,9 @@ static byte DWHITE      =    (256-47);
+ #define AM_PANUPKEY     KEY_UPARROW
+ #define AM_PANRIGHTKEY  KEY_RIGHTARROW
+ #define AM_PANLEFTKEY   KEY_LEFTARROW
+-#define AM_ZOOMINKEY    '='
++// The documentation specify '+'
++//#define AM_ZOOMINKEY    '='
++#define AM_ZOOMINKEY    '+'
+ #define AM_ZOOMOUTKEY   '-'
+ #define AM_STARTKEY     KEY_TAB
+ #define AM_ENDKEY       KEY_TAB
diff --git a/doomlegacy-devel/patches/patch-src_d__main.c b/doomlegacy-devel/patches/patch-src_d__main.c
new file mode 100644
index 0000000000..b98e8c7e4c
--- /dev/null
+++ b/doomlegacy-devel/patches/patch-src_d__main.c
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Without command line arguments the launcher menu is displayed by default.
+This is not desired because we have already prepared the shareware Episode 1
+for pkgsrc.
+
+--- src/d_main.c.orig	2019-08-21 09:16:46.000000000 +0000
++++ src/d_main.c
+@@ -2578,8 +2578,10 @@ restart_command:
+     EOUT_flags = EOUT_text | EOUT_log | EOUT_con;
+ 
+ 
+-#ifdef LAUNCHER   
+-    if ( fatal_error || init_sequence == 1 || (init_sequence == 0 && myargc < 2 ))
++#ifdef LAUNCHER
++    // Disable argc check for pkgsrc (shareware episode already prepared)
++    // if ( fatal_error || init_sequence == 1 || (init_sequence == 0 && myargc < 2 ))
++    if ( fatal_error || init_sequence == 1 )
+     {
+         // [WDJ] Invoke built-in launcher command line
+ #if 0
diff --git a/doomlegacy-devel/patches/patch-src_p__setup.c b/doomlegacy-devel/patches/patch-src_p__setup.c
new file mode 100644
index 0000000000..ee4ce8b4f9
--- /dev/null
+++ b/doomlegacy-devel/patches/patch-src_p__setup.c
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Correctly convert the 16-Bit blockmap offset (as imported from wad) to the
+32-Bit format of the engine. On big endian machines this can overrun the
+int16_t data type which leads to 32-Bit values padded with ones instead of
+zeros.
+
+--- src/p_setup.c.orig	2019-08-21 08:45:39.000000000 +0000
++++ src/p_setup.c
+@@ -149,6 +149,8 @@
+ //
+ //-----------------------------------------------------------------------------
+ 
++#include "inttypes.h"
++
+ #include "doomincl.h"
+ #include "p_local.h"
+ #include "p_tick.h"
+@@ -1338,6 +1340,7 @@ void P_LoadBlockMap (int lump)
+   bmaporgy = blockmaphead[1]<<FRACBITS;
+   bmapwidth = blockmaphead[2];
+   bmapheight = blockmaphead[3];
++  printf("[MB] Blockmap size (X/Y): %d/%d\n", bmapwidth, bmapheight);
+   blockmapindex = & blockmaphead[4];
+   firstlist = 4 + (bmapwidth*bmapheight);
+   lastlist = count - 1;
+@@ -1348,7 +1351,9 @@ void P_LoadBlockMap (int lump)
+   // read blockmap index array
+   for (i=4 ; i<firstlist ; i++)  // for all entries in wad offset index
+   {
+-      uint32_t  bme = LE_SWAP16(wadblockmaplump[i]);  // offset
++      printf("[MB] Raw blockmap offset: %d\n", LE_SWAP16(wadblockmaplump[i]));
++      uint32_t  bme = (uint16_t) LE_SWAP16(wadblockmaplump[i]);  // offset
++      printf("[MB] Cooked blockmap offset: 0x%08"PRIX32"\n", bme);
+       // upon overflow, the bme will wrap to low values
+       if ( (bme < firstlist)  // too small to be valid
+            && (bme < 0x1000) && (prev_bme > 0xf000))  // wrapped


Home | Main Index | Thread Index | Old Index