pkgsrc-Bugs archive

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

pkg/24886: games/xevil does not compile with gcc 3.x



>Number:         24886
>Category:       pkg
>Synopsis:       games/xevil does not compile with gcc 3.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 23 06:45:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Chris Tribo
>Release:        1.6ZK
>Organization:
>Environment:
NetBSD Suck 1.6ZK NetBSD 1.6ZK (suck) #2: Fri Feb 27 02:59:36 EST 2004  
root@Suck:/usr/obj/sys/arch/i386/compile/suck i386
>Description:
xevil makes use of strstring.h which is now deprecated. This package looks like 
an excellent candidate for pkg-views since the current code works fine on gcc 
2.95, but not on gcc 3.x. Anyway, the patches follow. Six files modified.


>How-To-Repeat:
try to build using gcc 3.x
>Fix:
--- actual.C.orig       1996-09-23 18:18:08.000000000 -0400
+++ actual.C    2004-03-22 23:55:32.000000000 -0500
@@ -23,6 +23,7 @@
     hardts%alum.mit.edu@localhost
     http://graphics.lcs.mit.edu/~hardts/xevil.html
 */
+using namespace std;
 
 #ifndef NO_PRAGMAS
 #pragma implementation "actual.h"
@@ -30,7 +31,8 @@
 
 
 // Include Files
-#include <strstream.h>
+#include <strstream>
+using std::ostrstream;
 
 #include "utils.h"
 #include "coord.h"


--- /tmp/game.C 1996-09-23 20:27:18.000000000 -0400
+++ game.C      2004-03-22 23:56:35.000000000 -0500
@@ -22,6 +22,7 @@
     hardts%alum.mit.edu@localhost
     http://graphics.lcs.mit.edu/~hardts/xevil.html
 */
+using namespace std;
 
 #ifndef NO_PRAGMAS
 #pragma implementation "game.h"
@@ -34,7 +35,7 @@
 #include <stdio.h>
 }
 
-#include <strstream.h>
+#include <strstream>
 #include <iomanip.h>
 
 #include "utils.h"


--- physical.C  1996-09-23 18:21:32.000000000 -0400
+++ physical.C  2004-03-23 01:05:04.000000000 -0500
@@ -22,6 +22,7 @@
     hardts%alum.mit.edu@localhost
     http://graphics.lcs.mit.edu/~hardts/xevil.html
 */
+using namespace std;
 
 #ifndef NO_PRAGMAS
 #pragma implementation "physical.h"
@@ -29,13 +30,14 @@
 
 
 // Include Files
-#include <iostream.h>
+#include <iostream>
 
 extern "C" {
 #include <string.h>
 }
 
-#include <strstream.h>
+#include <strstream>
+using std::ostrstream;
 
 #include "utils.h"
 #include "coord.h"


--- locator.C   1996-09-22 21:59:24.000000000 -0400
+++ locator.C   2004-03-23 01:05:04.000000000 -0500
@@ -22,6 +22,7 @@
     hardts%alum.mit.edu@localhost
     http://graphics.lcs.mit.edu/~hardts/xevil.html
 */
+using namespace std;
 
 #ifndef NO_PRAGMAS
 #pragma implementation "locator.h"
@@ -210,7 +211,7 @@
 void Locator::get_nearby(PhysicalP nearby[OL_NEARBY_MAX],int &nitems,
                         PhysicalP p,int radius)
 {
-  int glocRadius = (int)ceil(radius / OL_GRID_SIZE_MAX);
+  int glocRadius = (int)ceil((float)(radius / OL_GRID_SIZE_MAX));
   int radius_2 = radius * radius;
   nitems = 0;


--- /tmp/ui.C   1996-09-23 16:31:19.000000000 -0400
+++ ui.C        2004-03-23 01:05:04.000000000 -0500
@@ -23,6 +23,7 @@
     hardts%alum.mit.edu@localhost
     http://graphics.lcs.mit.edu/~hardts/xevil.html
 */
+using namespace std;
 
 #ifndef NO_PRAGMAS
 #pragma implementation "ui.h"
@@ -42,7 +43,8 @@
 }
 
 #include <iostream.h>
-#include <strstream.h>
+#include <strstream>
+using std::ostrstream;
 
 #include "coord.h"
 #include "ui.h"


--- ../work/Makefile    2004-03-23 01:26:41.000000000 -0500
+++ Makefile    2004-03-23 01:26:36.000000000 -0500
@@ -106,7 +106,7 @@
 
 netbsd:
        @$(MAKE) CC="c++" \
-CFLAGS="-DUSE_RANDOM -DPROTECTED_IS_PUBLIC -DMSEC_PER_CLOCK=8" \
+CFLAGS="-DUSE_RANDOM -DPROTECTED_IS_PUBLIC -DMSEC_PER_CLOCK=8 -Wno-deprecated" 
\
 INCL_DIRS=-I$(X11BASE)/include LIBS_DIRS=-L$(X11BASE)/lib \
 LIBS="-lX11 -lm" $(TARGETS)

>Release-Note:
>Audit-Trail:
>Unformatted:



Home | Main Index | Thread Index | Old Index