[115344] trunk/dports/x11/mesa/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Tue Dec 31 11:29:16 PST 2013


Revision: 115344
          https://trac.macports.org/changeset/115344
Author:   jeremyhu at macports.org
Date:     2013-12-31 11:29:16 -0800 (Tue, 31 Dec 2013)
Log Message:
-----------
mesa: Build fix for non-default C++ runtimes

Modified Paths:
--------------
    trunk/dports/x11/mesa/Portfile

Modified: trunk/dports/x11/mesa/Portfile
===================================================================
--- trunk/dports/x11/mesa/Portfile	2013-12-31 19:21:01 UTC (rev 115343)
+++ trunk/dports/x11/mesa/Portfile	2013-12-31 19:29:16 UTC (rev 115344)
@@ -6,7 +6,7 @@
 name                mesa
 epoch               1
 version             8.0.4
-revision            2
+revision            3
 categories          x11 graphics
 maintainers         jeremyhu openmaintainer
 license             MIT
@@ -53,6 +53,12 @@
     configure.cppflags-append -I${filespath}/include
 }
 
+# TODO: Simplify once MacPorts 2.3 is released
+set cxx_stdlibflags {}
+if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
+    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
+}
+
 configure.cppflags-delete -I${prefix}/include
 
 post-extract {
@@ -63,7 +69,7 @@
 
 post-patch {
     # Ensure correct compilers are used in mklib.
-    reinplace "s:LINK=\"g++\":LINK=\"${configure.cxx}\":"  ${worksrcpath}/bin/mklib
+    reinplace "s:LINK=\"g++\":LINK=\"${configure.cxx} ${cxx_stdlibflags}\":"  ${worksrcpath}/bin/mklib
     reinplace "s:LINK=\"cc\":LINK=\"${configure.cc}\":"    ${worksrcpath}/bin/mklib
 }
 
@@ -78,7 +84,7 @@
 pre-build {
     build.args-append \
         CC="${configure.cc} ${configure.cppflags}" \
-        CXX="${configure.cxx} ${configure.cppflags}"
+        CXX="${configure.cxx} ${configure.cppflags} ${cxx_stdlibflags}"
 }
 
 variant iglx description {Install a libGL that uses your X11 server's indirect GLX path for rendering (the default is off which allows libGL to accelerate rendering using OpenGL.framework)} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131231/b3cf1e55/attachment.html>


More information about the macports-changes mailing list