<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/71a945e3b8519788bc339c2569530a034138129f">https://github.com/macports/macports-ports/commit/71a945e3b8519788bc339c2569530a034138129f</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 71a945e3b8519788bc339c2569530a034138129f
</span>Author: kencu <ken.cunningham.webuse@gmail.com>
AuthorDate: Thu Jun 10 08:37:56 2021 -0700
<span style='display:block; white-space:pre;color:#404040;'> libgcc9: whitespace
</span>---
lang/gcc9/Portfile | 178 ++++++++++++++++++++++++++---------------------------
1 file changed, 89 insertions(+), 89 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/gcc9/Portfile b/lang/gcc9/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a304ebf693f..19911a18677 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/gcc9/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/gcc9/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -200,95 +200,95 @@ if {${subport} eq "libgcc9"} {
</span>
if { ${os.major} >= 12 } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # libgcc9 provides libasan.5.dylib only on darwin 12+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/ticket/35770
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/ticket/38814
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # While there can be multiple versions of these runtimes in a single
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # process, it is not possible to pass objects between different versions,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # so we simplify this by having the libgcc port provide the newest version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # of these runtimes for all versions of gcc to use.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # If there is a binary incompatible change to the runtime in a future
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # version of gcc, then the latest version of gcc to provide a given ABI
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # version should continue to provide a subport for that and older gcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # versions.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run port:libgcc10
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append {*}${depends_lib}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-replace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --libdir=${prefix}/lib/${name} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --libdir=${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # see https://trac.macports.org/ticket/54766
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-replace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --includedir=${prefix}/include/${name} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --includedir=${prefix}/include/gcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-replace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --with-gxx-include-dir=${prefix}/include/gcc/c++/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # TODO: Possibly disable bootstrap with appropriate configure flags.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # the problem is that libstdc++'s configure script tests for tls support
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # using the running compiler (not gcc for which libstdc++ is being built).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Thus when we build with clang, we get a mismatch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/ticket/36116
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #compiler.blacklist-append {clang < 425}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #configure.args-append --disable-bootstrap
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #build.target all
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- post-destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Create temporary lib dir
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Loop over the specific libs provided by this port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach dylib ${install_dylibs} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Different OS versions (e.g. Leopard) or architectures (e.g. PPC) don't produce all the dylibs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://trac.macports.org/ticket/40098
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://trac.macports.org/ticket/40100
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {! [file exists ${destroot}${prefix}/lib/libgcc/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- continue
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_exists universal] && [variant_isset universal]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[file exists ${archdir}/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach link [glob -tails -directory ${archdir} *.dylib] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # strip debug symbols to supress debugger warnings:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/attachment/ticket/34831
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {! [string match *libgcc_ext* ${dylib}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Remove stuff not provided by libgccX ports
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/share
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/libexec
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Move temporary lib dir back in place
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Remove includes. Provided by newer libgcc.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/include
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libgcc9 provides libasan.5.dylib only on darwin 12+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/35770
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/38814
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # While there can be multiple versions of these runtimes in a single
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # process, it is not possible to pass objects between different versions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # so we simplify this by having the libgcc port provide the newest version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # of these runtimes for all versions of gcc to use.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # If there is a binary incompatible change to the runtime in a future
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # version of gcc, then the latest version of gcc to provide a given ABI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # version should continue to provide a subport for that and older gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # versions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run port:libgcc10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append {*}${depends_lib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --libdir=${prefix}/lib/${name} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --libdir=${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/54766
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --includedir=${prefix}/include/${name} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --includedir=${prefix}/include/gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-gxx-include-dir=${prefix}/include/gcc/c++/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # TODO: Possibly disable bootstrap with appropriate configure flags.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the problem is that libstdc++'s configure script tests for tls support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # using the running compiler (not gcc for which libstdc++ is being built).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Thus when we build with clang, we get a mismatch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/36116
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #compiler.blacklist-append {clang < 425}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #configure.args-append --disable-bootstrap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #build.target all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create temporary lib dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Loop over the specific libs provided by this port
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach dylib ${install_dylibs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Different OS versions (e.g. Leopard) or architectures (e.g. PPC) don't produce all the dylibs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/40098
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/40100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {! [file exists ${destroot}${prefix}/lib/libgcc/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ continue
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_exists universal] && [variant_isset universal]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${archdir}/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach link [glob -tails -directory ${archdir} *.dylib] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # strip debug symbols to supress debugger warnings:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/attachment/ticket/34831
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {! [string match *libgcc_ext* ${dylib}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove stuff not provided by libgccX ports
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/share
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/libexec
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Move temporary lib dir back in place
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove includes. Provided by newer libgcc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
} else {
</pre><pre style='margin:0'>
</pre>