From 16c6fa993926c07b5fbfefb36c8abbb80ac3c134 Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Wed, 10 Oct 2018 00:38:31 +0300 Subject: [PATCH] osgearth: update patch Fix build with OpenSceneGraph >= 3.6.1 --- src/osgearth-1-fixes.patch | 23 +++++++++++++++++++++++ src/osgearth.mk | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/osgearth-1-fixes.patch b/src/osgearth-1-fixes.patch index 72f22828..1070d64f 100644 --- a/src/osgearth-1-fixes.patch +++ b/src/osgearth-1-fixes.patch @@ -42,3 +42,26 @@ index 1111111..2222222 100644 ADD_SUBDIRECTORY( tests ) ENDIF() +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Pek +Date: Mon, 18 Jun 2018 18:49:40 +0300 +Subject: Fix build with OpenSceneGraph >= 3.6.1 + + +diff --git a/src/osgEarth/ScreenSpaceLayout.cpp b/src/osgEarth/ScreenSpaceLayout.cpp +index 346d7bcae..760d26fa8 100644 +--- a/src/osgEarth/ScreenSpaceLayout.cpp ++++ b/src/osgEarth/ScreenSpaceLayout.cpp +@@ -106,7 +106,11 @@ namespace + return diff < 0.0f; + + // then fallback on traversal order. ++#if OSG_VERSION_GREATER_THAN(3,6,1) ++ diff = float(lhs->_traversalOrderNumber) - float(rhs->_traversalOrderNumber); ++#else + diff = float(lhs->_traversalNumber) - float(rhs->_traversalNumber); ++#endif + return diff < 0.0f; + } + } + diff --git a/src/osgearth.mk b/src/osgearth.mk index 17b3c54c..9095b020 100644 --- a/src/osgearth.mk +++ b/src/osgearth.mk @@ -7,7 +7,7 @@ $(PKG)_IGNORE := $(PKG)_VERSION := 2.9 $(PKG)_CHECKSUM := 22aeef42bb700c1e669d9ba57ce4155c0668caf86cc738750a6b9d34c1eaf2a4 $(PKG)_GH_CONF := gwaldron/osgearth/releases/latest, osgearth- -$(PKG)_DEPS := curl cc gdal openscenegraph poco sqlite zlib +$(PKG)_DEPS := curl cc gdal openscenegraph sqlite zlib define $(PKG)_BUILD cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \