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

cvs diff -r1.80 -r1.81 pkgsrc/x11/xplanet/Makefile (expand / switch to unified diff)

--- 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
3DISTNAME= xplanet-1.2.2 3DISTNAME= xplanet-1.3.0
4PKGREVISION= 27 
5CATEGORIES= x11 4CATEGORIES= x11
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xplanet/} 5MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xplanet/}
7 6
8MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://xplanet.sourceforge.net/ 8HOMEPAGE= http://xplanet.sourceforge.net/
10COMMENT= Rotating rendered map of the Earth in X11 root window 9COMMENT= Rotating rendered map of the Earth in X11 root window
11LICENSE= gnu-gpl-v2 10LICENSE= gnu-gpl-v2
12 11
13USE_LANGUAGES= c c++ 12USE_LANGUAGES= c c++
14USE_TOOLS+= gmake pkg-config 13USE_TOOLS+= gmake pkg-config
15GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
16CONFIGURE_ENV+= PERL=${_ENV_PERL:Q} 15CONFIGURE_ENV+= PERL=${_ENV_PERL:Q}
17_ENV_PERL= ${TOOLS_SETENV} perl 16_ENV_PERL= ${TOOLS_SETENV} perl

cvs diff -r1.9 -r1.10 pkgsrc/x11/xplanet/PLIST (expand / switch to unified diff)

--- 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 $
2bin/xplanet 2bin/xplanet
3man/man1/xplanet.1 3man/man1/xplanet.1
4share/xplanet/arcs/README 4share/xplanet/arcs/README
5share/xplanet/arcs/constellations 5share/xplanet/arcs/constellations
6share/xplanet/config/README 6share/xplanet/config/README
7share/xplanet/config/default 7share/xplanet/config/default
8share/xplanet/config/earth_markers 8share/xplanet/config/earth_markers
9share/xplanet/config/moon_orbit 9share/xplanet/config/moon_orbit
10share/xplanet/config/overlay_clouds 10share/xplanet/config/overlay_clouds
11share/xplanet/ephemeris/README 11share/xplanet/ephemeris/README
12share/xplanet/fonts/FreeMonoBold.ttf 12share/xplanet/fonts/FreeMonoBold.ttf
13share/xplanet/fonts/README 13share/xplanet/fonts/README
14share/xplanet/images/README 14share/xplanet/images/README
@@ -25,23 +25,25 @@ share/xplanet/images/subsolar.png @@ -25,23 +25,25 @@ share/xplanet/images/subsolar.png
25share/xplanet/images/sun.jpg 25share/xplanet/images/sun.jpg
26share/xplanet/markers/README 26share/xplanet/markers/README
27share/xplanet/markers/brightStars 27share/xplanet/markers/brightStars
28share/xplanet/markers/earth 28share/xplanet/markers/earth
29share/xplanet/markers/mars 29share/xplanet/markers/mars
30share/xplanet/markers/moon 30share/xplanet/markers/moon
31share/xplanet/origin/README 31share/xplanet/origin/README
32share/xplanet/origin/cassini 32share/xplanet/origin/cassini
33share/xplanet/origin/galileo 33share/xplanet/origin/galileo
34share/xplanet/rgb.txt 34share/xplanet/rgb.txt
35share/xplanet/satellites/README 35share/xplanet/satellites/README
36share/xplanet/satellites/iss 36share/xplanet/satellites/iss
37share/xplanet/satellites/iss.tle 37share/xplanet/satellites/iss.tle
 38share/xplanet/scattering/README
 39share/xplanet/scattering/earthRayleigh
38share/xplanet/spice/README 40share/xplanet/spice/README
39share/xplanet/spice/asteroids 41share/xplanet/spice/asteroids
40share/xplanet/spice/asteroids.krn 42share/xplanet/spice/asteroids.krn
41share/xplanet/spice/cassini 43share/xplanet/spice/cassini
42share/xplanet/spice/cassini.krn 44share/xplanet/spice/cassini.krn
43share/xplanet/spice/mgs 45share/xplanet/spice/mgs
44share/xplanet/spice/mgs.krn 46share/xplanet/spice/mgs.krn
45share/xplanet/spice/voyager 47share/xplanet/spice/voyager
46share/xplanet/spice/voyager.krn 48share/xplanet/spice/voyager.krn
47share/xplanet/stars/BSC 49share/xplanet/stars/BSC

cvs diff -r1.20 -r1.21 pkgsrc/x11/xplanet/distinfo (expand / switch to unified diff)

--- 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
3SHA1 (xplanet-1.2.2.tar.gz) = 3c9cc4be7cd87121884162204eff376af2fc03e3 3SHA1 (xplanet-1.3.0.tar.gz) = 7c5208b501b441a0184cbb334a5658d0309d7dac
4RMD160 (xplanet-1.2.2.tar.gz) = 431c9223b2b122599a8c4bdca18c17fea0dcd5ab 4RMD160 (xplanet-1.3.0.tar.gz) = b5ba6239019669668aeb7f63391aa850cc3dd8b7
5SHA512 (xplanet-1.2.2.tar.gz) = 1a5dbad62b79adce28239615e3a2fd00300fca085f9400f2735c5dc015f06c63e182ed0d78399324bf6049374f2c034e6026a4054f26c34e11024b956695a53f 5SHA512 (xplanet-1.3.0.tar.gz) = c9f0db21c457d0702f8b1fb6d632838f45e80ea45b9cade80d6ab0ae956fdca03cfeed9582548c69b349a354afc27308309656d7e06ac46bc416c3e1038f8efd
6Size (xplanet-1.2.2.tar.gz) = 1217169 bytes 6Size (xplanet-1.3.0.tar.gz) = 1227385 bytes
 7SHA1 (patch-src_libannotate_addArcs.cpp) = 5d2ba7c0df6989e0b0b838fccbc73fe7a17ba91c
 8SHA1 (patch-src_libannotate_addMarkers.cpp) = 9c05d3b308b6a957b8af7f8a05ba49a608f5120e
 9SHA1 (patch-src_libannotate_addSatellites.cpp) = 7c8976a3e88ebac7e4d9b59a38f98f87b9d04f57
7SHA1 (patch-src_libimage_gif.c) = 6c107bd1f733fe82f2b88af8ad778e0fe5aea5bd 10SHA1 (patch-src_libimage_gif.c) = 6c107bd1f733fe82f2b88af8ad778e0fe5aea5bd
 11SHA1 (patch-src_libmultiple_RayleighScattering.cpp) = 3a64033dc0c6915c9cd2eed2e506dd4c802138c9
 12SHA1 (patch-src_libmultiple_drawStars.cpp) = b6a3f3995f4f1ac77660fdad64524ef6a48c4d50
 13SHA1 (patch-src_readConfig.cpp) = c1a46209dfcbb6a37b6c7ff90f633a6450fbd5d9

File Added: pkgsrc/x11/xplanet/patches/patch-src_libannotate_addArcs.cpp
$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;
         }

File Added: pkgsrc/x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp
$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, 

File Added: pkgsrc/x11/xplanet/patches/patch-src_libannotate_addSatellites.cpp
$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;
         }

File Added: pkgsrc/x11/xplanet/patches/patch-src_libmultiple_RayleighScattering.cpp
$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]))
         {

File Added: pkgsrc/x11/xplanet/patches/patch-src_libmultiple_drawStars.cpp
$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;

File Added: pkgsrc/x11/xplanet/patches/patch-src_readConfig.cpp
$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.