aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <slackbuilds@jaxartes.net>2019-11-16 10:36:44 -0800
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-11-23 16:01:58 +0700
commitdfd4c1736fa32cd035237f19bfb0a57288edb4a5 (patch)
tree18e968400ec851e551b3525f7db7b6b99729a48b
parent11eac2cfbf8495cd1dc98244cfafa4f488c6ff5a (diff)
gis/osgEarth: Add geos 3.8 patch, remove Qt support.
-rw-r--r--gis/osgEarth/README15
-rw-r--r--gis/osgEarth/geos-3_6_1-support.patch60
-rw-r--r--gis/osgEarth/geos-3_8-support.patch70
-rw-r--r--gis/osgEarth/osgEarth.SlackBuild17
4 files changed, 75 insertions, 87 deletions
diff --git a/gis/osgEarth/README b/gis/osgEarth/README
index 8026af489fec..eb37a5179642 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 fc6a6beefb9f..000000000000
--- 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 000000000000..e5375e205cd4
--- /dev/null
+++ b/gis/osgEarth/geos-3_8-support.patch
@@ -0,0 +1,70 @@
+Binary files osgearth-osgearth-2.10.2.a/src/osgEarthSymbology/.GEOS.cpp.un~ and osgearth-osgearth-2.10.2.b/src/osgEarthSymbology/.GEOS.cpp.un~ differ
+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 ff83e100c573..cf201daf4e02 100644
--- a/gis/osgEarth/osgEarth.SlackBuild
+++ b/gis/osgEarth/osgEarth.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=osgEarth
SRCNAM=osgearth
VERSION=${VERSION:-2.10.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -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