diff options
author | pawel <pawel@FreeBSD.org> | 2013-12-25 20:15:23 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2013-12-25 20:15:23 +0800 |
commit | aa45ba4e4fe92af1ed11e637709c2bdfe5d458ef (patch) | |
tree | 1fee162d3991adf1f2e72eb7ed8cef683e0623bc | |
parent | 64604cf3f7e8185cce1e4f3536be68871f4af2f1 (diff) | |
download | freebsd-ports-gnome-aa45ba4e4fe92af1ed11e637709c2bdfe5d458ef.tar.gz freebsd-ports-gnome-aa45ba4e4fe92af1ed11e637709c2bdfe5d458ef.tar.zst freebsd-ports-gnome-aa45ba4e4fe92af1ed11e637709c2bdfe5d458ef.zip |
- Fix build on -current
- Convert to new options framework, add PORTAUDIO option
- Strip glob2 binary
PR: ports/184841
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
-rw-r--r-- | games/glob2/Makefile | 74 | ||||
-rw-r--r-- | games/glob2/files/patch-src__Game.h | 36 |
2 files changed, 76 insertions, 34 deletions
diff --git a/games/glob2/Makefile b/games/glob2/Makefile index 6ddb52c205d4..d8aba1916e4e 100644 --- a/games/glob2/Makefile +++ b/games/glob2/Makefile @@ -3,7 +3,7 @@ PORTNAME= glob2 PORTVERSION= 0.9.4.4 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= games MASTER_SITES= SAVANNAH/${PORTNAME}/${PORTVERSION:R}/ @@ -17,44 +17,50 @@ LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis \ libfribidi.so:${PORTSDIR}/converters/fribidi \ libboost_thread.so:${PORTSDIR}/devel/boost-libs \ libfreetype.so:${PORTSDIR}/print/freetype2 -# Should work with portaudio v19_20071207 -# Can be built with portaudio2 but does not run cleanly -#LIB_DEPENDS+= libportaudio.so:${PORTSDIR}/audio/portaudio2 -USES= gmake +OPTIONS_DEFINE= DOCS PORTAUDIO + +USES= pkgconfig scons USE_SDL= image net sdl ttf USE_GL= gl -USE_SCONS= yes -#SCONS_ARGS+= --portaudio=true -#SCONS_BUILDENV= ${SCONS_ENV} -SCONS_ARGS= CXXFLAGS+=" -g -pg" INSTALLDIR="${STAGEDIR}${PREFIX}/share" -CFLAGS+= -Wno-return-type - +MAKE_ARGS= CCFLAGS="${CFLAGS}" \ + LINKFLAGS="${LDFLAGS}" \ + BINDIR="${STAGEDIR}${PREFIX}/bin" \ + INSTALLDIR="${STAGEDIR}${PREFIX}/share" \ + DATADIR="${DATADIR}" INSTALLS_ICONS= yes -ICON_SIZES= 16x16 24x24 32x32 48x48 64x64 128x128 -#CFLAGS+= ${PTHREAD_CFLAGS} -I. `pkg-config --cflags portaudio-2.0` -I${LOCALBASE}/include -CFLAGS+= ${PTHREAD_CFLAGS} -I. -I${LOCALBASE}/include -#LINKFLAGS= ${PTHREAD_LIBS} `pkg-config --libs portaudio-2.0` -L${LOCALBASE}/lib -LINKFLAGS= ${PTHREAD_LIBS} -L${LOCALBASE}/lib +CFLAGS+= ${PA2_CFLAGS} -I${LOCALBASE}/include -Wno-return-type +LDFLAGS+= ${PA2_LDFLAGS} -L${LOCALBASE}/lib -pthread PORTDOCS= README +SUB_FILES= pkg-message -OPTIONS_DEFINE= DOCS +.include <bsd.port.options.mk> -SUB_FILES= pkg-message +# 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 +PA2_CFLAGS+= -I${LOCALBASE}/include/portaudio2 +PA2_LDFLAGS+= -L${LOCALBASE}/lib/portaudio2 +.endif post-patch: - @${REINPLACE_CMD} -e 's|/usr/local/bin|${STAGEDIR}${PREFIX}/bin|' \ + @${REINPLACE_CMD} -e \ + 's|"-g"|""|' \ ${WRKSRC}/SConstruct - @${REINPLACE_CMD} -e 's|portaudio.h|portaudio2/portaudio.h|' ${WRKSRC}/src/VoiceRecorder.cpp - @${REINPLACE_CMD} -e 's|^Icon.*|Icon=${PORTNAME}|' \ - ${WRKSRC}/data/${PORTNAME}.desktop - -.for s in 16 24 32 48 64 128 - @cd ${WRKSRC}/data/icons && \ - ${MV} glob2-icon-${s}x${s}.png ${PORTNAME}_${s}x${s}.png -.endfor + @${REINPLACE_CMD} -e \ + 's|portaudio.h|portaudio2/portaudio.h|' \ + ${WRKSRC}/src/VoiceRecorder.cpp + @${REINPLACE_CMD} -e \ + '/^Icon/s|=.*|=${PORTNAME}|' \ + ${WRKSRC}/data/${PORTNAME}.desktop + @${REINPLACE_CMD} -e \ + '/(PACKAGE_SOURCE_DIR)/s|^|//|' \ + ${WRKSRC}/libgag/src/FileManager.cpp manual-regression-test: # Don't enable these tests on pointyhat, they take too long. @@ -65,15 +71,15 @@ manual-regression-test: .endif post-install: -.for s in ${ICON_SIZES} - @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/ - ${INSTALL_DATA} ${WRKSRC}/data/icons/${PORTNAME}_${s}.png \ - ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png +.for s in 16 24 32 48 64 128 + @${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/ - + ${STAGEDIR}${PREFIX}/share/pixmaps @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR}) + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/glob2 .include <bsd.port.mk> diff --git a/games/glob2/files/patch-src__Game.h b/games/glob2/files/patch-src__Game.h new file mode 100644 index 000000000000..ed710bb7bad6 --- /dev/null +++ b/games/glob2/files/patch-src__Game.h @@ -0,0 +1,36 @@ +--- src/Game.h.orig ++++ src/Game.h +@@ -82,6 +82,16 @@ + DRAW_OVERLAY = 0x100, + }; + ++ struct BuildProject ++ { ++ int posX; ++ int posY; ++ int teamNumber; ++ int typeNum; ++ int unitWorking; ++ int unitWorkingFuture; ++ }; ++ + /// This method will prepare the game with this mapHeader + void setMapHeader(const MapHeader& mapHeader); + +@@ -149,16 +159,6 @@ + BOTTOM_TO_TOP + }; + +- struct BuildProject +- { +- int posX; +- int posY; +- int teamNumber; +- int typeNum; +- int unitWorking; +- int unitWorkingFuture; +- }; +- + ///Initiates Game + void init(GameGUI *gui, MapEdit* edit); + |