pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/osg osg: SunOS fixes and remove obsolete patc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e26b183e029
branches:  trunk
changeset: 383602:8e26b183e029
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Mon Aug 06 11:12:27 2018 +0000

description:
osg: SunOS fixes and remove obsolete patches.

diffstat:

 graphics/osg/distinfo                                                         |   7 +-
 graphics/osg/patches/patch-ac                                                 |  34 ---------
 graphics/osg/patches/patch-af                                                 |  19 -----
 graphics/osg/patches/patch-applications_present3D_Cluster.cpp                 |   4 +-
 graphics/osg/patches/patch-include_OpenThreads_Atomic                         |  15 ----
 graphics/osg/patches/patch-src_OpenThreads_common_Atomic.cpp                  |  15 ----
 graphics/osg/patches/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp             |  30 --------
 graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h         |  22 +++++-
 graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp |  15 ++++
 graphics/osg/patches/patch-src_osgViewer_DarwinUtils.mm                       |  37 ----------
 10 files changed, 41 insertions(+), 157 deletions(-)

diffs (267 lines):

diff -r 9948675c967f -r 8e26b183e029 graphics/osg/distinfo
--- a/graphics/osg/distinfo     Mon Aug 06 11:03:18 2018 +0000
+++ b/graphics/osg/distinfo     Mon Aug 06 11:12:27 2018 +0000
@@ -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-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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-ac
--- a/graphics/osg/patches/patch-ac     Mon Aug 06 11:03:18 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-af
--- a/graphics/osg/patches/patch-af     Mon Aug 06 11:03:18 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-applications_present3D_Cluster.cpp
--- a/graphics/osg/patches/patch-applications_present3D_Cluster.cpp     Mon Aug 06 11:03:18 2018 +0000
+++ b/graphics/osg/patches/patch-applications_present3D_Cluster.cpp     Mon Aug 06 11:12:27 2018 +0000
@@ -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 @@
  #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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-include_OpenThreads_Atomic
--- a/graphics/osg/patches/patch-include_OpenThreads_Atomic     Mon Aug 06 11:03:18 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-src_OpenThreads_common_Atomic.cpp
--- a/graphics/osg/patches/patch-src_OpenThreads_common_Atomic.cpp      Mon Aug 06 11:03:18 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp
--- a/graphics/osg/patches/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp Mon Aug 06 11:03:18 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h
--- a/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h     Mon Aug 06 11:03:18 2018 +0000
+++ b/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscHostEndianness.h     Mon Aug 06 11:12:27 2018 +0000
@@ -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 @@
          #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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/osg/patches/patch-src_osgPlugins_osc_osc_OscOutboundPacketStream.cpp     Mon Aug 06 11:12:27 2018 +0000
@@ -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 -r 9948675c967f -r 8e26b183e029 graphics/osg/patches/patch-src_osgViewer_DarwinUtils.mm
--- a/graphics/osg/patches/patch-src_osgViewer_DarwinUtils.mm   Mon Aug 06 11:03:18 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index