[97313] trunk/dports/graphics/OpenSceneGraph

ryandesign at macports.org ryandesign at macports.org
Mon Sep 3 04:26:10 PDT 2012


Revision: 97313
          https://trac.macports.org/changeset/97313
Author:   ryandesign at macports.org
Date:     2012-09-03 04:26:06 -0700 (Mon, 03 Sep 2012)
Log Message:
-----------
OpenSceneGraph:

 * update to 3.0.1 which fixes a build failure with the current version of curl
 * blacklist clang to fix build failure (http://lists.macosforge.org/pipermail/macports-users/2012-September/030412.html)
 * add patch to fix build on Lion and up (http://forum.openscenegraph.org/viewtopic.php?t=9001)

Modified Paths:
--------------
    trunk/dports/graphics/OpenSceneGraph/Portfile
    trunk/dports/graphics/OpenSceneGraph/files/patch-CMakeLists.txt.diff

Added Paths:
-----------
    trunk/dports/graphics/OpenSceneGraph/files/patch-src-osgViewer-DarwinUtils.mm.diff

Modified: trunk/dports/graphics/OpenSceneGraph/Portfile
===================================================================
--- trunk/dports/graphics/OpenSceneGraph/Portfile	2012-09-03 09:18:42 UTC (rev 97312)
+++ trunk/dports/graphics/OpenSceneGraph/Portfile	2012-09-03 11:26:06 UTC (rev 97313)
@@ -4,7 +4,7 @@
 PortSystem              1.0
 
 name                    OpenSceneGraph
-version                 2.8.4
+version                 3.0.1
 set inconvenient_version    [strsed ${version} {/\.0$//}]
 maintainers             nomaintainer
 license                 wxWidgets-3
@@ -21,16 +21,20 @@
                         useful in fields such as visual simulation, games, \
                         virtual reality, scientific visualization and modelling
 
-checksums               sha1    356ecd39f7e714dabb6776e23303fe3f1798a7cf \
-                        rmd160  ffb48efc2b9a28f7049923abd1814dd930e1f47c
+checksums               rmd160  54b315c318b7ade2bcc65703cea5f41377e93a71 \
+                        sha256  0c1103574b0a5a27c7d68d43454f1bf9c0cea114a583c42637bc8eb47b1d8296
 
-patchfiles              patch-CMakeLists.txt.diff
+patchfiles              patch-CMakeLists.txt.diff \
+                        patch-src-osgViewer-DarwinUtils.mm.diff
 
 depends_build           port:cmake
 
 depends_lib             port:freetype \
                         port:gdal
 
+# error: cannot initialize a parameter of type 'void *' with an lvalue of type 'const void *const'
+compiler.blacklist      clang
+
 configure.cmd           cmake
 configure.pre_args      -DCMAKE_INSTALL_PREFIX=${prefix}
 configure.args          -DCMAKE_BUILD_TYPE=Release \

Modified: trunk/dports/graphics/OpenSceneGraph/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/OpenSceneGraph/files/patch-CMakeLists.txt.diff	2012-09-03 09:18:42 UTC (rev 97312)
+++ trunk/dports/graphics/OpenSceneGraph/files/patch-CMakeLists.txt.diff	2012-09-03 11:26:06 UTC (rev 97313)
@@ -1,46 +1,43 @@
---- CMakeLists.txt	2008-09-23 11:27:39.000000000 -0500
-+++ CMakeLists.txt	2008-11-17 23:27:01.000000000 -0600
-@@ -587,43 +587,6 @@
-     ENDIF(OSG_USE_AGGRESSIVE_WARNINGS)
- ENDIF(OSG_AGGRESSIVE_WARNING_FLAGS)
+--- CMakeLists.txt.orig	2011-07-31 02:50:34.000000000 -0500
++++ CMakeLists.txt	2012-09-03 05:58:31.000000000 -0500
+@@ -794,40 +794,6 @@
+         #I think this or similar will be required for IPhone apps
+         OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" ON)
  
--# Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
--# and 32/64-bit Intel/PPC on >= 10.5. Anything <= 10.3 doesn't support.
--IF(APPLE)
--    # These are just defaults/recommendations, but how we want to build
--    # out of the box. But the user needs to be able to change these options.
--    # So we must only set the values the first time CMake is run, or we
--    # will overwrite any changes the user sets.
--    # FORCE is used because the options are not reflected in the UI otherwise.
--    # Seems like a good place to add version specific compiler flags too.
--    IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
--        # This is really fragile, but CMake doesn't provide the OS system
--        # version information we need. (Darwin versions can be changed
--        # independently of OS X versions.)
--        # It does look like CMake handles the CMAKE_OSX_SYSROOT automatically.
--        IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
--            # 64-bit compiles are not supported with Carbon. We should enable 
--            # 64-bit compilation by default once osgviewer has been 
--            # rewritten with Cocoa.
--            #SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
--            SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
--            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
--        ELSE(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
--            IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+-    ELSE()
+-
+-        # Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
+-        # and 32/64-bit Intel/PPC on >= 10.5. Anything <= 10.3 doesn't support.
+-
+-        # These are just defaults/recommendations, but how we want to build
+-        # out of the box. But the user needs to be able to change these options.
+-        # So we must only set the values the first time CMake is run, or we
+-        # will overwrite any changes the user sets.
+-        # FORCE is used because the options are not reflected in the UI otherwise.
+-        # Seems like a good place to add version specific compiler flags too.
+-        IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
+-            # This is really fragile, but CMake doesn't provide the OS system
+-            # version information we need. (Darwin versions can be changed
+-            # independently of OS X versions.)
+-            # It does look like CMake handles the CMAKE_OSX_SYSROOT automatically.
+-            IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
+-                # 64-bit compiles are not supported with Carbon. We should enable 
+-                # 64-bit compilation by default once osgviewer has been 
+-                # rewritten with Cocoa.
+-                #SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
 -                SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
+-                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
+-            ELSEIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+-                SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
 -                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.4 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
--            ELSE(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+-            ELSE()
 -                # No Universal Binary support
 -                # Should break down further to set the -mmacosx-version-min,
 -                # but the SDK detection is too unreliable here.
--            ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
--        ENDIF(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
--    ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
+-            ENDIF()
+-        ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
 -
--    OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" OFF)
--
--ENDIF(APPLE)
--
+-        OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" OFF)
  
- #
- # Provide target for generating wrappers
+     ENDIF()
+ 

Added: trunk/dports/graphics/OpenSceneGraph/files/patch-src-osgViewer-DarwinUtils.mm.diff
===================================================================
--- trunk/dports/graphics/OpenSceneGraph/files/patch-src-osgViewer-DarwinUtils.mm.diff	                        (rev 0)
+++ trunk/dports/graphics/OpenSceneGraph/files/patch-src-osgViewer-DarwinUtils.mm.diff	2012-09-03 11:26:06 UTC (rev 97313)
@@ -0,0 +1,75 @@
+--- src/osgViewer/DarwinUtils.mm (revision 12292)
++++ src/osgViewer/DarwinUtils.mm (revision 12799)
+@@ -48,4 +48,51 @@
+ namespace osgDarwin {
+ 
++//
++// Lion replacement for CGDisplayBitsPerPixel(CGDirectDisplayID displayId)
++//
++size_t displayBitsPerPixel( CGDirectDisplayID displayId )
++{
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
++    return CGDisplayBitsPerPixel(displayId);
++#else
++    CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displayId);
++    if (!mode)
++    {
++        OSG_WARN << "CGDisplayCopyDisplayMode returned NULL" << std::endl;
++        return 0;
++    }
++
++    CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode);
++    if (!pixEnc)
++    {
++        OSG_WARN << "CGDisplayModeCopyPixelEncoding returned NULL" << std::endl;
++        CGDisplayModeRelease(mode);
++        return 0;
++    }
++
++    size_t depth = 0;
++    if (CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo)
++    {
++        depth = 32;
++    }
++    else if (CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo)
++    {
++        depth = 16;
++    }
++    else if (CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo)
++    {
++        depth = 8;
++    }
++    else
++    {
++        OSG_WARN << "Unable to match pixel encoding '" << CFStringGetCStringPtr(pixEnc, kCFStringEncodingUTF8) << "'" << std::endl;
++    }
++
++    CGDisplayModeRelease(mode);
++    CFRelease(pixEnc);
++
++    return depth;
++#endif
++}
+ 
+ static inline CGRect toCGRect(NSRect nsRect)
+@@ -314,5 +361,5 @@
+     resolution.width = CGDisplayPixelsWide(id);
+     resolution.height = CGDisplayPixelsHigh(id);
+-    resolution.colorDepth = CGDisplayBitsPerPixel(id);
++    resolution.colorDepth = displayBitsPerPixel(id);
+     resolution.refreshRate = getDictDouble (CGDisplayCurrentMode(id), kCGDisplayRefreshRate);        // Not tested
+     if (resolution.refreshRate<0) resolution.refreshRate = 0;
+@@ -403,5 +450,5 @@
+         CGDisplayBestModeForParametersAndRefreshRate(
+                         displayid, 
+-                        CGDisplayBitsPerPixel(displayid), 
++                        displayBitsPerPixel(displayid), 
+                         width, height,  
+                         refresh,  
+@@ -433,5 +480,5 @@
+         CGDisplayBestModeForParametersAndRefreshRate(
+                         displayid, 
+-                        CGDisplayBitsPerPixel(displayid), 
++                        displayBitsPerPixel(displayid), 
+                         width, height,  
+                         refreshRate,  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120903/f589ca3c/attachment.html>


More information about the macports-changes mailing list