update openscenegraph

This commit is contained in:
Boris Pek 2017-12-14 01:15:50 +03:00
parent d0d64a15ae
commit e6b965c5de
2 changed files with 47 additions and 93 deletions

View File

@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Fri, 9 Oct 2015 11:13:12 +0200
Subject: [PATCH 1/7] fix case in headers windows.h, winsock2.h
Subject: [PATCH 1/6] fix case in headers windows.h, winsock2.h
diff --git a/examples/osghangglide/hat.cpp b/examples/osghangglide/hat.cpp
@ -21,19 +21,6 @@ index 1111111..2222222 100644
#pragma warning( disable : 4244 )
#endif
diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp
index 1111111..2222222 100644
--- a/src/osg/DisplaySettings.cpp
+++ b/src/osg/DisplaySettings.cpp
@@ -24,7 +24,7 @@ using namespace osg;
using namespace std;
#if defined(WIN32) && !defined(__CYGWIN__)
-#include<Windows.h>
+#include<windows.h>
extern "C" { OSG_EXPORT DWORD NvOptimusEnablement=0x00000001; }
#else
extern "C" { int NvOptimusEnablement=0x00000001; }
diff --git a/src/osgPlugins/ply/typedefs.h b/src/osgPlugins/ply/typedefs.h
index 1111111..2222222 100644
--- a/src/osgPlugins/ply/typedefs.h
@ -50,76 +37,10 @@ index 1111111..2222222 100644
# include <osg/Notify>
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Fri, 9 Oct 2015 12:54:07 +0200
Subject: [PATCH 2/7] fix case in library ws2_32
diff --git a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
+++ b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
@@ -19,7 +19,7 @@ IF(WIN32)
mdns_win/dns_sd.h
mdns_win/dns-sd.c
)
- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm")
+ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm")
SET(TARGET_LIBRARIES_VARS ZEROCONF_LIBRARY)
ADD_DEFINITIONS(-DNOT_HAVE_GETOPT)
ADD_DEFINITIONS(-DNOT_HAVE_SETLINEBUF)
diff --git a/src/osgPlugins/osc/CMakeLists.txt b/src/osgPlugins/osc/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/osgPlugins/osc/CMakeLists.txt
+++ b/src/osgPlugins/osc/CMakeLists.txt
@@ -35,7 +35,7 @@ if(WIN32 AND NOT ANDROID)
ip/win32/NetworkingUtils.cpp
ip/win32/UdpSocket.cpp
)
- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm")
+ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm")
ELSE()
SET(TARGET_SRC
${TARGET_SRC}
diff --git a/src/osgPlugins/vrml/CMakeLists.txt b/src/osgPlugins/vrml/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/osgPlugins/vrml/CMakeLists.txt
+++ b/src/osgPlugins/vrml/CMakeLists.txt
@@ -27,7 +27,7 @@ IF (WIN32)
PNG_LIBRARY
ZLIB_LIBRARY)
SET(TARGET_EXTERNAL_LIBRARIES
- Ws2_32.lib)
+ ws2_32.lib)
ELSE()
SET(TARGET_LIBRARIES_VARS
OPENVRML_LIBRARY)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Fri, 9 Oct 2015 14:00:54 +0200
Subject: [PATCH 3/7] fix pointer to int conversion on 64bit
diff --git a/src/osgPlugins/osgjs/WriteVisitor.cpp b/src/osgPlugins/osgjs/WriteVisitor.cpp
index 1111111..2222222 100644
--- a/src/osgPlugins/osgjs/WriteVisitor.cpp
+++ b/src/osgPlugins/osgjs/WriteVisitor.cpp
@@ -225,7 +225,7 @@ JSONObject* createImage(osg::Image* image, bool inlineImages, int maxTextureDime
// no image file so use this inline name image and create a file
std::stringstream ss;
ss << osgDB::getFilePath(baseName) << osgDB::getNativePathSeparator();
- ss << (long int)image << ".inline_conv_generated.png"; // write the pointer location
+ ss << (uintptr_t)image << ".inline_conv_generated.png"; // write the pointer location
std::string filename = ss.str();
if (osgDB::writeImageFile(*image, filename)) {
image->setFileName(filename);
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Rashad Kanavath <rashad.kanavath@c-s.fr>
Date: Sun, 10 Jan 2016 14:04:18 +1100
Subject: [PATCH 4/7] openscenegraph: use previously built openthreads
Subject: [PATCH 2/6] openscenegraph: use previously built openthreads
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@ -138,7 +59,7 @@ index 1111111..2222222 100644
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 5/7] use pkg-config for gstreamer detection in mingw
Subject: [PATCH 3/6] use pkg-config for gstreamer detection in mingw
diff --git a/CMakeModules/FindGStreamer.cmake b/CMakeModules/FindGStreamer.cmake
@ -158,7 +79,7 @@ index 1111111..2222222 100644
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 6/7] disable ffmpeg
Subject: [PATCH 4/6] disable ffmpeg
OpenSceneGraph is using removed features of ffmpeg, which have
been deprecated for 3+ years.
@ -185,14 +106,14 @@ index 1111111..2222222 100644
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 7/7] Require the presence of either qt5 or qt4.
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
@@ -712,9 +712,9 @@ IF(OSG_USE_QT AND NOT ANDROID)
@@ -708,9 +708,9 @@ IF(OSG_USE_QT AND NOT ANDROID)
IF (DESIRED_QT_VERSION)
IF (DESIRED_QT_VERSION MATCHES 5)
@ -204,3 +125,36 @@ index 1111111..2222222 100644
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
diff --git a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
+++ b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt
@@ -19,7 +19,7 @@ IF(WIN32)
mdns_win/dns_sd.h
mdns_win/dns-sd.c
)
- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm")
+ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm")
SET(TARGET_LIBRARIES_VARS ZEROCONF_LIBRARY)
ADD_DEFINITIONS(-DNOT_HAVE_GETOPT)
ADD_DEFINITIONS(-DNOT_HAVE_SETLINEBUF)
diff --git a/src/osgPlugins/vrml/CMakeLists.txt b/src/osgPlugins/vrml/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/osgPlugins/vrml/CMakeLists.txt
+++ b/src/osgPlugins/vrml/CMakeLists.txt
@@ -27,7 +27,7 @@ IF (WIN32)
PNG_LIBRARY
ZLIB_LIBRARY)
SET(TARGET_EXTERNAL_LIBRARIES
- Ws2_32.lib)
+ ws2_32.lib)
ELSE()
SET(TARGET_LIBRARIES_VARS
OPENVRML_LIBRARY)

View File

@ -4,19 +4,19 @@ PKG := openscenegraph
$(PKG)_WEBSITE := http://www.openscenegraph.org/
$(PKG)_DESCR := OpenSceneGraph
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.4.0
$(PKG)_CHECKSUM := 5c727d84755da276adf8c4a4a3a8ba9c9570fc4b4969f06f1d2e9f89b1e3040e
$(PKG)_SUBDIR := OpenSceneGraph-$($(PKG)_VERSION)
$(PKG)_FILE := OpenSceneGraph-$($(PKG)_VERSION).zip
$(PKG)_URL := http://trac.openscenegraph.org/downloads/developer_releases/$($(PKG)_FILE)
$(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)_DEPS := gcc boost curl dcmtk freetype gdal giflib gstreamer \
gta jasper jpeg libpng openal openexr openthreads poppler \
qt tiff zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://trac.openscenegraph.org/downloads/developer_releases/?C=M;O=D' | \
$(SED) -n 's,.*OpenSceneGraph-\([0-9]*\.[0-9]*[02468]\.[^<]*\)\.zip.*,\1,p' | \
grep -v rc | \
$(WGET) -q -O- 'http://www.openscenegraph.org/index.php/download-section/stable-releases' | \
$(SED) -n 's,.*OpenSceneGraph/tree/OpenSceneGraph-\([0-9]*\.[0-9]*[02468]\.[^<]*\)">.*,\1,p' | \
$(SORT) -V | \
tail -1
endef