From 2b7ea3b722b8bf6dfc324b73fee79e5da07b858f Mon Sep 17 00:00:00 2001 From: danfe Date: Mon, 20 Sep 2004 19:43:12 +0000 Subject: Fix problematic C++ code, and unbreak the build with recent GCC. Reported by: kris Approved by: portmgr (marcus), fjoe (mentor, implicit) --- games/alephone/Makefile | 8 +------- .../files/patch-Source_Files::Misc::sdl_widgets.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 games/alephone/files/patch-Source_Files::Misc::sdl_widgets.h (limited to 'games/alephone') diff --git a/games/alephone/Makefile b/games/alephone/Makefile index 9ea6be5a6dd..8f677a4475c 100644 --- a/games/alephone/Makefile +++ b/games/alephone/Makefile @@ -22,12 +22,6 @@ USE_X_PREFIX= yes GNU_CONFIGURE= yes CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" -.include - -.if ${OSVERSION} >= 502126 -BROKEN= "Does not compile on FreeBSD >= 5.x" -.endif - post-patch: @${PERL} -pi -e 's,^#include \"network_modem.h\".*,,' \ ${WRKSRC}/Source_Files/Network/network.cpp \ @@ -38,4 +32,4 @@ post-install: @${CAT} ${PKGMESSAGE} .endif -.include +.include diff --git a/games/alephone/files/patch-Source_Files::Misc::sdl_widgets.h b/games/alephone/files/patch-Source_Files::Misc::sdl_widgets.h new file mode 100644 index 00000000000..89bc01409e5 --- /dev/null +++ b/games/alephone/files/patch-Source_Files::Misc::sdl_widgets.h @@ -0,0 +1,20 @@ +--- Source_Files/Misc/sdl_widgets.h.orig Mon Jul 16 21:37:51 2001 ++++ Source_Files/Misc/sdl_widgets.h Mon Sep 20 20:46:48 2004 +@@ -402,7 +402,7 @@ + protected: + void draw_items(SDL_Surface *s) const + { +- vector::const_iterator i = items.begin() + top_item; ++ typename vector::const_iterator i = items.begin() + top_item; + int x = rect.x + get_dialog_space(LIST_L_SPACE); + int y = rect.y + get_dialog_space(LIST_T_SPACE); + int width = rect.w - get_dialog_space(LIST_L_SPACE) - get_dialog_space(LIST_R_SPACE); +@@ -413,7 +413,7 @@ + const vector &items; // List of items + + private: +- virtual void draw_item(vector::const_iterator i, SDL_Surface *s, int x, int y, int width, bool selected) const = 0; ++ virtual void draw_item(typename vector::const_iterator i, SDL_Surface *s, int x, int y, int width, bool selected) const = 0; + }; + + #endif -- cgit