diff options
Diffstat (limited to 'gis/osgEarth')
-rw-r--r-- | gis/osgEarth/README | 15 | ||||
-rw-r--r-- | gis/osgEarth/geos-3_6_1-support.patch | 60 | ||||
-rw-r--r-- | gis/osgEarth/geos-3_8-support.patch | 69 | ||||
-rw-r--r-- | gis/osgEarth/osgEarth.SlackBuild | 23 | ||||
-rw-r--r-- | gis/osgEarth/osgEarth.info | 6 |
5 files changed, 80 insertions, 93 deletions
diff --git a/gis/osgEarth/README b/gis/osgEarth/README index 8026af489fe..eb37a517964 100644 --- a/gis/osgEarth/README +++ b/gis/osgEarth/README @@ -7,17 +7,4 @@ get up and running quickly and easily. Some optional requirements are recommended for enhanced functionality and/or performance. They include: - osgQt, poco, protobuf, rocksdb - -For all but osgQt, they will be used if detected when osgEarth is built. - -In the case of osgQt, the version of Qt that it was built with is relevant. -If osgQt was built with Qt5, the environment variable OSGQT=5 must be set when -running the osgEarth SlackBuild i.e. - OSGQT=5 sh osgEarth.SlackBuild -In this case, the qt5 package is also an additional build requirement. - -If osgQt was built with Qt4 (the standard for Slackware 14.2), set OSGQT=4 i.e. - OSGQT=4 sh osgEarth.SlackBuild - -If OSGQT is not set, osgQt support will not be included. + poco, protobuf, rocksdb diff --git a/gis/osgEarth/geos-3_6_1-support.patch b/gis/osgEarth/geos-3_6_1-support.patch deleted file mode 100644 index fc6a6beefb9..00000000000 --- a/gis/osgEarth/geos-3_6_1-support.patch +++ /dev/null @@ -1,60 +0,0 @@ -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/geos-3_8-support.patch b/gis/osgEarth/geos-3_8-support.patch new file mode 100644 index 00000000000..5993d4cb0c8 --- /dev/null +++ b/gis/osgEarth/geos-3_8-support.patch @@ -0,0 +1,69 @@ +diff -Nur osgearth-osgearth-2.10.2.a/src/osgEarthSymbology/GEOS.cpp osgearth-osgearth-2.10.2.b/src/osgEarthSymbology/GEOS.cpp +--- osgearth-osgearth-2.10.2.a/src/osgEarthSymbology/GEOS.cpp 2019-07-12 08:49:14.000000000 -0700 ++++ osgearth-osgearth-2.10.2.b/src/osgEarthSymbology/GEOS.cpp 2019-11-16 10:00:08.966241888 -0800 +@@ -49,7 +49,7 @@ + + namespace + { +- geom::CoordinateSequence* ++ std::unique_ptr<geom::CoordinateSequence> + vec3dArray2CoordSeq( const Symbology::Geometry* input, bool close, const geom::CoordinateSequenceFactory* factory ) + { + bool needToClose = close && input->size() > 2 && input->front() != input->back(); +@@ -64,7 +64,7 @@ + { + coords->push_back( coords->front() ); + } +- geom::CoordinateSequence* seq = factory->create( coords ); ++ std::unique_ptr<geom::CoordinateSequence> seq = factory->create( coords ); + + return seq; + } +@@ -108,7 +108,8 @@ + else + { + // any other type will at least contain points: +- geom::CoordinateSequence* seq = 0L; ++ std::unique_ptr<geom::CoordinateSequence> seq = 0L; ++ + try + { + switch( input->getType() ) +@@ -119,24 +120,24 @@ + + case Symbology::Geometry::TYPE_POINTSET: + seq = vec3dArray2CoordSeq( input, false, f->getCoordinateSequenceFactory() ); +- if ( seq ) output = f->createPoint( seq ); ++ if ( seq ) output = f->createPoint( *seq ); + break; + + case Symbology::Geometry::TYPE_LINESTRING: + seq = vec3dArray2CoordSeq( input, false, f->getCoordinateSequenceFactory() ); +- if ( seq ) output = f->createLineString( seq ); ++ if ( seq ) output = f->createLineString( *seq ); + break; + + case Symbology::Geometry::TYPE_RING: + seq = vec3dArray2CoordSeq( input, true, f->getCoordinateSequenceFactory() ); +- if ( seq ) output = f->createLinearRing( seq ); ++ if ( seq ) output = f->createLinearRing( *seq ); + break; + + case Symbology::Geometry::TYPE_POLYGON: + seq = vec3dArray2CoordSeq( input, true, f->getCoordinateSequenceFactory() ); + geom::LinearRing* shell = 0L; + if ( seq ) +- shell = f->createLinearRing( seq ); ++ shell = f->createLinearRing( *seq ); + + if ( shell ) + { +@@ -155,7 +156,7 @@ + holes = 0L; + } + } +- output = f->createPolygon( shell, holes ); ++ output = f->createPolygon( shell, (std::vector<geom::LinearRing * >*)holes ); + } + + break; diff --git a/gis/osgEarth/osgEarth.SlackBuild b/gis/osgEarth/osgEarth.SlackBuild index adde7db9aa0..cf201daf4e0 100644 --- a/gis/osgEarth/osgEarth.SlackBuild +++ b/gis/osgEarth/osgEarth.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for osgEarth # Copyright 2012 Alexander Bruy <alexander.bruy@gmail.com> -# Copyright 2018 Christoph Willing, Brisbane Australia +# Copyright 2018-2019 Christoph Willing, Brisbane Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ PRGNAM=osgEarth SRCNAM=osgearth -VERSION=${VERSION:-2.10} +VERSION=${VERSION:-2.10.2} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} @@ -43,10 +43,10 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKCFLAGS="-O2 -march=i586 -mtune=i686 -msse4.1" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-O2 -march=i686 -mtune=i686 -msse4.1" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" @@ -56,16 +56,6 @@ else LIBDIRSUFFIX="" fi -osgqt=""; -echo "OSGQT = $OSGQT" -if [ "$OSGQT" = "4" ]; then - osgqt="-DOSGEARTH_QT_BUILD=ON -DOSGEARTH_QT_VERSION=4" -elif [ "$OSGQT" = "5" ]; then - osgqt="-DOSGEARTH_QT_BUILD=ON -DOSGEARTH_QT_VERSION=5" -else - osgqt="" -fi - set -e rm -rf $PKG @@ -81,6 +71,8 @@ find -L . \ \( -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/geos-3_8-support.patch + mkdir -p build cd build cmake .. \ @@ -88,8 +80,7 @@ cd build -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -lX11" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ - -DDYNAMIC_OSGEARTH=ON \ - $osgqt + -DDYNAMIC_OSGEARTH=ON make make install DESTDIR=$PKG diff --git a/gis/osgEarth/osgEarth.info b/gis/osgEarth/osgEarth.info index 984a63f1bd8..d87bb831933 100644 --- a/gis/osgEarth/osgEarth.info +++ b/gis/osgEarth/osgEarth.info @@ -1,8 +1,8 @@ PRGNAM="osgEarth" -VERSION="2.10" +VERSION="2.10.2" HOMEPAGE="http://osgearth.org/" -DOWNLOAD="https://github.com/gwaldron/osgearth/archive/osgearth-2.10/osgearth-osgearth-2.10.tar.gz" -MD5SUM="8eba9d37a7d3da82f76505ee0ac6d2c0" +DOWNLOAD="https://github.com/gwaldron/osgearth/archive/osgearth-2.10.2/osgearth-osgearth-2.10.2.tar.gz" +MD5SUM="24f01afedb2eeac8154bf64772b7cbc7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="OpenSceneGraph gdal" |