Merge pull request #2224 from sibuserv/update-openscenegraph

Update OpenSceneGraph
This commit is contained in:
mabrand 2018-11-14 11:10:18 +01:00 committed by GitHub
commit a97782ae64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 111 additions and 69 deletions

View File

@ -56,30 +56,10 @@ index 1111111..2222222 100644
osgDB
osgUtil
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sun, 10 Jan 2016 14:19:57 +1100
Subject: [PATCH 3/6] use pkg-config for gstreamer detection in mingw
diff --git a/CMakeModules/FindGStreamer.cmake b/CMakeModules/FindGStreamer.cmake
index 1111111..2222222 100644
--- a/CMakeModules/FindGStreamer.cmake
+++ b/CMakeModules/FindGStreamer.cmake
@@ -65,7 +65,7 @@
# )
#endmacro()
-if (WIN32)
+if (WIN32 AND NOT MINGW)
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
find_path(${_component_prefix}_INCLUDE_DIRS
NAMES ${_header}
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Mon, 22 Feb 2016 03:35:28 +0300
Subject: [PATCH 4/6] disable ffmpeg
Subject: [PATCH 3/6] disable ffmpeg
OpenSceneGraph is using removed features of ffmpeg, which have
been deprecated for 3+ years.
@ -88,48 +68,25 @@ See https://github.com/mxe/mxe/issues/1230#issuecomment-186936198
Source of patch: http://forum.openscenegraph.org/viewtopic.php?t=10485
diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt
index 1111111..2222222 100644
index 77d66f8..1c8398e 100644
--- a/src/osgPlugins/CMakeLists.txt
+++ b/src/osgPlugins/CMakeLists.txt
@@ -199,10 +199,6 @@ IF(XINE_FOUND)
ADD_SUBDIRECTORY(xine)
@@ -213,10 +213,6 @@ IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
ADD_PLUGIN_DIRECTORY(txp)
ENDIF()
-IF(FFMPEG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
- ADD_SUBDIRECTORY(ffmpeg)
- ADD_PLUGIN_DIRECTORY(ffmpeg)
-ENDIF()
-
IF(GSTREAMER_FOUND AND GLIB_FOUND)
ADD_SUBDIRECTORY(gstreamer)
ADD_PLUGIN_DIRECTORY(gstreamer)
ENDIF()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Saikrishna Arcot <saiarcot895@gmail.com>
Date: Mon, 6 Jun 2016 19:06:00 -0500
Subject: [PATCH 5/6] Require the presence of either qt5 or qt4.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -708,9 +708,9 @@ IF(OSG_USE_QT AND NOT ANDROID)
IF (DESIRED_QT_VERSION)
IF (DESIRED_QT_VERSION MATCHES 5)
- FIND_PACKAGE(Qt5Widgets)
+ FIND_PACKAGE(Qt5Widgets REQUIRED)
ELSEIF (DESIRED_QT_VERSION MATCHES 4)
- FIND_PACKAGE(Qt4)
+ FIND_PACKAGE(Qt4 REQUIRED)
ELSE()
FIND_PACKAGE(Qt3)
ENDIF()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@yandex.ru>
Date: Thu, 14 Dec 2017 15:29:38 +0300
Subject: [PATCH 6/6] fix case in library ws2_32
Subject: [PATCH 4/6] fix case in library ws2_32
diff --git a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
@ -158,3 +115,69 @@ index 1111111..2222222 100644
ELSE()
SET(TARGET_LIBRARIES_VARS
OPENVRML_LIBRARY)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@yandex.ru>
Date: Wed, 10 Oct 2018 00:56:37 +0300
Subject: [PATCH 5/6] fix build with GCC < 6.x
diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp
index 91e6c8f..d11347e 100644
--- a/src/osgViewer/GraphicsWindowWin32.cpp
+++ b/src/osgViewer/GraphicsWindowWin32.cpp
@@ -799,7 +799,7 @@ Win32WindowingSystem::Win32WindowingSystem()
if (hModuleShore) {
setProcessDpiAwareness = (SetProcessDpiAwarenessFunc *) GetProcAddress(hModuleShore, "SetProcessDpiAwareness");
if (setProcessDpiAwareness) {
- (*setProcessDpiAwareness)(PROCESS_DPI_AWARENESS::PROCESS_PER_MONITOR_DPI_AWARE);
+ (*setProcessDpiAwareness)(PROCESS_PER_MONITOR_DPI_AWARE);
}
}
// #endif
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@yandex.ru>
Date: Wed, 10 Oct 2018 01:48:22 +0300
Subject: [PATCH 6/6] fix build of gta plugin when pkg-config is used
+ update related variable for build without pkg-config.
diff --git a/CMakeModules/FindGTA.cmake b/CMakeModules/FindGTA.cmake
index 086069c..e483ad3 100644
--- a/CMakeModules/FindGTA.cmake
+++ b/CMakeModules/FindGTA.cmake
@@ -33,7 +33,7 @@ IF(NOT GTA_FOUND)
/usr/freeware/include
)
- FIND_LIBRARY(GTA_LIBRARY
+ FIND_LIBRARY(GTA_LIBRARIES
NAMES gta libgta
PATHS
$ENV{GTA_DIR}/lib
@@ -50,8 +50,8 @@ IF(NOT GTA_FOUND)
)
SET(GTA_FOUND "NO")
- IF(GTA_LIBRARY AND GTA_INCLUDE_DIRS)
+ IF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
SET(GTA_FOUND "YES")
- ENDIF(GTA_LIBRARY AND GTA_INCLUDE_DIRS)
+ ENDIF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
ENDIF(NOT GTA_FOUND)
\ No newline at end of file
diff --git a/src/osgPlugins/gta/CMakeLists.txt b/src/osgPlugins/gta/CMakeLists.txt
index 2b910a6..16466fe 100644
--- a/src/osgPlugins/gta/CMakeLists.txt
+++ b/src/osgPlugins/gta/CMakeLists.txt
@@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${GTA_INCLUDE_DIRS} )
SET(TARGET_SRC ReaderWriterGTA.cpp )
-SET(TARGET_LIBRARIES_VARS GTA_LIBRARY)
+SET(TARGET_LIBRARIES_VARS GTA_LIBRARIES)
#### end var setup ###
SETUP_PLUGIN(gta)

View File

@ -4,15 +4,12 @@ PKG := openscenegraph
$(PKG)_WEBSITE := http://www.openscenegraph.org/
$(PKG)_DESCR := OpenSceneGraph
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.4.1
$(PKG)_CHECKSUM := 930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5
#$(PKG)_GH_CONF := openscenegraph/OpenSceneGraph/tags, OpenSceneGraph-
$(PKG)_SUBDIR := OpenSceneGraph-OpenSceneGraph-$($(PKG)_VERSION)
$(PKG)_FILE := OpenSceneGraph-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/openscenegraph/OpenSceneGraph/archive/$($(PKG)_FILE)
$(PKG)_VERSION := 3.6.3
$(PKG)_CHECKSUM := 51bbc79aa73ca602cd1518e4e25bd71d41a10abd296e18093a8acfebd3c62696
$(PKG)_GH_CONF := openscenegraph/OpenSceneGraph/tags, OpenSceneGraph-
$(PKG)_DEPS := cc boost curl dcmtk freetype gdal giflib gstreamer \
gta jasper jpeg libpng openal openexr openthreads poppler \
qtbase tiff zlib
tiff zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.openscenegraph.org/index.php/download-section/stable-releases' | \
@ -25,16 +22,15 @@ define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' \
-DCMAKE_CXX_FLAGS='-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS' \
-DCMAKE_HAVE_PTHREAD_H=OFF \
-DOSG_DETERMINE_WIN_VERSION=OFF \
-DPKG_CONFIG_EXECUTABLE='$(PREFIX)/bin/$(TARGET)-pkg-config' \
-DDYNAMIC_OPENTHREADS=$(CMAKE_SHARED_BOOL) \
-DDYNAMIC_OPENSCENEGRAPH=$(CMAKE_SHARED_BOOL) \
-DBUILD_OSG_APPLICATIONS=OFF \
-DPOPPLER_HAS_CAIRO_EXITCODE=0 \
-D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \
-D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \
$(if $(filter qtbase,$($(PKG)_DEPS)), \
-DDESIRED_QT_VERSION=5, \
-DDESIRED_QT_VERSION=4)
-D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1
endef

View File

@ -12,19 +12,19 @@ $(PKG)_URL = $(openscenegraph_URL)
$(PKG)_DEPS := cc
define $(PKG)_UPDATE
echo $openscenegraph_VERSION)
echo $(openscenegraph_VERSION)
endef
define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && '$(TARGET)-cmake' \
cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' \
-DDYNAMIC_OPENTHREADS=$(CMAKE_SHARED_BOOL) \
-DOSG_DETERMINE_WIN_VERSION=OFF \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DOSG_USE_QT=FALSE \
-DPOPPLER_HAS_CAIRO_EXITCODE=0 \
-D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \
-D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \
'$(1)'
$(MAKE) -C '$(1).build/src/OpenThreads' -j '$(JOBS)' install VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)/src/OpenThreads' -j '$(JOBS)' VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)/src/OpenThreads' -j 1 install VERBOSE=1
endef

View File

@ -42,3 +42,26 @@ index 1111111..2222222 100644
ADD_SUBDIRECTORY( tests )
ENDIF()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@yandex.ru>
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;
}
}

View File

@ -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)' \

View File

@ -3,8 +3,8 @@
PKG := proj
$(PKG)_WEBSITE := https://trac.osgeo.org/proj/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 5.0.0
$(PKG)_CHECKSUM := b30df08d736e69744cb255828721abb545b494d6032c13a96520f3219a444cd2
$(PKG)_VERSION := 5.1.0
$(PKG)_CHECKSUM := 6b1379a53317d9b5b8c723c1dc7bf2e3a8eb22ceb46b8807a1ce48ef65685bb3
$(PKG)_SUBDIR := proj-$($(PKG)_VERSION)
$(PKG)_FILE := proj-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://download.osgeo.org/proj/$($(PKG)_FILE)