summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-05-27 14:03:21 +0000
committerbapt <bapt@FreeBSD.org>2014-05-27 14:03:21 +0000
commit9366ccd4c46a64bedf5e1072e169aaebb75702cf (patch)
treeb67109b3bdcea9a0c7f901ba809e43f8d535c1a0
parent3f4f537d8d1b0cf6eadea2c42d56ceef6955711f (diff)
downloadFreeBSD-ports-9366ccd4c46a64bedf5e1072e169aaebb75702cf.zip
FreeBSD-ports-9366ccd4c46a64bedf5e1072e169aaebb75702cf.tar.gz
USES=scons
Fix build with lua changes
-rw-r--r--games/battletanks/Makefile13
-rw-r--r--games/battletanks/files/patch-engine-SConscript23
2 files changed, 6 insertions, 30 deletions
diff --git a/games/battletanks/Makefile b/games/battletanks/Makefile
index ffc9fa1..5fb280e 100644
--- a/games/battletanks/Makefile
+++ b/games/battletanks/Makefile
@@ -16,17 +16,13 @@ LIB_DEPENDS= libsigc-2.0.so:${PORTSDIR}/devel/libsigc++20 \
libvorbisfile.so:${PORTSDIR}/audio/libvorbis \
libsmpeg.so:${PORTSDIR}/multimedia/smpeg
-USES= openal:al pkgconfig lua:51 tar:bzip2
+USES= openal:al pkgconfig lua:51 scons tar:bzip2
USE_LDCONFIG= yes
USE_SDL= image sdl
-USE_SCONS= yes
USE_PYTHON_BUILD= yes
-SCONS_ARGS= prefix=${PREFIX} resources_dir=${DATADIR} \
+MAKE_ARGS= prefix=${PREFIX} resources_dir=${DATADIR} \
--install-sandbox=${STAGEDIR}
-SCONS_BUILDENV= CC="${CC}" CXX="${CXX}" \
- CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS} -fpermissive" \
- LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}" \
- CPPPATH="${LOCALBASE}/include" LIBPATH="${LOCALBASE}/lib"
+CXXFLAGS+= -fpermissive
PORTDOCS= LICENSE LICENSE.EXCEPTION README-en.txt README-linux.txt \
donate.url homepage.url project_page.url video.txt
@@ -38,6 +34,9 @@ pre-build:
# would have resulted in a larger diff and gratuitous difference with Debian)
@cd ${WRKSRC} && ${PYTHON_CMD} engine/sl08/sl08.py > engine/sl08/sl08.h
+post-patch:
+ @${REINPLACE_CMD} -e "s/lua5.1/lua-${LUA_VER}/g" ${WRKSRC}/engine/SConscript
+
post-install:
${INSTALL_MAN} ${FILESDIR}/${PORTNAME}.6 \
${STAGEDIR}${MANPREFIX}/man/man6
diff --git a/games/battletanks/files/patch-engine-SConscript b/games/battletanks/files/patch-engine-SConscript
deleted file mode 100644
index 73c3cd9..0000000
--- a/games/battletanks/files/patch-engine-SConscript
+++ /dev/null
@@ -1,23 +0,0 @@
---- engine/SConscript.orig 2009-12-30 14:50:33.000000000 +0100
-+++ engine/SConscript 2010-01-13 23:58:23.000000000 +0100
-@@ -79,17 +79,17 @@
-
- if sys.platform != 'win32':
- got_lua = False
-- for lua in ['lua5.1', 'lua5.0', 'lua']:
-+ for lua in ['lua-5.1', 'lua-5.0', 'lua']:
- try:
- env.ParseConfig("pkg-config --cflags --libs %s 2>/dev/null" %lua);
- got_lua = True
- env.Append(CPPDEFINES=['ENABLE_LUA'])
-- bt_libs.append(lua)
-+ bt_libs.append('lua')
- break
- except:
- continue
- if not got_lua:
-- raise Exception("Cannot find lua5.1/lua5.0 or lua pkg-config information")
-+ raise Exception("Cannot find lua-5.1/lua-5.0 or lua pkg-config information")
-
- env.Append(CPPDEFINES=['ENABLE_LUA'])
- bt_sources.append('luaxx/state.cpp')
OpenPOWER on IntegriCloud