<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[116456] trunk/base/src/port1.0/portconfigure.tcl</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/116456">116456</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2014-01-25 10:54:02 -0800 (Sat, 25 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>portconfigure.tcl: Use string comparisons where appropriate.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbasesrcport10portconfiguretcl">trunk/base/src/port1.0/portconfigure.tcl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbasesrcport10portconfiguretcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portconfigure.tcl (116455 => 116456)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -76,8 +76,8 @@
</span><span class="cx"> global ${type}.cmd option_defaults
</span><span class="cx">
</span><span class="cx"> if {![info exists ${type}.cmd] || (
</span><del>- ([info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] == $option_defaults(${type}.cmd)) ||
- (![info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] == "${type}")
</del><ins>+ ([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})
</ins><span class="cx"> )} {
</span><span class="cx"> eval [linsert $dep 0 depends_build-append]
</span><span class="cx"> }
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> xmkmf port:imake
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if {[string equal ${action} "set"]} {
</del><ins>+ if {$action eq "set"} {
</ins><span class="cx"> switch $option {
</span><span class="cx"> autoreconf.cmd -
</span><span class="cx"> automake.cmd -
</span><span class="lines">@@ -279,9 +279,9 @@
</span><span class="cx"> foreach arch $archs {
</span><span class="cx"> if {[lsearch -exact $supported_archs $arch] != -1} {
</span><span class="cx"> set add_arch $arch
</span><del>- } elseif {$arch == "x86_64" && [lsearch -exact $supported_archs "i386"] != -1} {
</del><ins>+ } elseif {$arch eq "x86_64" && [lsearch -exact $supported_archs "i386"] != -1} {
</ins><span class="cx"> set add_arch "i386"
</span><del>- } elseif {$arch == "ppc64" && [lsearch -exact $supported_archs "ppc"] != -1} {
</del><ins>+ } elseif {$arch eq "ppc64" && [lsearch -exact $supported_archs "ppc"] != -1} {
</ins><span class="cx"> set add_arch "ppc"
</span><span class="cx"> } else {
</span><span class="cx"> continue
</span><span class="lines">@@ -301,14 +301,14 @@
</span><span class="cx"> set flags "-m64"
</span><span class="cx"> } elseif {[tbool configure.m32]} {
</span><span class="cx"> set flags "-m32"
</span><del>- } elseif {${configure.build_arch} != ""} {
</del><ins>+ } elseif {${configure.build_arch} ne ""} {
</ins><span class="cx"> if {[arch_flag_supported ${configure.compiler}] &&
</span><span class="cx"> [regexp {^(?:cc|cxx|objc|objcxx)$} $tool]
</span><span class="cx"> } then {
</span><span class="cx"> set flags "-arch ${configure.build_arch}"
</span><del>- } elseif {${configure.build_arch} == "x86_64" || ${configure.build_arch} == "ppc64"} {
</del><ins>+ } elseif {${configure.build_arch} eq "x86_64" || ${configure.build_arch} eq "ppc64"} {
</ins><span class="cx"> set flags "-m64"
</span><del>- } elseif {${configure.compiler} != "gcc-3.3"} {
</del><ins>+ } elseif {${configure.compiler} ne "gcc-3.3"} {
</ins><span class="cx"> set flags "-m32"
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx"> # ld directly. So we punt and let portfiles deal with that case.
</span><span class="cx"> proc portconfigure::configure_get_ld_archflags {args} {
</span><span class="cx"> global configure.build_arch configure.compiler
</span><del>- if {${configure.build_arch} != "" && [arch_flag_supported ${configure.compiler}]} {
</del><ins>+ if {${configure.build_arch} ne "" && [arch_flag_supported ${configure.compiler}]} {
</ins><span class="cx"> return "-arch ${configure.build_arch}"
</span><span class="cx"> } else {
</span><span class="cx"> return ""
</span><span class="lines">@@ -402,7 +402,7 @@
</span><span class="cx">
</span><span class="cx"> # internal function to determine the default compiler
</span><span class="cx"> proc portconfigure::configure_get_default_compiler {args} {
</span><del>- if {[option compiler.whitelist] != ""} {
</del><ins>+ if {[option compiler.whitelist] ne ""} {
</ins><span class="cx"> set search_list [option compiler.whitelist]
</span><span class="cx"> } else {
</span><span class="cx"> set search_list [option compiler.fallback]
</span><span class="lines">@@ -479,7 +479,7 @@
</span><span class="cx"> # internal function to find correct compilers
</span><span class="cx"> proc portconfigure::configure_get_compiler {type {compiler {}}} {
</span><span class="cx"> global configure.compiler prefix
</span><del>- if {$compiler == ""} {
</del><ins>+ if {$compiler eq ""} {
</ins><span class="cx"> set compiler ${configure.compiler}
</span><span class="cx"> }
</span><span class="cx"> # Tcl 8.4's switch doesn't support -matchvar.
</span><span class="lines">@@ -489,7 +489,7 @@
</span><span class="cx"> objc { return ${prefix}/bin/gcc-apple${suffix} }
</span><span class="cx"> cxx -
</span><span class="cx"> objcxx {
</span><del>- if {$suffix == "-4.2"} {
</del><ins>+ if {$suffix eq "-4.2"} {
</ins><span class="cx"> return ${prefix}/bin/g++-apple${suffix}
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -709,12 +709,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # https://trac.macports.org/ticket/34221
</span><del>- if {${os.platform} == "darwin" && ${os.major} == 12} {
</del><ins>+ if {${os.platform} eq "darwin" && ${os.major} == 12} {
</ins><span class="cx"> append_to_environment_value configure "__CFPREFERENCES_AVOID_DAEMON" 1
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # add SDK flags if cross-compiling (or universal on ppc tiger)
</span><del>- if {${configure.sdkroot} != ""} {
</del><ins>+ if {${configure.sdkroot} ne ""} {
</ins><span class="cx"> foreach env_var {CPPFLAGS CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS} {
</span><span class="cx"> append_to_environment_value configure $env_var -isysroot ${configure.sdkroot}
</span><span class="cx"> }
</span><span class="lines">@@ -734,10 +734,10 @@
</span><span class="cx"> eval [linsert ${configure.universal_args} 0 configure.pre_args-append]
</span><span class="cx"> } else {
</span><span class="cx"> foreach env_var {CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS FFLAGS F90FLAGS FCFLAGS LDFLAGS} {
</span><del>- if {${configure.march} != ""} {
</del><ins>+ if {${configure.march} ne ""} {
</ins><span class="cx"> append_to_environment_value configure $env_var -march=${configure.march}
</span><span class="cx"> }
</span><del>- if {${configure.mtune} != ""} {
</del><ins>+ if {${configure.mtune} ne ""} {
</ins><span class="cx"> append_to_environment_value configure $env_var -mtune=${configure.mtune}
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>