[131111] trunk/dports/devel/cmake/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Mon Jan 5 23:34:20 PST 2015


Revision: 131111
          https://trac.macports.org/changeset/131111
Author:   jeremyhu at macports.org
Date:     2015-01-05 23:34:20 -0800 (Mon, 05 Jan 2015)
Log Message:
-----------
cmake: Temporary build fix for SL and Leopard when using libc++

Modified Paths:
--------------
    trunk/dports/devel/cmake/Portfile

Modified: trunk/dports/devel/cmake/Portfile
===================================================================
--- trunk/dports/devel/cmake/Portfile	2015-01-06 07:33:02 UTC (rev 131110)
+++ trunk/dports/devel/cmake/Portfile	2015-01-06 07:34:20 UTC (rev 131111)
@@ -43,6 +43,17 @@
                     CMAKE_INCLUDE_PATH=${prefix}/include/ncurses \
                     CMAKE_LIBRARY_PATH=${prefix}/lib
 
+platform darwin {
+    configure.env-append \
+                    CMAKE_OSX_DEPLOYMENT_TARGET="${macosx_deployment_target}"
+
+    if {${configure.sdkroot} != ""} {
+        configure.env-append CMAKE_OSX_SYSROOT="${configure.sdkroot}"
+    } else {
+        configure.env-append CMAKE_OSX_SYSROOT="/"
+    }
+}
+
 configure.args      --mandir=/share/man --docdir=/share/doc/cmake \
                     --parallel=${build.jobs} \
                     --init=${worksrcpath}/macports.cmake \
@@ -62,11 +73,14 @@
     set universal_archs_supported ${supported_archs}
 }
 
-platform darwin 11 {
-    # TODO: Figure out why using libc++ fails.
-    #       Since nothing links against cmake and cmake is just using
-    #       the STL, we're safe to force libstdc++
-    configure.cxx_stdlib libstdc++
+platform darwin {
+    # TODO: Figure out why using libc++ fails on Lion and fix the bootstrap
+    #       script to honor CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET.
+    #       Since nothing links against cmake and cmake is just using the STL,
+    #       we're safe to force libstdc++
+    if {${os.major} < 12} {
+        configure.cxx_stdlib libstdc++
+    }
 }
 
 post-patch {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150105/feb13863/attachment.html>


More information about the macports-changes mailing list