Tue Feb 13 12:45:02 2018 UTC ()
Update to 1.3.0
* Fix build with GCC 6 with patches from Debian
Changelog:
Version 1.3.0 (released 18 Feb 2012)
* add "outlined" keyword to marker files
* update JPL ephemeris code for 64 bit machines
* add bump_shade config file parameter
* add opacity keyword for markers
* implement Rayleigh scattering
(ryoon)
diff -r1.80 -r1.81 pkgsrc/x11/xplanet/Makefile
diff -r1.9 -r1.10 pkgsrc/x11/xplanet/PLIST
diff -r1.20 -r1.21 pkgsrc/x11/xplanet/distinfo
diff -r0 -r1.1 pkgsrc/x11/xplanet/patches/patch-src_libannotate_addArcs.cpp
diff -r0 -r1.1 pkgsrc/x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp
diff -r0 -r1.1 pkgsrc/x11/xplanet/patches/patch-src_libannotate_addSatellites.cpp
diff -r0 -r1.1 pkgsrc/x11/xplanet/patches/patch-src_libmultiple_RayleighScattering.cpp
diff -r0 -r1.1 pkgsrc/x11/xplanet/patches/patch-src_libmultiple_drawStars.cpp
diff -r0 -r1.1 pkgsrc/x11/xplanet/patches/patch-src_readConfig.cpp
--- pkgsrc/x11/xplanet/Makefile 2017/02/12 06:26:17 1.80
+++ pkgsrc/x11/xplanet/Makefile 2018/02/13 12:45:02 1.81
| @@ -1,17 +1,16 @@ | | | @@ -1,17 +1,16 @@ |
1 | # $NetBSD: Makefile,v 1.80 2017/02/12 06:26:17 ryoon Exp $ | | 1 | # $NetBSD: Makefile,v 1.81 2018/02/13 12:45:02 ryoon Exp $ |
2 | | | 2 | |
3 | DISTNAME= xplanet-1.2.2 | | 3 | DISTNAME= xplanet-1.3.0 |
4 | PKGREVISION= 27 | | | |
5 | CATEGORIES= x11 | | 4 | CATEGORIES= x11 |
6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xplanet/} | | 5 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xplanet/} |
7 | | | 6 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 7 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= http://xplanet.sourceforge.net/ | | 8 | HOMEPAGE= http://xplanet.sourceforge.net/ |
10 | COMMENT= Rotating rendered map of the Earth in X11 root window | | 9 | COMMENT= Rotating rendered map of the Earth in X11 root window |
11 | LICENSE= gnu-gpl-v2 | | 10 | LICENSE= gnu-gpl-v2 |
12 | | | 11 | |
13 | USE_LANGUAGES= c c++ | | 12 | USE_LANGUAGES= c c++ |
14 | USE_TOOLS+= gmake pkg-config | | 13 | USE_TOOLS+= gmake pkg-config |
15 | GNU_CONFIGURE= yes | | 14 | GNU_CONFIGURE= yes |
16 | CONFIGURE_ENV+= PERL=${_ENV_PERL:Q} | | 15 | CONFIGURE_ENV+= PERL=${_ENV_PERL:Q} |
17 | _ENV_PERL= ${TOOLS_SETENV} perl | | 16 | _ENV_PERL= ${TOOLS_SETENV} perl |
--- pkgsrc/x11/xplanet/PLIST 2011/04/04 11:41:28 1.9
+++ pkgsrc/x11/xplanet/PLIST 2018/02/13 12:45:02 1.10
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | @comment $NetBSD: PLIST,v 1.9 2011/04/04 11:41:28 adam Exp $ | | 1 | @comment $NetBSD: PLIST,v 1.10 2018/02/13 12:45:02 ryoon Exp $ |
2 | bin/xplanet | | 2 | bin/xplanet |
3 | man/man1/xplanet.1 | | 3 | man/man1/xplanet.1 |
4 | share/xplanet/arcs/README | | 4 | share/xplanet/arcs/README |
5 | share/xplanet/arcs/constellations | | 5 | share/xplanet/arcs/constellations |
6 | share/xplanet/config/README | | 6 | share/xplanet/config/README |
7 | share/xplanet/config/default | | 7 | share/xplanet/config/default |
8 | share/xplanet/config/earth_markers | | 8 | share/xplanet/config/earth_markers |
9 | share/xplanet/config/moon_orbit | | 9 | share/xplanet/config/moon_orbit |
10 | share/xplanet/config/overlay_clouds | | 10 | share/xplanet/config/overlay_clouds |
11 | share/xplanet/ephemeris/README | | 11 | share/xplanet/ephemeris/README |
12 | share/xplanet/fonts/FreeMonoBold.ttf | | 12 | share/xplanet/fonts/FreeMonoBold.ttf |
13 | share/xplanet/fonts/README | | 13 | share/xplanet/fonts/README |
14 | share/xplanet/images/README | | 14 | share/xplanet/images/README |
| @@ -25,23 +25,25 @@ share/xplanet/images/subsolar.png | | | @@ -25,23 +25,25 @@ share/xplanet/images/subsolar.png |
25 | share/xplanet/images/sun.jpg | | 25 | share/xplanet/images/sun.jpg |
26 | share/xplanet/markers/README | | 26 | share/xplanet/markers/README |
27 | share/xplanet/markers/brightStars | | 27 | share/xplanet/markers/brightStars |
28 | share/xplanet/markers/earth | | 28 | share/xplanet/markers/earth |
29 | share/xplanet/markers/mars | | 29 | share/xplanet/markers/mars |
30 | share/xplanet/markers/moon | | 30 | share/xplanet/markers/moon |
31 | share/xplanet/origin/README | | 31 | share/xplanet/origin/README |
32 | share/xplanet/origin/cassini | | 32 | share/xplanet/origin/cassini |
33 | share/xplanet/origin/galileo | | 33 | share/xplanet/origin/galileo |
34 | share/xplanet/rgb.txt | | 34 | share/xplanet/rgb.txt |
35 | share/xplanet/satellites/README | | 35 | share/xplanet/satellites/README |
36 | share/xplanet/satellites/iss | | 36 | share/xplanet/satellites/iss |
37 | share/xplanet/satellites/iss.tle | | 37 | share/xplanet/satellites/iss.tle |
| | | 38 | share/xplanet/scattering/README |
| | | 39 | share/xplanet/scattering/earthRayleigh |
38 | share/xplanet/spice/README | | 40 | share/xplanet/spice/README |
39 | share/xplanet/spice/asteroids | | 41 | share/xplanet/spice/asteroids |
40 | share/xplanet/spice/asteroids.krn | | 42 | share/xplanet/spice/asteroids.krn |
41 | share/xplanet/spice/cassini | | 43 | share/xplanet/spice/cassini |
42 | share/xplanet/spice/cassini.krn | | 44 | share/xplanet/spice/cassini.krn |
43 | share/xplanet/spice/mgs | | 45 | share/xplanet/spice/mgs |
44 | share/xplanet/spice/mgs.krn | | 46 | share/xplanet/spice/mgs.krn |
45 | share/xplanet/spice/voyager | | 47 | share/xplanet/spice/voyager |
46 | share/xplanet/spice/voyager.krn | | 48 | share/xplanet/spice/voyager.krn |
47 | share/xplanet/stars/BSC | | 49 | share/xplanet/stars/BSC |
--- pkgsrc/x11/xplanet/distinfo 2015/11/04 03:29:10 1.20
+++ pkgsrc/x11/xplanet/distinfo 2018/02/13 12:45:02 1.21
| @@ -1,7 +1,13 @@ | | | @@ -1,7 +1,13 @@ |
1 | $NetBSD: distinfo,v 1.20 2015/11/04 03:29:10 agc Exp $ | | 1 | $NetBSD: distinfo,v 1.21 2018/02/13 12:45:02 ryoon Exp $ |
2 | | | 2 | |
3 | SHA1 (xplanet-1.2.2.tar.gz) = 3c9cc4be7cd87121884162204eff376af2fc03e3 | | 3 | SHA1 (xplanet-1.3.0.tar.gz) = 7c5208b501b441a0184cbb334a5658d0309d7dac |
4 | RMD160 (xplanet-1.2.2.tar.gz) = 431c9223b2b122599a8c4bdca18c17fea0dcd5ab | | 4 | RMD160 (xplanet-1.3.0.tar.gz) = b5ba6239019669668aeb7f63391aa850cc3dd8b7 |
5 | SHA512 (xplanet-1.2.2.tar.gz) = 1a5dbad62b79adce28239615e3a2fd00300fca085f9400f2735c5dc015f06c63e182ed0d78399324bf6049374f2c034e6026a4054f26c34e11024b956695a53f | | 5 | SHA512 (xplanet-1.3.0.tar.gz) = c9f0db21c457d0702f8b1fb6d632838f45e80ea45b9cade80d6ab0ae956fdca03cfeed9582548c69b349a354afc27308309656d7e06ac46bc416c3e1038f8efd |
6 | Size (xplanet-1.2.2.tar.gz) = 1217169 bytes | | 6 | Size (xplanet-1.3.0.tar.gz) = 1227385 bytes |
| | | 7 | SHA1 (patch-src_libannotate_addArcs.cpp) = 5d2ba7c0df6989e0b0b838fccbc73fe7a17ba91c |
| | | 8 | SHA1 (patch-src_libannotate_addMarkers.cpp) = 9c05d3b308b6a957b8af7f8a05ba49a608f5120e |
| | | 9 | SHA1 (patch-src_libannotate_addSatellites.cpp) = 7c8976a3e88ebac7e4d9b59a38f98f87b9d04f57 |
7 | SHA1 (patch-src_libimage_gif.c) = 6c107bd1f733fe82f2b88af8ad778e0fe5aea5bd | | 10 | SHA1 (patch-src_libimage_gif.c) = 6c107bd1f733fe82f2b88af8ad778e0fe5aea5bd |
| | | 11 | SHA1 (patch-src_libmultiple_RayleighScattering.cpp) = 3a64033dc0c6915c9cd2eed2e506dd4c802138c9 |
| | | 12 | SHA1 (patch-src_libmultiple_drawStars.cpp) = b6a3f3995f4f1ac77660fdad64524ef6a48c4d50 |
| | | 13 | SHA1 (patch-src_readConfig.cpp) = c1a46209dfcbb6a37b6c7ff90f633a6450fbd5d9 |
$NetBSD: patch-src_libannotate_addArcs.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $
--- src/libannotate/addArcs.cpp.orig 2008-11-13 23:43:42.000000000 +0000
+++ src/libannotate/addArcs.cpp
@@ -258,10 +258,14 @@ addArcs(PlanetProperties *planetProperti
{
ifstream inFile(arcFile.c_str());
char *line = new char[MAX_LINE_LENGTH];
- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
- readArcFile(line, planet, view, projection,
- planetProperties, annotationMap);
-
+ while (1)
+ {
+ inFile.getline (line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
+ readArcFile(line, planet, view, projection,
+ planetProperties, annotationMap);
+ }
inFile.close();
delete [] line;
}
@@ -292,9 +296,13 @@ addArcs(View *view, multimap<double, Ann
{
ifstream inFile(arcFile.c_str());
char *line = new char[256];
- while (inFile.getline (line, 256, '\n') != NULL)
- readArcFile(line, NULL, view, NULL, NULL, annotationMap);
-
+ while (1)
+ {
+ inFile.getline (line, 256, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
+ readArcFile(line, NULL, view, NULL, NULL, annotationMap);
+ }
inFile.close();
delete [] line;
}
$NetBSD: patch-src_libannotate_addMarkers.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $
--- src/libannotate/addMarkers.cpp.orig 2011-11-15 01:44:24.000000000 +0000
+++ src/libannotate/addMarkers.cpp
@@ -423,13 +423,16 @@ addMarkers(PlanetProperties *planetPrope
{
ifstream inFile(markerFile.c_str());
char *line = new char[MAX_LINE_LENGTH];
- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (1)
{
unsigned char color[3];
memcpy(color, planetProperties->MarkerColor(), 3);
string font(planetProperties->MarkerFont());
int fontSize(planetProperties->MarkerFontSize());
+ inFile.getline (line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
readMarkerFile(line, planet, pixel_radius, X, Y, Z,
view, projection, width, height,
color, font, fontSize,
@@ -469,13 +472,18 @@ addMarkers(View *view, const int width,
{
ifstream inFile(markerFile.c_str());
char *line = new char[MAX_LINE_LENGTH];
- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
- {
+ while (1)
+ {
+ inFile.getline (line, MAX_LINE_LENGTH, '\n');
+
unsigned char color[3];
memcpy(color, options->Color(), 3);
string font(options->Font());
int fontSize(options->FontSize());
+ if (inFile.eof() || inFile.fail())
+ break;
+
readMarkerFile(line, NULL, 0, 0, 0, 0,
view, NULL, width, height,
color, font, fontSize, 1.0,
$NetBSD: patch-src_libannotate_addSatellites.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $
--- src/libannotate/addSatellites.cpp.orig 2010-07-30 21:49:06.000000000 +0000
+++ src/libannotate/addSatellites.cpp
@@ -488,11 +488,23 @@ loadSatelliteVector(PlanetProperties *pl
{
ifstream inFile(tleFile.c_str());
char lines[3][80];
- while (inFile.getline(lines[0], 80) != NULL)
- {
- if ((inFile.getline(lines[1], 80) == NULL)
- || (inFile.getline(lines[2], 80) == NULL))
- {
+ bool malformed_file = false;
+ while (1)
+ {
+ inFile.getline(lines[0], 80);
+ if (inFile.eof() || inFile.fail())
+ break;
+ inFile.getline(lines[1], 80);
+ if (inFile.eof() || inFile.fail())
+ malformed_file = true;
+ else
+ {
+ inFile.getline(lines[2], 80);
+ if (inFile.eof() || inFile.fail())
+ malformed_file = true;
+ }
+ if (malformed_file)
+ {
ostringstream errStr;
errStr << "Malformed TLE file (" << tleFile << ")?\n";
xpWarn(errStr.str(), __FILE__, __LINE__);
@@ -542,10 +554,14 @@ addSatellites(PlanetProperties *planetPr
{
ifstream inFile(satFile.c_str());
char *line = new char[MAX_LINE_LENGTH];
- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (1)
+ {
+ inFile.getline (line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
readSatelliteFile(line, planet, view, projection,
planetProperties, annotationMap);
-
+ }
inFile.close();
delete [] line;
}
$NetBSD: patch-src_libmultiple_RayleighScattering.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $
--- src/libmultiple/RayleighScattering.cpp.orig 2012-02-25 16:32:59.000000000 +0000
+++ src/libmultiple/RayleighScattering.cpp
@@ -369,8 +369,12 @@ RayleighScattering::readConfigFile(strin
diskTemplate_.clear();
limbTemplate_.clear();
- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (1)
{
+ inFile.getline(line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
+
int i = 0;
while (isDelimiter(line[i]))
{
@@ -439,8 +443,12 @@ RayleighScattering::readBlock(ifstream &
values.clear();
char line[MAX_LINE_LENGTH];
- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (1)
{
+ inFile.getline(line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
+
int i = 0;
while (isDelimiter(line[i]))
{
@@ -470,8 +478,12 @@ RayleighScattering::readValue(ifstream &
double &value)
{
char line[MAX_LINE_LENGTH];
- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (1)
{
+ inFile.getline(line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
+
int i = 0;
while (isDelimiter(line[i]))
{
$NetBSD: patch-src_libmultiple_drawStars.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $
--- src/libmultiple/drawStars.cpp.orig 2006-03-26 04:55:59.000000000 +0000
+++ src/libmultiple/drawStars.cpp
@@ -41,8 +41,12 @@ drawStars(DisplayBase *display, View *vi
ifstream inFile(starMap.c_str());
char line[MAX_LINE_LENGTH];
- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (1)
{
+ inFile.getline(line, MAX_LINE_LENGTH, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
+
if (line[0] == '#') continue;
double Vmag, RA, Dec;
$NetBSD: patch-src_readConfig.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $
--- src/readConfig.cpp.orig 2012-03-03 03:20:05.000000000 +0000
+++ src/readConfig.cpp
@@ -550,9 +550,13 @@ readConfigFile(string configFile, Planet
ifstream inFile(configFile.c_str());
char *line = new char[256];
- while (inFile.getline(line, 256, '\n') != NULL)
+ while (1)
+ {
+ inFile.getline(line, 256, '\n');
+ if (inFile.eof() || inFile.fail())
+ break;
readConfig(line, planetProperties);
-
+ }
// This condition will only be true if [default] is the only
// section in the config file. In this case, set all planet
// properties to the default values.