rpms/prboom/devel prboom-2.3.1-64bit.patch, NONE, 1.1 prboom-2.3.1-config.patch, NONE, 1.1 prboom-2.3.1-gamedir.patch, NONE, 1.1 prboom-2.3.1-gcc4.patch, NONE, 1.1 prboom.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Michael Thomas (wart) fedora-extras-commits at redhat.com
Tue Mar 14 19:30:10 UTC 2006


Author: wart

Update of /cvs/extras/rpms/prboom/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7137/devel

Modified Files:
	.cvsignore sources 
Added Files:
	prboom-2.3.1-64bit.patch prboom-2.3.1-config.patch 
	prboom-2.3.1-gamedir.patch prboom-2.3.1-gcc4.patch prboom.spec 
Log Message:
auto-import prboom-2.3.1-4 on branch devel from prboom-2.3.1-4.src.rpm

prboom-2.3.1-64bit.patch:

--- NEW FILE prboom-2.3.1-64bit.patch ---
diff -ur prboom-2.3.1.orig/src/d_main.c prboom-2.3.1/src/d_main.c
--- prboom-2.3.1.orig/src/d_main.c	2006-03-12 10:53:56.000000000 +0100
+++ prboom-2.3.1/src/d_main.c	2006-03-12 10:37:27.000000000 +0100
@@ -1719,13 +1719,21 @@
     {
       // for statistics driver
       extern  void* statcopy;
+      void *orig_statcopy = statcopy;
+      char *check;
 
       // killough 5/2/98: this takes a memory
       // address as an integer on the command line!
 
-      statcopy = (void*) atoi(myargv[p+1]);
-      //jff 9/3/98 use logical output routine
-      lprintf (LO_CONFIRM,"External statistics registered.\n");
+      // HDG 11/3/2006: UGLY! Fixed to use strtoul, so this has
+      // atleast a chance to work on 64 bit.
+      statcopy = (void*) strtoul(myargv[p+1], &check, 0);
+      if (*check == '\0')
+           //jff 9/3/98 use logical output routine
+           lprintf (LO_CONFIRM,"External statistics registered.\n");
+      else
+           // we should report an error here I Guess
+           statcopy = orig_statcopy;
     }
 
   // sf: -blockmap option as a variable now
Only in prboom-2.3.1/src: d_main.c~
diff -ur prboom-2.3.1.orig/src/doomdata.h prboom-2.3.1/src/doomdata.h
--- prboom-2.3.1.orig/src/doomdata.h	2004-09-15 21:09:42.000000000 +0200
+++ prboom-2.3.1/src/doomdata.h	2006-03-12 10:53:43.000000000 +0100
@@ -82,9 +82,9 @@
 typedef struct {
   short textureoffset GCC_PACKED;
   short rowoffset GCC_PACKED;
-  char  toptexture[8] GCC_PACKED;
-  char  bottomtexture[8] GCC_PACKED;
-  char  midtexture[8] GCC_PACKED;
+  char  toptexture[8] /* GCC_PACKED */;
+  char  bottomtexture[8] /* GCC_PACKED */;
+  char  midtexture[8] /* GCC_PACKED */;
   short sector GCC_PACKED;  // Front sector, towards viewer.
 } GCC_PACKED mapsidedef_t;
 
@@ -147,8 +147,8 @@
 typedef struct {
   short floorheight GCC_PACKED;
   short ceilingheight GCC_PACKED;
-  char  floorpic[8] GCC_PACKED;
-  char  ceilingpic[8] GCC_PACKED;
+  char  floorpic[8] /* GCC_PACKED */;
+  char  ceilingpic[8] /* GCC_PACKED */;
   short lightlevel GCC_PACKED;
   short special GCC_PACKED;
   short tag GCC_PACKED;
Only in prboom-2.3.1/src: doomdata.h~
diff -ur prboom-2.3.1.orig/src/p_saveg.c prboom-2.3.1/src/p_saveg.c
--- prboom-2.3.1.orig/src/p_saveg.c	2004-09-15 21:09:45.000000000 +0200
+++ prboom-2.3.1/src/p_saveg.c	2006-03-12 10:44:33.000000000 +0100
@@ -45,7 +45,7 @@
 
 // Pads save_p to a 4-byte boundary
 //  so that the load/save works on SGI&Gecko.
-#define PADSAVEP()    do { save_p += (4 - ((int) save_p & 3)) & 3; } while (0)
+#define PADSAVEP()    do { save_p += (4 - ((long) save_p & 3)) & 3; } while (0)
 //
 // P_ArchivePlayers
 //
@@ -95,7 +95,7 @@
         for (j=0 ; j<NUMPSPRITES ; j++)
           if (players[i]. psprites[j].state)
             players[i]. psprites[j].state =
-              &states[ (int)players[i].psprites[j].state ];
+              &states[ (long)players[i].psprites[j].state ];
       }
 }
 
@@ -269,7 +269,7 @@
   number_of_thinkers = 0;
   for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
     if (th->function == P_MobjThinker)
-      th->prev = (thinker_t *) ++number_of_thinkers;
+      th->prev = (thinker_t *)(long) ++number_of_thinkers;
   }
 
 // phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the
@@ -436,10 +436,10 @@
       PADSAVEP();
       memcpy (mobj, save_p, sizeof(mobj_t));
       save_p += sizeof(mobj_t);
-      mobj->state = states + (int) mobj->state;
+      mobj->state = states + (long) mobj->state;
 
       if (mobj->player)
-        (mobj->player = &players[(int) mobj->player - 1]) -> mo = mobj;
+        (mobj->player = &players[(long) mobj->player - 1]) -> mo = mobj;
 
       P_SetThingPosition (mobj);
       mobj->info = &mobjinfo[mobj->type];
@@ -746,7 +746,7 @@
           ceiling_t *ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVEL, NULL);
           memcpy (ceiling, save_p, sizeof(*ceiling));
           save_p += sizeof(*ceiling);
-          ceiling->sector = &sectors[(int)ceiling->sector];
+          ceiling->sector = &sectors[(long)ceiling->sector];
           ceiling->sector->ceilingdata = ceiling; //jff 2/22/98
 
           if (ceiling->thinker.function)
@@ -763,10 +763,10 @@
           vldoor_t *door = Z_Malloc (sizeof(*door), PU_LEVEL, NULL);
           memcpy (door, save_p, sizeof(*door));
           save_p += sizeof(*door);
-          door->sector = &sectors[(int)door->sector];
+          door->sector = &sectors[(long)door->sector];
 
           //jff 1/31/98 unarchive line remembered by door as well
-          door->line = (int)door->line!=-1? &lines[(int)door->line] : NULL;
+          door->line = (long)door->line!=-1? &lines[(long)door->line] : NULL;
 
           door->sector->ceilingdata = door;       //jff 2/22/98
           door->thinker.function = T_VerticalDoor;
@@ -780,7 +780,7 @@
           floormove_t *floor = Z_Malloc (sizeof(*floor), PU_LEVEL, NULL);
           memcpy (floor, save_p, sizeof(*floor));
           save_p += sizeof(*floor);
-          floor->sector = &sectors[(int)floor->sector];
+          floor->sector = &sectors[(long)floor->sector];
           floor->sector->floordata = floor; //jff 2/22/98
           floor->thinker.function = T_MoveFloor;
           P_AddThinker (&floor->thinker);
@@ -793,7 +793,7 @@
           plat_t *plat = Z_Malloc (sizeof(*plat), PU_LEVEL, NULL);
           memcpy (plat, save_p, sizeof(*plat));
           save_p += sizeof(*plat);
-          plat->sector = &sectors[(int)plat->sector];
+          plat->sector = &sectors[(long)plat->sector];
           plat->sector->floordata = plat; //jff 2/22/98
 
           if (plat->thinker.function)
@@ -810,7 +810,7 @@
           lightflash_t *flash = Z_Malloc (sizeof(*flash), PU_LEVEL, NULL);
           memcpy (flash, save_p, sizeof(*flash));
           save_p += sizeof(*flash);
-          flash->sector = &sectors[(int)flash->sector];
+          flash->sector = &sectors[(long)flash->sector];
           flash->thinker.function = T_LightFlash;
           P_AddThinker (&flash->thinker);
           break;
@@ -822,7 +822,7 @@
           strobe_t *strobe = Z_Malloc (sizeof(*strobe), PU_LEVEL, NULL);
           memcpy (strobe, save_p, sizeof(*strobe));
           save_p += sizeof(*strobe);
-          strobe->sector = &sectors[(int)strobe->sector];
+          strobe->sector = &sectors[(long)strobe->sector];
           strobe->thinker.function = T_StrobeFlash;
           P_AddThinker (&strobe->thinker);
           break;
@@ -834,7 +834,7 @@
           glow_t *glow = Z_Malloc (sizeof(*glow), PU_LEVEL, NULL);
           memcpy (glow, save_p, sizeof(*glow));
           save_p += sizeof(*glow);
-          glow->sector = &sectors[(int)glow->sector];
+          glow->sector = &sectors[(long)glow->sector];
           glow->thinker.function = T_Glow;
           P_AddThinker (&glow->thinker);
           break;
@@ -846,7 +846,7 @@
           fireflicker_t *flicker = Z_Malloc (sizeof(*flicker), PU_LEVEL, NULL);
           memcpy (flicker, save_p, sizeof(*flicker));
           save_p += sizeof(*flicker);
-          flicker->sector = &sectors[(int)flicker->sector];
+          flicker->sector = &sectors[(long)flicker->sector];
           flicker->thinker.function = T_FireFlicker;
           P_AddThinker (&flicker->thinker);
           break;
@@ -859,7 +859,7 @@
           elevator_t *elevator = Z_Malloc (sizeof(*elevator), PU_LEVEL, NULL);
           memcpy (elevator, save_p, sizeof(*elevator));
           save_p += sizeof(*elevator);
-          elevator->sector = &sectors[(int)elevator->sector];
+          elevator->sector = &sectors[(long)elevator->sector];
           elevator->sector->floordata = elevator; //jff 2/22/98
           elevator->sector->ceilingdata = elevator; //jff 2/22/98
           elevator->thinker.function = T_MoveElevator;
Only in prboom-2.3.1/src: p_saveg.c~
diff -ur prboom-2.3.1.orig/src/p_spec.c prboom-2.3.1/src/p_spec.c
--- prboom-2.3.1.orig/src/p_spec.c	2004-09-15 21:09:36.000000000 +0200
+++ prboom-2.3.1/src/p_spec.c	2006-03-12 10:46:28.000000000 +0100
@@ -976,11 +976,11 @@
     switch (t)             // return whether thinker of same type is active
     {
       case floor_special:
-        return (int)sec->floordata;
+        return (long)sec->floordata;
       case ceiling_special:
-        return (int)sec->ceilingdata;
+        return (long)sec->ceilingdata;
       case lighting_special:
-        return (int)sec->lightingdata;
+        return (long)sec->lightingdata;
     }
   return 1; // don't know which special, must be active, shouldn't be here
 }
Only in prboom-2.3.1/src: p_spec.c~
diff -ur prboom-2.3.1.orig/src/r_patch.c prboom-2.3.1/src/r_patch.c
--- prboom-2.3.1.orig/src/r_patch.c	2004-09-15 21:09:19.000000000 +0200
+++ prboom-2.3.1/src/r_patch.c	2006-03-12 10:51:25.000000000 +0100
@@ -198,7 +198,7 @@
 
   // allocate our data chunk
   dataSize = pixelDataSize + columnsDataSize + postsDataSize;
-  patch->data = (unsigned char*)Z_Malloc(dataSize, PU_CACHE, &patch->data);
+  patch->data = (unsigned char*)Z_Malloc(dataSize, PU_CACHE, (void **)&patch->data);
   memset(patch->data, 0, dataSize);
 
   // set out pixel, column, and post pointers into our data array
@@ -207,7 +207,7 @@
   patch->posts = (TPatchPost*)((unsigned char*)patch->columns + columnsDataSize);
 
   // sanity check that we've got all the memory allocated we need
-  assert(((int)patch->posts + (int)(numPostsTotal*sizeof(TPatchPost)) - (int)patch->data) == dataSize);
+  assert(((long)patch->posts + (long)(numPostsTotal*sizeof(TPatchPost)) - (long)patch->data) == dataSize);
 
   memset(patch->pixels, 0xff, (patch->width*patch->height));
 
@@ -422,7 +422,7 @@
 
   // allocate our data chunk
   dataSize = pixelDataSize + columnsDataSize + postsDataSize;
-  composite_patch->data = (unsigned char*)Z_Malloc(dataSize, PU_STATIC, &composite_patch->data);
+  composite_patch->data = (unsigned char*)Z_Malloc(dataSize, PU_STATIC, (void **)&composite_patch->data);
   memset(composite_patch->data, 0, dataSize);
 
   // set out pixel, column, and post pointers into our data array
@@ -431,7 +431,7 @@
   composite_patch->posts = (TPatchPost*)((unsigned char*)composite_patch->columns + columnsDataSize);
 
   // sanity check that we've got all the memory allocated we need
-  assert(((int)composite_patch->posts + (int)(numPostsTotal*sizeof(TPatchPost)) - (int)composite_patch->data) == dataSize);
+  assert(((long)composite_patch->posts + (long)(numPostsTotal*sizeof(TPatchPost)) - (long)composite_patch->data) == dataSize);
 
   memset(composite_patch->pixels, 0xff, (composite_patch->width*composite_patch->height));
 
Only in prboom-2.3.1/src: r_patch.c~

prboom-2.3.1-config.patch:

--- NEW FILE prboom-2.3.1-config.patch ---
--- prboom-2.3.1/src/g_cmd.c.hdg	2006-03-10 21:48:49.000000000 +0100
+++ prboom-2.3.1/src/g_cmd.c	2006-03-10 22:10:46.000000000 +0100
@@ -501,7 +501,6 @@
 // CPhipps - compatibility vars
 static const char *complevel_str[] =
 {
-	"prboom_current", // -1 = best
 	"doom_12",
 	"doom_1666",
 	"doom2_19",
@@ -516,19 +515,16 @@
 	"MBF",
 	"prboom_203beta",
 	"prboom_210_211",
-	"prboom_212_223",
+	"prboom_212_223", /* untill 224 actually but lets not mod the string */
+	"prboom_current"  /* 230 - 231 and probably later */
 };
 
-static int desired_default_compatibility_level;
-CONSOLE_INT(default_compatibility_level, desired_default_compatibility_level, NULL, 0, MAX_COMPATIBILITY_LEVEL-1, complevel_str, 0)
+CONSOLE_INT(default_compatibility_level, default_compatibility_level, NULL, 0, MAX_COMPATIBILITY_LEVEL-1, complevel_str, 0)
 {
-	default_compatibility_level = desired_default_compatibility_level - 1;
 }
 
-static int desired_compatibility_level;
-CONSOLE_INT(compatibility_level, desired_compatibility_level, NULL, 0, MAX_COMPATIBILITY_LEVEL-1, complevel_str, 0)
+CONSOLE_INT(compatibility_level, compatibility_level, NULL, 0, MAX_COMPATIBILITY_LEVEL-1, complevel_str, 0)
 {
-	compatibility_level = desired_compatibility_level - 1;
 	G_Compatibility();
 }

prboom-2.3.1-gamedir.patch:

--- NEW FILE prboom-2.3.1-gamedir.patch ---
diff -Naur prboom-2.3.1/configure prboom-2.3.1.new/configure
--- prboom-2.3.1/configure	2004-09-15 12:11:41.000000000 -0700
+++ prboom-2.3.1.new/configure	2006-03-13 15:42:56.000000000 -0800
@@ -1853,9 +1853,9 @@
 
 
 if test "x$prefix" != xNONE; then
-  DOOMWADDIR="$prefix/share/games/doom"
+  DOOMWADDIR="$prefix/share/doom"
 else
-  DOOMWADDIR="$ac_default_prefix/share/games/doom"
+  DOOMWADDIR="$ac_default_prefix/share/doom"
 fi
 cat >>confdefs.h <<_ACEOF
 #define DOOMWADDIR "$DOOMWADDIR"
 
diff -Naur prboom-2.3.1/src/d_main.c prboom-2.3.1.new/src/d_main.c
--- prboom-2.3.1/src/d_main.c	2006-03-08 18:41:07.000000000 -0800
+++ prboom-2.3.1.new/src/d_main.c	2006-03-13 15:31:16.000000000 -0800
@@ -158,6 +158,7 @@
   "doom.wad",
   "doom1.wad",
   "doomu.wad", /* CPhipps - alow doomu.wad */
+  "freedoom.wad", /* wart at kobold.org:  added freedoom for Fedora Extras */
 };
 static const int nstandard_iwads = sizeof standard_iwads/sizeof*standard_iwads;
 

prboom-2.3.1-gcc4.patch:

--- NEW FILE prboom-2.3.1-gcc4.patch ---
diff -Naur prboom-2.3.1/src/c_runcmd.c prboom-2.3.1.new/src/c_runcmd.c
--- prboom-2.3.1/src/c_runcmd.c	2004-09-15 12:09:37.000000000 -0700
+++ prboom-2.3.1.new/src/c_runcmd.c	2006-03-06 20:42:04.000000000 -0800
@@ -1212,7 +1212,7 @@
 {
   char *filedata;
 
-  if(M_ReadFile(filename, (byte **)&filedata) <= 0) // haleyjd: ptr cast
+  if(M_ReadFile(filename, (char **)(&filedata)) <= 0)
     C_Printf("couldn't exec '%s'\n", filename);
   else
   {
diff -Naur prboom-2.3.1/src/d_main.c prboom-2.3.1.new/src/d_main.c
--- prboom-2.3.1/src/d_main.c	2004-09-24 11:27:37.000000000 -0700
+++ prboom-2.3.1.new/src/d_main.c	2006-03-06 20:42:04.000000000 -0800
@@ -137,7 +137,7 @@
 
 extern boolean timingdemo, singledemo, demoplayback, fastdemo; // killough
 
-static int      basetic;
+int      basetic;
 
 char    wadfile[PATH_MAX+1];       // primary wad file
 char    mapdir[PATH_MAX+1];        // directory of development maps
diff -Naur prboom-2.3.1/src/gl_intern.h prboom-2.3.1.new/src/gl_intern.h
--- prboom-2.3.1/src/gl_intern.h	2004-09-15 12:09:48.000000000 -0700
+++ prboom-2.3.1.new/src/gl_intern.h	2006-03-06 20:42:04.000000000 -0800
@@ -93,7 +93,6 @@
 extern boolean gl_shared_texture_palette;
 extern boolean use_mipmapping;
 extern int transparent_pal_index;
-extern unsigned char gld_palmap[256];
 extern GLTexture *last_gltexture;
 extern int last_cm;
   
diff -Naur prboom-2.3.1/src/m_fixed.h prboom-2.3.1.new/src/m_fixed.h
--- prboom-2.3.1/src/m_fixed.h	2004-09-15 12:09:27.000000000 -0700
+++ prboom-2.3.1.new/src/m_fixed.h	2006-03-06 20:42:04.000000000 -0800
@@ -123,7 +123,7 @@
 /* CPhipps - made __inline__ to inline, as specified in the gcc docs
  * Also made const */
 
-inline static const fixed_t FixedMul(fixed_t a, fixed_t b)
+inline static fixed_t FixedMul(fixed_t a, fixed_t b)
 {
   return (fixed_t)((int_64_t) a*b >> FRACBITS);
 }
@@ -186,7 +186,7 @@
 /* CPhipps - made __inline__ to inline, as specified in the gcc docs
  * Also made const */
 
-inline static const fixed_t FixedDiv(fixed_t a, fixed_t b)
+inline static fixed_t FixedDiv(fixed_t a, fixed_t b)
 {
   return (D_abs(a)>>14) >= D_abs(b) ? ((a^b)>>31) ^ INT_MAX :
     (fixed_t)(((int_64_t) a << FRACBITS) / b);
@@ -199,7 +199,7 @@
  * (notice that the C standard for % does not guarantee this)
  */
 
-inline static const fixed_t FixedMod(fixed_t a, fixed_t b)
+inline static fixed_t FixedMod(fixed_t a, fixed_t b)
 {
   if (b & (b-1)) {
     fixed_t r = a % b;
diff -Naur prboom-2.3.1/src/p_maputl.h prboom-2.3.1.new/src/p_maputl.h
--- prboom-2.3.1/src/p_maputl.h	2004-09-15 12:09:45.000000000 -0700
+++ prboom-2.3.1.new/src/p_maputl.h	2006-03-06 20:42:04.000000000 -0800
@@ -64,7 +64,9 @@
 typedef boolean (*traverser_t)(intercept_t *in);
 
 #ifdef __GNUC__
-#define CONSTFUNC const
+// Not for gcc4!
+// #define CONSTFUNC const
+#define CONSTFUNC
 #else
 #define CONSTFUNC
 #endif
diff -Naur prboom-2.3.1/src/p_mobj.h prboom-2.3.1.new/src/p_mobj.h
--- prboom-2.3.1/src/p_mobj.h	2004-09-15 12:09:47.000000000 -0700
+++ prboom-2.3.1.new/src/p_mobj.h	2006-03-06 20:42:04.000000000 -0800
@@ -369,8 +369,6 @@
 // Whether an object is "sentient" or not. Used for environmental influences.
 #define sentient(mobj) ((mobj)->health > 0 && (mobj)->info->seestate)
 
-extern mapthing_t itemrespawnque[];
-extern int itemrespawntime[];
 extern int iquehead;
 extern int iquetail;
 extern int gravity;
diff -Naur prboom-2.3.1/src/psnprntf.c prboom-2.3.1.new/src/psnprntf.c
--- prboom-2.3.1/src/psnprntf.c	2004-09-24 11:27:36.000000000 -0700
+++ prboom-2.3.1.new/src/psnprntf.c	2006-03-06 20:42:04.000000000 -0800
@@ -130,7 +130,7 @@
     case 'X': \
     case 'p': \
         GET_VARS \
-        ncount += pvsnfmt_int(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, &ap); \
+        ncount += pvsnfmt_int(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, ap); \
         state = STATE_NONE; \
         break; \
     case 'e': \
@@ -139,17 +139,17 @@
     case 'g': \
     case 'G': \
         GET_VARS \
-        ncount += pvsnfmt_double(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, &ap); \
+        ncount += pvsnfmt_double(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, ap); \
         state = STATE_NONE; \
         break; \
     case 'c': \
         GET_VARS \
-        ncount += pvsnfmt_char(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, &ap); \
+        ncount += pvsnfmt_char(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, ap); \
         state = STATE_NONE; \
         break; \
     case 's': \
         GET_VARS \
-        ncount += pvsnfmt_str(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, &ap); \
+        ncount += pvsnfmt_str(&pinsertion, &nmax, *pfmt, flags, width, precision, prefix, ap); \
         state = STATE_NONE; \
         break; \
     case 'n': \
@@ -306,11 +306,11 @@
 }
 
 int pvsnfmt_char(char **pinsertion, size_t *nmax, const char fmt, int flags,
-                 int width, int precision, char prefix, va_list *ap)
+                 int width, int precision, char prefix, va_list ap)
 {
     if (*nmax > 1)
     {
-        **pinsertion = (char) va_arg(*ap, int);
+        **pinsertion = (char) va_arg(ap, int);
         *pinsertion += 1;
         *nmax -= 1;
     }
@@ -338,9 +338,9 @@
  */
 
 int pvsnfmt_str(char **pinsertion, size_t *nmax, const char fmt, int flags,
-                int width, int precision, char prefix, va_list *ap)
+                int width, int precision, char prefix, va_list ap)
 {
-    const char *str = va_arg(*ap, const char *);
+    const char *str = va_arg(ap, const char *);
     int nprinted;
     int len;
     int pad = 0;
@@ -428,7 +428,7 @@
  */
 
 int pvsnfmt_int(char **pinsertion, size_t *nmax, char fmt, int flags,
-                int width, int precision, char prefix, va_list *ap)
+                int width, int precision, char prefix, va_list ap)
 {
     long int number = 0;
     unsigned long int unumber;
@@ -463,17 +463,17 @@
         {
             case 'd':
             case 'i':
-                number = (signed short int) va_arg(*ap, int);
+                number = (signed short int) va_arg(ap, int);
                 break;
             case 'u':
             case 'o':
             case 'x':
             case 'X':
-                unumber = (unsigned short int) va_arg(*ap, int);
+                unumber = (unsigned short int) va_arg(ap, int);
                 numbersigned = 0;
                 break;
              case 'p':
-                unumber = (unsigned long) va_arg(*ap, void *);
+                unumber = (unsigned long) va_arg(ap, void *);
                 numbersigned = 0;
         }
         break;
@@ -482,17 +482,17 @@
         {
             case 'd':
             case 'i':
-                number = va_arg(*ap, signed long int);
+                number = va_arg(ap, signed long int);
                 break;
             case 'u':
             case 'o':
             case 'x':
             case 'X':
-                unumber = va_arg(*ap, unsigned long int);
+                unumber = va_arg(ap, unsigned long int);
                 numbersigned = 0;
                 break;
              case 'p':
-                unumber = (unsigned long) va_arg(*ap, void *);
+                unumber = (unsigned long) va_arg(ap, void *);
                 numbersigned = numbersigned;
         }
         break;
@@ -501,17 +501,17 @@
         {
             case 'd':
             case 'i':
-                number = va_arg(*ap, signed int);
+                number = va_arg(ap, signed int);
                 break;
             case 'u':
             case 'o':
             case 'x':
             case 'X':
-                unumber = va_arg(*ap, unsigned int);
+                unumber = va_arg(ap, unsigned int);
                 numbersigned = 0;
                 break;
              case 'p':
-                unumber = (unsigned long) va_arg(*ap, void *);
+                unumber = (unsigned long) va_arg(ap, void *);
                 numbersigned = 0;
          }
     } /* switch fmt to retrieve number */
@@ -784,12 +784,12 @@
  */
 
 int pvsnfmt_double(char **pinsertion, size_t *nmax, const char fmt, int flags,
-                int width, int precision, char prefix, va_list *ap)
+                int width, int precision, char prefix, va_list ap)
 {
     char *digits;
     int sign = 0;
     int dec;
-    double value = va_arg(*ap, double);
+    double value = va_arg(ap, double);
 
     int len;
     int pad = 0;
diff -Naur prboom-2.3.1/src/psnprntf.h prboom-2.3.1.new/src/psnprntf.h
--- prboom-2.3.1/src/psnprntf.h	2004-09-15 12:09:27.000000000 -0700
+++ prboom-2.3.1.new/src/psnprntf.h	2006-03-06 20:42:04.000000000 -0800
@@ -17,16 +17,16 @@
  * if there had been enough room).
  */
 int pvsnfmt_char(char **pinsertion, size_t *nmax, const char fmt, int flags,
-                 int width, int precision, char prefix, va_list *ap);
+                 int width, int precision, char prefix, va_list ap);
 
 int pvsnfmt_int(char **pinsertion, size_t *nmax, char fmt, int flags,
-                 int width, int precision, char prefix, va_list *ap);
+                 int width, int precision, char prefix, va_list ap);
 
 int pvsnfmt_str(char **pinsertion, size_t *nmax, const char fmt, int flags,
-                 int width, int precision, char prefix, va_list *ap);
+                 int width, int precision, char prefix, va_list ap);
 
 int pvsnfmt_double(char **pinsertion, size_t *nmax, const char fmt, int flags,
-                 int width, int precision, char prefix, va_list *ap);
+                 int width, int precision, char prefix, va_list ap);
 
 /* These are the flags you need (use logical OR) for the flags parameter of
  * fmt functions above.
diff -Naur prboom-2.3.1/src/r_bsp.h prboom-2.3.1.new/src/r_bsp.h
--- prboom-2.3.1/src/r_bsp.h	2004-09-15 12:09:31.000000000 -0700
+++ prboom-2.3.1.new/src/r_bsp.h	2006-03-06 20:42:04.000000000 -0800
@@ -41,11 +41,6 @@
 extern line_t   *linedef;
 extern sector_t *frontsector;
 extern sector_t *backsector;
-extern int      rw_x;
-extern int      rw_stopx;
-extern boolean  segtextured;
-extern boolean  markfloor;      /* false if the back side is the same plane */
-extern boolean  markceiling;
 
 /* old code -- killough:
  * extern drawseg_t drawsegs[MAXDRAWSEGS];
diff -Naur prboom-2.3.1/src/r_data.h prboom-2.3.1.new/src/r_data.h
--- prboom-2.3.1/src/r_data.h	2004-09-15 12:09:33.000000000 -0700
+++ prboom-2.3.1.new/src/r_data.h	2006-03-06 20:42:04.000000000 -0800
@@ -48,7 +48,7 @@
 {
   int originx, originy;  // Block origin, which has already accounted
   int patch;             // for the internal origin of the patch.
-} texpatch_t __attribute__((packed));
+} texpatch_t;
 
 //
 // Texture definition.
diff -Naur prboom-2.3.1/src/r_main.c prboom-2.3.1.new/src/r_main.c
--- prboom-2.3.1/src/r_main.c	2004-09-15 12:09:26.000000000 -0700
+++ prboom-2.3.1.new/src/r_main.c	2006-03-06 20:42:04.000000000 -0800
@@ -118,7 +118,7 @@
 // killough 5/2/98: reformatted
 //
 
-const int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node)
+int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node)
 {
   if (!node->dx)
     return x <= node->x ? node->dy > 0 : node->dy < 0;
@@ -137,7 +137,7 @@
 
 // killough 5/2/98: reformatted
 
-const int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line)
+int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line)
 {
   fixed_t lx = line->v1->x;
   fixed_t ly = line->v1->y;
diff -Naur prboom-2.3.1/src/r_main.h prboom-2.3.1.new/src/r_main.h
--- prboom-2.3.1/src/r_main.h	2004-09-15 12:09:27.000000000 -0700
+++ prboom-2.3.1.new/src/r_main.h	2006-03-06 20:42:04.000000000 -0800
@@ -112,8 +112,8 @@
 // Utility functions.
 //
 
-const int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node);
-const int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line);
+int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node);
+int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line);
 angle_t R_PointToAngle(fixed_t x, fixed_t y);
 angle_t R_PointToAngle2(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2);
 subsector_t *R_PointInSubsector(fixed_t x, fixed_t y);
diff -Naur prboom-2.3.1/src/SDL/i_system.c prboom-2.3.1.new/src/SDL/i_system.c
--- prboom-2.3.1/src/SDL/i_system.c	2004-09-15 12:09:21.000000000 -0700
+++ prboom-2.3.1.new/src/SDL/i_system.c	2006-03-06 20:42:04.000000000 -0800
@@ -133,7 +133,8 @@
     if (rc <= 0) {
       I_Error("I_Read: read failed: %s", rc ? strerror(errno) : "EOF");
     }
-    sz -= rc; (unsigned char *)buf += rc;
+    sz -= rc;
+    buf += rc;
   }
 }
 


--- NEW FILE prboom.spec ---
%define waddir  %{_datadir}/doom

Name:           prboom
Version:        2.3.1
Release:        4%{?dist}
Summary:        Open source port of the DOOM game engine

Group:          Amusements/Games
License:        GPL
URL:            http://prboom.sourceforge.net/
Source0:        http://dl.sourceforge.net/prboom/prboom-2.3.1.tar.gz
Patch0:         prboom-2.3.1-gcc4.patch
Patch1:         prboom-2.3.1-gamedir.patch
Patch2:         prboom-2.3.1-config.patch
Patch3:         prboom-2.3.1-64bit.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  SDL_mixer-devel SDL_net-devel
Requires:       freedoom

%description
prboom is an open-source port of Doom, the classic 3D first-person shooter
game.  It totally outclassed any 3D world games that preceded it, with amazing
speed, flexibility, and outstanding gameplay. The specs to the game were
released, and thousands of extra levels were written by fans of the game; even
today new levels are written for Doom faster then any one person could play
them. 

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
%configure --disable-cpu-opt --program-prefix=''
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

# Move the binaries out of the crufty /usr/games directory
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mv $RPM_BUILD_ROOT/usr/games/* $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{waddir}
mv $RPM_BUILD_ROOT/%{_datadir}/games/doom/%{name}.wad $RPM_BUILD_ROOT/%{waddir}

# Remove the doc files that will get picked up in the files
# section below.
rm -rf $RPM_BUILD_ROOT/%{_docdir}


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_bindir}/prboom
%{_bindir}/prboom-game-server
%dir %{waddir}
%{waddir}/prboom.wad
%{_mandir}/man5/*
%{_mandir}/man6/*
%doc NEWS AUTHORS README COPYING
%doc doc/README.compat doc/README.demos doc/MBF.txt doc/MBFFAQ.txt doc/boom.txt

%changelog
* Tue Mar 14 2006 Wart <wart at kobold.org> 2.3.1-4
- Added patch to fix up some x86_64 issues

* Mon Mar 13 2006 Wart <wart at kobold.org> 2.3.1-3
- Once again, change the default wad dir to datadir/doom (see discussion on
  bz #185211)

* Sun Mar 12 2006 Wart <wart at kobold.org> 2.3.1-2
- Replace datadir/games/doom with datadir/prboom in the files section.

* Sat Mar 11 2006 Wart <wart at kobold.org> 2.3.1-1
- Initial package for Fedora Extras


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/prboom/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	14 Mar 2006 19:29:08 -0000	1.1
+++ .cvsignore	14 Mar 2006 19:30:09 -0000	1.2
@@ -0,0 +1 @@
+prboom-2.3.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/prboom/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	14 Mar 2006 19:29:08 -0000	1.1
+++ sources	14 Mar 2006 19:30:09 -0000	1.2
@@ -0,0 +1 @@
+c53231604fe6cf7352e73911ad44c90d  prboom-2.3.1.tar.gz




More information about the fedora-extras-commits mailing list