aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2005-04-24 05:06:40 +0800
committeranholt <anholt@FreeBSD.org>2005-04-24 05:06:40 +0800
commit02bbf729d12b073db272ecfb60788f480db6b469 (patch)
tree4db310be27bb1ab03745c4069efaed7b2ee9b186 /games
parent18a6331e5dc7140c477bb6f0beb057416c6f2ccc (diff)
downloadfreebsd-ports-gnome-02bbf729d12b073db272ecfb60788f480db6b469.tar.gz
freebsd-ports-gnome-02bbf729d12b073db272ecfb60788f480db6b469.tar.zst
freebsd-ports-gnome-02bbf729d12b073db272ecfb60788f480db6b469.zip
Unbreak with new GCC by fixing bad C++ code.
PR: 77809 Submitted by: self Approved by: maintainer timeout (2 months)
Diffstat (limited to 'games')
-rw-r--r--games/pipenightdreams/Makefile4
-rw-r--r--games/pipenightdreams/files/patch-eventmanager.cpp11
-rw-r--r--games/pipenightdreams/files/patch-graphic.cpp25
-rw-r--r--games/pipenightdreams/files/patch-hash.cpp35
-rw-r--r--games/pipenightdreams/files/patch-image.cpp11
-rw-r--r--games/pipenightdreams/files/patch-list.cpp20
-rw-r--r--games/pipenightdreams/files/patch-pipe.cpp16
-rw-r--r--games/pipenightdreams/files/patch-player.h13
-rw-r--r--games/pipenightdreams/files/patch-pointer.cpp11
-rw-r--r--games/pipenightdreams/files/patch-pointer.h15
-rw-r--r--games/pipenightdreams/files/patch-score.cpp11
-rw-r--r--games/pipenightdreams/files/patch-str.cpp29
12 files changed, 197 insertions, 4 deletions
diff --git a/games/pipenightdreams/Makefile b/games/pipenightdreams/Makefile
index d5d2083b4635..a1c6b185d20d 100644
--- a/games/pipenightdreams/Makefile
+++ b/games/pipenightdreams/Makefile
@@ -25,10 +25,6 @@ MAN6= pipenightdreams.6
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile (bad C++ code)"
-.endif
-
post-patch:
${REINPLACE_CMD} 's|"SDL/SDL|"SDL|g ; s|<SDL/SDL|<SDL|g; \
s|SDL_LIBSS|SDL_LIBS|g; s|datadir/games|datadir|;' \
diff --git a/games/pipenightdreams/files/patch-eventmanager.cpp b/games/pipenightdreams/files/patch-eventmanager.cpp
new file mode 100644
index 000000000000..7dc2b8ba7068
--- /dev/null
+++ b/games/pipenightdreams/files/patch-eventmanager.cpp
@@ -0,0 +1,11 @@
+--- src/eventmanager.cpp.orig Sat Jan 1 14:52:51 2005
++++ src/eventmanager.cpp Sat Jan 1 14:52:55 2005
+@@ -40,7 +40,7 @@
+ lista_streams->remove(lista_streams->indexOf(s));
+ }
+
+-void EventManager::pumpEvents(bool wait=false){
++void EventManager::pumpEvents(bool wait){
+ SDL_Event event;
+ Index * stream;
+ bool got=false;
diff --git a/games/pipenightdreams/files/patch-graphic.cpp b/games/pipenightdreams/files/patch-graphic.cpp
new file mode 100644
index 000000000000..72ce4f4e7b50
--- /dev/null
+++ b/games/pipenightdreams/files/patch-graphic.cpp
@@ -0,0 +1,25 @@
+--- src/graphic.cpp.orig Sat Jan 1 14:51:18 2005
++++ src/graphic.cpp Sat Jan 1 14:52:31 2005
+@@ -44,11 +44,11 @@
+ if (pixels) free(pixels);
+ }
+
+-void Graphic::setAlpha(char value=OPAQUE){
++void Graphic::setAlpha(char value){
+ SDL_SetAlpha(surface, SDL_SRCALPHA, value);
+ }
+
+-void Graphic::enableClipping(bool flag=true){
++void Graphic::enableClipping(bool flag){
+
+ if (flag){
+ SDL_Rect rect;
+@@ -68,7 +68,7 @@
+ clip_height=height;
+ }
+
+-void Graphic::flip(Axis a=HAxis){
++void Graphic::flip(Axis a){
+ if (surface){
+ if (SDL_MUSTLOCK(surface))
+ if (SDL_LockSurface(surface)<0) return;
diff --git a/games/pipenightdreams/files/patch-hash.cpp b/games/pipenightdreams/files/patch-hash.cpp
new file mode 100644
index 000000000000..9feb8e009f06
--- /dev/null
+++ b/games/pipenightdreams/files/patch-hash.cpp
@@ -0,0 +1,35 @@
+--- src/hash.cpp.orig Sat Jan 1 14:48:35 2005
++++ src/hash.cpp Sat Jan 1 14:50:49 2005
+@@ -55,10 +55,12 @@
+ return(sum % nbuckets);
+ }
+
+-Hash::Hash(int bs=256){
++typedef List *ListPtr;
++
++Hash::Hash(int bs){
+ int i;
+ nbuckets=bs;
+- lbuckets=new (List *)[nbuckets];
++ lbuckets=new ListPtr[nbuckets];
+
+ for (i=0;i<nbuckets;i++)
+ lbuckets[i]=new List();
+@@ -99,7 +101,7 @@
+ return NotAdded;
+ }
+
+-Hash::Result Hash::remove(Str * str, bool del=false){
++Hash::Result Hash::remove(Str * str, bool del){
+ if (str){
+ Index * i;
+ List * list=lbuckets[function(str)];
+@@ -135,7 +137,7 @@
+ return NULL;
+ }
+
+-void Hash::empty(bool del=true){
++void Hash::empty(bool del){
+ int i;
+ List * list;
+ for (i=0;i<nbuckets;i++){
diff --git a/games/pipenightdreams/files/patch-image.cpp b/games/pipenightdreams/files/patch-image.cpp
new file mode 100644
index 000000000000..9ea52cb42a57
--- /dev/null
+++ b/games/pipenightdreams/files/patch-image.cpp
@@ -0,0 +1,11 @@
+--- src/image.cpp.orig Sat Jan 1 14:47:18 2005
++++ src/image.cpp Sat Jan 1 14:47:24 2005
+@@ -19,7 +19,7 @@
+ #include "SDL_image.h"
+ #include <stdio.h>
+
+-Image::Image(Str * filename=NULL):Graphic(){
++Image::Image(Str * filename):Graphic(){
+ if (filename) load(filename);
+ }
+
diff --git a/games/pipenightdreams/files/patch-list.cpp b/games/pipenightdreams/files/patch-list.cpp
new file mode 100644
index 000000000000..fb1bd76bc7c2
--- /dev/null
+++ b/games/pipenightdreams/files/patch-list.cpp
@@ -0,0 +1,20 @@
+--- src/list.cpp.orig Sat Jan 1 14:45:36 2005
++++ src/list.cpp Sat Jan 1 14:47:10 2005
+@@ -125,7 +125,7 @@
+ return (insert(indexOf(i), obj));
+ }
+
+-List::Result List::remove(Index * index, bool del=false){
++List::Result List::remove(Index * index, bool del){
+ if (isEmpty()) return EmptyList;
+ if (!index) return NullIndex;
+
+@@ -155,7 +155,7 @@
+ return Removed;
+ }
+
+-void List::empty(bool del=true){
++void List::empty(bool del){
+ while (!isEmpty())
+ remove(getFirst(), del);
+ }
diff --git a/games/pipenightdreams/files/patch-pipe.cpp b/games/pipenightdreams/files/patch-pipe.cpp
new file mode 100644
index 000000000000..9dcb094f2e72
--- /dev/null
+++ b/games/pipenightdreams/files/patch-pipe.cpp
@@ -0,0 +1,16 @@
+--- src/pipe.cpp.orig Sat Jan 1 14:45:09 2005
++++ src/pipe.cpp Sat Jan 1 14:45:19 2005
+@@ -43,11 +43,11 @@
+ return !(full_level>0) && !fixed;
+ }
+
+-void Pipe::setFixed(bool flag=true){
++void Pipe::setFixed(bool flag){
+ fixed=flag;
+ }
+
+-void Pipe::setBonus(Bonus bonus=NormalBonus){
++void Pipe::setBonus(Bonus bonus){
+ this->bonus=bonus;
+ }
+
diff --git a/games/pipenightdreams/files/patch-player.h b/games/pipenightdreams/files/patch-player.h
new file mode 100644
index 000000000000..2b66ea41b0a4
--- /dev/null
+++ b/games/pipenightdreams/files/patch-player.h
@@ -0,0 +1,13 @@
+--- src/player.h.orig Sat Apr 23 14:01:47 2005
++++ src/player.h Sat Apr 23 14:01:49 2005
+@@ -47,8 +47,8 @@
+ void setStartRowColumn(int row, int column);
+ void setBoard(Board * bd);
+
+- inline void setRestrictionCoef(unsigned int coef);
+- inline void setFixedCoef(unsigned int coef);
++ void setRestrictionCoef(unsigned int coef);
++ void setFixedCoef(unsigned int coef);
+
+ void incLives();
+ void decLives();
diff --git a/games/pipenightdreams/files/patch-pointer.cpp b/games/pipenightdreams/files/patch-pointer.cpp
new file mode 100644
index 000000000000..afc1358924aa
--- /dev/null
+++ b/games/pipenightdreams/files/patch-pointer.cpp
@@ -0,0 +1,11 @@
+--- src/pointer.cpp.orig Sat Jan 1 14:44:34 2005
++++ src/pointer.cpp Sat Jan 1 14:44:44 2005
+@@ -17,7 +17,7 @@
+
+ #include "pointer.h"
+
+-Pointer::Pointer(int row=0, int column=0){
++Pointer::Pointer(int row, int column){
+ this->row=row;
+ this->column=column;
+ this->moved_flag=true;
diff --git a/games/pipenightdreams/files/patch-pointer.h b/games/pipenightdreams/files/patch-pointer.h
new file mode 100644
index 000000000000..388b83597c3d
--- /dev/null
+++ b/games/pipenightdreams/files/patch-pointer.h
@@ -0,0 +1,15 @@
+--- src/pointer.h.orig Sat Jan 1 14:55:27 2005
++++ src/pointer.h Sat Jan 1 14:56:09 2005
+@@ -45,9 +45,9 @@
+
+ inline void setRow(int row);
+ inline void setColumn(int column);
+- inline void setRowColumn(int row, int column);
+- inline void setMoved(bool flag);
+- inline bool moved();
++ void setRowColumn(int row, int column);
++ void setMoved(bool flag);
++ bool moved();
+
+ Str * image_name;
+ Image * ima;
diff --git a/games/pipenightdreams/files/patch-score.cpp b/games/pipenightdreams/files/patch-score.cpp
new file mode 100644
index 000000000000..6da95c8b7737
--- /dev/null
+++ b/games/pipenightdreams/files/patch-score.cpp
@@ -0,0 +1,11 @@
+--- src/score.cpp.orig Sat Jan 1 14:44:00 2005
++++ src/score.cpp Sat Jan 1 14:44:07 2005
+@@ -18,7 +18,7 @@
+ #include "score.h"
+ #include <math.h>
+
+-Score::Score(int value=0){
++Score::Score(int value){
+ this->value=value;
+ delta=0;
+ changed=true;
diff --git a/games/pipenightdreams/files/patch-str.cpp b/games/pipenightdreams/files/patch-str.cpp
new file mode 100644
index 000000000000..650cd9513327
--- /dev/null
+++ b/games/pipenightdreams/files/patch-str.cpp
@@ -0,0 +1,29 @@
+--- src/str.cpp.orig Sat Jan 1 14:43:20 2005
++++ src/str.cpp Sat Jan 1 14:43:25 2005
+@@ -11,7 +11,7 @@
+
+ const char Str::nul = '\0';
+
+-Str::Str(const char * string=NULL){
++Str::Str(const char * string){
+ s=NULL;
+ set(string);
+ }
+@@ -25,7 +25,7 @@
+ if (s) delete[] s;
+ }
+
+-void Str::set(const char * string=NULL){
++void Str::set(const char * string){
+ if (s) delete[] s;
+ if (string){
+ s=new char[strlen(string)+1];
+@@ -71,7 +71,7 @@
+ return (strlen(s));
+ }
+
+-bool Str::isEqual(Str * str, bool case_sensitive = true){
++bool Str::isEqual(Str * str, bool case_sensitive){
+ if (case_sensitive){
+ return (!strcmp(s, str->s));
+ }