diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-08-06 11:12:27 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-08-06 11:12:27 +0000 |
commit | b128fceda9a4639145c38fe6d540a74148f34761 (patch) | |
tree | 96aa2af4983aefb031ecfcbe20d6967ee4c4a335 | |
parent | 5dbc90a4e3d3d8bfc1e25ff5012957f127720749 (diff) | |
download | pkgsrc-b128fceda9a4639145c38fe6d540a74148f34761.tar.gz |
osg: SunOS fixes and remove obsolete patches.
10 files changed, 41 insertions, 157 deletions
diff --git a/graphics/osg/distinfo b/graphics/osg/distinfo index fd865d735bc..a81410b9a22 100644 --- a/graphics/osg/distinfo +++ b/graphics/osg/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2018/08/04 01:05:10 nia Exp $ +$NetBSD: distinfo,v 1.12 2018/08/06 11:12:27 jperkin Exp $ SHA1 (osg-3.4.1.tar.gz) = 6fc56846f5790d85dd8139aecb958701f4f4e630 RMD160 (osg-3.4.1.tar.gz) = 299ab7131433e7f36f0da10eb102014bce26ec83 @@ -8,7 +8,8 @@ SHA1 (patch-CMakeModules_FindFFmpeg.cmake) = cb533fdfa7cc569b6e226e1ab422ef36d5d SHA1 (patch-ab) = 0bb683599daae3b2718693f9df8077b0333a410b SHA1 (patch-ad) = 909075cabe15541b182794b4fdf5baa038f07ed3 SHA1 (patch-ae) = ca2f8a6cd509a914f9b643429e8384faf476f2c8 -SHA1 (patch-applications_present3D_Cluster.cpp) = 1b05be4da6632356200192d8f5aa5f08270f68d8 +SHA1 (patch-applications_present3D_Cluster.cpp) = 017b1d9b42760cad8deb77d7330b04f75aa0e814 SHA1 (patch-src_osgPlugins_osc_ip_posix_NetworkingUtils.cpp) = 5748636ed17d23a0a595d38b2b392e773840a102 -SHA1 (patch-src_osgPlugins_osc_osc_OscHostEndianness.h) = d8e9efa88898e240775ead76c5c9df4c86cd562c +SHA1 (patch-src_osgPlugins_osc_osc_OscHostEndianness.h) = 4202df06c8ab49fa5f3787cc1c59e9f247d1a21b +SHA1 (patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp) = b9bc38773bfdc78056a4575f772abd7a1fbf09f3 SHA1 (patch-src_osg_GLExtensions.cpp) = 5fc04fa162c5cf8aa34ddfb0152092b02e8eec08 diff --git a/graphics/osg/patches/patch-ac b/graphics/osg/patches/patch-ac deleted file mode 100644 index e637ece6326..00000000000 --- a/graphics/osg/patches/patch-ac +++ /dev/null @@ -1,34 +0,0 @@ -$NetBSD: patch-ac,v 1.2 2012/03/07 16:27:35 adam Exp $ - ---- include/osg/Math.orig 2008-11-23 13:35:43.000000000 +0200 -+++ include/osg/Math 2009-01-14 09:49:00.000000000 +0200 -@@ -14,7 +14,7 @@ - #ifndef __OSG_MATH - #define __OSG_MATH - --#include <math.h> -+#include <cmath> - - #include <osg/Export> - -@@ -207,14 +207,14 @@ - inline bool isNaN(float v) { return _isnan(v)!=0; } - inline bool isNaN(double v) { return _isnan(v)!=0; } - #else -- #if defined(__APPLE__) -+// #if defined(__APPLE__) - inline bool isNaN(float v) { return std::isnan(v); } - inline bool isNaN(double v) { return std::isnan(v); } -- #else -- // Need to use to std::isnan to avoid undef problem from <cmath> -- inline bool isNaN(float v) { return isnan(v); } -- inline bool isNaN(double v) { return isnan(v); } -- #endif -+// #else -+// // Need to use to std::isnan to avoid undef problem from <cmath> -+// inline bool isNaN(float v) { return isnan(v); } -+// inline bool isNaN(double v) { return isnan(v); } -+// #endif - #endif - - diff --git a/graphics/osg/patches/patch-af b/graphics/osg/patches/patch-af deleted file mode 100644 index bba23f00b29..00000000000 --- a/graphics/osg/patches/patch-af +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-af,v 1.1 2012/03/26 12:00:33 drochner Exp $ - ---- src/osgPlugins/xine/video_out_rgb.c.orig 2009-11-20 11:46:20.000000000 +0000 -+++ src/osgPlugins/xine/video_out_rgb.c -@@ -2769,8 +2769,14 @@ init_class(xine_t* xine, void* vo_visual - clear(rgb_class, sizeof(rgbout_class_t)); - - rgb_class->driver_class.open_plugin = open_plugin; -+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) - rgb_class->driver_class.get_identifier = get_identifier; - rgb_class->driver_class.get_description = get_description; -+#else -+ rgb_class->driver_class.identifier = get_identifier(NULL); -+ rgb_class->driver_class.description = get_description(NULL); -+#endif -+ - rgb_class->driver_class.dispose = dispose_class; - - return(rgb_class); diff --git a/graphics/osg/patches/patch-applications_present3D_Cluster.cpp b/graphics/osg/patches/patch-applications_present3D_Cluster.cpp index bb7e6dcbf1c..46755a53fe4 100644 --- a/graphics/osg/patches/patch-applications_present3D_Cluster.cpp +++ b/graphics/osg/patches/patch-applications_present3D_Cluster.cpp @@ -1,4 +1,4 @@ -$NetBSD: patch-applications_present3D_Cluster.cpp,v 1.3 2018/08/04 01:05:10 nia Exp $ +$NetBSD: patch-applications_present3D_Cluster.cpp,v 1.4 2018/08/06 11:12:27 jperkin Exp $ Support more platforms. @@ -20,7 +20,7 @@ Support more platforms. #if defined(__linux) || defined(__FreeBSD__) || defined( __APPLE__ ) || \ - defined(__DragonFly__) || defined(__FreeBSD_kernel__) || defined(__GNU__) + defined(__DragonFly__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || \ -+ defined(__NetBSD__) || defined(__OpenBSD__) ++ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun) socklen_t #else int diff --git a/graphics/osg/patches/patch-include_OpenThreads_Atomic b/graphics/osg/patches/patch-include_OpenThreads_Atomic deleted file mode 100644 index 9f0a9a7a2f7..00000000000 --- a/graphics/osg/patches/patch-include_OpenThreads_Atomic +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-include_OpenThreads_Atomic,v 1.1 2012/03/07 16:27:35 adam Exp $ - -Fix C error. - ---- include/OpenThreads/Atomic.orig 2012-03-06 16:27:45.000000000 +0000 -+++ include/OpenThreads/Atomic -@@ -241,7 +241,7 @@ _OPENTHREADS_ATOMIC_INLINE bool - AtomicPtr::assign(void* ptrNew, const void* const ptrOld) - { - #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) -- return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); -+ return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); - #elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __compare_and_swap((unsigned long*)&_ptr, (unsigned long)ptrOld, (unsigned long)ptrNew); - #elif defined(_OPENTHREADS_ATOMIC_USE_SUN) diff --git a/graphics/osg/patches/patch-src_OpenThreads_common_Atomic.cpp b/graphics/osg/patches/patch-src_OpenThreads_common_Atomic.cpp deleted file mode 100644 index bc6e5c15942..00000000000 --- a/graphics/osg/patches/patch-src_OpenThreads_common_Atomic.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_OpenThreads_common_Atomic.cpp,v 1.1 2012/03/07 16:27:35 adam Exp $ - -Fix C error. - ---- src/OpenThreads/common/Atomic.cpp.orig 2012-03-05 21:26:31.000000000 +0000 -+++ src/OpenThreads/common/Atomic.cpp -@@ -143,7 +143,7 @@ bool - AtomicPtr::assign(void* ptrNew, const void* const ptrOld) - { - #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) -- return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); -+ return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); - #elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) - return ptrOld == InterlockedCompareExchangePointer((PVOID volatile*)&_ptr, (PVOID)ptrNew, (PVOID)ptrOld); - #elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) diff --git a/graphics/osg/patches/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp b/graphics/osg/patches/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp deleted file mode 100644 index 31241885a1b..00000000000 --- a/graphics/osg/patches/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-src_osgPlugins_gif_ReaderWriterGIF.cpp,v 1.2 2014/05/23 13:45:07 obache Exp $ - -* GIFLIB 5.x API change - ---- src/osgPlugins/gif/ReaderWriterGIF.cpp.orig 2011-05-05 12:39:35.000000000 +0000 -+++ src/osgPlugins/gif/ReaderWriterGIF.cpp -@@ -370,7 +370,11 @@ GifImageStream** obj) - int interlacedoffset[] = { 0, 4, 2, 1 }; - int interlacedjumps[] = { 8, 8, 4, 2 }; - -+#if GIFLIB_MAJOR >= 5 -+ giffile = DGifOpen(&fin,gif_read_stream, NULL); -+#else - giffile = DGifOpen(&fin,gif_read_stream); -+#endif - if (!giffile) - { - giferror = ERR_OPEN; -@@ -557,7 +561,11 @@ GifImageStream** obj) - *width_ret = giffile->SWidth; - *height_ret = giffile->SHeight; - *numComponents_ret = 4; -+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 -+ DGifCloseFile(giffile, NULL); -+#else - DGifCloseFile(giffile); -+#endif - return buffer; - } - diff --git a/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h b/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h index ead00500265..845a7761ae9 100644 --- a/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h +++ b/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h @@ -1,8 +1,8 @@ -$NetBSD: patch-src_osgPlugins_osc_osc_OscHostEndianness.h,v 1.1 2018/08/04 01:05:10 nia Exp $ +$NetBSD: patch-src_osgPlugins_osc_osc_OscHostEndianness.h,v 1.2 2018/08/06 11:12:27 jperkin Exp $ Configure endianness for osc plug-in. ---- src/osgPlugins/osc/osc/OscHostEndianness.h.orig 2015-07-23 11:14:00.000000000 +0000 +--- src/osgPlugins/osc/osc/OscHostEndianness.h.orig 2017-08-28 16:50:49.000000000 +0000 +++ src/osgPlugins/osc/osc/OscHostEndianness.h @@ -64,7 +64,7 @@ #else @@ -13,3 +13,21 @@ Configure endianness for osc plug-in. #include <sys/endian.h> #if (_BYTE_ORDER == _LITTLE_ENDIAN) #ifndef __LITTLE_ENDIAN__ +@@ -77,6 +77,17 @@ + #else + #error Unknown machine endianness detected. + #endif ++ #elif defined(__sun) ++ #include <sys/byteorder.h> ++ #if defined(_BIG_ENDIAN) ++ #ifndef __BIG_ENDIAN__ ++ #define __BIG_ENDIAN__ ++ #endif ++ #else ++ #ifndef __LITTLE_ENDIAN__ ++ #define __LITTLE_ENDIAN__ ++ #endif ++ #endif + #endif + + #if defined(__LITTLE_ENDIAN__) diff --git a/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp b/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp new file mode 100644 index 00000000000..abd387e2587 --- /dev/null +++ b/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp,v 1.1 2018/08/06 11:12:27 jperkin Exp $ + +SunOS needs alloca.h + +--- src/osgPlugins/osc/osc/OscOutboundPacketStream.cpp.orig 2017-08-28 16:50:49.000000000 +0000 ++++ src/osgPlugins/osc/osc/OscOutboundPacketStream.cpp +@@ -35,6 +35,8 @@ + + #if defined(__WIN32__) || defined(WIN32) + #include <malloc.h> // for alloca ++#elif defined(__sun) ++#include <alloca.h> + #endif + + #include "OscHostEndianness.h" diff --git a/graphics/osg/patches/patch-src_osgViewer_DarwinUtils.mm b/graphics/osg/patches/patch-src_osgViewer_DarwinUtils.mm deleted file mode 100644 index 14b0faf0331..00000000000 --- a/graphics/osg/patches/patch-src_osgViewer_DarwinUtils.mm +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-src_osgViewer_DarwinUtils.mm,v 1.1 2012/03/07 16:27:35 adam Exp $ - -Work around depreciated API. - ---- src/osgViewer/DarwinUtils.mm.orig 2012-03-06 14:49:28.000000000 +0000 -+++ src/osgViewer/DarwinUtils.mm -@@ -313,7 +313,11 @@ void DarwinWindowingSystemInterface::get - CGDirectDisplayID id = getDisplayID(si); - resolution.width = CGDisplayPixelsWide(id); - resolution.height = CGDisplayPixelsHigh(id); -- resolution.colorDepth = CGDisplayBitsPerPixel(id); -+ CGDisplayModeRef displayMode = CGDisplayCopyDisplayMode(id); -+ CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding(displayMode); -+ CGDisplayModeRelease(displayMode); -+ resolution.colorDepth = CFStringGetLength(pixelEncoding); -+ CFRelease(pixelEncoding); - resolution.refreshRate = getDictDouble (CGDisplayCurrentMode(id), kCGDisplayRefreshRate); // Not tested - if (resolution.refreshRate<0) resolution.refreshRate = 0; - } -@@ -402,7 +406,7 @@ bool DarwinWindowingSystemInterface::set - CFDictionaryRef display_mode_values = - CGDisplayBestModeForParametersAndRefreshRate( - displayid, -- CGDisplayBitsPerPixel(displayid), -+ 32, - width, height, - refresh, - NULL); -@@ -432,7 +436,7 @@ bool DarwinWindowingSystemInterface::set - CFDictionaryRef display_mode_values = - CGDisplayBestModeForParametersAndRefreshRate( - displayid, -- CGDisplayBitsPerPixel(displayid), -+ 32, - width, height, - refreshRate, - &success); |