diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-08-31 03:58:53 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-08-31 03:58:53 +0000 |
commit | f2300aea682f5f2fcf8e18940f21bae92377e772 (patch) | |
tree | 155c05d477249e365b0aee3da756e8a6ee5d9164 /astro/celestia | |
parent | update to port astro/roadmap (diff) |
Partly unbreak astro/celestia due to C++ issues.
Also applied PR ports/46149
PR: ports/46149
Submitted by: Brad Laue <brad@brad-x.com>
Approved by: maintainer timeout
Notes
Notes:
svn path=/head/; revision=88163
Diffstat (limited to 'astro/celestia')
-rw-r--r-- | astro/celestia/Makefile | 29 | ||||
-rw-r--r-- | astro/celestia/files/patch-src::celengine::starbrowser.h | 11 | ||||
-rw-r--r-- | astro/celestia/files/patch-src::celestia::celestiacore.cpp | 21 |
3 files changed, 50 insertions, 11 deletions
diff --git a/astro/celestia/Makefile b/astro/celestia/Makefile index 5bc2b62f78f3..8721d78637ce 100644 --- a/astro/celestia/Makefile +++ b/astro/celestia/Makefile @@ -21,17 +21,24 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ GNU_CONFIGURE= yes PLIST= ${WRKDIR}/pkg-plist +USE_REINPLACE= yes USE_GMAKE= yes USE_MESA= yes USE_X_PREFIX= yes +.if !defined(WITHOUT_GNOME) USE_GNOME= gnomelibs +.endif CONFIGURE_ARGS= --prefix=${PREFIX} \ --includedir="${LOCALBASE}/include" \ --libdir="${LOCALBASE}/lib" CONFIGURE_ENV= \ -LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lm ${PTHREAD_LIBS}" -CPPFLAGS="-I${X11BASE}/include -I${X11BASE}/include/GL -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" + LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lm ${PTHREAD_LIBS}" \ + CPPFLAGS="-I${X11BASE}/include -I${X11BASE}/include/GL -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" + +.if defined(WITHOUT_GNOME) +CONFIGURE_ARGS+= --without-gtk +.endif .include <bsd.port.pre.mk> @@ -40,18 +47,18 @@ BROKEN= "Does not compile (bad C++ code)" .endif pre-patch: - ${PERL} -pi -e \ -"s:-O2::g; s:-Wall::g; s:-ffast-math::g; s:-fexpensive-optimizations::g; s:\!\ /bin/sh:\!\ ${LOCALBASE}/bin/bash:g" \ + ${REINPLACE_CMD} -e \ +'s:-O2::g; s:-Wall::g; s:-ffast-math::g; s:-fexpensive-optimizations::g; s:! /bin/sh:! ${LOCALBASE}/bin/bash:g' \ ${WRKSRC}/configure pre-install: ${ECHO_CMD} bin/celestia > ${PLIST} ${FIND} ${WRKSRC}/data/ -name '*.???' | \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} ${FIND} ${WRKSRC}/extras/ -name '*.ssc' | \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} ${FIND} ${WRKSRC}/fonts/ -name '*.txf' | \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} .for ii in celestia.cfg demo.cel guide.cel start.cel ${ECHO_CMD} share/celestia/${ii} >> ${PLIST} .endfor @@ -60,17 +67,17 @@ pre-install: ${ECHO_CMD} share/doc/celestia/${ii} >> ${PLIST} .endfor ${FIND} ${WRKSRC}/manual/ -name '*.???*' | \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/doc/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/doc/celestia/:g" >> ${PLIST} .for ii in celestia/manual celestia ${ECHO_CMD} @dirrm share/doc/${ii} >> ${PLIST} .endfor .endif ${FIND} ${WRKSRC}/models/ -name '*.???' | \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} ${FIND} ${WRKSRC}/shaders/ -name '*.vp' | \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} ${FIND} ${WRKSRC}/textures/ -name '*.jpg' -o -name '*.png'| \ - ${PERL} -pi -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} .for ii in /data /extras /textures/lores /textures/medres /textures /models \ /shaders /fonts / ${ECHO_CMD} @dirrm share/celestia${ii} >> ${PLIST} diff --git a/astro/celestia/files/patch-src::celengine::starbrowser.h b/astro/celestia/files/patch-src::celengine::starbrowser.h new file mode 100644 index 000000000000..2e89a544f187 --- /dev/null +++ b/astro/celestia/files/patch-src::celengine::starbrowser.h @@ -0,0 +1,11 @@ +--- src/celengine/starbrowser.h.orig Sat Aug 30 20:38:54 2003 ++++ src/celengine/starbrowser.h Sat Aug 30 20:39:08 2003 +@@ -12,6 +12,8 @@ + #ifndef _CELENGINE_STARBROWSER_H_ + #define _CELENGINE_STARBROWSER_H_ + ++using namespace std; ++ + #include "star.h" + #include "stardb.h" + #include "simulation.h" diff --git a/astro/celestia/files/patch-src::celestia::celestiacore.cpp b/astro/celestia/files/patch-src::celestia::celestiacore.cpp new file mode 100644 index 000000000000..e874e237c589 --- /dev/null +++ b/astro/celestia/files/patch-src::celestia::celestiacore.cpp @@ -0,0 +1,21 @@ +--- src/celestia/celestiacore.cpp.orig Sat Aug 30 20:44:13 2003 ++++ src/celestia/celestiacore.cpp Sat Aug 30 20:48:22 2003 +@@ -38,7 +38,6 @@ + #include "celestiacore.h" + #include <celutil/debug.h> + +- + using namespace std; + + static const int DragThreshold = 3; +@@ -1138,8 +1137,8 @@ + { + double distFromSun = body.getHeliocentricPosition(t).distanceFromOrigin(); + float planetTemp = sun->getTemperature() * +- (float) (pow(1 - body.getAlbedo(), 0.25) * +- sqrt(sun->getRadius() / (2 * distFromSun))); ++ (float) (pow((double)(1 - body.getAlbedo()),(double)( 0.25) * ++ sqrt(sun->getRadius() / (2 * distFromSun)))); + overlay << setprecision(0); + overlay << "Temperature: " << planetTemp << " K\n"; + overlay << setprecision(3); |