Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fixes to make odie build with "gort" instead of "sherpa" |
|---|---|
| Timelines: | family | ancestors | descendants | both | gort |
| Files: | files | file ages | folders |
| SHA1: |
d0db26f6a002a1144133d21389ef37c6 |
| User & Date: | hypnotoad 2016-02-18 17:23:49 |
Context
|
2016-02-19
| ||
| 14:54 | Fixed a typo introduced by a global search and replace check-in: 4f2f9e391e user: hypnotoad tags: gort | |
|
2016-02-18
| ||
| 17:23 | Fixes to make odie build with "gort" instead of "sherpa" check-in: d0db26f6a0 user: hypnotoad tags: gort | |
| 16:10 | Restructuring "ODIE" as a one trick pony to manage Tcl and Kit builds, as well as perform whatever autoconfiguring a high level integtrator may need check-in: bc425bad42 user: hypnotoad tags: trunk | |
Changes
Changes to Makefile.
| ︙ | ︙ | |||
8 9 10 11 12 13 14 |
reconfig:
rm -f autosetup/jimsh0.exe autosetup/jimsh0
ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
${ODIE_BUILD_TCLSH} autosetup/autosetup $(ODIE_RECONFIG_OPTS)
cp -a ${ODIE_SRC_DIR}/odieConfig.tcl ${LOCAL_REPO}/lib/odieConfig.tcl
cp -a ${ODIE_SRC_DIR}/odieConfig.sh ${LOCAL_REPO}/lib/odieConfig.sh
| | | | | | | | | | | | | | | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
reconfig:
rm -f autosetup/jimsh0.exe autosetup/jimsh0
ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
${ODIE_BUILD_TCLSH} autosetup/autosetup $(ODIE_RECONFIG_OPTS)
cp -a ${ODIE_SRC_DIR}/odieConfig.tcl ${LOCAL_REPO}/lib/odieConfig.tcl
cp -a ${ODIE_SRC_DIR}/odieConfig.sh ${LOCAL_REPO}/lib/odieConfig.sh
install: gort
$(SHELL) scripts/make_skel.sh
$(SHELL) scripts/make_tcl.sh
ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
$(ODIE_BUILD_TCLSH) scripts/make_gort.tcl
$(GORT) upgrade sqlite odielib tcllib
${ODIE_BUILD_TCLSH} build.tcl toadkit
packages: gort
$(GORT) install sqlite odielib tcllib
upgrade:
$(FOSSIL) update
${ODIE_BUILD_TCLSH} scripts/upgrade.tcl
$(ODIE_BUILD_TCLSH) scripts/make_gort.tcl
$(GORT) upgrade sqlite odielib tcllib
${ODIE_BUILD_TCLSH} build.tcl toadkit
upgrade-tcl:
$(FOSSIL) update
$(SHELL) scripts/make_tcl.sh
ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
${ODIE_BUILD_TCLSH} scripts/upgrade.tcl
$(ODIE_BUILD_TCLSH) scripts/make_gort.tcl
$(GORT) upgrade sqlite odielib tcllib
${ODIE_BUILD_TCLSH} build.tcl clean
rm -rf tcl tk
${ODIE_BUILD_TCLSH} build.tcl toadkit
tcl:
$(SHELL) scripts/make_tcl.sh
rebuild:
$(SHELL) scripts/make_distclean.sh
$(FOSSIL) update
$(SHELL) scripts/make_tcl.sh
$(ODIE_BUILD_TCLSH) scripts/make_gort.tcl
$(GORT) upgrade sqlite odielib tcllib
${ODIE_BUILD_TCLSH} build.tcl toadkit
distclean:
$(SHELL) scripts/make_distclean.sh
basekit:
${ODIE_BUILD_TCLSH} build.tcl toadkit
gort: $ODIE_DOWNLOAD/gort/gort.tcl
$ODIE_DOWNLOAD/gort/gort.tcl:
$(ODIE_BUILD_TCLSH) scripts/make_gort.tcl
$(ODIE_MKHDR):
$(CC) -o mkhdr.o scripts/mkhdr.c
$(CC) mkhdr.o -o mkhdr${EXE_SUFFIX}
cp -f mkhdr@EXE@ $(ODIE_MKHDR)
mkhdr: $(ODIE_MKHDR)
mkdoc:
$(TCLSH) scripts/mkdoc.tcl
.PHONY: all binaries clean depend distclean doc install libraries test upgrade upgrade-tcl
.PHONY: core gort basekit odielib toadkit sqlite reconfig mkhdr packages
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|
Changes to auto.def.
| ︙ | ︙ | |||
86 87 88 89 90 91 92 |
foreach {program required domake} {
zip 1 0
unzip 1 0
tar 1 0
git 0 1
strip 0 0
mkhdr 0 1
| | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
foreach {program required domake} {
zip 1 0
unzip 1 0
tar 1 0
git 0 1
strip 0 0
mkhdr 0 1
gort 0 1
} {
if {$required} {
set exename [lindex [find-an-executable -required $program] 0]
} else {
set exename [lindex [find-an-executable $program] 0]
}
if {$domake && $exename eq {}} {
|
| ︙ | ︙ |
Changes to autosetup/lib/odie.tcl.
1 2 3 | # @synopsis: # # ODIE modules adds teacup platform data and integration with | | | 1 2 3 4 5 6 7 8 9 10 11 |
# @synopsis:
#
# ODIE modules adds teacup platform data and integration with
# gort
#
use system codebale
# Build procs for this modules
options {
nodots => "Suppress dots in version numbers in lib names"
pkgdir: => "Where to install the package (default $prefix/lib)"
|
| ︙ | ︙ | |||
551 552 553 554 555 556 557 |
set ::force_check 0
###
# Under MSYS/Cygwin transform the Cygwinized paths
# pack into proper names for Windows
###
foreach path {
sandbox download src_dir tcl_shell wish_shell build_tclsh
| | | 551 552 553 554 555 556 557 558 559 560 561 562 563 |
set ::force_check 0
###
# Under MSYS/Cygwin transform the Cygwinized paths
# pack into proper names for Windows
###
foreach path {
sandbox download src_dir tcl_shell wish_shell build_tclsh
fossil git zip unzip lib local_repo
} {
if {[info exists ::odie($path)]} {
set ::odie_build($path) [::realpath $::odie($path)]
}
}
|
Changes to build.tcl.
1 2 3 4 5 | ### # script to build a tclkit ### set HERE [file dirname [file normalize [info script]]] set PWD [pwd] | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
###
# script to build a tclkit
###
set HERE [file dirname [file normalize [info script]]]
set PWD [pwd]
namespace eval ::practcl {}
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]
if {[lindex $argv 0] eq "clean"} {
file delete -force build
file delete -force tcl
file delete -force tk
foreach file [glob -nocomplain *.a] {
file delete $file
}
exit
}
package require fileutil
proc ::cat fname {
set fname [open $fname r]
set data [read $fname]
close $fname
return $data
}
proc ::practcl::_isdirectory name {
return [file isdirectory $name]
}
###
# topic: ebd68484cb7f18cad38beaab3cf574e2de5702ea
###
proc ::practcl::_istcl name {
return [string match *.tcl $name]
}
###
# topic: 2e481bd24d970304a1dd0acad3d75198b56c122e
###
proc ::practcl::_istm name {
return [string match *.tm $name]
}
proc ::practcl::_pkgindex_special pkgidxfile {
set fin [open $pkgidxfile r]
set dat [read $fin]
close $fin
set thisline {}
foreach line [split $dat \n] {
append thisline $line \n
if {![info complete $thisline]} continue
set line [string trim $line]
if {[string length $line]==0} {
set thisline {} ; continue
}
if {[string index $line 0] eq "#"} {
set thisline {} ; continue
}
if {[lindex $line 0] != "package"} {return 1}
if {[lindex $line 1] != "ifneeded"} {return 1}
set thisline {}
}
return 0
}
proc ::practcl::pkgindex_path base {
set stack {}
set buffer {
lappend ::PATHSTACK $dir
}
set base [file normalize $base]
set i [string length $base]
# Build a list of all of the paths
set paths [fileutil::find $base ::practcl::_isdirectory]
foreach path $paths {
if {$path eq $base} continue
set path_indexed($path) 0
foreach idxname {pkgIndex.tcl} {
set idxfile [file join $path $idxname]
if {[file exists $idxfile] && [::practcl::_pkgindex_special $idxfile]} {
incr path_indexed($path)
set dir [string trimleft [string range $path $i end] /]
append buffer "set dir \[file join \[lindex \$::PATHSTACK end\] $dir\] \; source \[file join \[lindex \$::PATHSTACK end\] $dir $idxname\]"
append buffer \n
}
}
}
foreach path $paths {
if {$path_indexed($path)} continue
foreach file [glob -nocomplain $path/*.tm] {
set file [file normalize $file]
set fname [file rootname [file tail $file]]
###
# Assume the package is correct in the filename
###
set package [lindex [split $fname -] 0]
set version [lindex [split $fname -] 1]
set path [string trimleft [string range [file dirname $file] $i end] /]
###
# Read the file, and override assumptions as needed
###
set fin [open $file r]
set dat [read $fin]
close $fin
foreach line [split $dat \n] {
set line [string trim $line]
if { [string range $line 0 9] != "# Package " } continue
set package [lindex $line 2]
set version [lindex $line 3]
break
}
append buffer "package ifneeded $package $version \[list source \[file join \[lindex \$::PATHSTACK end\] $path [file tail $file]\]\]"
append buffer \n
}
foreach file [glob -nocomplain $path/*.tcl] {
set file [file normalize $file]
if { $file == [file join $base tcl8.6 package.tcl] } continue
if { $file == [file join $base packages.tcl] } continue
if { $file == [file join $base main.tcl] } continue
if { [file tail $file] == "version_info.tcl" } continue
set fin [open $file r]
set dat [read $fin]
close $fin
if {![regexp "package provide" $dat]} continue
set fname [file rootname [file tail $file]]
set dir [string trimleft [string range [file dirname $file] $i end] /]
foreach line [split $dat \n] {
set line [string trim $line]
if { [string range $line 0 14] != "package provide" } continue
set package [lindex $line 2]
set version [lindex $line 3]
append buffer "package ifneeded $package $version \[list source \[file join \[lindex \$::PATHSTACK end\] $dir [file tail $file]\]\]"
append buffer \n
break
}
}
}
append buffer {
set dir [lindex $::PATHSTACK end]
set ::PATHSTACK [lrange $::PATHSTACK 0 end-1]
}
return $buffer
}
###
# topic: 15c41a8a701fb2afdfbd8d479d464bda
###
proc ::pkgLibraryDir {root fout d1} {
puts [format {%*sIndexing %s} [expr {4 * [info level]}] {} [file tail $d1]]
set idx [string length $root]
foreach ftail [glob -directory $d1 -nocomplain -tails *] {
set f [file join $d1 $ftail]
if {[file isdirectory $f] && [string compare CVS $ftail]} {
pkgLibraryDir $root $fout $f
} elseif {[file tail $f] eq "pkgIndex.tcl"} {
puts $fout "set dir \${VFSROOT}[string range $d1 $idx end]"
puts $fout [cat $f]
}
}
}
|
| ︙ | ︙ | |||
79 80 81 82 83 84 85 |
proc ::COMPILE {which cfile {extras {}}} {
set objfile [file normalize build/[file tail [file dirname $cfile]]_[file rootname [file tail $cfile]].o]
lappend ::KIT(${which}_OBJS) $objfile
if {[file exists $objfile] && [file mtime $objfile] > [file mtime $cfile]} return
lappend cmd $::KIT(cc) {*}$::KIT(cflags_optimize) {*}$::KIT(shlib_cflags) {*}$::KIT(cflags_warning) {*}$::KIT(extra_cflags) {*}$::KIT(defs) {*}$extras
foreach path $::KIT(INCLUDES) {
| | | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
proc ::COMPILE {which cfile {extras {}}} {
set objfile [file normalize build/[file tail [file dirname $cfile]]_[file rootname [file tail $cfile]].o]
lappend ::KIT(${which}_OBJS) $objfile
if {[file exists $objfile] && [file mtime $objfile] > [file mtime $cfile]} return
lappend cmd $::KIT(cc) {*}$::KIT(cflags_optimize) {*}$::KIT(shlib_cflags) {*}$::KIT(cflags_warning) {*}$::KIT(extra_cflags) {*}$::KIT(defs) {*}$extras
foreach path $::KIT(INCLUDES) {
lappend cmd -I./[fileutil::relative $::PWD $path]
}
lappend cmd {*}$::KIT(EXTRA_CFLAGS)
lappend cmd -c [fileutil::relative $::PWD $cfile] -o $objfile
puts [list [file tail $cfile] -> [file tail $objfile]]
puts $cmd
exec {*}$cmd >&@ stdout
}
|
| ︙ | ︙ | |||
102 103 104 105 106 107 108 |
copyDir $f [file join $d2 $ftail]
} elseif {[file isfile $f]} {
file copy -force $f [file join $d2 $ftail]
}
}
}
| | | | | | | | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
copyDir $f [file join $d2 $ftail]
} elseif {[file isfile $f]} {
file copy -force $f [file join $d2 $ftail]
}
}
}
source [file join $::HERE odieConfig.tcl]
if { $::odie(platform) eq "windows" } {
set ::KIT(EXEEXT) .exe
} else {
set ::KIT(EXEEXT) {}
}
set fout [open [file join $PWD wrap.tcl] w]
puts $::fout [list set ::KIT(EXEEXT) $::KIT(EXEEXT)]
puts $::fout [list package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]]
puts $::fout "if {!\[file exists tclkit_bare\$::KIT(EXEEXT)\]} \{[list exec \[info nameofexecutable\] [info script] >&@ stdout]}"
puts $fout {
proc ::copyDir {d1 d2} {
file delete -force -- $d2
file mkdir $d2
foreach ftail [glob -directory $d1 -nocomplain -tails *] {
set f [file join $d1 $ftail]
if {[file isdirectory $f] && [string compare CVS $ftail]} {
copyDir $f [file join $d2 $ftail]
} elseif {[file isfile $f]} {
file copy -force $f [file join $d2 $ftail]
}
}
}
set name [lindex $argv 0]
set path [lindex $argv 1]
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
package require zipfile::mkzip
copyDir tclkit.vfs/boot $::HERE/boot
copyDir tclkit.vfs/lib $::HERE/lib
::zipfile::mkzip::mkzip ${name}$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory $::HERE
}
close $fout
puts "BUILDING ZipVFS KITS"
if {"toadkit" in $argv || ![file exists tclkit_bare$::KIT(EXEEXT)]} {
file mkdir build
file mkdir tclkit.vfs/boot
if {![file exists [file join $PWD tcl]]} {
copyDir $::odie_tcl(src_dir) [file join $PWD tcl]
cd [file join $PWD tcl $::odie(tcl_src_dir)]
catch {domake distclean}
}
|
| ︙ | ︙ | |||
223 224 225 226 227 228 229 | lappend ::KIT(INCLUDES) [file join $PWD tk xlib] lappend ::KIT(INCLUDES) [file join $PWD tcl generic] lappend ::KIT(INCLUDES) [file join $PWD tcl $::odie(tcl_src_dir)] #lappend ::KIT(INCLUDES) [file join $PWD tcl compat] lappend ::KIT(INCLUDES) [file join $PWD tcl compat zlib] | | | | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
lappend ::KIT(INCLUDES) [file join $PWD tk xlib]
lappend ::KIT(INCLUDES) [file join $PWD tcl generic]
lappend ::KIT(INCLUDES) [file join $PWD tcl $::odie(tcl_src_dir)]
#lappend ::KIT(INCLUDES) [file join $PWD tcl compat]
lappend ::KIT(INCLUDES) [file join $PWD tcl compat zlib]
lappend ::KIT(INCLUDES) [file join $::HERE generic]
lappend ::KIT(INCLUDES) [file join $::HERE $::odie(tcl_src_dir)]
if { $::odie(platform) eq "windows" } {
set ::KIT(EXEEXT) .exe
set ::KIT(LDFLAGS_CONSOLE) {-mconsole -pipe -static-libgcc}
set ::KIT(LDFLAGS_WINDOW) {-mwindows -pipe -static-libgcc}
set ::KIT(EXTRA_CFLAGS) {-DTCL_TOMMATH -DMP_PREC=4 -DUNICODE -D_UNICODE -DBUILD_tcl -DBUILD_tk -DBUILD_ttk}
lappend ::KIT(OBJS) [file join $PWD tk $::odie(tcl_src_dir) tk.res.o] [file join $PWD tk $::odie(tcl_src_dir) wish.res.o]
|
| ︙ | ︙ | |||
282 283 284 285 286 287 288 |
deflate.c infback.c inffast.c
inflate.c inftrees.c trees.c
uncompr.c zutil.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
}
| | | | 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
deflate.c infback.c inffast.c
inflate.c inftrees.c trees.c
uncompr.c zutil.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
}
set cdir [file join $::HERE generic]
foreach file {
password.c rc4.c tclkit_init.c zvfs.c zvfsboot.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
}
set cdir [file join $::HERE $::odie(tcl_src_dir)]
if { $::odie(platform) eq "windows" } {
# tkwinico.c tlink32.c
foreach file {
tclsh_packages.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
}
|
| ︙ | ︙ | |||
337 338 339 340 341 342 343 |
###
# Build a starter VFS for both Tcl and wish
###
set VFSROOT [file join $PWD tclkit.vfs]
set PKGROOT [file join $PWD tclkit.pkg]
foreach path [glob [file join $PWD tcl pkgs *]] {
| | | | | | | | > > | > > > > | | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
###
# Build a starter VFS for both Tcl and wish
###
set VFSROOT [file join $PWD tclkit.vfs]
set PKGROOT [file join $PWD tclkit.pkg]
foreach path [glob [file join $PWD tcl pkgs *]] {
if {[string range [file tail $::HERE] 0 3] eq "itcl"} continue
if {![file isdirectory $::HERE]} continue
cd $::HERE
puts "$::HERE"
if {![file exists $::HERE/Makefile]} {
if {[file exists $::HERE/Makefile.in]} {
doexec sh configure --with-tcl=$PWD/tcl/$::odie(tcl_src_dir) --with-tclinclude=$PWD/tcl/generic --with-tzdata --enable-shared --enable-threads
} else {
continue
}
}
puts "INSTALLING to VFS [file tail $::HERE]"
domake install DESTDIR=$PKGROOT
}
cd $PWD
if {[file exists $VFSROOT]} {
file delete -force $VFSROOT
}
copyDir $PKGROOT/usr/local/lib $VFSROOT/pkgs
if {[file exists $VFSROOT/pkgs/pkgIndex.tcl]} {
file delete $VFSROOT/pkgs/pkgIndex.tcl
}
set buffer [::practcl::pkgindex_path $VFSROOT/pkgs]
set fout [open $VFSROOT/pkgs/pkgIndex.tcl w]
puts $fout $buffer
close $fout
copyDir tcl/library $VFSROOT/boot/tcl
if { $::odie(platform) eq "windows" } {
set ddedll [glob -nocomplain tcl/win/tcldde*.dll]
if {$ddedll != {}} {
file copy $ddedll $VFSROOT/boot/tcl/dde
}
set regdll [glob -nocomplain tcl/win/tclreg*.dll]
|
| ︙ | ︙ | |||
387 388 389 390 391 392 393 |
set fout [open [file join $VFSROOT boot tcl tclIndex] a]
puts $fout {#
# MANIFEST OF INCLUDED PACKAGES
#
set VFSROOT $dir
}
| | > > > > > > | | | | | | | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
set fout [open [file join $VFSROOT boot tcl tclIndex] a]
puts $fout {#
# MANIFEST OF INCLUDED PACKAGES
#
set VFSROOT $dir
}
pkgLibraryDir tcl/library $fout [file join $VFSROOT boot tcl]
puts $fout {
if {[file exists [file join $VFSROOT pkgs pkgIndex.tcl]} {
set dir [file join $VFSROOT pkgs]
source [file join $VFSROOT pkgs pkgIndex.tcl]
}
}
close $fout
copyDir tk/library $VFSROOT/boot/tk
if { $::odie(platform) eq "windows" } {
set dllsrc tk/win/[string trim $::TK(dll_file) \"]
} else {
set dllsrc tk/unix/[string trim $::TK(dll_file) \"]
}
file copy -force $dllsrc [file join $VFSROOT BOOT tk]
set fout [open [file join $VFSROOT BOOT tcl tclIndex] a]
puts $fout [string map [list @TKVERSION@ $::TK(version)$::TK(patch_level) @TKDLL@ [string trim $::TK(dll_file) \"]] {
package ifneeded Tk @TKVERSION@ [list load $::tk_library/@TKDLL@ Tk]
}]
close $fout
}
cd $PWD
if {[lindex $argv 0] eq "toadkit"} {
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
puts [list AUTOPATH $::auto_path]
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]
package require zipfile::mkzip
#file copy -force [file join $::HERE default_tclsh.tcl] tclkit.vfs/main.tcl
::zipfile::mkzip::mkzip toadkit$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory tclkit.vfs
}
if {[lindex $argv 0] eq "wrap"} {
set name [lindex $argv 1]
set path [lindex $argv 2]
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
puts [list AUTOPATH $::auto_path]
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE mkzip.tcl]]
package require zipfile::mkzip
copyDir tclkit.vfs/boot $::HERE/boot
copyDir tclkit.vfs/lib $::HERE/lib
::zipfile::mkzip::mkzip ${name}$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory $::HERE
}
|
Changes to odieConfig.sh.in.
| ︙ | ︙ | |||
74 75 76 77 78 79 80 |
MKHDR=@MKHDR_PROG@
ZIP=@ZIP_PROG@
UNZIP=@UNZIP_PROG@
ODIE_RM=${ODIE_BUILD_TCLSH}
ODIE_RM+=${ODIE_SRC_DIR}/scripts/rmdir.tcl
SHERPA=${ODIE_BUILD_TCLSH}
| | > > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
MKHDR=@MKHDR_PROG@
ZIP=@ZIP_PROG@
UNZIP=@UNZIP_PROG@
ODIE_RM=${ODIE_BUILD_TCLSH}
ODIE_RM+=${ODIE_SRC_DIR}/scripts/rmdir.tcl
SHERPA=${ODIE_BUILD_TCLSH}
SHERPA+=@ODIE_SANDBOX_PATH@/gort/gort.tcl
GORT=${ODIE_BUILD_TCLSH}
GORT+=@ODIE_SANDBOX_PATH@/gort/gort.tcl
KETTLE=${ODIE_BUILD_TCLSH}
KETTLE+=${exec_prefix}/bin/kettle
###
# Bits generated by autosetup
###
|
Changes to odieConfig.tcl.in.
| ︙ | ︙ | |||
65 66 67 68 69 70 71 |
fossil "@FOSSIL_PROG@"
tcl_shell "@TCLSH_PROG@"
wish_shell "@WISH_PROG@"
zzetup "${exec_prefix}/bin/zzipsetupstub@EXEEXT@"
wish_kit "@TKKIT_PROG@"
tcl_kit "@TCLKIT_PROG@"
toad_kit "@TOADKIT_PROG@"
| > | | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
fossil "@FOSSIL_PROG@"
tcl_shell "@TCLSH_PROG@"
wish_shell "@WISH_PROG@"
zzetup "${exec_prefix}/bin/zzipsetupstub@EXEEXT@"
wish_kit "@TKKIT_PROG@"
tcl_kit "@TCLKIT_PROG@"
toad_kit "@TOADKIT_PROG@"
gort "@ODIE_BUILD_TCLSH@ @ODIE_SANDBOX_PATH@/gort/gort.tcl"
sherpa "@ODIE_BUILD_TCLSH@ @ODIE_SANDBOX_PATH@/gort/gort.tcl"
kettle "${exec_prefix}/bin/kettle"
zip_kit "${exec_prefix}/bin/zipkit.zip"
lib "$prefix/lib"
rc "@RC@"
res "@RES@"
tk_res "@TK_RES@"
vfs_cp "@VFS_CP@"
|
| ︙ | ︙ |
Changes to scripts/common.tcl.
| ︙ | ︙ | |||
27 28 29 30 31 32 33 |
core.tcl formatting.tcl getopt.tcl misc.tcl
} {
source [file join $::autosetup(libdir) $file]
}
proc ::noop args {}
| | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
core.tcl formatting.tcl getopt.tcl misc.tcl
} {
source [file join $::autosetup(libdir) $file]
}
proc ::noop args {}
namespace eval ::gort_bootstrap {}
proc ::gort_bootstrap::download_fossil {pkg} {
variable distribution
set PKG_SRCPATH [sandbox_path $pkg]
set fosdb [fossil_db $pkg]
if {![file exists $fosdb]} {
puts "Fossil clone $pkg"
set fossil_url {}
if {[dict exists $distribution $pkg fossil_url]} {
|
| ︙ | ︙ | |||
60 61 62 63 64 65 66 |
doexec $::odie(fossil) update [dict get $distribution $pkg fossil_branch]
} else {
doexec $::odie(fossil) update
}
return ${PKG_SRCPATH}
}
| | | | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
doexec $::odie(fossil) update [dict get $distribution $pkg fossil_branch]
} else {
doexec $::odie(fossil) update
}
return ${PKG_SRCPATH}
}
proc ::gort_bootstrap::fossil_db pkg {
if {[file exists [file join $::odie(download) $pkg.fossil]]} {
return [file join $::odie(download) $pkg.fossil]
}
return [file join $::odie(download) $pkg.fos]
}
proc ::gort_bootstrap::sandbox_path pkg {
return [file join $::odie(sandbox) $pkg]
}
proc ::gort_bootstrap::build_gnumake {pkg action} {
puts "BUILD GNUMAKE $pkg $action"
if {$action eq "install"} {
set PKG_SRCPATH [sandbox_path $pkg]
cd ${PKG_SRCPATH}
doexec $::odie(fossil) update
set args [list --prefix=$::odie(local_repo)]
if {$::odie(host) != $::odie(target)} {
|
| ︙ | ︙ | |||
106 107 108 109 110 111 112 |
} err] {
puts "Died on $err"
exit 1
}
}
}
| | | | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
} err] {
puts "Died on $err"
exit 1
}
}
}
proc ::gort_bootstrap::build_sak {pkg action} {
if {$action eq "install"} {
set PKG_SRCPATH [sandbox_path $pkg]
doexec $::odie(build_tclsh) [file join $PKG_SRCPATH installer.tcl] \
-app-path $::odie(prefix)/bin -pkg-path $::odie(prefix)/lib/$pkg \
-no-examples -no-nroff -no-html \
-no-wait -no-gui
}
}
proc ::gort_bootstrap::build_kettle {pkg action} {
set PKG_SRCPATH [sandbox_path $pkg]
if {$pkg eq "kettle"} {
doexec $::odie(build_tclsh) [file join $PKG_SRCPATH kettle] -f [file join $PKG_SRCPATH build.tcl] $action
} else {
doexec $::odie(build_tclsh) $::odie(kettle) -f [file join $PKG_SRCPATH build.tcl] $action
}
}
proc ::gort_bootstrap::build_sqlite {pkg action} {
###
# Sqlite
###
puts "INSTALLING SQLITE"
set SQLITE_VERSION 3.8.7.2
set SQLITE_TFNAME sqlite-autoconf-3080704
set SQLITE_SRCPATH $::odie(sandbox)/sqlite
|
| ︙ | ︙ | |||
154 155 156 157 158 159 160 |
cd ${SQLITE_SRCPATH}/tea
if {![file exists ${SQLITE_SRCPATH}/tea/Makefile]} {
doexec sh ./configure --prefix=[::cygpath $::odie(local_repo)] --libdir=[::cygpath $::odie(local_repo)/lib] --host=$::odie(host)
}
doexec make install
}
| | | | | | | | | | | | | | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
cd ${SQLITE_SRCPATH}/tea
if {![file exists ${SQLITE_SRCPATH}/tea/Makefile]} {
doexec sh ./configure --prefix=[::cygpath $::odie(local_repo)] --libdir=[::cygpath $::odie(local_repo)/lib] --host=$::odie(host)
}
doexec make install
}
proc ::gort_bootstrap::install_package package {
variable distribution
set pkginfo [dict get $distribution $package]
puts [list $package $pkginfo]
set download [dict get $pkginfo get_proc]
$download $package
set build [dict get $pkginfo build_proc]
$build $package install
}
proc ::gort_bootstrap::distribution {name properties} {
variable distribution
foreach {field value} $properties {
dict set distribution $name $field $value
}
if {![dict exists $distribution $name get_proc]} {
dict set distribution $name get_proc ::noop
}
if {![dict exists $distribution $name build_proc]} {
dict set distribution $name build_proc ::noop
}
}
::gort_bootstrap::distribution sqlite {
get_proc ::noop
build_proc build_sqlite
#build_proc ::noop
}
if {!$::odie(windows)} {
::gort_bootstrap::distribution tclx {
get_proc download_fossil
build_proc build_gnumake
}
if 0 {
::gort_bootstrap::distribution kettle {
get_proc download_fossil
requires {tclx tcllib tklib}
build_proc build_kettle
}
}
}
::gort_bootstrap::distribution tclvfs {
get_proc download_fossil
requires tcllib
build_proc build_gnumake
}
::gort_bootstrap::distribution taolib {
get_proc download_fossil
requires {sqlite tcllib tklib}
build_proc build_sak
}
::gort_bootstrap::distribution tcllib {
get_proc download_fossil
fossil_branch odie
build_proc build_sak
}
::gort_bootstrap::distribution tklib {
get_proc download_fossil
requires tcllib
build_proc build_sak
}
::gort_bootstrap::distribution odielib {
get_proc download_fossil
fossil_branch autosetup
requires {tcllib sqlite}
build_proc build_gnumake
}
::gort_bootstrap::distribution gort {
get_proc download_fossil
fossil_branch trunk
requires {tcllib odielib taolib sqlite}
build_proc build_gnumake
}
proc ::doexec args {
exec {*}$args >&@ stdout
}
###
# Make sure the odielib toolkit is downloaded
###
if {![file exists [file join $::odie(sandbox) odielib modules odie index.tcl]]} {
::gort_bootstrap::download_fossil odielib
}
source [file join $path .. odielib modules odie index.tcl]
source [file join $path .. odielib modules cmdline cmdline.tcl]
source [file join $path .. odielib modules fileutil index.tcl]
source [file join $path .. odielib modules codebale index.tcl]
#::gort_bootstrap::distribution gort {
# get_proc download_fossil
# requires {taolib tcllib odielib kettle}
# build_proc build_kettle
#}
|
Name change from scripts/sherpa.tcl to scripts/gort.tcl.
1 2 3 4 5 6 7 8 | #!/bin/sh # Copyright (c) 2006-2011 WorkWare Systems http://www.workware.net.au/ # All rights reserved # vim:se syntax=tcl: # \ dir=`dirname "$0"`; exec "`$dir/../autosetup/find-tclsh`" "$0" "$@" ### | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#!/bin/sh
# Copyright (c) 2006-2011 WorkWare Systems http://www.workware.net.au/
# All rights reserved
# vim:se syntax=tcl:
# \
dir=`dirname "$0"`; exec "`$dir/../autosetup/find-tclsh`" "$0" "$@"
###
# Micronized version of gort for bootstrapping Odie
###
set path [file normalize [file join [file dirname [file normalize [info script]]] ..]]
source [file join $path scripts common.tcl]
namespace eval ::command {}
proc ::command::help {} {
foreach command [lsort -dictionary [info command ::command::*]] {
puts " * [namespace tail $command]"
}
}
proc ::command::package-list {} {
foreach distro [lsort -dictionary [dict keys $::gort_bootstrap::distribution]] {
puts " * $distro"
}
}
proc ::command::install {package} {
if {$package eq "all"} {
install-all
return
}
::gort_bootstrap::install_package $package
}
proc ::command::install-all {} {
set info $::gort_bootstrap::distribution
set allpkgs [lsort -dictionary [dict keys $info]]
set installed {}
foreach item $allpkgs {
if {[dict exists $info $item requires]} {
set requires($item) [dict get $info $item requires]
} else {
set requires($item) {}
|
| ︙ | ︙ | |||
62 63 64 65 66 67 68 |
lappend installed $item
}
}
foreach item $installed {
puts "INSTALLING $item"
}
foreach item $installed {
| | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
lappend installed $item
}
}
foreach item $installed {
puts "INSTALLING $item"
}
foreach item $installed {
::gort_bootstrap::install_package $item
}
}
set method [lindex $argv 0]
if { [info command ::command::$method] eq {} } {
puts stderr "Invalid command: $method."
::command::help
exit 1
}
::command::$method {*}[lrange $argv 1 end]
update
exit 0
|
Changes to scripts/make_distclean.sh.
| ︙ | ︙ | |||
10 11 12 13 14 15 16 |
cd ${ODIE_SANDBOX_PATH}/tcl/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/tk/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/tcl-static/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/tk-static/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/sqlite/tea ; make distclean
cd ${ODIE_SANDBOX_PATH}/tclvfs ; make distclean
cd ${ODIE_SANDBOX_PATH}/tcllib ; make distclean
| | < < < | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
cd ${ODIE_SANDBOX_PATH}/tcl/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/tk/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/tcl-static/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/tk-static/${ODIE_TCL_PLATFORM_DIR} ; make distclean
cd ${ODIE_SANDBOX_PATH}/sqlite/tea ; make distclean
cd ${ODIE_SANDBOX_PATH}/tclvfs ; make distclean
cd ${ODIE_SANDBOX_PATH}/tcllib ; make distclean
cd ${ODIE_SRC_DIR} ; ${ODIE_BUILD_TCLSH} build.tcl clean
find ${ODIE_SRC_DIR} -type d -iname "*.vfs" -exec rm {} \;
if [ ! -f "odieConfig.sh" ]; then
rm odieConfig.sh
fi
if [ ! -f "odieConfig.tcl" ]; then
|
| ︙ | ︙ |
Name change from scripts/make_sherpa.tcl to scripts/make_gort.tcl.
| ︙ | ︙ | |||
27 28 29 30 31 32 33 |
}
cd ${PKG_SRCPATH}
doexec $::odie(fossil) update $tag
return ${PKG_SRCPATH}
}
get_distro tcllib odie
| | | | | < < | | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
}
cd ${PKG_SRCPATH}
doexec $::odie(fossil) update $tag
return ${PKG_SRCPATH}
}
get_distro tcllib odie
get_distro gort trunk
###
# Build supporting libraries needed by Gort
##
file mkdir $::odie(prefix)/bin
# Rebuild gort
set GORT_SRCPATH $::odie(src_dir)/../gort
if {$::tcl_platform(platform) eq "windows"} {
file copy -force ${GORT_SRCPATH}/gort.tcl $::odie(prefix)/bin/gort.tcl
} else {
file delete $::odie(prefix)/bin/gort
file link -symbolic $::odie(prefix)/bin/gort ${GORT_SRCPATH}/gort.tcl
}
|
Changes to scripts/mkdoc.tcl.
|
| < < < < < | 1 2 3 4 5 6 7 |
source [file join [file dirname [file normalize [info script]]] common.tcl]
package require codebale
::codebale::mkdoc_embedded_html $::odielib(srcroot) $::odielib(modules) [file join $::odielib(srcroot) autodoc] \
-nav {Odie Home} /fossil/odie/home \
-o /var/www/odie/docs
|
| ︙ | ︙ |
Changes to scripts/upload.tcl.
| ︙ | ︙ | |||
58 59 60 61 62 63 64 |
puts $fout "<TABLE>"
puts $fout "<tr><th colspan=2>Self contained executables</th></tr>"
if {[file exists $::odie(wish_kit)]} {
upload $fout $::odie(wish_kit) ${server} $path "Base kit with tk"
}
upload $fout $::odie(tcl_kit) ${server} $path "Base kit with no tk"
upload $fout $::odie(zip_kit) ${server} $path "Sourceable Zipfile"
| | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
puts $fout "<TABLE>"
puts $fout "<tr><th colspan=2>Self contained executables</th></tr>"
if {[file exists $::odie(wish_kit)]} {
upload $fout $::odie(wish_kit) ${server} $path "Base kit with tk"
}
upload $fout $::odie(tcl_kit) ${server} $path "Base kit with no tk"
upload $fout $::odie(zip_kit) ${server} $path "Sourceable Zipfile"
upload $fout $::odie(gort) ${server} $path "The Gort package manager"
puts $fout "<tr><th colspan=2>Config Files</th></tr>"
upload $fout $here/../odieConfig.sh ${server} $path "Odie Configuration Paramters (sh readable)"
upload $fout $here/../odieConfig.tcl ${server} $path "Odie Configuration Paramters (tcl readable)"
upload $fout ${exec_prefix}/lib/tclConfig.sh ${server} $path "Tcl Configuration Paramters (sh readable)"
upload $fout ${exec_prefix}/lib/tkConfig.sh ${server} $path "Tk Configuration Paramters (sh readable)"
puts $fout "<tr><th colspan=2>Packages</th></tr>"
upload $fout $::odie(toad_kit) ${server} $path "Batteries included binary"
|
| ︙ | ︙ |