svn commit: r473561 - in head/games/spacejunk: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Fri Jun 29 17:13:11 UTC 2018
Author: amdmi3
Date: Fri Jun 29 17:13:09 2018
New Revision: 473561
URL: https://svnweb.freebsd.org/changeset/ports/473561
Log:
- Pet portlint
- Switch to USES=localbase
- Fix build with clang 6
- Switch to options helpers
- Regenerate patches
Modified:
head/games/spacejunk/Makefile
head/games/spacejunk/files/patch-src-SFont.c
head/games/spacejunk/files/patch-src-physicbody.cpp
head/games/spacejunk/files/patch-src-scorelist.cpp
Modified: head/games/spacejunk/Makefile
==============================================================================
--- head/games/spacejunk/Makefile Fri Jun 29 17:08:00 2018 (r473560)
+++ head/games/spacejunk/Makefile Fri Jun 29 17:13:09 2018 (r473561)
@@ -13,11 +13,15 @@ COMMENT= Video game about traveling in 2D planetary sy
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>
Modified: head/games/spacejunk/files/patch-src-SFont.c
==============================================================================
--- head/games/spacejunk/files/patch-src-SFont.c Fri Jun 29 17:08:00 2018 (r473560)
+++ head/games/spacejunk/files/patch-src-SFont.c Fri Jun 29 17:13:09 2018 (r473561)
@@ -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;
}
Modified: head/games/spacejunk/files/patch-src-physicbody.cpp
==============================================================================
--- head/games/spacejunk/files/patch-src-physicbody.cpp Fri Jun 29 17:08:00 2018 (r473560)
+++ head/games/spacejunk/files/patch-src-physicbody.cpp Fri Jun 29 17:13:09 2018 (r473561)
@@ -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);
Modified: head/games/spacejunk/files/patch-src-scorelist.cpp
==============================================================================
--- head/games/spacejunk/files/patch-src-scorelist.cpp Fri Jun 29 17:08:00 2018 (r473560)
+++ head/games/spacejunk/files/patch-src-scorelist.cpp Fri Jun 29 17:13:09 2018 (r473561)
@@ -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);
More information about the svn-ports-all
mailing list