diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-11 06:41:18 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-11 06:41:18 +0700 |
commit | 0509e0aace0e9345ad44caacc7a767cd6fa84fb8 (patch) | |
tree | 884ed66e7b05e935954dd320900002731a5dc9e8 /gis | |
parent | 8b06bd281335db9274ecd6b26e36529bb7baffb7 (diff) | |
download | slackbuilds-0509e0aace0e9345ad44caacc7a767cd6fa84fb8.tar.gz |
gis/osgEarth: Updated for version 2.8.
Plus added a PR to fix building with geos 3.6.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis')
-rw-r--r-- | gis/osgEarth/geos-3_6_1-support.patch | 60 | ||||
-rw-r--r-- | gis/osgEarth/osgEarth.SlackBuild | 28 | ||||
-rw-r--r-- | gis/osgEarth/osgEarth.info | 6 |
3 files changed, 78 insertions, 16 deletions
diff --git a/gis/osgEarth/geos-3_6_1-support.patch b/gis/osgEarth/geos-3_6_1-support.patch new file mode 100644 index 0000000000..fc6a6beefb --- /dev/null +++ b/gis/osgEarth/geos-3_6_1-support.patch @@ -0,0 +1,60 @@ +diff -Naur osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS +--- osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS 2016-09-15 17:19:21.000000000 +0300 ++++ osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS 2017-02-02 19:43:19.103864300 +0300 +@@ -26,6 +26,7 @@ + #include <osgEarthSymbology/Style> + #include <osgEarthSymbology/Geometry> + #include <geos/geom/Geometry.h> ++#include <geos/geom/GeometryFactory.h> + + namespace osgEarth { namespace Symbology + { +@@ -45,7 +46,7 @@ + void disposeGeometry(geos::geom::Geometry* input); + + protected: +- geos::geom::GeometryFactory* _factory; ++ geos::geom::GeometryFactory::unique_ptr _factory; + }; + + } } // namespace osgEarth::Features +diff -Naur osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS.cpp osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS.cpp +--- osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS.cpp 2016-09-15 17:19:21.000000000 +0300 ++++ osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS.cpp 2017-02-02 19:44:46.772878700 +0300 +@@ -67,7 +67,7 @@ + } + + geom::Geometry* +- import( const Symbology::Geometry* input, const geom::GeometryFactory* f ) ++ import( const Symbology::Geometry* input, const geom::GeometryFactory::unique_ptr f ) + { + geom::Geometry* output = 0L; + +@@ -216,7 +216,7 @@ + geos::geom::PrecisionModel* pm = new geos::geom::PrecisionModel(geom::PrecisionModel::FLOATING); + + // Factory will clone the PM +- _factory = new geos::geom::GeometryFactory( pm ); ++ _factory = geos::geom::GeometryFactory::create( pm ); + + // Delete the template. + delete pm; +@@ -224,7 +224,6 @@ + + GEOSContext::~GEOSContext() + { +- delete _factory; + } + + geom::Geometry* +@@ -331,10 +330,7 @@ + { + if (input) + { +- geom::GeometryFactory* f = const_cast<geom::GeometryFactory*>(input->getFactory()); + _factory->destroyGeometry(input); +- if ( f != _factory ) +- delete f; + } + } + diff --git a/gis/osgEarth/osgEarth.SlackBuild b/gis/osgEarth/osgEarth.SlackBuild index e04975b2e5..fd1e04a158 100644 --- a/gis/osgEarth/osgEarth.SlackBuild +++ b/gis/osgEarth/osgEarth.SlackBuild @@ -24,14 +24,13 @@ PRGNAM=osgEarth SRCNAM=osgearth -TARBALLNAME=osgearth-osgearth -VERSION=${VERSION:-2.7} +VERSION=${VERSION:-2.8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +41,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -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" @@ -61,15 +60,18 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $TARBALLNAME-$VERSION -tar xvf $CWD/$TARBALLNAME-$VERSION.tar.gz || tar xvf $CWD/$SRCNAM-$VERSION.tar.gz -cd $TARBALLNAME-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$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 {} \; + +# https://github.com/gwaldron/osgearth/pull/848 +patch -p1 < $CWD/geos-3_6_1-support.patch mkdir -p build cd build @@ -88,7 +90,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE.txt README.txt $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/gis/osgEarth/osgEarth.info b/gis/osgEarth/osgEarth.info index 503ee51788..4f2fadef2b 100644 --- a/gis/osgEarth/osgEarth.info +++ b/gis/osgEarth/osgEarth.info @@ -1,8 +1,8 @@ PRGNAM="osgEarth" -VERSION="2.7" +VERSION="2.8" HOMEPAGE="http://osgearth.org/" -DOWNLOAD="https://github.com/gwaldron/osgearth/archive/osgearth-2.7.tar.gz" -MD5SUM="aad15a3ee27a34dcabc9b8f4922a1e96" +DOWNLOAD="https://github.com/gwaldron/osgearth/archive/2.8/osgearth-2.8.tar.gz" +MD5SUM="9b71017b6863764d797c99d70e5237e1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="OpenSceneGraph gdal" |