<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e6f53118dd007f5021f0990391d4c6dd8456d30c">https://github.com/macports/macports-ports/commit/e6f53118dd007f5021f0990391d4c6dd8456d30c</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e6f53118dd007f5021f0990391d4c6dd8456d30c
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Apr 17 15:14:45 2018 +1000
<span style='display:block; white-space:pre;color:#404040;'> Portgroups: replace lsearch with in/ni
</span>---
_resources/port1.0/group/active_variants-1.1.tcl | 4 ++--
_resources/port1.0/group/bitbucket-1.0.tcl | 2 +-
_resources/port1.0/group/cmake-1.1.tcl | 2 +-
_resources/port1.0/group/compilers-1.0.tcl | 12 ++++++------
_resources/port1.0/group/github-1.0.tcl | 2 +-
_resources/port1.0/group/mpi-1.0.tcl | 2 +-
_resources/port1.0/group/perl5-1.0.tcl | 6 +++---
_resources/port1.0/group/php-1.1.tcl | 4 ++--
_resources/port1.0/group/python-1.0.tcl | 2 +-
_resources/port1.0/group/texlive-1.0.tcl | 2 +-
10 files changed, 19 insertions(+), 19 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/active_variants-1.1.tcl b/_resources/port1.0/group/active_variants-1.1.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 7220131..facbdd5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/active_variants-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/active_variants-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -209,7 +209,7 @@ proc _check_require_active_variants {method} {
</span> # with bin: dependencies)
if {$depname ne ""} {
# if the dependency isn't already in the list
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact $depends $depname] == -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$depname ni $depends} {
</span> # append it
lappend depends $depname
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -226,7 +226,7 @@ proc _check_require_active_variants {method} {
</span> set required [lindex $_require_active_variant 1]
set forbidden [lindex $_require_active_variant 2]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact $depends $port] == -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$port ni $depends} {
</span> ui_debug "Ignoring active_variants requirement for ${port} because ${method}-type install only considers ${deptypes} and those do not contain ${port}"
continue
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/bitbucket-1.0.tcl b/_resources/port1.0/group/bitbucket-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index fe1653b..7efce27 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/bitbucket-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/bitbucket-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -98,7 +98,7 @@ proc bitbucket.setup {bb_author bb_project bb_version {bb_tag_prefix ""}} {
</span> # Here be dragons.
if {![file exists ${worksrcpath}] && \
${fetch.type} eq "standard" && \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- [lsearch -exact ${master_sites} ${bitbucket.master_sites}] != -1 && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${bitbucket.master_sites} in ${master_sites} && \
</span> [llength ${distfiles}] > 0 && \
[llength [glob -nocomplain ${workpath}/*]] > 0} {
move [glob ${workpath}/*] ${worksrcpath}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/cmake-1.1.tcl b/_resources/port1.0/group/cmake-1.1.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index a3a357b..e234d28 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/cmake-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/cmake-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -123,7 +123,7 @@ proc cmake::rpath_flags {} {
</span> if {[llength [option cmake.install_rpath]]} {
# make sure a single ${cmake.install_prefix} is included in the rpath
# careful, we are likely to be called more than once.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact [option cmake.install_rpath] [option cmake.install_prefix]/lib] == -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {"[option cmake.install_prefix]/lib" ni [option cmake.install_rpath]} {
</span> cmake.install_rpath-append [option cmake.install_prefix]/lib
}
return [list \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/compilers-1.0.tcl b/_resources/port1.0/group/compilers-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 9722a51..11aa6ce 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/compilers-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/compilers-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -251,7 +251,7 @@ proc compilers.setup_variants {variants} {
</span> # only add conflicts from the compiler database (set above) if we
# actually have the compiler in the list of allowed variants
foreach j $cdb($variant,conflict) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact $j ${compilers.variants}] > -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$j in ${compilers.variants}} {
</span> lappend c $j
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -430,7 +430,7 @@ proc fortran_variant_isset {} {
</span> # remove all elements in R from L
proc remove_from_list {L R} {
foreach e $R {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set idx [lsearch $L $e]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set idx [lsearch -exact $L $e]
</span> set L [lreplace $L $idx $idx]
}
return $L
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -459,7 +459,7 @@ proc compilers.is_fortran_only {} {
</span> global compilers.list
foreach c {cc cxx cpp objc} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact ${compilers.list} $c] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$c in ${compilers.list}} {
</span> return 0
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -471,7 +471,7 @@ proc compilers.is_c_only {} {
</span> global compilers.list
foreach c {f77 f90 fc} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact ${compilers.list} $c] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$c in ${compilers.list}} {
</span> return 0
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -634,7 +634,7 @@ proc compilers.setup {args} {
</span> # remove duplicates
set duplicates {}
foreach foo $remove_list {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch $add_list $foo] != -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$foo in $add_list} {
</span> lappend duplicates $foo
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -662,7 +662,7 @@ proc compilers.setup {args} {
</span> if {${compilers.default_fortran} && ![fortran_variant_isset]} {
foreach fv $ordered_variants {
# if the variant exists, then make it default
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact ${compilers.variants} $fv] > -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$fv in ${compilers.variants}} {
</span> default_variants-append +$fv
break
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/github-1.0.tcl b/_resources/port1.0/group/github-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index f6de30c..1fb4dd0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/github-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/github-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -112,7 +112,7 @@ proc github.setup {gh_author gh_project gh_version {gh_tag_prefix ""} {gh_tag_su
</span> # Here be dragons.
if {![file exists ${worksrcpath}] && \
${fetch.type} eq "standard" && \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- [lsearch -exact ${master_sites} ${github.master_sites}] != -1 && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${github.master_sites} in ${master_sites} && \
</span> [llength ${distfiles}] > 0 && \
[llength [glob -nocomplain ${workpath}/*]] > 0} {
if {[file exists [glob -nocomplain ${workpath}/${github.author}-${github.project}-*]] && \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/mpi-1.0.tcl b/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 07c3349..15ae7e3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -313,7 +313,7 @@ proc mpi.setup {args} {
</span> set origvariants ${mpi.variants}
set mpi.variants [lsort [concat $remove_list $add_list]]
set removedvariants [remove_from_list $origvariants ${mpi.variants}]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact $removedvariants $badvariant] > -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$badvariant in $removedvariants} {
</span> ui_error "$name has disallowed +$badvariant! Please choose another mpi variant"
return -code error "$name +$badvariant not allowed"
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/perl5-1.0.tcl b/_resources/port1.0/group/perl5-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 2a9508c..fce0488 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/perl5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/perl5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -51,7 +51,7 @@ proc perl5_get_default_branch {} {
</span> set ret 5.26
}
# if the above default is not supported by this module, use the latest it does support
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists perl5.branches] && [lsearch -exact ${perl5.branches} $ret] == -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists perl5.branches] && $ret ni ${perl5.branches}} {
</span> set ret [lindex ${perl5.branches} end]
}
return $ret
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -102,7 +102,7 @@ proc perl5.create_variants {branches} {
</span> global name perl5.major perl5.default_variant perl5.variant perl5.set_default_variant perl5.conflict_variants perl5.require_variant perl5.variants
set perl5.variants [perl5.get_variant_names ${branches}]
foreach branch ${branches} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set index [lsearch ${branches} ${branch}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set index [lsearch -exact ${branches} ${branch}]
</span> set variant [lindex ${perl5.variants} ${index}]
# Add conflicts
set filtered {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -123,7 +123,7 @@ proc perl5.create_variants {branches} {
</span> }
# Set perl version and deps
foreach branch ${branches} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set index [lsearch ${branches} ${branch}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set index [lsearch -exact ${branches} ${branch}]
</span> set variant [lindex ${perl5.variants} ${index}]
if {[variant_isset ${variant}]} {
perl5.major ${branch}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/php-1.1.tcl b/_resources/port1.0/group/php-1.1.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 0c71dca..8fd762d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/php-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/php-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -140,7 +140,7 @@ default php.latest_stable_branch 7.2
</span> # not need to change this.
options php.default_branch
<span style='display:block; white-space:pre;background:#ffe0e0;'>-default php.default_branch {[expr {[lsearch -exact ${php.branches} ${php.latest_stable_branch}] != -1 ? ${php.latest_stable_branch} : [lindex ${php.branches} end]}]}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default php.default_branch {[expr {${php.latest_stable_branch} in ${php.branches} ? ${php.latest_stable_branch} : [lindex ${php.branches} end]}]}
</span> option_proc php.default_branch php._set_default_branch
proc php._set_default_branch {option action args} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -458,7 +458,7 @@ proc php.add_port_code {} {
</span> }
foreach extension [concat ${php.extensions} ${php.extensions.zend}] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {-1 == [lsearch -exact ${installed_extensions} ${extension}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${extension} ni ${installed_extensions}} {
</span> ui_error "Cannot list extension \"${extension}\" in ${php.extension_ini} because the port only installed the extensions \"[join ${installed_extensions} "\", \""]\""
return -code error "invalid extension name"
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/python-1.0.tcl b/_resources/port1.0/group/python-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index ade293f..94cdf96 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/python-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/python-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -91,7 +91,7 @@ proc python_get_version {} {
</span> proc python_get_default_version {} {
global python.versions
if {[info exists python.versions]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact ${python.versions} 27] != -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {27 in ${python.versions}} {
</span> return 27
} else {
return [lindex ${python.versions} end]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/texlive-1.0.tcl b/_resources/port1.0/group/texlive-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 8f113d4..e2fbac6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/texlive-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/texlive-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -309,7 +309,7 @@ proc texlive.texmfport {} {
</span> "$fmtprefix$fmtname\t$fmtengine\t$fmtpatterns\t$fmtoptions"
# Simulate texlinks
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact ${texlive.binaries} $fmtname] != -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$fmtname in ${texlive.binaries}} {
</span> # Decide what to link. Use the specified engine
# unless a binary with the same name as the
# format exists (this can happen for metafont;
</pre><pre style='margin:0'>
</pre>