From 578e7979041b95e1f5bd756ed4acbb975c274cdf Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Sun, 10 Jan 2016 14:19:41 +1100 Subject: [PATCH] openscenegraph: consolidate patches --- ...openscenegraph-1-fix-case-in-headers.patch | 58 -------- src/openscenegraph-1-fixes.patch | 137 ++++++++++++++++++ ...negraph-2-fix-case-in-library-ws2-32.patch | 56 ------- ...x-pointer-to-int-conversion-on-64bit.patch | 28 ---- src/openscenegraph-4-noopenthreads.patch | 14 -- 5 files changed, 137 insertions(+), 156 deletions(-) delete mode 100644 src/openscenegraph-1-fix-case-in-headers.patch create mode 100644 src/openscenegraph-1-fixes.patch delete mode 100644 src/openscenegraph-2-fix-case-in-library-ws2-32.patch delete mode 100644 src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch delete mode 100644 src/openscenegraph-4-noopenthreads.patch diff --git a/src/openscenegraph-1-fix-case-in-headers.patch b/src/openscenegraph-1-fix-case-in-headers.patch deleted file mode 100644 index 04ef6ba5..00000000 --- a/src/openscenegraph-1-fix-case-in-headers.patch +++ /dev/null @@ -1,58 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 31fe54c6c787bc3b66dd22a17528aeaeb0544752 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev -Date: Fri, 9 Oct 2015 11:13:12 +0200 -Subject: [PATCH] fix case in headers windows.h, winsock2.h - ---- - examples/osghangglide/hat.cpp | 2 +- - src/osg/DisplaySettings.cpp | 2 +- - src/osgPlugins/ply/typedefs.h | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/examples/osghangglide/hat.cpp b/examples/osghangglide/hat.cpp -index 4ef9e79..2884770 100644 ---- a/examples/osghangglide/hat.cpp -+++ b/examples/osghangglide/hat.cpp -@@ -17,7 +17,7 @@ - */ - - #ifdef _MSC_VER --#include -+#include - #pragma warning( disable : 4244 ) - #endif - -diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp -index 8ebae0d..8731c10 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 -+#include - 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 4d6c833..7a1e334 100644 ---- a/src/osgPlugins/ply/typedefs.h -+++ b/src/osgPlugins/ply/typedefs.h -@@ -13,8 +13,8 @@ - #define MESH_TYPEDEFS_H - - # if defined(_MSC_VER) --# include --# include -+# include -+# include - # endif - - # include --- -1.7.10.4 - diff --git a/src/openscenegraph-1-fixes.patch b/src/openscenegraph-1-fixes.patch new file mode 100644 index 00000000..f3289872 --- /dev/null +++ b/src/openscenegraph-1-fixes.patch @@ -0,0 +1,137 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev +Date: Fri, 9 Oct 2015 11:13:12 +0200 +Subject: [PATCH] fix case in headers windows.h, winsock2.h + + +diff --git a/examples/osghangglide/hat.cpp b/examples/osghangglide/hat.cpp +index 1111111..2222222 100644 +--- a/examples/osghangglide/hat.cpp ++++ b/examples/osghangglide/hat.cpp +@@ -17,7 +17,7 @@ + */ + + #ifdef _MSC_VER +-#include ++#include + #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 ++#include + 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 ++++ b/src/osgPlugins/ply/typedefs.h +@@ -13,8 +13,8 @@ + #define MESH_TYPEDEFS_H + + # if defined(_MSC_VER) +-# include +-# include ++# include ++# include + # endif + + # include + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev +Date: Fri, 9 Oct 2015 12:54:07 +0200 +Subject: [PATCH] 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 +Date: Fri, 9 Oct 2015 14:00:54 +0200 +Subject: [PATCH] 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 +Date: Sun, 10 Jan 2016 14:04:18 +1100 +Subject: [PATCH] openscenegraph: use previously built openthreads + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -8,7 +8,6 @@ ENDIF() + + #the old construct SUBDIRS( was substituded by ADD_SUBDIRECTORY that is to be preferred according on CMake docs. + FOREACH( mylibfolder +- OpenThreads + osg + osgDB + osgUtil diff --git a/src/openscenegraph-2-fix-case-in-library-ws2-32.patch b/src/openscenegraph-2-fix-case-in-library-ws2-32.patch deleted file mode 100644 index 7221e20d..00000000 --- a/src/openscenegraph-2-fix-case-in-library-ws2-32.patch +++ /dev/null @@ -1,56 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From c78dde633089cdff3142eb30cc01c5bd77a3c617 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev -Date: Fri, 9 Oct 2015 12:54:07 +0200 -Subject: [PATCH] fix case in library ws2_32 - ---- - src/osgPlugins/ZeroConfDevice/CMakeLists.txt | 2 +- - src/osgPlugins/osc/CMakeLists.txt | 2 +- - src/osgPlugins/vrml/CMakeLists.txt | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt -index 5287cfc..fab449e 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 6bf6127..0529e17 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 867e0df..5e5eb26 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) --- -1.7.10.4 - diff --git a/src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch b/src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch deleted file mode 100644 index c6484770..00000000 --- a/src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch +++ /dev/null @@ -1,28 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 9858a76d8daebe3e26f67eb530c89a8f00d5cd28 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev -Date: Fri, 9 Oct 2015 14:00:54 +0200 -Subject: [PATCH] fix pointer to int conversion on 64bit - ---- - src/osgPlugins/osgjs/WriteVisitor.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/osgPlugins/osgjs/WriteVisitor.cpp b/src/osgPlugins/osgjs/WriteVisitor.cpp -index 9f2b3c7..98e0c19 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); --- -1.7.10.4 - diff --git a/src/openscenegraph-4-noopenthreads.patch b/src/openscenegraph-4-noopenthreads.patch deleted file mode 100644 index f88f084f..00000000 --- a/src/openscenegraph-4-noopenthreads.patch +++ /dev/null @@ -1,14 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -burN OpenSceneGraph-3.4.0.orig/src/CMakeLists.txt OpenSceneGraph-3.4.0/src/CMakeLists.txt ---- OpenSceneGraph-3.4.0.orig/src/CMakeLists.txt 2015-12-03 11:53:17.597970954 +0100 -+++ OpenSceneGraph-3.4.0/src/CMakeLists.txt 2015-12-03 11:55:07.941146106 +0100 -@@ -8,7 +8,6 @@ - - #the old construct SUBDIRS( was substituded by ADD_SUBDIRECTORY that is to be preferred according on CMake docs. - FOREACH( mylibfolder -- OpenThreads - osg - osgDB - osgUtil