Ticket #46493: cmake-3.1.2-RJVB.diff

File cmake-3.1.2-RJVB.diff, 18.6 KB (added by RJVB (René Bertin), 10 years ago)
  • trunk/dports/devel/cmake/Portfile

    diff --git a/trunk/dports/devel/cmake/Portfile b/trunk/dports/devel/cmake/Portfile
    a b  
    55PortGroup           muniversal 1.0
    66
    77name                cmake
    8 version             3.0.2
    9 revision            1
     8version             3.1.2
    109set branch          [join [lrange [split ${version} .] 0 1] .]
    1110categories          devel
    1211license             BSD
    1312installs_libs       no
    14 maintainers         css
     13maintainers         css michaelld
    1514description         Cross-platform make
    1615long_description    An extensible, open-source system that manages the build    \
    1716                    process in an operating system and compiler independent manner. \
     
    2120master_sites        http://www.cmake.org/files/v${branch}/
    2221platforms           darwin freebsd
    2322
    24 checksums           rmd160  b94ea2ed4dced373e289fa5f66674a227135f350 \
    25                     sha256  6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e
     23checksums           rmd160 50caf6ff5de97390decf43446ef0733750a5862c \
     24                    sha256 2b210f7d867a1e716c1895357ebe63c7b9ae61fdb5f2d300ab2f01795f085b35
    2625
    2726depends_lib-append  port:libidn \
    2827                    port:openssl \
     
    3635                    patch-Modules-FindFreetype.cmake.diff \
    3736                    patch-Modules-FindQt4.cmake.diff \
    3837                    patch-Modules-Platform-Darwin.cmake.diff \
     38                    patch-Modules-Platform-Darwin-Initialize.cmake.diff \
    3939                    patch-Modules-noArchCheck.diff
    4040
     41# RJVB : fix for the obsolete use of -bundle instead of -dynamiclib in CMAKE_SHARED_MODULE_CREATE
     42patchfiles-append   patch-SHARED_BUNDLE_flag.diff
     43
    4144configure.env-append \
    4245                    CMAKE_PREFIX_PATH=${prefix} \
    4346                    CMAKE_INCLUDE_PATH=${prefix}/include/ncurses \
     
    5861                    --parallel=${build.jobs} \
    5962                    --init=${worksrcpath}/macports.cmake \
    6063                    --system-libs
     64#--sphinx-man --sphinx-build=${prefix}/bin/sphinx-build-3.3
    6165
    6266configure.universal_args
    6367configure.post_args
     
    112116        reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
    113117        ln -s ${prefix}/bin/cmake-gui ${destroot}${applications_dir}/${app}.app/Contents/MacOS/cmake-gui
    114118        xinstall -m 644 ${worksrcpath}/Source/QtDialog/CMakeSetup.icns ${destroot}${applications_dir}/${app}.app/Contents/Resources/CMakeSetup.icns
     119        file delete -force ${destroot}${prefix}/PlugIns
     120        file delete -force ${destroot}${prefix}/Resources
    115121    }
    116122}
    117123
    118 variant gui description {Qt4 based cmake-gui} {
     124variant qt4 description {Build the Qt4 gui version} {
    119125    PortGroup qt4 1.0
    120     patchfiles-append patch-CMakeLists.txt.diff
     126}
     127
     128variant gui description {Qt based cmake-gui} {
     129    if {[variant_isset qt4]} {
     130        # qt4 being requested we have to make sure CMake doesn't detect and use
     131        # qt5 if that happens to be installed too:
     132        patchfiles-append   patch-CMakeLists.txt.diff \
     133                            patch-CMakeLists-4qt4.diff
     134    } else {
     135        # this is how cmake checks what Qt version to use:
     136        if {[file exists ${prefix}/lib/pkgconfig/Qt5Widgets.pc]} {
     137            PortGroup qt5 1.0
     138        } else {
     139            PortGroup qt4 1.0
     140        }
     141        patchfiles-append   patch-CMakeLists.txt.diff
     142    }
    121143    configure.args-append --qt-gui --qt-qmake=${qt_qmake_cmd}
    122144}
    123145
  • new file trunk/dports/devel/cmake/files/patch-CMakeLists-4qt4.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-CMakeLists-4qt4.diff b/trunk/dports/devel/cmake/files/patch-CMakeLists-4qt4.diff
    new file mode 10644
    - +  
     1diff --git Source/QtDialog/CMakeLists.txt Source/QtDialog/CMakeLists.txt
     2index 03c2fb4..a73a37f 100644
     3--- Source/QtDialog/CMakeLists.txt
     4+++ Source/QtDialog/CMakeLists.txt
     5@@ -14,8 +14,8 @@ project(QtDialog)
     6 if(POLICY CMP0020)
     7   cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
     8 endif()
     9-find_package(Qt5Widgets QUIET)
     10-if (Qt5Widgets_FOUND)
     11+#find_package(Qt5Widgets QUIET)
     12+if (FALSE)
     13   include_directories(${Qt5Widgets_INCLUDE_DIRS})
     14   add_definitions(${Qt5Widgets_DEFINITONS})
     15   macro(qt4_wrap_ui)
  • trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff b/trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff
    a b  
     1diff --git CMakeLists.txt CMakeLists.txt
     2index 71850de..e25ea4e 100644
    13--- CMakeLists.txt
    24+++ CMakeLists.txt
    3 @@ -476,7 +476,7 @@ if(BUILD_CursesDialog)
    4  endif()
     5@@ -501,7 +501,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
     6   endif()
    57 
    6  if(BUILD_QtDialog)
    7 -  if(APPLE)
    8 +  if(FALSE)
    9      set(CMAKE_BUNDLE_VERSION
    10        "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
    11      set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
     8   if(BUILD_QtDialog)
     9-    if(APPLE)
     10+    if(APPLEBUNDLE)
     11       set(CMAKE_BUNDLE_VERSION
     12         "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
     13       set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
     14diff --git Source/QtDialog/CMakeLists.txt Source/QtDialog/CMakeLists.txt
     15index 03c2fb4..eb46fcb 100644
    1216--- Source/QtDialog/CMakeLists.txt
    1317+++ Source/QtDialog/CMakeLists.txt
    14 @@ -99,7 +99,7 @@ set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
     18@@ -125,7 +125,7 @@ set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
    1519 if(WIN32)
    1620   set(SRCS ${SRCS} CMakeSetup.rc)
    1721 endif()
    1822-if(APPLE)
    19 +if(FALSE)
     23+if(APPLEBUNDLE)
    2024   set(SRCS ${SRCS} CMakeSetup.icns)
    2125   set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
    2226   set_source_files_properties(CMakeSetup.icns PROPERTIES
    23 @@ -115,13 +115,13 @@ endif()
     27@@ -141,13 +141,13 @@ endif()
    2428 
    2529 set(CMAKE_INCLUDE_CURRENT_DIR ON)
    2630 
     
    3236 endif()
    3337 
    3438-if(APPLE)
    35 +if(FALSE)
     39+if(APPLEBUNDLE)
    3640   file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
    3741     LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
    3842 
    39 @@ -153,7 +153,7 @@ if(UNIX)
    40    install(FILES cmakecache.xml DESTINATION share/mime/packages )
    41  endif()
    42  
    43 -if(APPLE)
    44 +if(FALSE)
    45    set(CMAKE_POSTFLIGHT_SCRIPT
    46      "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh")
    47    set(CMAKE_POSTUPGRADE_SCRIPT
    48 @@ -166,7 +166,7 @@ if(APPLE)
     43@@ -184,11 +184,11 @@ if(APPLE)
    4944                 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
    5045 endif()
    5146 
    5247-if(APPLE OR WIN32)
    53 +if(WIN32)
     48+if(APPLEBUNDLE OR WIN32)
    5449   # install rules for including 3rd party libs such as Qt
    5550   # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
    5651   set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
     52-  if(APPLE)
     53+  if(APPLEBUNDLE)
     54     set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake")
     55   endif()
     56   install(CODE "
  • trunk/dports/devel/cmake/files/patch-Modules-FindFreetype.cmake.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-Modules-FindFreetype.cmake.diff b/trunk/dports/devel/cmake/files/patch-Modules-FindFreetype.cmake.diff
    a b  
    1 --- Modules/FindFreetype.cmake.orig
    2 +++ Modules/FindFreetype.cmake
    3 @@ -55,10 +55,6 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
     1--- Modules/FindFreetype.cmake.orig     2015-02-04 15:36:43.000000000 -0500
     2+++ Modules/FindFreetype.cmake  2015-02-09 10:34:02.000000000 -0500
     3@@ -57,10 +57,6 @@
    44   HINTS
    55     ENV FREETYPE_DIR
    66   PATHS
     
    1111     ENV GTKMM_BASEPATH
    1212     [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
    1313     [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
    14 @@ -72,10 +68,6 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
     14@@ -78,10 +74,6 @@
    1515   HINTS
    1616     ENV FREETYPE_DIR
    1717   PATHS
     
    2222     ENV GTKMM_BASEPATH
    2323     [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
    2424     [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
    25 @@ -88,10 +80,6 @@ find_library(FREETYPE_LIBRARY
     25@@ -99,10 +91,6 @@
     26   HINTS
    2627     ENV FREETYPE_DIR
    27    PATH_SUFFIXES lib
    2828   PATHS
    2929-    /usr/X11R6
    3030-    /usr/local/X11R6
  • trunk/dports/devel/cmake/files/patch-Modules-FindQt4.cmake.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-Modules-FindQt4.cmake.diff b/trunk/dports/devel/cmake/files/patch-Modules-FindQt4.cmake.diff
    a b  
    1 --- Modules/FindQt4.cmake.orig
    2 +++ Modules/FindQt4.cmake
    3 @@ -728,9 +728,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
     1--- Modules/FindQt4.cmake.orig  2015-02-04 15:36:43.000000000 -0500
     2+++ Modules/FindQt4.cmake       2015-02-09 10:34:02.000000000 -0500
     3@@ -741,9 +741,7 @@
    44       find_path(QT_IMPORTS_DIR NAMES Qt
    55         HINTS ${qt_cross_paths} ${qt_imports_dir}
    66         DOC "The location of the Qt imports"
  • new file trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin-Initialize.cmake.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin-Initialize.cmake.diff b/trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin-Initialize.cmake.diff
    new file mode 10644
    - +  
     1--- Modules/Platform/Darwin-Initialize.cmake.orig       2015-02-09 10:55:45.000000000 -0500
     2+++ Modules/Platform/Darwin-Initialize.cmake    2015-02-09 10:58:06.000000000 -0500
     3@@ -94,11 +94,17 @@
     4         NOT CMAKE_OSX_DEPLOYMENT_TARGET VERSION_EQUAL ${_CMAKE_OSX_DEPLOYMENT_TARGET})
     5       set(_CMAKE_OSX_SDKS_VER ${CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${CMAKE_OSX_DEPLOYMENT_TARGET}})
     6       set(_CMAKE_OSX_SYSROOT_CHECK "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
     7-      message(WARNING
     8-        "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
     9-        "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
     10-        "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"."
     11-        )
     12+      if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_DEFAULT}")
     13+        if(NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "${_CURRENT_OSX_VERSION}")
     14+         message(WARNING
     15+            "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
     16+            "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
     17+            "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"."
     18+            )
     19+       endif()
     20+      else()
     21+        set(_CMAKE_OSX_SYSROOT_DEFAULT "")
     22+      endif()
     23     endif()
     24   else()
     25     # Assume developer files are in root (such as Xcode 4.5 command-line tools).
  • trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin.cmake.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin.cmake.diff b/trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin.cmake.diff
    a b  
    1 --- Modules/Platform/Darwin.cmake.orig  2014-09-11 23:24:00.000000000 +1000
    2 +++ Modules/Platform/Darwin.cmake       2014-10-21 14:02:52.000000000 +1100
    3 @@ -140,12 +140,18 @@
    4        else()
    5          set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
    6          set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
    7 -        message(WARNING
    8 -          "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
    9 -          "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
    10 -          "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n"
    11 -          "matching the host OS X version."
    12 -          )
    13 +        if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_DEFAULT}")
    14 +          if (NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "${_CURRENT_OSX_VERSION}")
    15 +            message(WARNING
    16 +              "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
    17 +              "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
    18 +              "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n"
    19 +              "matching the host OS X version."
    20 +              )
    21 +          endif()
    22 +        else ()
    23 +          set(_CMAKE_OSX_SYSROOT_DEFAULT "")
    24 +        endif()
    25        endif()
    26      else()
    27        set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
    28 @@ -207,6 +213,8 @@
     1--- Modules/Platform/Darwin.cmake.orig  2015-02-04 15:36:43.000000000 -0500
     2+++ Modules/Platform/Darwin.cmake       2015-02-09 10:39:29.000000000 -0500
     3@@ -70,7 +70,8 @@
    294     set(_sdk_ver "${CMAKE_MATCH_1}")
    305   elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$")
    316     set(_sdk_ver "${CMAKE_MATCH_1}")
    32 +  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/" OR "${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "")
    33 +    set(_sdk_ver "${_CURRENT_OSX_VERSION}")
     7-  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/")
     8+  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/" OR
     9+         "${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "")
     10     set(_sdk_ver "${_CURRENT_OSX_VERSION}")
    3411   else()
    3512     message(FATAL_ERROR
    36        "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
  • new file trunk/dports/devel/cmake/files/patch-SHARED_BUNDLE_flag.diff

    diff --git a/trunk/dports/devel/cmake/files/patch-SHARED_BUNDLE_flag.diff b/trunk/dports/devel/cmake/files/patch-SHARED_BUNDLE_flag.diff
    new file mode 10644
    - +  
     1--- ./Modules/Platform/Darwin-Intel.cmake.orig  2014-06-09 17:46:52.000000000 +0200
     2+++ ./Modules/Platform/Darwin-Intel.cmake       2014-07-03 12:26:08.000000000 +0200
     3@@ -21,7 +21,8 @@
     4 macro(__darwin_compiler_intel lang)
     5   set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
     6   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     7-  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     8+  #set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     9+  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     10 
     11   if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
     12     set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
     13--- ./Modules/Platform/Darwin-XL-C.cmake.orig   2014-06-09 17:46:52.000000000 +0200
     14+++ ./Modules/Platform/Darwin-XL-C.cmake        2014-07-03 12:26:15.000000000 +0200
     15@@ -1,5 +1,6 @@
     16 set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
     17-set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
     18+#set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
     19+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-dynamiclib")
     20 
     21 # Enable shared library versioning.
     22 set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
     23--- ./Modules/Platform/Darwin-XL-CXX.cmake.orig 2014-06-09 17:46:52.000000000 +0200
     24+++ ./Modules/Platform/Darwin-XL-CXX.cmake      2014-07-03 12:26:22.000000000 +0200
     25@@ -1,5 +1,6 @@
     26 set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
     27-set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
     28+#set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
     29+set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-dynamiclib")
     30 
     31 # Enable shared library versioning.
     32 set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
     33--- ./Modules/Platform/Darwin.cmake.orig        2014-06-09 17:46:52.000000000 +0200
     34+++ ./Modules/Platform/Darwin.cmake     2014-07-03 12:26:31.000000000 +0200
     35@@ -50,7 +50,8 @@
     36 
     37 set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
     38 set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     39-set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     40+#set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     41+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     42 set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
     43 set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
     44 set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
     45--- Modules/Platform/orig.Darwin-GNU.cmake      2015-02-10 21:59:20.000000000 +0100
     46+++ Modules/Platform/Darwin-GNU.cmake   2015-02-10 22:03:10.000000000 +0100
     47@@ -22,7 +22,8 @@
     48   set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
     49   # GNU does not have -shared on OS X
     50   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     51-  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     52+  #set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     53+  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     54 
     55   if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.3)
     56     set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
     57--- Modules/Platform/orig.Darwin-Clang.cmake    2015-02-10 21:59:20.000000000 +0100
     58+++ Modules/Platform/Darwin-Clang.cmake 2015-02-10 22:04:52.000000000 +0100
     59@@ -21,7 +21,8 @@
     60 macro(__darwin_compiler_clang lang)
     61   set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
     62   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     63-  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     64+  #set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     65+  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
     66   set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
     67   set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
     68   if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.1)