aboutsummaryrefslogtreecommitdiff
path: root/games/glob2
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-06-11 19:50:18 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-06-11 19:50:18 +0000
commit0ac68f2c9497fe24ed1b29a816f98385b62afda6 (patch)
tree6ac654e5882d10ab1c7f9df4dd97e4081e73886a /games/glob2
parent913fc3d387a15624162c6556ca324e87df8434f0 (diff)
downloadports-0ac68f2c9497fe24ed1b29a816f98385b62afda6.tar.gz
ports-0ac68f2c9497fe24ed1b29a816f98385b62afda6.zip
Notes
Diffstat (limited to 'games/glob2')
-rw-r--r--games/glob2/Makefile34
-rw-r--r--games/glob2/files/patch-SConstruct33
2 files changed, 45 insertions, 22 deletions
diff --git a/games/glob2/Makefile b/games/glob2/Makefile
index c554f130c166..9a408d0948a3 100644
--- a/games/glob2/Makefile
+++ b/games/glob2/Makefile
@@ -12,8 +12,6 @@ COMMENT= Globulation 2, free and innovative strategy game
LICENSE= GPLv3
-BROKEN= Fails to build
-
LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis \
libspeex.so:${PORTSDIR}/audio/speex \
libfribidi.so:${PORTSDIR}/converters/fribidi \
@@ -24,43 +22,45 @@ OPTIONS_DEFINE= DOCS PORTAUDIO
USES= pkgconfig scons
USE_SDL= image net sdl ttf
-USE_GL= gl
+USE_GL= gl glu
MAKE_ARGS= CCFLAGS="${CFLAGS}" \
LINKFLAGS="${LDFLAGS}" \
+ LIBPATH="${LIBPATH}" \
BINDIR="${STAGEDIR}${PREFIX}/bin" \
INSTALLDIR="${STAGEDIR}${PREFIX}/share" \
DATADIR="${DATADIR}"
INSTALLS_ICONS= yes
CFLAGS+= ${PA2_CFLAGS} -I${LOCALBASE}/include -Wno-return-type
-LDFLAGS+= ${PA2_LDFLAGS} -L${LOCALBASE}/lib -pthread
+LDFLAGS+= ${PA2_LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}
+LIBPATH= ${LIBPATH2}${LOCALBASE}/lib
PORTDOCS= README
SUB_FILES= pkg-message
.include <bsd.port.options.mk>
-# Should work with portaudio v19_20071207
-# Can be built with portaudio2 but does not run cleanly
.if ${PORT_OPTIONS:MPORTAUDIO}
-BUILD_DEPENDS+= portaudio2>0:${PORTSDIR}/audio/portaudio2
-RUN_DEPENDS+= portaudio2>0:${PORTSDIR}/audio/portaudio2
-MAKE_ARGS+= --portaudio=true
+LIB_DEPENDS+= libportaudio.so.2:${PORTSDIR}/audio/portaudio2
PA2_CFLAGS+= -I${LOCALBASE}/include/portaudio2
PA2_LDFLAGS+= -L${LOCALBASE}/lib/portaudio2
+LIBPATH2= ${LOCALBASE}/lib/portaudio2:
+MAKE_ARGS+= --portaudio=true
+.else
+MAKE_ARGS+= --portaudio=false
.endif
-post-patch:
- @${REINPLACE_CMD} -e \
+pre-configure:
+ ${REINPLACE_CMD} -e \
's|"-g"|""|' \
${WRKSRC}/SConstruct
- @${REINPLACE_CMD} -e \
+ ${REINPLACE_CMD} -e \
's|portaudio.h|portaudio2/portaudio.h|' \
${WRKSRC}/src/VoiceRecorder.cpp
- @${REINPLACE_CMD} -e \
+ ${REINPLACE_CMD} -e \
'/^Icon/s|=.*|=${PORTNAME}|' \
${WRKSRC}/data/${PORTNAME}.desktop
- @${REINPLACE_CMD} -e \
+ ${REINPLACE_CMD} -e \
'/(PACKAGE_SOURCE_DIR)/s|^|//|' \
${WRKSRC}/libgag/src/FileManager.cpp
@@ -74,14 +74,14 @@ manual-regression-test:
post-install:
.for s in 16 24 32 48 64 128
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
(cd ${WRKSRC}/data/icons && ${INSTALL_DATA} glob2-icon-${s}x${s}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/${PORTNAME}.png)
.endfor
${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/glob2
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/glob2
.include <bsd.port.mk>
diff --git a/games/glob2/files/patch-SConstruct b/games/glob2/files/patch-SConstruct
index 4844c9663b40..43316649bbe0 100644
--- a/games/glob2/files/patch-SConstruct
+++ b/games/glob2/files/patch-SConstruct
@@ -1,14 +1,16 @@
---- ./SConstruct.orig 2009-08-30 21:23:30.000000000 +0200
-+++ ./SConstruct 2013-10-28 02:21:28.000000000 +0100
-@@ -14,6 +14,7 @@
+--- SConstruct.orig 2009-08-30 21:23:30.000000000 +0200
++++ SConstruct 2014-06-10 23:51:36.000000000 +0200
+@@ -14,7 +14,9 @@
def establish_options(env):
opts = Options('options_cache.py')
+ opts.Add("CCFLAGS", "Manually add to the CCFLAGS", "")
opts.Add("CXXFLAGS", "Manually add to the CXXFLAGS", "-g")
++ opts.Add("LIBPATH", "Manually add to the LIBPATH", "")
opts.Add("LINKFLAGS", "Manually add to the LINKFLAGS", "-g")
if isDarwinPlatform:
-@@ -22,10 +23,10 @@
+ opts.Add(PathOption("INSTALLDIR", "Installation Directory", "./"))
+@@ -22,10 +24,10 @@
opts.Add("INSTALLDIR", "Installation Directory", "/usr/local/share")
opts.Add("BINDIR", "Binary Installation Directory", "/usr/local/bin")
opts.Add("DATADIR", "Directory where data will be put, set to the same as INSTALLDIR", "/usr/local/share")
@@ -23,7 +25,7 @@
opts.Add("font", "Build the game using an alternative font placed in the data/font folder", "sans.ttf")
Help(opts.GenerateHelpText(env))
opts.Update(env)
-@@ -111,14 +112,17 @@
+@@ -111,14 +113,17 @@
missing.append("zlib")
boost_thread = ''
@@ -41,3 +43,24 @@
boost_date_time = ''
if conf.CheckLib("boost_date_time") and conf.CheckCXXHeader("boost/date_time/posix_time/posix_time.hpp"):
+@@ -186,7 +191,7 @@
+ env.Append(LIBS=['fribidi'])
+
+ #Do checks for portaudio
+- if conf.CheckLib('portaudio') and conf.CheckCXXHeader('portaudio.h'):
++ if conf.CheckLib('portaudio2') and conf.CheckCXXHeader('portaudio.h'):
+ if env['mingw'] or isWindowsPlatform:
+ print "--------"
+ print "NOTE: It appears you are compiling under Windows. At this stage, PortAudio crashes Globulation 2 when voice chat is used."
+@@ -194,9 +199,9 @@
+ print "--------"
+ else:
+ if GetOption('portaudio'):
+- print "trying to use portaudio"
++ print "trying to use portaudio2"
+ configfile.add("HAVE_PORTAUDIO ", "Defined when Port Audio support is present and compiled")
+- env.Append(LIBS=['portaudio'])
++ env.Append(LIBS=['portaudio2'])
+ else:
+ print " no portaudio"
+ print " no portaudio - although portaudio was found to be installed, you have "