[116456] trunk/base/src/port1.0/portconfigure.tcl
larryv at macports.org
larryv at macports.org
Sat Jan 25 10:54:02 PST 2014
Revision: 116456
https://trac.macports.org/changeset/116456
Author: larryv at macports.org
Date: 2014-01-25 10:54:02 -0800 (Sat, 25 Jan 2014)
Log Message:
-----------
portconfigure.tcl: Use string comparisons where appropriate.
Modified Paths:
--------------
trunk/base/src/port1.0/portconfigure.tcl
Modified: trunk/base/src/port1.0/portconfigure.tcl
===================================================================
--- trunk/base/src/port1.0/portconfigure.tcl 2014-01-25 18:53:00 UTC (rev 116455)
+++ trunk/base/src/port1.0/portconfigure.tcl 2014-01-25 18:54:02 UTC (rev 116456)
@@ -76,8 +76,8 @@
global ${type}.cmd option_defaults
if {![info exists ${type}.cmd] || (
- ([info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] == $option_defaults(${type}.cmd)) ||
- (![info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] == "${type}")
+ ([info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] eq $option_defaults(${type}.cmd)) ||
+ (![info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] eq ${type})
)} {
eval [linsert $dep 0 depends_build-append]
}
@@ -94,7 +94,7 @@
xmkmf port:imake
}
- if {[string equal ${action} "set"]} {
+ if {$action eq "set"} {
switch $option {
autoreconf.cmd -
automake.cmd -
@@ -279,9 +279,9 @@
foreach arch $archs {
if {[lsearch -exact $supported_archs $arch] != -1} {
set add_arch $arch
- } elseif {$arch == "x86_64" && [lsearch -exact $supported_archs "i386"] != -1} {
+ } elseif {$arch eq "x86_64" && [lsearch -exact $supported_archs "i386"] != -1} {
set add_arch "i386"
- } elseif {$arch == "ppc64" && [lsearch -exact $supported_archs "ppc"] != -1} {
+ } elseif {$arch eq "ppc64" && [lsearch -exact $supported_archs "ppc"] != -1} {
set add_arch "ppc"
} else {
continue
@@ -301,14 +301,14 @@
set flags "-m64"
} elseif {[tbool configure.m32]} {
set flags "-m32"
- } elseif {${configure.build_arch} != ""} {
+ } elseif {${configure.build_arch} ne ""} {
if {[arch_flag_supported ${configure.compiler}] &&
[regexp {^(?:cc|cxx|objc|objcxx)$} $tool]
} then {
set flags "-arch ${configure.build_arch}"
- } elseif {${configure.build_arch} == "x86_64" || ${configure.build_arch} == "ppc64"} {
+ } elseif {${configure.build_arch} eq "x86_64" || ${configure.build_arch} eq "ppc64"} {
set flags "-m64"
- } elseif {${configure.compiler} != "gcc-3.3"} {
+ } elseif {${configure.compiler} ne "gcc-3.3"} {
set flags "-m32"
}
}
@@ -321,7 +321,7 @@
# ld directly. So we punt and let portfiles deal with that case.
proc portconfigure::configure_get_ld_archflags {args} {
global configure.build_arch configure.compiler
- if {${configure.build_arch} != "" && [arch_flag_supported ${configure.compiler}]} {
+ if {${configure.build_arch} ne "" && [arch_flag_supported ${configure.compiler}]} {
return "-arch ${configure.build_arch}"
} else {
return ""
@@ -402,7 +402,7 @@
# internal function to determine the default compiler
proc portconfigure::configure_get_default_compiler {args} {
- if {[option compiler.whitelist] != ""} {
+ if {[option compiler.whitelist] ne ""} {
set search_list [option compiler.whitelist]
} else {
set search_list [option compiler.fallback]
@@ -479,7 +479,7 @@
# internal function to find correct compilers
proc portconfigure::configure_get_compiler {type {compiler {}}} {
global configure.compiler prefix
- if {$compiler == ""} {
+ if {$compiler eq ""} {
set compiler ${configure.compiler}
}
# Tcl 8.4's switch doesn't support -matchvar.
@@ -489,7 +489,7 @@
objc { return ${prefix}/bin/gcc-apple${suffix} }
cxx -
objcxx {
- if {$suffix == "-4.2"} {
+ if {$suffix eq "-4.2"} {
return ${prefix}/bin/g++-apple${suffix}
}
}
@@ -709,12 +709,12 @@
}
# https://trac.macports.org/ticket/34221
- if {${os.platform} == "darwin" && ${os.major} == 12} {
+ if {${os.platform} eq "darwin" && ${os.major} == 12} {
append_to_environment_value configure "__CFPREFERENCES_AVOID_DAEMON" 1
}
# add SDK flags if cross-compiling (or universal on ppc tiger)
- if {${configure.sdkroot} != ""} {
+ if {${configure.sdkroot} ne ""} {
foreach env_var {CPPFLAGS CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS} {
append_to_environment_value configure $env_var -isysroot ${configure.sdkroot}
}
@@ -734,10 +734,10 @@
eval [linsert ${configure.universal_args} 0 configure.pre_args-append]
} else {
foreach env_var {CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS FFLAGS F90FLAGS FCFLAGS LDFLAGS} {
- if {${configure.march} != ""} {
+ if {${configure.march} ne ""} {
append_to_environment_value configure $env_var -march=${configure.march}
}
- if {${configure.mtune} != ""} {
+ if {${configure.mtune} ne ""} {
append_to_environment_value configure $env_var -mtune=${configure.mtune}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140125/351b659d/attachment.html>
More information about the macports-changes
mailing list