@ -132,6 +132,16 @@ file mkdir $stage
set env( FOSSIL_HOME ) $stage
set env( FOSSIL_HOME ) $stage
file mkdir $fossildir
file mkdir $fossildir
# H e r m e t i c c h i l d s h e l l s : t h e s u i t e - b u i l t t c l s h m u s t n o t s e e t h e u s e r ' s m a c h i n e - l e v e l
# p a c k a g e p a t h s ( T C L L I B P A T H p u s h e d e . g C : / T C L P K G S i n t o t c l _ p k g P a t h h e r e - m i s d i r e c t i n g
# i n s t a l l e r d e f a u l t p a t h s a n d r i s k i n g f a l s e - p o s i t i v e s m o k e s v i a m a c h i n e p a c k a g e s ) .
foreach ev { TCLLIBPATH TCL_LIBRARY TK_LIBRARY} {
if { [ info exists env( $ev ) ] } {
log " u n s e t t i n g i n h e r i t e d \$ e n v ( $ e v ) f o r h e r m e t i c c h i l d s h e l l s "
unset env( $ev )
}
}
proc fossil_source { name url branch dir} {
proc fossil_source { name url branch dir} {
# e n s u r e < s t o r e > / < n a m e > . f o s s i l e x i s t s ( r e a d - o n l y s e e d c o p y , e l s e n e t w o r k c l o n e ) a n d
# e n s u r e < s t o r e > / < n a m e > . f o s s i l e x i s t s ( r e a d - o n l y s e e d c o p y , e l s e n e t w o r k c l o n e ) a n d
# o p e n i t a t b r a n c h i n d i r
# o p e n i t a t b r a n c h i n d i r
@ -295,11 +305,20 @@ foreach {label path script} [list \
# g e n e r a t i o n o f t h e a g g r e g a t i n g p k g I n d e x . t c l ( g e n _ m a i n _ i n d e x ) . R u n i t i n b a t c h m o d e
# g e n e r a t i o n o f t h e a g g r e g a t i n g p k g I n d e x . t c l ( g e n _ m a i n _ i n d e x ) . R u n i t i n b a t c h m o d e
# ( p a c k a g e s o n l y ) w i t h t h e s u i t e - b u i l t s h e l l ; d e f a u l t p a t h s d e r i v e f r o m t h a t s h e l l ,
# ( p a c k a g e s o n l y ) w i t h t h e s u i t e - b u i l t s h e l l ; d e f a u l t p a t h s d e r i v e f r o m t h a t s h e l l ,
# l a n d i n g t h e p a c k a g e s u n d e r < o u t > / l i b / < t k l i b - v e r s i o n - d i r > .
# l a n d i n g t h e p a c k a g e s u n d e r < o u t > / l i b / < t k l i b - v e r s i o n - d i r > .
proc installer_version { dir } {
# t c l l i b - f a m i l y : s u p p o r t / i n s t a l l a t i o n / v e r s i o n . t c l c a r r i e s ' p a c k a g e _ v e r s i o n < v > '
set f [ open [ file join $dir support installation version.tcl] r]
set data [ read $f ] ; close $f
if { ! [ regexp { package_version \ s+ ( \ S + ) } $data - > v] } { error " n o p a c k a g e _ v e r s i o n i n $ d i r " }
return $v
}
if { ! [ llength [ glob - nocomplain [ file join $stage out lib tklib* ] ] ] } {
if { ! [ llength [ glob - nocomplain [ file join $stage out lib tklib* ] ] ] } {
log " i n s t a l l i n g t k l i b ( b a t c h , p a c k a g e s o n l y ) v i a i t s o w n i n s t a l l e r "
set tklibver [ installer_version [ file join $stage tklib] ]
log " i n s t a l l i n g t k l i b $ t k l i b v e r ( b a t c h , p a c k a g e s o n l y ) v i a i t s o w n i n s t a l l e r "
set savedpwd [ pwd ]
set savedpwd [ pwd ]
cd [ file join $stage tklib]
cd [ file join $stage tklib]
run $exe installer.tcl - no-gui - no-wait - pkgs - no-apps - no-html - no-nroff - no-examples
run $exe installer.tcl - no-gui - no-wait - no-apps - no-html - no-nroff - no-examples \
-pkg-path [ file join $stage out lib tklib$tklibver ]
cd $savedpwd
cd $savedpwd
}
}
set tkliblanded [ glob - nocomplain [ file join $stage out lib tklib* ] ]
set tkliblanded [ glob - nocomplain [ file join $stage out lib tklib* ] ]
@ -307,4 +326,69 @@ if {![llength $tkliblanded]} {fail "tklib install did not land under [file join
set tksmoke [ exec $exe << { package require Tk; wm withdraw .; puts " t o o l t i p : [ p a c k a g e r e q u i r e t o o l t i p ] " ; destroy .; exit } ]
set tksmoke [ exec $exe << { package require Tk; wm withdraw .; puts " t o o l t i p : [ p a c k a g e r e q u i r e t o o l t i p ] " ; destroy .; exit } ]
log " t k l i b : [ f i l e t a i l [ l i n d e x $ t k l i b l a n d e d 0 ] ] i n s t a l l e d ; s m o k e $ t k s m o k e "
log " t k l i b : [ f i l e t a i l [ l i n d e x $ t k l i b l a n d e d 0 ] ] i n s t a l l e d ; s m o k e $ t k s m o k e "
# - - t c l l i b i n s t a l l ( G - 0 9 8 ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# S a m e i n s t a l l e r f a m i l y a s t k l i b ( m o d u l e e x c l u s i o n s + a g g r e g a t i n g p k g I n d e x ; c r i t c l D S L
# s t u b b e d t o n o - o p s , s o t h i s i s t h e P U R E - T C L s i d e o n l y - t h e c r i t c l - b u i l t t c l l i b c
# a c c e l e r a t o r s a r e a s e p a r a t e s t e p ) . B a t c h , p a c k a g e s o n l y , s u i t e - b u i l t s h e l l .
if { ! [ llength [ glob - nocomplain [ file join $stage out lib tcllib* ] ] ] } {
set tcllibver [ installer_version [ file join $stage tcllib] ]
log " i n s t a l l i n g t c l l i b $ t c l l i b v e r ( b a t c h , p a c k a g e s o n l y , p u r e - t c l s i d e ) v i a i t s o w n i n s t a l l e r "
set savedpwd [ pwd ]
cd [ file join $stage tcllib]
run $exe installer.tcl - no-gui - no-wait - no-apps - no-html - no-nroff - no-examples \
-pkg-path [ file join $stage out lib tcllib$tcllibver ]
cd $savedpwd
}
set tclliblanded [ glob - nocomplain [ file join $stage out lib tcllib* ] ]
if { ! [ llength $tclliblanded ] } { fail " t c l l i b i n s t a l l d i d n o t l a n d u n d e r [ f i l e j o i n $ s t a g e o u t l i b ] " }
set tcllibsmoke [ exec $exe << { puts " m d 5 : [ p a c k a g e r e q u i r e m d 5 ] s h a 1 : [ p a c k a g e r e q u i r e s h a 1 ] c m d l i n e : [ p a c k a g e r e q u i r e c m d l i n e ] " ; exit } ]
log " t c l l i b : [ f i l e t a i l [ l i n d e x $ t c l l i b l a n d e d 0 ] ] i n s t a l l e d ; s m o k e $ t c l l i b s m o k e "
# - - t c l l i b c a c c e l e r a t o r s v i a c r i t c l + z i g c c ( G - 0 9 8 ) - - - - - - - - - - - - - - - - - - - - - - -
# s a k . t c l ' s c r i t c l t a r g e t e x p e c t s a t c l k i t s h + s t a r k i t o n w i n d o w s ; w e r e p l i c a t e i t s
# u n d e r l y i n g i n v o c a t i o n d i r e c t l y ( c r i t c l - c a c h e . . . - f o r c e - l i b d i r < d e s t > - p k g t c l l i b c
# < m o d u l e c r i t c l f i l e s > ) u s i n g t h e c r i t c l s o u r c e c h e c k o u t ' s m a i n . t c l a p p u n d e r t h e
# s u i t e s h e l l , w i t h t h e s u i t e ' s z i g o n P A T H a n d t h e t r a c k e d c r i t c l _ z i g . c o n f i g .
set critcldir [ file join $stage critcl]
set critclpin 3.3 .1
if { ! [ file isdirectory [ file join $critcldir .git] ] } {
log " c l o n i n g c r i t c l ( g i t ) - > $ c r i t c l d i r "
run git clone - - quiet https:/ / github.com/ andreas-kupries/ critcl $critcldir
}
run git - C $critcldir checkout - - quiet $critclpin
if { ! [ llength [ glob - nocomplain [ file join $stage out lib tcllibc* ] ] ] } {
# m o d u l e l i s t f r o m t c l l i b ' s o w n d e c l a r a t i o n s ( s u p p o r t / i n s t a l l a t i o n / v e r s i o n . t c l ) :
# c r i t c l _ m a i n ' s f i l e f i r s t , t h e n e v e r y c r i t c l m o d u l e ' s f i l e s ( s a k . t c l s e m a n t i c s )
set f [ open [ file join $stage tcllib support installation version.tcl] r]
set vdata [ read $f ] ; close $f
set mainfiles { }
set modfiles { }
foreach line [ split $vdata \ n] {
if { [ regexp { ^ critcl_main \ s+ \ S+ \ s+ ( . + ) $ } $line - > flist] } {
foreach ff [ concat { * } $flist ] { lappend mainfiles $ff }
} elseif { [ regexp { ^ critcl \ s+ \ S+ \ s+ ( . + ) $ } $line - > flist] } {
foreach ff [ concat { * } $flist ] { lappend modfiles $ff }
}
}
if { ! [ llength $mainfiles ] } { fail " n o c r i t c l _ m a i n d e c l a r a t i o n f o u n d i n t c l l i b v e r s i o n . t c l " }
set critclfiles { }
foreach ff [ concat $mainfiles $modfiles ] {
lappend critclfiles [ file join $stage tcllib modules $ff ]
}
log " b u i l d i n g t c l l i b c v i a c r i t c l $ c r i t c l p i n + z i g c c ( [ l l e n g t h $ c r i t c l f i l e s ] c r i t c l f i l e s ) "
set zigdir [ file dirname $opt ( -zig ) ]
set savedpath $env ( PATH )
set env( PATH ) " [ f i l e n a t i v e n a m e $ z i g d i r ] ; $ e n v ( P A T H ) "
set savedpwd [ pwd ]
cd [ file join $stage tcllib]
run $exe [ file join $critcldir main.tcl] \
-config [ file join $suiteroot critcl_zig.config] \
-cache [ file join $stage .critcl] - force \
-libdir [ file join $stage out lib] - pkg tcllibc { * } $critclfiles
cd $savedpwd
set env( PATH ) $savedpath
}
set tcllibcsmoke [ exec $exe << { puts " t c l l i b c : [ p a c k a g e r e q u i r e t c l l i b c ] " ; package require md5; puts " m d 5 - c r i t c l - a c c e l : $ : : m d 5 : : a c c e l ( c r i t c l ) " ; exit } ]
log " t c l l i b c : $ t c l l i b c s m o k e "
log " P A S S - b u i l t $ p a t c h l e v e l ( c h e c k o u t [ s t r i n g r a n g e $ u u i d 0 1 1 ] . . . , z i g $ z i g v ) - > $ s t a g e / o u t "
log " P A S S - b u i l t $ p a t c h l e v e l ( c h e c k o u t [ s t r i n g r a n g e $ u u i d 0 1 1 ] . . . , z i g $ z i g v ) - > $ s t a g e / o u t "