diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2018-06-30 01:13:09 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2018-06-30 01:13:09 +0800 |
commit | 818967c0a0ebcb14726c46e51cbec46ba6686a1f (patch) | |
tree | 0654afafb5c23b6e90c1c87f85ed8e8419e2e285 /games | |
parent | f7e5a02b41ffdd3e9974c160c0cc1a821c94a2eb (diff) | |
download | freebsd-ports-gnome-818967c0a0ebcb14726c46e51cbec46ba6686a1f.tar.gz freebsd-ports-gnome-818967c0a0ebcb14726c46e51cbec46ba6686a1f.tar.zst freebsd-ports-gnome-818967c0a0ebcb14726c46e51cbec46ba6686a1f.zip |
- Pet portlint
- Switch to USES=localbase
- Fix build with clang 6
- Switch to options helpers
- Regenerate patches
Diffstat (limited to 'games')
-rw-r--r-- | games/spacejunk/Makefile | 17 | ||||
-rw-r--r-- | games/spacejunk/files/patch-src-SFont.c | 6 | ||||
-rw-r--r-- | games/spacejunk/files/patch-src-physicbody.cpp | 18 | ||||
-rw-r--r-- | games/spacejunk/files/patch-src-scorelist.cpp | 6 |
4 files changed, 25 insertions, 22 deletions
diff --git a/games/spacejunk/Makefile b/games/spacejunk/Makefile index 75375418dfbc..1664a897cb1c 100644 --- a/games/spacejunk/Makefile +++ b/games/spacejunk/Makefile @@ -13,11 +13,15 @@ COMMENT= Video game about traveling in 2D planetary systems LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING +BROKEN_aarch64= Fails to compile: error: _compile_time_assert__ declared as an array with a negative size +BROKEN_sparc64= Doesn't compile on sparc64 + +USES= localbase GNU_CONFIGURE= yes USE_SDL= sdl mixer image -CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib +CXXFLAGS+= -Wno-c++11-narrowing +CXXFLAGS+= -O0 # XXX: segfaults with optimization, need to investigate SUB_FILES= spacejunk @@ -34,9 +38,6 @@ DESKTOP_ENTRIES="Spacejunk" \ OPTIONS_DEFINE= DOCS -BROKEN_aarch64= Fails to compile: error: _compile_time_assert__ declared as an array with a negative size -BROKEN_sparc64= Doesn't compile on sparc64 - post-patch: @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/src/gem-uta.c \ ${WRKSRC}/libinfo/gem-uta.c @@ -44,9 +45,11 @@ post-patch: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/spacejunk ${STAGEDIR}${PREFIX}/libexec/ - cd ${WRKSRC} && ${COPYTREE_SHARE} 'data config.txt' ${STAGEDIR}${DATADIR}/ + @cd ${WRKSRC} && ${COPYTREE_SHARE} 'data config.txt' ${STAGEDIR}${DATADIR}/ ${INSTALL_SCRIPT} ${WRKDIR}/spacejunk ${STAGEDIR}${PREFIX}/bin/ - cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/ + +do-install-DOCS-on: + @cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/ ${RMDIR} ${STAGEDIR}${DOCSDIR}/web/templates ${STAGEDIR}${DOCSDIR}/web/toolbars .include <bsd.port.mk> diff --git a/games/spacejunk/files/patch-src-SFont.c b/games/spacejunk/files/patch-src-SFont.c index b139751b8364..c92367f766e1 100644 --- a/games/spacejunk/files/patch-src-SFont.c +++ b/games/spacejunk/files/patch-src-SFont.c @@ -1,7 +1,7 @@ Clang compatibility ---- src/SFont.c.orig 2013-06-14 01:28:33.767289275 +0400 -+++ src/SFont.c 2013-06-14 01:39:06.709113401 +0400 -@@ -72,7 +72,7 @@ +--- src/SFont.c.orig 2009-06-17 17:47:07 UTC ++++ src/SFont.c +@@ -72,7 +72,7 @@ static Uint32 GetPixel(SDL_Surface *Surf return -1; } diff --git a/games/spacejunk/files/patch-src-physicbody.cpp b/games/spacejunk/files/patch-src-physicbody.cpp index a5e891f87a67..6eb794e129a2 100644 --- a/games/spacejunk/files/patch-src-physicbody.cpp +++ b/games/spacejunk/files/patch-src-physicbody.cpp @@ -1,6 +1,6 @@ Clang compatibility ---- src/physicbody.cpp.orig 2013-06-14 01:22:11.442112529 +0400 -+++ src/physicbody.cpp 2013-06-14 01:38:02.468909545 +0400 +--- src/physicbody.cpp.orig 2009-06-17 17:47:07 UTC ++++ src/physicbody.cpp @@ -20,9 +20,21 @@ #include "physicbody.h" #include <math.h> @@ -23,7 +23,7 @@ Clang compatibility const double PhysicEngine::G=6.6726e-17; -@@ -165,7 +180,6 @@ +@@ -165,7 +177,6 @@ inline Vector2d PhysicEngine::calculateA return acc; } @@ -31,7 +31,7 @@ Clang compatibility void PhysicEngine::_vstep (int delta) { #define DELTA_LIMIT 3 #define ERROR_LIMIT 0.001 -@@ -179,11 +193,11 @@ +@@ -179,11 +190,11 @@ void PhysicEngine::_vstep (int delta) { real tempdelta=delta; real time=0; int n=bodies.size(); @@ -46,7 +46,7 @@ Clang compatibility do { for (vector<PhysicBody*>::iterator j=bodies.begin();j!=bodies.end();j++) { if (!*j) continue; -@@ -306,12 +320,12 @@ +@@ -306,12 +317,12 @@ void PhysicEngine::_step(int delta,bool real PhysicEngine::vstepRK5 (real delta,Vector2d initaccels[]) { real maxdist=0; int n=bodies.size(); @@ -65,7 +65,7 @@ Clang compatibility for (vector<PhysicBody*>::iterator j=bodies.begin();j!=bodies.end();j++) { if (!*j || ((*j)->flags & PhysicBody::FIXED)) continue; mipos[(*j)->id]=(*j)->pos; -@@ -321,8 +335,8 @@ +@@ -321,8 +332,8 @@ real PhysicEngine::vstepRK5 (real delta, (*j)->pos=mipos[(*j)->id]+k1pos[(*j)->id]*0.2; } calculateForces(delta*0.2,accels); @@ -76,7 +76,7 @@ Clang compatibility for (vector<PhysicBody*>::iterator j=bodies.begin();j!=bodies.end();j++) { if (!*j || ((*j)->flags & PhysicBody::FIXED)) continue; k2vel[(*j)->id]=accels[(*j)->id]*delta; -@@ -330,8 +344,8 @@ +@@ -330,8 +341,8 @@ real PhysicEngine::vstepRK5 (real delta, (*j)->pos=mipos[(*j)->id]+k1pos[(*j)->id]*(3.0/40.0)+k2pos[(*j)->id]*(9.0/40.0); } calculateForces(delta*0.3,accels); @@ -87,7 +87,7 @@ Clang compatibility for (vector<PhysicBody*>::iterator j=bodies.begin();j!=bodies.end();j++) { if (!*j || ((*j)->flags & PhysicBody::FIXED)) continue; k3vel[(*j)->id]=accels[(*j)->id]*delta; -@@ -339,8 +353,8 @@ +@@ -339,8 +350,8 @@ real PhysicEngine::vstepRK5 (real delta, (*j)->pos=mipos[(*j)->id]+k1pos[(*j)->id]*0.3+k2pos[(*j)->id]*(-0.9)+k3pos[(*j)->id]*1.2; } calculateForces(delta*0.6,accels); @@ -98,7 +98,7 @@ Clang compatibility for (vector<PhysicBody*>::iterator j=bodies.begin();j!=bodies.end();j++) { if (!*j || ((*j)->flags & PhysicBody::FIXED)) continue; k4vel[(*j)->id]=accels[(*j)->id]*delta; -@@ -348,8 +362,8 @@ +@@ -348,8 +359,8 @@ real PhysicEngine::vstepRK5 (real delta, (*j)->pos=mipos[(*j)->id]+k1pos[(*j)->id]*(-11.0/54.0)+k2pos[(*j)->id]*2.5+k3pos[(*j)->id]*(-70.0/27.0)+k4pos[(*j)->id]*(35.0/27.0); } calculateForces(delta,accels); diff --git a/games/spacejunk/files/patch-src-scorelist.cpp b/games/spacejunk/files/patch-src-scorelist.cpp index c6bf4489e7c6..6bcf7db474a6 100644 --- a/games/spacejunk/files/patch-src-scorelist.cpp +++ b/games/spacejunk/files/patch-src-scorelist.cpp @@ -1,6 +1,6 @@ ---- src/scorelist.cpp.orig 2013-09-14 02:20:35.651231123 +0400 -+++ src/scorelist.cpp 2013-09-14 02:22:39.837225946 +0400 -@@ -98,7 +98,7 @@ +--- src/scorelist.cpp.orig 2010-05-07 18:21:19 UTC ++++ src/scorelist.cpp +@@ -98,7 +98,7 @@ string ScoreList::getPoints() const { ostream & operator << (ostream & o,const ScoreList & s) { STDStreamPrinter sp(o); OStreamUTF8Encoder sc(&sp); |