summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2005-07-23 10:41:11 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2005-07-23 10:41:11 +0000
commit6f823f416633e55f8b60682e4496dec69eee1e03 (patch)
treea358535fdab33caabb490190b2b1e8ec47ac80e6 /games
parentAdd a generic message regarding the problems with some soundcards. (diff)
- Add missing depend on libxml [1]
- Fix build on < 5.4 (5.3, 4.x). Unbreak on 4.x Submitted by: maintainer Reported by: kris via pointyhat [1]
Notes
Notes: svn path=/head/; revision=139964
Diffstat (limited to 'games')
-rw-r--r--games/lincity-ng/Makefile13
-rw-r--r--games/lincity-ng/files/extra-src-gui-Gradient.cpp12
-rw-r--r--games/lincity-ng/files/extra-src-gui-PainterSDL-PainterSDL.cpp13
3 files changed, 37 insertions, 1 deletions
diff --git a/games/lincity-ng/Makefile b/games/lincity-ng/Makefile
index 16e22db4dfed..c76356542655 100644
--- a/games/lincity-ng/Makefile
+++ b/games/lincity-ng/Makefile
@@ -20,6 +20,8 @@ LIB_DEPENDS= physfs-1.0.0:${PORTSDIR}/devel/physfs
USE_BZIP2= yes
USE_GCC= 3.2+
USE_SDL= sdl mixer image ttf gfx
+USE_GNOME= libxml2
+USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libphysfs=${PREFIX}
@@ -30,7 +32,16 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
-BROKEN= "Does not build on 4.x"
+pre-configure::
+ @${REINPLACE_CMD} -e 's|<stdint.h>|<inttypes.h>|' \
+ ${WRKSRC}/src/gui/Filter.cpp ${WRKSRC}/src/gui/Gradient.hpp \
+ ${WRKSRC}/src/gui/Color.hpp
+.endif
+
+.if ${OSVERSION} < 504000
+pre-configure::
+ @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-src-gui-Gradient.cpp
+ @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-src-gui-PainterSDL-PainterSDL.cpp
.endif
do-build:
diff --git a/games/lincity-ng/files/extra-src-gui-Gradient.cpp b/games/lincity-ng/files/extra-src-gui-Gradient.cpp
new file mode 100644
index 000000000000..2996f8917001
--- /dev/null
+++ b/games/lincity-ng/files/extra-src-gui-Gradient.cpp
@@ -0,0 +1,12 @@
+--- src/gui/Gradient.cpp.orig Fri Jul 15 19:47:11 2005
++++ src/gui/Gradient.cpp Sat Jul 23 12:40:46 2005
+@@ -28,9 +28,7 @@
+ #include "Painter.hpp"
+ #include "ComponentFactory.hpp"
+
+-#ifdef _MSC_VER
+ #define lrintf(x) (long int)x
+-#endif
+
+ Gradient::Gradient()
+ : direction(LEFT_RIGHT)
diff --git a/games/lincity-ng/files/extra-src-gui-PainterSDL-PainterSDL.cpp b/games/lincity-ng/files/extra-src-gui-PainterSDL-PainterSDL.cpp
new file mode 100644
index 000000000000..476925c8c3ac
--- /dev/null
+++ b/games/lincity-ng/files/extra-src-gui-PainterSDL-PainterSDL.cpp
@@ -0,0 +1,13 @@
+--- src/gui/PainterSDL/PainterSDL.cpp.orig Fri Jul 15 19:47:12 2005
++++ src/gui/PainterSDL/PainterSDL.cpp Sat Jul 23 12:41:09 2005
+@@ -30,10 +30,8 @@
+
+ #include "TextureSDL.hpp"
+
+-#ifdef _MSC_VER
+ #define lrint(x) (long int)x
+ #define lroundf(x) (long int)(x + .5)
+-#endif
+
+ PainterSDL::PainterSDL(SDL_Surface* _target)
+ : target(_target)