summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mesa2018-01-21 20:30:47 -0500
committerSamuel Mesa2018-01-21 20:30:47 -0500
commita925e9f2dcf0a5325dd015e71ee365ab01bcae9b (patch)
treead6a8f398527b8b59db83f3df11106f81024a210
parent84ae82307deb5a72bc018d7e543b4834c6ae5a4e (diff)
downloadaur-a925e9f2dcf0a5325dd015e71ee365ab01bcae9b.tar.gz
Update version 2.8
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD17
-rw-r--r--fix-suppor_geos36.patch94
3 files changed, 111 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a1ec96d72a60..b803438fe689 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = osgearth
pkgdesc = A terrain rendering toolkit for OpenSceneGraph
- pkgver = 2.7
+ pkgver = 2.8
pkgrel = 1
url = http://www.osgearth.org
arch = i686
@@ -13,8 +13,10 @@ pkgbase = osgearth
depends = qt5-base
provides = osgearth
conflicts = osgearth-qt5
- source = https://github.com/gwaldron/osgearth/archive/osgearth-2.7.tar.gz
- md5sums = aad15a3ee27a34dcabc9b8f4922a1e96
+ source = https://github.com/gwaldron/osgearth/archive/osgearth-2.8.tar.gz
+ source = fix-suppor_geos36.patch
+ md5sums = b3dbb1e386db52587af17c3d9999d3e6
+ md5sums = 3d975f10662544231cf36371f8549c6a
pkgname = osgearth
diff --git a/PKGBUILD b/PKGBUILD
index ddf4643d1732..e9136c950eaa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,18 +3,25 @@
# Contributor: A. Weiss <adam [at] archlinux.us>
pkgname=osgearth
-pkgver=2.7
+pkgver=2.8
pkgrel=1
pkgdesc="A terrain rendering toolkit for OpenSceneGraph"
arch=('i686' 'x86_64')
-url=('http://www.osgearth.org')
+url='http://www.osgearth.org'
license=('LGPL')
depends=('openscenegraph' 'gdal' 'minizip' 'qt5-base')
makedepends=('cmake')
provides=('osgearth')
conflicts=('osgearth-qt5')
-source=("https://github.com/gwaldron/osgearth/archive/${pkgname}-${pkgver}.tar.gz")
-md5sums=('aad15a3ee27a34dcabc9b8f4922a1e96')
+source=("https://github.com/gwaldron/osgearth/archive/${pkgname}-${pkgver}.tar.gz" "fix-suppor_geos36.patch")
+md5sums=('b3dbb1e386db52587af17c3d9999d3e6'
+ '3d975f10662544231cf36371f8549c6a')
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgname}-${pkgver}
+
+ patch -Np1 -i ${srcdir}/fix-suppor_geos36.patch
+}
build() {
cd ${srcdir}/${pkgname}-${pkgname}-${pkgver}
@@ -32,7 +39,7 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
..
- make -j5
+ make
}
package() {
diff --git a/fix-suppor_geos36.patch b/fix-suppor_geos36.patch
new file mode 100644
index 000000000000..31e3899cb280
--- /dev/null
+++ b/fix-suppor_geos36.patch
@@ -0,0 +1,94 @@
+From 6a3f724e3a19aa53ba7af40bcbce7e1e19477a8e Mon Sep 17 00:00:00 2001
+From: Sandro Mani <manisandro@gmail.com>
+Date: Mon, 20 Mar 2017 15:19:09 +0100
+Subject: [PATCH] Add GEOS >= 3.6.0 compatibility
+
+---
+ src/osgEarthSymbology/GEOS | 6 ++++++
+ src/osgEarthSymbology/GEOS.cpp | 15 ++++++++++++++-
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/src/osgEarthSymbology/GEOS b/src/osgEarthSymbology/GEOS
+index 9921e65440..74471d2123 100644
+--- a/src/osgEarthSymbology/GEOS
++++ b/src/osgEarthSymbology/GEOS
+@@ -25,7 +25,9 @@
+ #include <osgEarthFeatures/Common>
+ #include <osgEarthSymbology/Style>
+ #include <osgEarthSymbology/Geometry>
++#include <geos/version.h>
+ #include <geos/geom/Geometry.h>
++#include <geos/geom/GeometryFactory.h>
+
+ namespace osgEarth { namespace Symbology
+ {
+@@ -45,7 +47,11 @@ namespace osgEarth { namespace Symbology
+ void disposeGeometry(geos::geom::Geometry* input);
+
+ protected:
++#if GEOS_VERSION_MAJOR >= 3 && GEOS_VERSION_MINOR >= 6
++ geos::geom::GeometryFactory::unique_ptr _factory;
++#else
+ geos::geom::GeometryFactory* _factory;
++#endif
+ };
+
+ } } // namespace osgEarth::Features
+diff --git a/src/osgEarthSymbology/GEOS.cpp b/src/osgEarthSymbology/GEOS.cpp
+index 9d7d27e521..db42f657ee 100644
+--- a/src/osgEarthSymbology/GEOS.cpp
++++ b/src/osgEarthSymbology/GEOS.cpp
+@@ -216,7 +216,11 @@ GEOSContext::GEOSContext()
+ geos::geom::PrecisionModel* pm = new geos::geom::PrecisionModel(geom::PrecisionModel::FLOATING);
+
+ // Factory will clone the PM
++#if GEOS_VERSION_MAJOR >= 3 && GEOS_VERSION_MINOR >= 6
++ _factory = geos::geom::GeometryFactory::create( pm );
++#else
+ _factory = new geos::geom::GeometryFactory( pm );
++#endif
+
+ // Delete the template.
+ delete pm;
+@@ -224,7 +228,9 @@ GEOSContext::GEOSContext()
+
+ GEOSContext::~GEOSContext()
+ {
++#if !(GEOS_VERSION_MAJOR >= 3 && GEOS_VERSION_MINOR >= 6)
+ delete _factory;
++#endif
+ }
+
+ geom::Geometry*
+@@ -233,12 +239,16 @@ GEOSContext::importGeometry(const Symbology::Geometry* input)
+ geom::Geometry* output = 0L;
+ if ( input && input->isValid() )
+ {
++#if GEOS_VERSION_MAJOR >= 3 && GEOS_VERSION_MINOR >= 6
++ output = import( input, _factory.get() );
++#else
+ output = import( input, _factory );
+
+ // if output is ok, it will have a pointer to f. this is probably a leak.
+ // TODO: Check whether this is a leak!! -gw
+ //if ( !output )
+ // delete f;
++#endif
+ }
+ return output;
+ }
+@@ -335,10 +345,13 @@ GEOSContext::disposeGeometry(geom::Geometry* input)
+ {
+ if (input)
+ {
+- geom::GeometryFactory* f = const_cast<geom::GeometryFactory*>(input->getFactory());
++#if GEOS_VERSION_MAJOR >= 3 && GEOS_VERSION_MINOR >= 6
+ _factory->destroyGeometry(input);
++#else
++ geom::GeometryFactory* f = const_cast<geom::GeometryFactory*>(input->getFactory());
+ if ( f != _factory )
+ delete f;
++#endif
+ }
+ }
+