Skip to content
Permalink
Browse files

Hack to act as if we were not expanding ${prefix}.

Remark:
port info tom

will output something with {${prefix}...} in it.

It's the way it worked (I mean in depends_*) and the way it still works.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@14532 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
pguyot committed Oct 10, 2005
1 parent 28f5529 commit a84fb2a4ea61bba7b1f63eb29919a717690e1849
Showing with 7 additions and 17 deletions.
  1. +7 −17 src/port/portindex.tcl
@@ -4,7 +4,7 @@ exec @TCLSH@ "$0" "$@"

# Traverse through all ports, creating an index and archiving port directories
# if requested
# $Id: portindex.tcl,v 1.33 2005/10/09 13:36:16 jberry Exp $
# $Id: portindex.tcl,v 1.34 2005/10/10 14:23:55 pguyot Exp $

catch {source \
[file join "@TCL_PACKAGE_DIR@" darwinports1.0 darwinports_fastload.tcl]}
@@ -99,16 +99,18 @@ proc print_usage args {
puts "-d:\tOutput debugging information"
}

proc pindex {portdir} {
variable prefix $darwinports::prefix

proc pindex {portdir} {
global target fd directory archive outdir stats
incr stats(total)
if {[catch {set interp [dportopen file://[file join $directory $portdir]]} result]} {
puts "Failed to parse file $portdir/Portfile: $result"
incr stats(failed)
} else {
} else {
global darwinports::prefix
set save_prefix $prefix
set prefix {\${prefix}}
array set portinfo [dportinfo $interp]
set $prefix $save_prefix
dportclose $interp
set portinfo(portdir) $portdir
puts "Adding port $portdir"
@@ -128,18 +130,6 @@ proc pindex {portdir} {
}
}

# Canonicalize any path: dependencies by substituting out $prefix
foreach dependstype { depends_build depends_lib depends_run } {
if {[info exists portinfo($dependstype)]} {
set deps $portinfo($dependstype)
set newDeps {}
foreach dep $deps {
lappend newDeps [regsub "^(path|lib|bin):$prefix/" $dep {\1:${prefix}/}]
}
set portinfo($dependstype) $newDeps
}
}

set output [array get portinfo]
set len [expr [string length $output] + 1]
puts $fd [list $portinfo(name) $len]

0 comments on commit a84fb2a

Please sign in to comment.
You can’t perform that action at this time.