summaryrefslogtreecommitdiffstats
path: root/gis/osgEarth
diff options
context:
space:
mode:
Diffstat (limited to 'gis/osgEarth')
-rw-r--r--gis/osgEarth/geos-3_6_1-support.patch60
-rw-r--r--gis/osgEarth/osgEarth.SlackBuild28
-rw-r--r--gis/osgEarth/osgEarth.info6
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"