diff options
author | Benjamin Trigona-Harany <bosth@alumni.sfu.ca> | 2018-03-15 22:47:37 -0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-03-17 08:51:43 +0700 |
commit | cdedb068939b53e61b66b08a0b5949cd24b9ce15 (patch) | |
tree | 0e240c9c60daae681a145bce431fe1104376792d /gis/xplanet | |
parent | abb617ff62cffc1ec67f152f2f939621f439f807 (diff) |
gis/xplanet: Fix build on current.
Diffstat (limited to 'gis/xplanet')
-rw-r--r-- | gis/xplanet/null-comparison.patch | 157 | ||||
-rw-r--r-- | gis/xplanet/xplanet.SlackBuild | 23 |
2 files changed, 168 insertions, 12 deletions
diff --git a/gis/xplanet/null-comparison.patch b/gis/xplanet/null-comparison.patch new file mode 100644 index 000000000000..3ead8872e0cb --- /dev/null +++ b/gis/xplanet/null-comparison.patch @@ -0,0 +1,157 @@ +Index: src/libannotate/addArcs.cpp +=================================================================== +diff --git a/src/libannotate/addArcs.cpp b/src/libannotate/addArcs.cpp +--- a/src/libannotate/addArcs.cpp (revision 206) ++++ b/src/libannotate/addArcs.cpp (revision 207) +@@ -258,7 +258,7 @@ + { + ifstream inFile(arcFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + readArcFile(line, planet, view, projection, + planetProperties, annotationMap); + +@@ -292,7 +292,7 @@ + { + ifstream inFile(arcFile.c_str()); + char *line = new char[256]; +- while (inFile.getline (line, 256, '\n') != NULL) ++ while (inFile.getline (line, 256, '\n')) + readArcFile(line, NULL, view, NULL, NULL, annotationMap); + + inFile.close(); +Index: src/libannotate/addMarkers.cpp +=================================================================== +diff --git a/src/libannotate/addMarkers.cpp b/src/libannotate/addMarkers.cpp +--- a/src/libannotate/addMarkers.cpp (revision 206) ++++ b/src/libannotate/addMarkers.cpp (revision 207) +@@ -429,7 +429,7 @@ + { + ifstream inFile(markerFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + { + unsigned char color[3]; + memcpy(color, planetProperties->MarkerColor(), 3); +@@ -475,7 +475,7 @@ + { + ifstream inFile(markerFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + { + unsigned char color[3]; + memcpy(color, options->Color(), 3); +Index: src/libannotate/addSatellites.cpp +=================================================================== +diff --git a/src/libannotate/addSatellites.cpp b/src/libannotate/addSatellites.cpp +--- a/src/libannotate/addSatellites.cpp (revision 206) ++++ b/src/libannotate/addSatellites.cpp (revision 207) +@@ -488,10 +488,10 @@ + { + ifstream inFile(tleFile.c_str()); + char lines[3][80]; +- while (inFile.getline(lines[0], 80) != NULL) ++ while (inFile.getline(lines[0], 80)) + { +- if ((inFile.getline(lines[1], 80) == NULL) +- || (inFile.getline(lines[2], 80) == NULL)) ++ if ((!inFile.getline(lines[1], 80)) ++ || (!inFile.getline(lines[2], 80))) + { + ostringstream errStr; + errStr << "Malformed TLE file (" << tleFile << ")?\n"; +@@ -542,7 +542,7 @@ + { + ifstream inFile(satFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + readSatelliteFile(line, planet, view, projection, + planetProperties, annotationMap); + +Index: src/libannotate/addSpiceObjects.cpp +=================================================================== +diff --git a/src/libannotate/addSpiceObjects.cpp b/src/libannotate/addSpiceObjects.cpp +--- a/src/libannotate/addSpiceObjects.cpp (revision 206) ++++ b/src/libannotate/addSpiceObjects.cpp (revision 207) +@@ -524,7 +524,7 @@ + { + ifstream inFile(kernelFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int ii = 0; + while (isDelimiter(line[ii])) +@@ -576,7 +576,7 @@ + { + ifstream inFile(spiceFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + readSpiceFile(line, planetsFromSunMap, view, projection, + annotationMap); + inFile.close(); +Index: src/libmultiple/RayleighScattering.cpp +=================================================================== +diff --git a/src/libmultiple/RayleighScattering.cpp b/src/libmultiple/RayleighScattering.cpp +--- a/src/libmultiple/RayleighScattering.cpp (revision 206) ++++ b/src/libmultiple/RayleighScattering.cpp (revision 207) +@@ -369,7 +369,7 @@ + + diskTemplate_.clear(); + limbTemplate_.clear(); +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +@@ -439,7 +439,7 @@ + values.clear(); + + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +@@ -470,7 +470,7 @@ + double &value) + { + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +Index: src/libmultiple/drawStars.cpp +=================================================================== +diff --git a/src/libmultiple/drawStars.cpp b/src/libmultiple/drawStars.cpp +--- a/src/libmultiple/drawStars.cpp (revision 206) ++++ b/src/libmultiple/drawStars.cpp (revision 207) +@@ -41,7 +41,7 @@ + ifstream inFile(starMap.c_str()); + + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + if (line[0] == '#') continue; + +Index: src/readConfig.cpp +=================================================================== +diff --git a/src/readConfig.cpp b/src/readConfig.cpp +--- a/src/readConfig.cpp (revision 206) ++++ b/src/readConfig.cpp (revision 207) +@@ -550,7 +550,7 @@ + + ifstream inFile(configFile.c_str()); + char *line = new char[256]; +- while (inFile.getline(line, 256, '\n') != NULL) ++ while (inFile.getline(line, 256, '\n')) + readConfig(line, planetProperties); + + // This condition will only be true if [default] is the only diff --git a/gis/xplanet/xplanet.SlackBuild b/gis/xplanet/xplanet.SlackBuild index 746822007e4b..1b1c7599f161 100644 --- a/gis/xplanet/xplanet.SlackBuild +++ b/gis/xplanet/xplanet.SlackBuild @@ -14,14 +14,14 @@ OUTPUT=${OUTPUT:-/tmp} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; *) export ARCH=$( uname -m ) ;; esac fi -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -42,14 +42,14 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION - chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/null-comparison.patch # Patch for giflib 5.x from Arch Linux (thanks!) # https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib6.patch?h=packages/xplanet patch -p1 < $CWD/giflib6.patch @@ -65,14 +65,13 @@ CXXFLAGS="$SLKCFLAGS" \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux -make make install DESTDIR=$PKG -find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null || true +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ |