Mon Aug 23 14:27:43 2021 UTC ()
games/woof: Build fix

Renamed variable "time" to unbreak build on SmartOS.
No bump for PKGREVISION required.


(micha)
diff -r1.21 -r1.22 pkgsrc/games/woof/distinfo
diff -r0 -r1.1 pkgsrc/games/woof/patches/patch-Source_wi__stuff.c

cvs diff -r1.21 -r1.22 pkgsrc/games/woof/distinfo (expand / switch to unified diff)

--- pkgsrc/games/woof/distinfo 2021/08/20 15:23:05 1.21
+++ pkgsrc/games/woof/distinfo 2021/08/23 14:27:43 1.22
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
1$NetBSD: distinfo,v 1.21 2021/08/20 15:23:05 micha Exp $ 1$NetBSD: distinfo,v 1.22 2021/08/23 14:27:43 micha Exp $
2 2
3SHA1 (woof_6.3.1.tar.gz) = 03336e19759847187fe1e2ae0a2893577a90782d 3SHA1 (woof_6.3.1.tar.gz) = 03336e19759847187fe1e2ae0a2893577a90782d
4RMD160 (woof_6.3.1.tar.gz) = 2186d9d90c888b68d92776723ce78fefae0b578f 4RMD160 (woof_6.3.1.tar.gz) = 2186d9d90c888b68d92776723ce78fefae0b578f
5SHA512 (woof_6.3.1.tar.gz) = aad2a66b36480012ff01d25b6692d0f0d6048d90f5ecf1e0de081a2423884afdedc9e1fd97dec621d2641033907b528fa05481b9d7eeb6e96e4cc226651f8259 5SHA512 (woof_6.3.1.tar.gz) = aad2a66b36480012ff01d25b6692d0f0d6048d90f5ecf1e0de081a2423884afdedc9e1fd97dec621d2641033907b528fa05481b9d7eeb6e96e4cc226651f8259
6Size (woof_6.3.1.tar.gz) = 1986946 bytes 6Size (woof_6.3.1.tar.gz) = 1986946 bytes
7SHA1 (patch-Source_d__iwad.c) = fc897f508e31653495bfed26152a7e6d70021089 7SHA1 (patch-Source_d__iwad.c) = fc897f508e31653495bfed26152a7e6d70021089
 8SHA1 (patch-Source_wi__stuff.c) = 94d16305a725ac269e37038d2a8ce3c969a0d2ee

File Added: pkgsrc/games/woof/patches/Attic/patch-Source_wi__stuff.c
$NetBSD: patch-Source_wi__stuff.c,v 1.1 2021/08/23 14:27:43 micha Exp $

Workaround for namespace clash on SmartOS:

/home/pbulk/build/games/woof/work/woof-woof_6.3.1/Source/wi_stuff.c:366:19: error: 'time' redeclared as different kind of symbol
  366 | static patch_t*   time;
      |                   ^~~~

--- Source/wi_stuff.c.orig	2021-08-13 13:18:32.000000000 +0000
+++ Source/wi_stuff.c
@@ -363,7 +363,7 @@ static patch_t*   items;
 static patch_t*   frags;
 
 // Time sucks.
-static patch_t*   time;
+static patch_t*   woof_time;
 static patch_t*   par;
 static patch_t*   sucks;
 
@@ -897,7 +897,7 @@ static void WI_unloadData(void)
   Z_ChangeTag(sp_secret, PU_CACHE);
   Z_ChangeTag(items, PU_CACHE);
   Z_ChangeTag(frags, PU_CACHE);
-  Z_ChangeTag(time, PU_CACHE);
+  Z_ChangeTag(woof_time, PU_CACHE);
   Z_ChangeTag(sucks, PU_CACHE);
   Z_ChangeTag(par, PU_CACHE);
 
@@ -1815,7 +1815,7 @@ static void WI_drawStats(void)
   V_DrawPatch(SP_STATSX, SP_STATSY+2*lh, FB, sp_secret);
   WI_drawPercent(ORIGWIDTH - SP_STATSX, SP_STATSY+2*lh, cnt_secret[0]);
 
-  V_DrawPatch(SP_TIMEX, SP_TIMEY, FB, time);
+  V_DrawPatch(SP_TIMEX, SP_TIMEY, FB, woof_time);
   WI_drawTime(ORIGWIDTH/2 - SP_TIMEX, SP_TIMEY, cnt_time, true);
 
   // Ty 04/11/98: redid logic: should skip only if with pwad but 
@@ -2077,7 +2077,7 @@ void WI_loadData(void)
   colon = W_CacheLumpName("WICOLON", PU_STATIC); 
 
   // "time"
-  time = W_CacheLumpName("WITIME", PU_STATIC);   
+  woof_time = W_CacheLumpName("WITIME", PU_STATIC);   
 
   // "sucks"
   sucks = W_CacheLumpName("WISUCKS", PU_STATIC);