[97687] trunk/dports/lang

jeremyhu at macports.org jeremyhu at macports.org
Tue Sep 11 21:41:13 PDT 2012


Revision: 97687
          http://trac.macports.org//changeset/97687
Author:   jeremyhu at macports.org
Date:     2012-09-11 21:41:13 -0700 (Tue, 11 Sep 2012)
Log Message:
-----------
gcc4?: Add a new libstdcxx (and libstdcxx-devel) port to provide the GNU C++ runtime.  Note that it is not compatible with the host C++ runtime, but at least now we're not in a situation where each gcc port has its own conflicting runtime.  See #35770 for more discussion.

Modified Paths:
--------------
    trunk/dports/lang/gcc42/Portfile
    trunk/dports/lang/gcc43/Portfile
    trunk/dports/lang/gcc44/Portfile
    trunk/dports/lang/gcc45/Portfile
    trunk/dports/lang/gcc46/Portfile
    trunk/dports/lang/gcc47/Portfile
    trunk/dports/lang/gcc48/Portfile

Modified: trunk/dports/lang/gcc42/Portfile
===================================================================
--- trunk/dports/lang/gcc42/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc42/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -5,7 +5,7 @@
 
 name			gcc42
 version			4.2.4
-revision		5
+revision		6
 platforms		darwin
 categories		lang
 maintainers		mww openmaintainer
@@ -41,7 +41,7 @@
 universal_variant	no
 
 depends_lib		port:gmp port:mpfr port:libiconv
-depends_run		port:gcc_select port:ld64 port:cctools
+depends_run		port:gcc_select port:ld64 port:cctools path:lib/libstdc++.dylib:libstdcxx
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -119,9 +119,11 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 post-destroot {

Modified: trunk/dports/lang/gcc43/Portfile
===================================================================
--- trunk/dports/lang/gcc43/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc43/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -5,7 +5,7 @@
 
 name                gcc43
 version             4.3.6
-revision            5
+revision            6
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -54,7 +54,7 @@
                     rmd160  cde38f66b4b952f52938dc50d7606a0e1ccc7d2f
 
 depends_lib         port:gmp port:mpfr port:libiconv
-depends_run         port:gcc_select port:ld64 port:cctools
+depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc++.dylib:libstdcxx
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -139,9 +139,11 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 select.group        gcc

Modified: trunk/dports/lang/gcc44/Portfile
===================================================================
--- trunk/dports/lang/gcc44/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc44/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -6,7 +6,7 @@
 name                gcc44
 epoch               1
 version             4.4.7
-revision            3
+revision            4
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -55,7 +55,7 @@
                     rmd160  660d8e2f8162458e463de6195e58391ee711ed59
 
 depends_lib         port:gmp port:mpfr port:libiconv
-depends_run         port:gcc_select port:ld64 port:cctools
+depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc++.dylib:libstdcxx
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -144,9 +144,11 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 select.group        gcc

Modified: trunk/dports/lang/gcc45/Portfile
===================================================================
--- trunk/dports/lang/gcc45/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc45/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -6,7 +6,7 @@
 name                gcc45
 epoch               1
 version             4.5.4
-revision            3
+revision            4
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -60,7 +60,7 @@
                     sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
 
 depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl
-depends_run         port:gcc_select port:ld64 port:cctools
+depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc++.dylib:libstdcxx
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -149,9 +149,11 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 select.group        gcc

Modified: trunk/dports/lang/gcc46/Portfile
===================================================================
--- trunk/dports/lang/gcc46/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc46/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -6,7 +6,7 @@
 name                gcc46
 epoch               1
 version             4.6.3
-revision            6
+revision            7
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -46,7 +46,7 @@
                     sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
 
 depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
-depends_run         port:gcc_select port:ld64 port:cctools
+depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc++.dylib:libstdcxx
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -128,9 +128,11 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 select.group        gcc

Modified: trunk/dports/lang/gcc47/Portfile
===================================================================
--- trunk/dports/lang/gcc47/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc47/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -4,9 +4,10 @@
 PortGroup select 1.0
 
 name                gcc47
+subport             libstdcxx {}
 epoch               1
 version             4.7.1
-revision            4
+revision            5
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -44,7 +45,7 @@
                     sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
 
 depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
-depends_run         port:gcc_select port:ld64 port:cctools
+depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc++.dylib:libstdcxx
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -117,6 +118,23 @@
 
 destroot.target     install install-info-host
 
+# TODO: Optimize this.  We don't need to actually bootstrap gcc to build libstdc++
+if {${subport} == "libstdcxx"} {
+    depends_run-delete port:${subport}
+
+    configure.args-delete --libdir=${prefix}/lib/${name}
+
+    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
+    configure.args-append --enable-languages=c++
+
+    destroot.target     install-target-libstdc++-v3
+
+    post-destroot {
+        eval delete [glob ${destroot}${prefix}/lib/*{a,py}]
+        file delete -force ${destroot}${prefix}/share/gcc-${major}
+        file delete -force ${destroot}${prefix}/include/${name}
+    }
+} else {
 post-destroot {
     file delete -force ${destroot}${prefix}/share/man/man7 \
         ${destroot}${prefix}/share/info
@@ -128,14 +146,18 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 select.group        gcc
 select.file         ${filespath}/mp-${name}
 
+}
+
 platform powerpc {
     configure.universal_archs ppc ppc64
 }

Modified: trunk/dports/lang/gcc48/Portfile
===================================================================
--- trunk/dports/lang/gcc48/Portfile	2012-09-12 04:09:22 UTC (rev 97686)
+++ trunk/dports/lang/gcc48/Portfile	2012-09-12 04:41:13 UTC (rev 97687)
@@ -4,8 +4,9 @@
 PortGroup select 1.0
 
 name                gcc48
+subport             libstdcxx-devel {}
 version             4.8-20120909
-revision            2
+revision            3
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -32,7 +33,7 @@
 use_bzip2           yes
 
 depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
-depends_run         port:gcc_select port:ld64 port:cctools
+depends_run         port:gcc_select port:ld64 port:cctools port:libstdcxx-devel
 
 depends_skip_archcheck-append gcc_select ld64 cctools
 
@@ -98,6 +99,23 @@
 
 destroot.target     install install-info-host
 
+# TODO: Optimize this.  We don't need to actually bootstrap gcc to build libstdc++
+if {${subport} == "libstdcxx-devel"} {
+    depends_run-delete port:${subport}
+
+    configure.args-delete --libdir=${prefix}/lib/${name}
+
+    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
+    configure.args-append --enable-languages=c++
+
+    destroot.target     install-target-libstdc++-v3
+
+    post-destroot {
+        eval delete [glob ${destroot}${prefix}/lib/*{a,py}]
+        file delete -force ${destroot}${prefix}/share/gcc-${major}
+        file delete -force ${destroot}${prefix}/include/${name}
+    }
+} else {
 post-destroot {
     file delete -force ${destroot}${prefix}/share/man/man7 \
         ${destroot}${prefix}/share/info
@@ -109,14 +127,18 @@
     # http://trac.macports.org/ticket/35770
     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
 
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
+
     # This symlink is provided as a transition aide and will be removed
     # with a future revision of this port.
-    ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
+    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
 }
 
 select.group        gcc
 select.file         ${filespath}/mp-${name}
 
+}
+
 platform powerpc {
     configure.universal_archs ppc ppc64
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120911/a7008cb9/attachment-0001.html>


More information about the macports-changes mailing list