aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-08-31 04:37:45 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-08-31 04:37:45 +0000
commit70078584a9e96ce5c4f45c7567c507207081e482 (patch)
treeea43a693f7144ddacbfd32d1eebce792dd75b191
parentf2300aea682f5f2fcf8e18940f21bae92377e772 (diff)
downloadports-70078584a9e96ce5c4f45c7567c507207081e482.tar.gz
ports-70078584a9e96ce5c4f45c7567c507207081e482.zip
Unbreak the C++ errors
Notes
Notes: svn path=/head/; revision=88164
-rw-r--r--astro/celestia/Makefile8
-rw-r--r--astro/celestia/files/patch-src::buildstardb.cpp29
-rw-r--r--astro/celestia/files/patch-src::celestia::celestiacore.cpp26
-rw-r--r--astro/celestia/files/patch-src::celestia::celestiacore.h13
4 files changed, 65 insertions, 11 deletions
diff --git a/astro/celestia/Makefile b/astro/celestia/Makefile
index 8721d78637ce..cef64d08ac6b 100644
--- a/astro/celestia/Makefile
+++ b/astro/celestia/Makefile
@@ -40,12 +40,6 @@ CONFIGURE_ENV= \
CONFIGURE_ARGS+= --without-gtk
.endif
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile (bad C++ code)"
-.endif
-
pre-patch:
${REINPLACE_CMD} -e \
's:-O2::g; s:-Wall::g; s:-ffast-math::g; s:-fexpensive-optimizations::g; s:! /bin/sh:! ${LOCALBASE}/bin/bash:g' \
@@ -111,4 +105,4 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/textures/medres/*.??? \
${DATADIR}/textures/medres/
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/astro/celestia/files/patch-src::buildstardb.cpp b/astro/celestia/files/patch-src::buildstardb.cpp
new file mode 100644
index 000000000000..e775e24e2b3c
--- /dev/null
+++ b/astro/celestia/files/patch-src::buildstardb.cpp
@@ -0,0 +1,29 @@
+--- src/buildstardb.cpp.orig Sat Aug 30 21:33:27 2003
++++ src/buildstardb.cpp Sat Aug 30 21:34:05 2003
+@@ -921,7 +921,7 @@
+ {
+ MultistarSystem* multiSystem = new MultistarSystem();
+ multiSystem->nStars = 1;
+- multiSystem->stars[0] = iter;
++ multiSystem->stars[0] = &(*iter);
+ starSystems.insert(MultistarSystemCatalog::value_type(iter->CCDMIdentifier, multiSystem));
+ }
+ else
+@@ -933,7 +933,7 @@
+ }
+ else
+ {
+- multiSystem->stars[multiSystem->nStars] = iter;
++ multiSystem->stars[multiSystem->nStars] = &(*iter);
+ multiSystem->nStars++;
+ }
+ }
+@@ -1162,7 +1162,7 @@
+ for (vector<HipparcosStar>::iterator iter = stars.begin();
+ iter != stars.end(); iter++)
+ {
+- starIndex.insert(starIndex.end(), iter);
++ starIndex.insert(starIndex.end(), &(*iter));
+ }
+
+ HIPCatalogComparePredicate pred;
diff --git a/astro/celestia/files/patch-src::celestia::celestiacore.cpp b/astro/celestia/files/patch-src::celestia::celestiacore.cpp
index e874e237c589..e001e090a83e 100644
--- a/astro/celestia/files/patch-src::celestia::celestiacore.cpp
+++ b/astro/celestia/files/patch-src::celestia::celestiacore.cpp
@@ -1,5 +1,5 @@
---- src/celestia/celestiacore.cpp.orig Sat Aug 30 20:44:13 2003
-+++ src/celestia/celestiacore.cpp Sat Aug 30 20:48:22 2003
+--- src/celestia/celestiacore.cpp.orig Thu May 2 10:53:49 2002
++++ src/celestia/celestiacore.cpp Sat Aug 30 21:32:21 2003
@@ -38,7 +38,6 @@
#include "celestiacore.h"
#include <celutil/debug.h>
@@ -8,14 +8,32 @@
using namespace std;
static const int DragThreshold = 3;
+@@ -194,7 +193,7 @@
+ sim->setFrame(fav.coordSys, sim->getSelection());
+ }
+
+-void CelestiaCore::addFavorite(string name, string parentFolder, FavoritesList::const_iterator* iter)
++void CelestiaCore::addFavorite(std::string name, std::string parentFolder, FavoritesList::iterator* iter)
+ {
+ FavoritesList::iterator pos;
+ if(!iter)
+@@ -214,7 +213,7 @@
+ favorites->insert(pos, fav);
+ }
+
+-void CelestiaCore::addFavoriteFolder(string name, FavoritesList::const_iterator* iter)
++void CelestiaCore::addFavoriteFolder(std::string name, FavoritesList::iterator* iter)
+ {
+ FavoritesList::iterator pos;
+ if(!iter)
@@ -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))));
++ (float) (pow((float)(1 - body.getAlbedo()),(float)(( 0.25) *
++ sqrt(sun->getRadius() / (2 * distFromSun)))));
overlay << setprecision(0);
overlay << "Temperature: " << planetTemp << " K\n";
overlay << setprecision(3);
diff --git a/astro/celestia/files/patch-src::celestia::celestiacore.h b/astro/celestia/files/patch-src::celestia::celestiacore.h
new file mode 100644
index 000000000000..1b2db493f15a
--- /dev/null
+++ b/astro/celestia/files/patch-src::celestia::celestiacore.h
@@ -0,0 +1,13 @@
+--- src/celestia/celestiacore.h.orig Sat Aug 30 21:30:15 2003
++++ src/celestia/celestiacore.h Sat Aug 30 21:30:40 2003
+@@ -126,8 +126,8 @@
+ void readFavoritesFile();
+ void writeFavoritesFile();
+ void activateFavorite(FavoritesEntry&);
+- void addFavorite(std::string, std::string, FavoritesList::const_iterator* iter=NULL);
+- void addFavoriteFolder(std::string, FavoritesList::const_iterator* iter=NULL);
++ void addFavorite(std::string, std::string, FavoritesList::iterator* iter=NULL);
++ void addFavoriteFolder(std::string, FavoritesList::iterator* iter=NULL);
+ const FavoritesList* getFavorites();
+
+ const DestinationList* getDestinations();