<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/8c68b2e8a3be74b8ce322be588c418f4c8aac29e">https://github.com/macports/macports-ports/commit/8c68b2e8a3be74b8ce322be588c418f4c8aac29e</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 8c68b2e gmp: allow binary distribution
</span>8c68b2e is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 8c68b2e8a3be74b8ce322be588c418f4c8aac29e
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Fri Oct 4 19:45:28 2019 +1000
<span style='display:block; white-space:pre;color:#404040;'> gmp: allow binary distribution
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Build for a minimum spec CPU by default so binaries should work for all
</span><span style='display:block; white-space:pre;color:#404040;'> users. Add a native variant that can be selected to get the former
</span><span style='display:block; white-space:pre;color:#404040;'> behaviour of auto-detecting the build machine's CPU.
</span>---
devel/gmp/Portfile | 49 ++++++++++++++++++++-----------------------------
1 file changed, 20 insertions(+), 29 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/gmp/Portfile b/devel/gmp/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 7ab1571..10d0d07 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/gmp/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/gmp/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -38,12 +38,6 @@ patchfiles \
</span>
configure.args --enable-cxx
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Prevent precompiled binaries.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# See #41614.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# might not be needed if we decide to add:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#default_variants +core2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-archive_sites
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> configure.universal_args-delete --disable-dependency-tracking
# Clear all options that affect CFLAGS and CXXFLAGS, since the configure
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -94,30 +88,13 @@ configure.pipe no
</span> test.run yes
test.target check
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# see configure.ac for possible CPU values and what each does
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set processors {core2}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach processor ${processors} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # only one processor variant can be used, so create a list of every other processor variant to conflict with
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set conflicts_list ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach processor_conflict ${processors} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${processor_conflict} ne ${processor} } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend conflicts_list ${processor_conflict}
</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;'>- variant ${processor} description "do not let ${name} determine CPU type; build for ${processor}" conflicts {*}${conflicts_list} "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append --host=${processor}-apple-${os.platform}${os.version}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant native description {Build optimized for your machine's specific processor} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ archive_sites
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# if any of the processor variants are active, CPU is not auto-detected
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set auto_cpu true
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach processor ${processors} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [variant_isset ${processor}] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set auto_cpu false
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset native]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set auto_cpu true
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set auto_cpu false
</span> }
# config.guess: "Print the host system CPU-VENDOR-OS."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -220,6 +197,20 @@ if {![variant_isset universal]} {
</span> configure.args-append --host=${build_processor}-apple-${os.platform}${os.version}
}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {!${auto_cpu}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Choose minimum spec so binaries should work for all users.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch -- $build_arch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ x86_64 { set processor core2 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ i386 { set processor pentiumm }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ppc { set processor powerpc750 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ppc64 { set processor powerpc970 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default { set processor "" }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$processor ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append --host=${processor}-apple-${os.platform}${os.version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "Unknown build_arch '$build_arch', can't set a fixed processor type"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
} else {
# Keep configure.cflags and configure.cxxflags empty.
</pre><pre style='margin:0'>
</pre>