diff options
author | mi <mi@FreeBSD.org> | 2014-06-08 07:30:50 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2014-06-08 07:30:50 +0800 |
commit | bcda8981509dd87e021e5754c801fccd11d2ffa1 (patch) | |
tree | 0cbe4ab8b7b3998f4b73f008cb3c0f4f6cd78b21 /games | |
parent | 4781e71b3264dee6601b996d9337a2931eb577b1 (diff) | |
download | freebsd-ports-gnome-bcda8981509dd87e021e5754c801fccd11d2ffa1.tar.gz freebsd-ports-gnome-bcda8981509dd87e021e5754c801fccd11d2ffa1.tar.zst freebsd-ports-gnome-bcda8981509dd87e021e5754c801fccd11d2ffa1.zip |
Uncondemn by adding patches to appease new C++ compilers
(tested against GNU 4.8 and clang 3.4). Add support for staging.
While here, change vegastrike to build against the existing
boost.
While here, rearrange vegastrike-data to extract directly to
${STAGEDIR}${DATADIR} -- saving one round of data-writing.
Diffstat (limited to 'games')
-rw-r--r-- | games/vegastrike-data/Makefile | 37 | ||||
-rw-r--r-- | games/vegastrike/Makefile | 26 | ||||
-rw-r--r-- | games/vegastrike/files/patch-Makefile.in | 20 | ||||
-rw-r--r-- | games/vegastrike/files/patch-c++ | 33 |
4 files changed, 81 insertions, 35 deletions
diff --git a/games/vegastrike-data/Makefile b/games/vegastrike-data/Makefile index f682f8e22539..4bb63fe0306c 100644 --- a/games/vegastrike-data/Makefile +++ b/games/vegastrike-data/Makefile @@ -11,32 +11,29 @@ DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Vega Strike data files -DEPRECATED= Does not compile with modern compilers -EXPIRATION_DATE= 2014-07-06 - USE_BZIP2= yes NO_BUILD= yes -PLIST= ${WRKDIR}/pkg-plist -WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} - MANUAL_PACKAGE_BUILD=huge -NO_STAGE= yes -post-patch: - @${FIND} ${WRKSRC} -name "Makefile.am" -delete - -pre-install: - @${RM} -f ${PLIST} - @cd ${WRKSRC} && \ - ${FIND} . -type f -mindepth 1 | ${SORT} | \ - ${SED} -e 's|^\./||; s|^|%%DATADIR%%/|' >> ${PLIST} && \ - ${FIND} . -type d -mindepth 1 | ${SORT} -r | \ - ${SED} -e 's|^\./||; s|^|@dirrm %%DATADIR%%/|' >> ${PLIST} - @${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST} +do-extract: + ${MKDIR} ${WRKDIR} + # Will extract directly into ${STAGEDIR}${DATADIR:H} do-install: - ${MKDIR} ${DATADIR} - cd ${WRKSRC} && ${COPYTREE_SHARE} . ${DATADIR} + ${RM} -rf ${STAGEDIR}${DATADIR} + ${MKDIR} ${STAGEDIR}${DATADIR:H} + ${TAR} -C ${STAGEDIR}${DATADIR:H} -xvf ${_DISTDIR}/${DISTFILES} \ + --exclude Makefile.am --no-same-owner 2>&1 | \ + ${AWK} ' \ + BEGIN { dirn = 0 ; print "@cwd ${DATADIR}" } \ + { sub("^x [^/]*/", "") } \ + /\/$$/ { sub("/$$", ""); dirs[dirn++] = $$0 ; next } \ + !/^$$/ { print $$0 } \ + END {while (dirn--) print "@dirrm " dirs[dirn]; \ + print "@cwd"; print "@dirrm ${DATADIR_REL}" } \ + ' >> ${TMPPLIST} + ${MV} ${STAGEDIR}${DATADIR:H}/vegastrike-data-${PORTVERSION} \ + ${STAGEDIR}${DATADIR} .include <bsd.port.mk> diff --git a/games/vegastrike/Makefile b/games/vegastrike/Makefile index a0f429f5f0e0..5da4a6504e2b 100644 --- a/games/vegastrike/Makefile +++ b/games/vegastrike/Makefile @@ -3,7 +3,7 @@ PORTNAME= vegastrike PORTVERSION= 0.5.1.r1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/0.5.1/ DISTNAME= vegastrike-src-${PORTVERSION} @@ -11,12 +11,10 @@ DISTNAME= vegastrike-src-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Opensource 3D space simulator -DEPRECATED= Does not compile with modern compilers -EXPIRATION_DATE= 2014-07-06 - RUN_DEPENDS= ${DATADIR}/vegastrike.ico:${PORTSDIR}/games/vegastrike-data -LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \ - vorbis.4:${PORTSDIR}/audio/libvorbis \ +LIB_DEPENDS= boost_python:${PORTSDIR}/devel/boost-python-libs \ + expat:${PORTSDIR}/textproc/expat2 \ + vorbis:${PORTSDIR}/audio/libvorbis \ ogg:${PORTSDIR}/audio/libogg USE_BZIP2= yes @@ -30,10 +28,13 @@ USE_GL= gl glu glut USE_GNOME= gtk20 CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib +USE_DOS2UNIX= *.cpp *.h +EXTRACT_AFTER_ARGS+=--exclude boost # cegui and ffmpeg are not used yet CONFIGURE_ARGS= --disable-cegui --disable-ffmpeg \ --with-data-dir="${LOCALBASE}/share/${PORTNAME}" \ + --with-boost=system \ --enable-flags="${CXXFLAGS}" PLIST_FILES= bin/vegastrike bin/vssetup bin/vegaserver @@ -43,7 +44,6 @@ PORTDOCS= README OPTIONS_DEFINE= MESHER MESHER_DESC= Enable mesher modelling tool -NO_STAGE= yes .include <bsd.port.pre.mk> .if ${OSVERSION} < 800000 @@ -63,15 +63,11 @@ post-patch: s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/vegaserver ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/vegastrike ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/vssetup ${PREFIX}/bin -.if ${PORT_OPTIONS:MMESHER} - ${INSTALL_PROGRAM} ${WRKSRC}/mesher ${PREFIX}/bin -.endif + ${INSTALL_PROGRAM} ${PLIST_FILES:S|bin|${WRKSRC}|} \ + ${STAGEDIR}${PREFIX}/bin .if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .endif post-install: diff --git a/games/vegastrike/files/patch-Makefile.in b/games/vegastrike/files/patch-Makefile.in new file mode 100644 index 000000000000..9873583c0dbd --- /dev/null +++ b/games/vegastrike/files/patch-Makefile.in @@ -0,0 +1,20 @@ +This patch filters-out the libraries not needed for the vegaserver, +which is a daemon (non-GUI) process. It also removes the useless +patching of the Boost code. + +--- Makefile.in 2012-03-31 21:53:59.000000000 -0400 ++++ Makefile.in 2014-06-07 17:30:56.000000000 -0400 +@@ -3064,5 +3064,5 @@ + vegaserver$(EXEEXT): $(vegaserver_OBJECTS) $(vegaserver_DEPENDENCIES) + @rm -f vegaserver$(EXEEXT) +- $(CXXLINK) $(vegaserver_LDFLAGS) $(vegaserver_OBJECTS) $(vegaserver_LDADD) $(LIBS) ++ $(CXXLINK) $(vegaserver_LDFLAGS) $(vegaserver_OBJECTS) $(vegaserver_LDADD) $(filter-out -lX% -lGL% -lSDL% -lglut,$(LIBS)) + src/gui/$(am__dirstamp): + @$(mkdir_p) src/gui +@@ -5451,5 +5451,5 @@ + @BOOSTSYSTEM_FALSE@done + +-all: boost_patched_gcc44 ++all: + + boost_patched_gcc44: boost_gcc44.patch diff --git a/games/vegastrike/files/patch-c++ b/games/vegastrike/files/patch-c++ new file mode 100644 index 000000000000..e826f119b35f --- /dev/null +++ b/games/vegastrike/files/patch-c++ @@ -0,0 +1,33 @@ +--- src/resizable.h 2010-02-25 09:26:53.000000000 -0500 ++++ src/resizable.h 2014-06-07 12:38:44.000000000 -0400 +@@ -1,2 +1,4 @@ ++#include <string.h> ++ + #include <cstdlib> + template < class ITEM > +--- src/cmd/unit_jump.h 2012-03-19 04:20:14.000000000 -0400 ++++ src/cmd/unit_jump.h 2014-06-07 12:46:15.000000000 -0400 +@@ -109,5 +109,5 @@ + if (tester->isUnit() == UNITPTR && tester != this) + if ( ( this->LocalPosition()-tester->LocalPosition() ).Magnitude() < this->rSize()+tester->rSize() ) +- SetCurPosition( this->LocalPosition()+this->cumulative_transformation_matrix.getR() ++ this->SetCurPosition( this->LocalPosition()+this->cumulative_transformation_matrix.getR() + *( 4*( this->rSize()+tester->rSize() ) ) ); + DealPossibleJumpDamage( this ); +--- objconv/basemaker/base_maker_texture.cpp 2010-03-09 21:56:23.000000000 -0500 ++++ objconv/basemaker/base_maker_texture.cpp 2014-06-07 12:48:22.000000000 -0400 +@@ -2,4 +2,5 @@ + #include "base_maker_texture.h" + #include <stdio.h> ++#include <string.h> + #include <png.h> + #ifdef _WIN32 +--- src/gldrv/hashtable_3d.h 2014-06-07 13:28:18.000000000 -0400 ++++ src/gldrv/hashtable_3d.h 2014-06-07 13:51:23.000000000 -0400 +@@ -38,5 +38,5 @@ + public: + ///Hashes a single value to a value on the collide table truncated to all 3d constraints. Consider using a swizzle +- int hash_int( const double aye ) ++ static int hash_int( const double aye ) + { + return ( (int) ( ( (aye < 0) ? (aye |