[97724] trunk/dports/lang
jeremyhu at macports.org
jeremyhu at macports.org
Thu Sep 13 01:34:58 PDT 2012
Revision: 97724
http://trac.macports.org//changeset/97724
Author: jeremyhu at macports.org
Date: 2012-09-13 01:34:58 -0700 (Thu, 13 Sep 2012)
Log Message:
-----------
libstdcxx*: Fix +universal build and remove the linktime symlink so as to not break clang++.
Modified Paths:
--------------
trunk/dports/lang/gcc47/Portfile
trunk/dports/lang/gcc48/Portfile
Modified: trunk/dports/lang/gcc47/Portfile
===================================================================
--- trunk/dports/lang/gcc47/Portfile 2012-09-13 08:10:05 UTC (rev 97723)
+++ trunk/dports/lang/gcc47/Portfile 2012-09-13 08:34:58 UTC (rev 97724)
@@ -120,6 +120,9 @@
# TODO: Optimize this. We don't need to actually bootstrap gcc to build libstdc++
if {${subport} == "libstdcxx"} {
+ # Subport revisions start at 100, so we don't need to revbump the main port and subport together
+ revision 100
+
depends_run-delete path:lib/.libstdcxx:libstdcxx
configure.args-delete --libdir=${prefix}/lib/${name}
@@ -134,13 +137,29 @@
destroot.target install-target-libstdc++-v3
post-destroot {
- eval delete [glob ${destroot}${prefix}/lib/*{a,py}]
+ eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
file delete -force ${destroot}${prefix}/share/gcc-${major}
file delete -force ${destroot}${prefix}/include/${name}
+ # Don't install the linktime symlink. The compilers will place this
+ # in their libdir, and we don't want to break other toolchains by having
+ # them link against this libstdc++ (at least not until it is built on
+ # top of libc++abi).
+ file delete ${destroot}${prefix}/lib/libstdc++.dylib
+
# base doesn't like the + in this depspec path:lib/libstdc++.dylib:libstdcxx
system "touch ${destroot}${prefix}/lib/.libstdcxx"
+ if {[variant_isset universal]} {
+ foreach archdir [glob ${destroot}${prefix}/lib/*/] {
+ if {[file exists ${archdir}/libstdc++.6.dylib]} {
+ system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
+ system "lipo -create -output ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib && mv ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib"
+ }
+ file delete -force ${archdir}
+ }
+ }
+
# Some linkers don't optimize this unused link away. TODO: Fix this in the build system
system "install_name_tool -change ${prefix}/lib/libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib"
}
Modified: trunk/dports/lang/gcc48/Portfile
===================================================================
--- trunk/dports/lang/gcc48/Portfile 2012-09-13 08:10:05 UTC (rev 97723)
+++ trunk/dports/lang/gcc48/Portfile 2012-09-13 08:34:58 UTC (rev 97724)
@@ -101,6 +101,9 @@
# TODO: Optimize this. We don't need to actually bootstrap gcc to build libstdc++
if {${subport} == "libstdcxx-devel"} {
+ # Subport revisions start at 100, so we don't need to revbump the main port and subport together
+ revision 100
+
depends_run-delete port:${subport}
configure.args-delete --libdir=${prefix}/lib/${name}
@@ -115,13 +118,29 @@
destroot.target install-target-libstdc++-v3
post-destroot {
- eval delete [glob ${destroot}${prefix}/lib/*{a,py}]
+ eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
file delete -force ${destroot}${prefix}/share/gcc-${major}
file delete -force ${destroot}${prefix}/include/${name}
+ # Don't install the linktime symlink. The compilers will place this
+ # in their libdir, and we don't want to break other toolchains by having
+ # them link against this libstdc++ (at least not until it is built on
+ # top of libc++abi).
+ file delete ${destroot}${prefix}/lib/libstdc++.dylib
+
# base doesn't like the + in this depspec path:lib/libstdc++.dylib:libstdcxx
system "touch ${destroot}${prefix}/lib/.libstdcxx"
+ if {[variant_isset universal]} {
+ foreach archdir [glob ${destroot}${prefix}/lib/*/] {
+ if {[file exists ${archdir}/libstdc++.6.dylib]} {
+ system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
+ system "lipo -create -output ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib && mv ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib"
+ }
+ file delete -force ${archdir}
+ }
+ }
+
# Some linkers don't optimize this unused link away. TODO: Fix this in the build system
system "install_name_tool -change ${prefix}/lib/libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120913/bea71ed4/attachment-0001.html>
More information about the macports-changes
mailing list