<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/698a72484fe3dfa8b9dcdf330be06f579ffab62a">https://github.com/macports/macports-ports/commit/698a72484fe3dfa8b9dcdf330be06f579ffab62a</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 698a72484fe3dfa8b9dcdf330be06f579ffab62a
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Fri Jun 15 21:17:19 2018 -0500
<span style='display:block; white-space:pre;color:#404040;'> minivmac*: Use associative array instead of proc
</span>---
emulators/minivmac-devel/Portfile | 30 +++++++-----------------------
emulators/minivmac/Portfile | 30 +++++++-----------------------
2 files changed, 14 insertions(+), 46 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/emulators/minivmac-devel/Portfile b/emulators/minivmac-devel/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index b52e875..df5281d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/emulators/minivmac-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/emulators/minivmac-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,6 +130,10 @@ if {${subport} eq ${name}} {
</span> set my_bootstrap_app "Mini vMac Bootstrap.app"
set my_rom_file vMac.ROM
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mnvm_target(i386) imch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mnvm_target(ppc) mach
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mnvm_target(x86_64) mc64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Options that are the same for every variation.
configure.pre_args -ef 1 \
-maintainer MacPorts \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -240,13 +244,12 @@ if {${subport} eq ${name}} {
</span> # Configure all variations.
foreach my_arch [get_canonical_archs] {
file mkdir ${build.dir}/${my_arch}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_target [my_arch_to_target ${my_arch}]
</span> foreach {my_machine my_variation_options} ${my_variations} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_variation ${my_version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set my_variation ${my_version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-$mnvm_target(${my_arch})
</span>
ui_debug "Configuring ${my_variation}"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args -t ${my_target} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args -t $mnvm_target(${my_arch}) \
</span> -n ${my_variation} \
@ \
{*}${my_variation_options}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -328,10 +331,9 @@ if {${subport} eq ${name}} {
</span>
post-build {
foreach my_arch [get_canonical_archs] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_target [my_arch_to_target ${my_arch}]
</span> foreach {my_machine unused} ${my_variations} {
if {[variant_isset universal]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|${my_target}|umch|" ${build.dir}/${my_arch}/${my_machine}/minivmac.app/Contents/Info.plist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|$mnvm_target(${my_arch})|umch|" ${build.dir}/${my_arch}/${my_machine}/minivmac.app/Contents/Info.plist
</span> }
# Install the prettier icons.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -543,24 +545,6 @@ proc my_read_alias {file} {
</span> return [exec osascript ${filespath}/readalias.applescript [file normalize ${file}]]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Converts normal arch names into Mini vMac target names.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc my_arch_to_target {arch} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch ${arch} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- i386 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return imch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ppc {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return mach
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- x86_64 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return mc64
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "unsupported architecture ${arch}"
</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> # Mounts a disk image, using an Expect script that answers "yes" when some
# versions of hdiutil ask if we want to mount the image even though it may be
# damaged.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/emulators/minivmac/Portfile b/emulators/minivmac/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index de5f582..3392aa3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/emulators/minivmac/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/emulators/minivmac/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -123,6 +123,10 @@ if {${subport} eq ${name}} {
</span> set my_bootstrap_app "Mini vMac Bootstrap.app"
set my_rom_file vMac.ROM
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mnvm_target(i386) imch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mnvm_target(ppc) mach
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mnvm_target(x86_64) mc64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Options that are the same for every variation.
configure.pre_args -maintainer MacPorts \
-homepage https://www.macports.org \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -232,13 +236,12 @@ if {${subport} eq ${name}} {
</span> # Configure all variations.
foreach my_arch [get_canonical_archs] {
file mkdir ${build.dir}/${my_arch}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_target [my_arch_to_target ${my_arch}]
</span> foreach {my_machine my_variation_options} ${my_variations} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_variation ${my_version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set my_variation ${my_version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-$mnvm_target(${my_arch})
</span>
ui_debug "Configuring ${my_variation}"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args -t ${my_target} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args -t $mnvm_target(${my_arch}) \
</span> -n ${my_variation} \
{*}${my_variation_options}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -306,10 +309,9 @@ if {${subport} eq ${name}} {
</span>
post-build {
foreach my_arch [get_canonical_archs] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_target [my_arch_to_target ${my_arch}]
</span> foreach {my_machine unused} ${my_variations} {
if {[variant_isset universal]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|${my_target}|umch|" ${build.dir}/${my_arch}/${my_machine}/minivmac.app/Contents/Info.plist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|$mnvm_target(${my_arch})|umch|" ${build.dir}/${my_arch}/${my_machine}/minivmac.app/Contents/Info.plist
</span> }
# Install the prettier icons.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -518,21 +520,3 @@ proc my_read_alias {file} {
</span> global filespath
return [exec osascript ${filespath}/readalias.applescript [file normalize ${file}]]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Converts normal arch names into Mini vMac target names.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc my_arch_to_target {arch} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch ${arch} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- i386 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return imch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ppc {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return mach
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- x86_64 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return mc64
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "unsupported architecture ${arch}"
</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></pre><pre style='margin:0'>
</pre>