mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
- Pet portlint
- Switch to USES=localbase - Fix build with clang 6 - Switch to options helpers - Regenerate patches
This commit is contained in:
parent
4556ef08e8
commit
b0e2c06333
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473561
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user