openbsd-ports/devel/tcllib/patches/patch-installer_tcl

42 lines
1.3 KiB
Plaintext

$OpenBSD: patch-installer_tcl,v 1.1 2009/03/19 16:54:32 sthen Exp $
--- installer.tcl.orig Fri Dec 12 23:10:26 2008
+++ installer.tcl Sat Jan 17 05:58:53 2009
@@ -79,21 +79,29 @@ if {![package vsatisfies [package provide Tcl] 8.0]} {
puts $index "unset maindir"
puts $index ""
close $index
+ file attributes [file join $outdir pkgIndex.tcl] -owner root -group bin -permissions 0444
return
}
proc xcopyfile {src dest} {
# dest can be dir or file
run file copy -force $src $dest
+ if {[file isdirectory $dest]} {
+ set dest [file join $dest [file tail $src]]
+ }
+ file attributes $dest -owner root -group bin -permissions 0444
return
}
proc xcopy {src dest recurse {pattern *}} {
run file mkdir $dest
+ file attributes $dest -owner root -group bin -permissions 0755
if {[string equal $pattern *] || !$recurse} {
foreach file [glob [file join $src $pattern]] {
+ if {[file extension $file] eq ".orig"} { continue }
set base [file tail $file]
+ if {$base eq "ChangeLog"} { continue }
set sub [file join $dest $base]
if {0 == [string compare CVS $base]} {continue}
@@ -144,6 +152,7 @@ proc write_out {f text} {
catch {file delete -force $f}
puts -nonewline [set of [open $f w]] $text
close $of
+ file attributes $f -owner root -group bin -permissions 0444
}