Skip to content
Permalink
Browse files

Apply consistent formatting - looking at lines suddenly tabbed out am…

…idst other lines which

were not was annoying  me.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@4453 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jordan K. Hubbard
Jordan K. Hubbard committed Jan 5, 2004
1 parent d95aeb4 commit 4919e2c87c8c9a3841c255912522fb8f15f63af5
@@ -70,11 +70,11 @@ proc build_getmaketype {args} {
pbx {
set pbxbuild "pbxbuild"
set xcodebuild "xcodebuild"

if {[option os.platform] != "darwin"} {
return -code error "[format [msgcat::mc "This port requires 'pbxbuild/xcodebuild', which is not available on %s."] [option os.platform]]"
}

if {[catch {set xcodebuild [binaryInPath $xcodebuild]}] == 0} {
return $xcodebuild
} elseif {[catch {set pbxbuild [binaryInPath $pbxbuild]}] == 0} {
@@ -92,7 +92,7 @@ proc build_getmaketype {args} {

proc build_start {args} {
global UI_PREFIX

ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s with target %s"] [option portname] [option build.target]]"
}

@@ -53,31 +53,31 @@ proc dmd5 {file} {

proc checksum_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying checksum for %s"] $portname]"
}

proc checksum_main {args} {
global distpath all_dist_files UI_PREFIX

# If no files have been downloaded there is nothing to checksum
if {![info exists all_dist_files]} {
return 0
}

if {![exists checksums]} {
ui_error "[msgcat::mc "No checksums statement in Portfile. File checksums are:"]"
foreach distfile $all_dist_files {
ui_msg "$distfile md5 [md5 file $distpath/$distfile]"
}
return -code error "[msgcat::mc "No checksums statement in Portfile."]"
}

# Optimization for the 2 argument case for checksums
if {[llength [option checksums]] == 2 && [llength $all_dist_files] == 1} {
option checksums [linsert [option checksums] 0 $all_dist_files]
}

foreach distfile $all_dist_files {
set checksum [md5 file $distpath/$distfile]
set dchecksum [dmd5 $distfile]
@@ -44,7 +44,7 @@ set UI_PREFIX "--->"

proc clean_start {args} {
global UI_PREFIX

ui_msg "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option portname]]"
}

@@ -53,28 +53,28 @@ set UI_PREFIX "---> "

proc configure_start {args} {
global UI_PREFIX

ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option portname]]"
}

proc configure_main {args} {
global [info globals]
global configure configure.args configure.dir automake automake.env automake.args automake.dir autoconf autoconf.env autoconf.args autoconf.dir xmkmf libtool portname worksrcpath prefix workpath UI_PREFIX use_configure use_autoconf use_automake use_xmkmf

if {[tbool use_automake]} {
# XXX depend on automake
if {[catch {system "[command automake]"} result]} {
return -code error "[format [msgcat::mc "%s failure: %s"] automake $result]"
}
}

if {[tbool use_autoconf]} {
# XXX depend on autoconf
if {[catch {system "[command autoconf]"} result]} {
return -code error "[format [msgcat::mc "%s failure: %s"] autoconf $result]"
}
}

if {[tbool use_xmkmf]} {
# XXX depend on xmkmf
if {[catch {system "[command xmkmf]"} result]} {
@@ -49,16 +49,16 @@ proc validate_depends_options {option action args} {
switch -regex $action {
set|append|delete {
foreach depspec $args {
if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9_/\-\.$^\?\+\(\)\|\\]+):([-A-Za-z\./0-9_]+)} "$depspec" match deppath depregex portname]} {
switch $deppath {
lib {}
bin {}
path {}
default {return -code error [format [msgcat::mc "unknown depspec type: %s"] $deppath]}
}
} else {
return -code error [format [msgcat::mc "invalid depspec: %s"] $depspec]
}
if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9_/\-\.$^\?\+\(\)\|\\]+):([-A-Za-z\./0-9_]+)} "$depspec" match deppath depregex portname]} {
switch $deppath {
lib {}
bin {}
path {}
default {return -code error [format [msgcat::mc "unknown depspec type: %s"] $deppath]}
}
} else {
return -code error [format [msgcat::mc "invalid depspec: %s"] $depspec]
}
}
}
}
@@ -55,13 +55,13 @@ set UI_PREFIX "---> "

proc destroot_start {args} {
global UI_PREFIX prefix portname destroot portresourcepath os.platform destroot.clean

ui_msg "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${portname}]"

if { ${destroot.clean} == "yes" } {
system "rm -Rf \"${destroot}\""
}

file mkdir "${destroot}"
if { ${os.platform} == "darwin" } {
system "cd \"${destroot}\" && mtree -e -U -f ${portresourcepath}/install/macosx.mtree"
@@ -77,7 +77,7 @@ proc destroot_main {args} {

proc destroot_finish {args} {
global destroot

# Prune empty directories in ${destroot}
catch {system "find \"${destroot}\" -depth -type d -print | xargs rmdir 2>/dev/null"}
return 0
@@ -41,30 +41,30 @@ set UI_PREFIX "---> "

proc dmg_main {args} {
global portname portversion portrevision package.destpath UI_PREFIX

ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${portname} ${portversion}]"

return [package_dmg $portname $portversion $portrevision]
}

proc package_dmg {portname portversion portrevision} {
global UI_PREFIX package.destpath portpath

if {[expr (${portrevision} > 0)]} {
set imagename "${portname}-${portversion}-${portrevision}"
} else {
set imagename "${portname}-${portversion}"
}

set tmp_image ${package.destpath}/${imagename}.tmp.dmg
set final_image ${package.destpath}/${imagename}.dmg
set pkgpath ${package.destpath}/${portname}-${portversion}.pkg

if {[file readable $final_image] && ([file mtime ${final_image}] >= [file mtime ${portpath}/Portfile])} {
ui_msg "$UI_PREFIX [format [msgcat::mc "Disk Image for %s-%s is up-to-date"] ${portname} ${portversion}]"
return 0
}

# size for .dmg
set size [dirSize ${pkgpath}]
if {[expr ($size < 4194304)]} {
@@ -74,7 +74,7 @@ proc package_dmg {portname portversion portrevision} {
# this should later be replaced with hdiutil create -srcfolder
set blocks [expr ($size/512) + ((($size/512)*3)/100)]
}

if {[system "hdiutil create -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
}
@@ -92,6 +92,6 @@ proc package_dmg {portname portversion portrevision} {
return -code error [format [msgcat::mc "Failed to internet-enable: %s"] ${final_image}]
}
system "rm -f ${tmp_image}"

return 0
}
@@ -56,7 +56,7 @@ set UI_PREFIX "---> "

proc extract_init {args} {
global extract.only extract.dir extract.cmd extract.pre_args extract.post_args distfiles use_bzip2 use_zip workpath

if {[tbool use_bzip2]} {
option extract.cmd [binaryInPath "bzip2"]
} elseif {[tbool use_zip]} {
@@ -68,18 +68,18 @@ proc extract_init {args} {

proc extract_start {args} {
global UI_PREFIX

ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option portname]]"
}

proc extract_main {args} {
global UI_PREFIX

if {![exists distfiles] && ![exists extract.only]} {
# nothing to do
return 0
}

foreach distfile [option extract.only] {
ui_info "$UI_PREFIX [format [msgcat::mc "Extracting %s"] $distfile]"
option extract.args "[option distpath]/$distfile"
@@ -155,30 +155,30 @@ proc mirror_sites {mirrors tag subdir} {
ui_warn "[format [msgcat::mc "No mirror sites on file for class %s"] $mirrors]"
return {}
}

set ret [list]
foreach element $portfetch::mirror_sites::sites($mirrors) {

# here we have the chance to take a look at tags, that possibly
# have been assigned in mirror_sites.tcl
set splitlist [split $element :]
if {[llength $splitlist] > 1} {
set element "[lindex $splitlist 0]:[lindex $splitlist 1]"
set mirror_tag "[lindex $splitlist 2]"
set element "[lindex $splitlist 0]:[lindex $splitlist 1]"
set mirror_tag "[lindex $splitlist 2]"
}

if {$subdir == "" && $mirror_tag != "nosubdir"} {
set subdir ${portname}
}

if {"$tag" != ""} {
eval append element "${subdir}:${tag}"
} else {
eval append element "${subdir}"
}
eval lappend ret $element
}

return $ret
}

@@ -191,9 +191,9 @@ proc checkfiles {args} {
global distdir distfiles patchfiles all_dist_files patch_sites fetch_urls \
master_sites filespath master_sites.mirror_subdir \
patch_sites.mirror_subdir fallback_mirror_site

append master_sites " ${fallback_mirror_site}"

foreach list {master_sites patch_sites} {
upvar #0 $list uplist
if {![info exists uplist]} {
@@ -227,7 +227,7 @@ proc checkfiles {args} {
}
}
}

if {[info exists patchfiles]} {
foreach file $patchfiles {
if {![file exists $filespath/$file]} {
@@ -285,7 +285,7 @@ proc cvsfetch {args} {
proc fetchfiles {args} {
global distpath all_dist_files UI_PREFIX fetch_urls fetch.cmd os.platform fetch.pre_args
global distfile site

if {![file isdirectory $distpath]} {
if {[catch {file mkdir $distpath} result]} {
return -code error [format [msgcat::mc "Unable to create distribution files path: %s"] $result]
@@ -327,7 +327,7 @@ proc fetchfiles {args} {
# Initialize fetch target, calling checkfiles if neccesary
proc fetch_init {args} {
global distfiles distname distpath all_dist_files dist_subdir fetch.type

if {[info exist distpath] && [info exists dist_subdir]} {
set distpath ${distpath}/${dist_subdir}
}
@@ -338,7 +338,7 @@ proc fetch_init {args} {

proc fetch_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $portname]"
}

@@ -348,7 +348,7 @@ proc fetch_start {args} {
# or call the standard fetchfiles procedure
proc fetch_main {args} {
global distname distpath all_dist_files fetch.type

# Check for files, download if neccesary
if {![info exists all_dist_files] && "${fetch.type}" == "standard"} {
return 0

0 comments on commit 4919e2c

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