[MacPorts] #39975: root: Add --enable-cxx11 when using libc++
MacPorts
noreply at macports.org
Sat Nov 9 10:47:21 PST 2013
#39975: root: Add --enable-cxx11 when using libc++
--------------------------+------------------------
Reporter: jfcaron@… | Owner: jeremyhu@…
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.2.0
Resolution: | Keywords:
Port: root |
--------------------------+------------------------
Comment (by jeremyhu@…):
Not exactly. I'm thinking this:
{{{
Index: Portfile
===================================================================
--- Portfile (revision 113119)
+++ Portfile (working copy)
@@ -111,6 +111,26 @@
--enable-fink \
--enable-gdml
+platform darwin {
+ set cxx_stdlib {}
+
+ if {[info exists configure.cxx_stdlib] &&
+ ${configure.cxx_stdlib} ne {} &&
+ [string match *clang* ${configure.cxx}]} {
+ set cxx_stdlib ${configure.cxx_stdlib}
+ } elseif {[string match *clang* ${configure.cxx}] &&
+ ${os.major} >= 13} {
+ set cxx_stdlib libc++
+ } else {
+ set cxx_stdlib libstdc++
+ }
+
+ if {${cxx_stdlib} == "libc++"} {
+ configure.args-delete --disable-c++11
+ configure.args-append --enable-c++11
+ }
+}
+
universal_variant no
default_variants +ssl +xml +gsl +minuit2 +tmva +roofit +graphviz
+opengl +soversion
}}}
--
Ticket URL: <https://trac.macports.org/ticket/39975#comment:16>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list