Browse Source
suite_tcl90: critcl_zig.config gains the linux-x86_64-zig cross target (zig cc -target x86_64-linux-gnu.2.17 - the dynamic-glibc floor decision, recorded in the goal file and fed to G-105). build905.zig gains the tcllibc-linux step (critcl driver on the windows suite shell, stubs linkage, no linux host; uuid.tcl excluded matching upstream's own native-linux package shape) gated by the new tools/elf_gate.tcl (G-133-equivalent ELF64/LSB/ET_DYN/x86_64 structural check - the load-smoke stand-in for cross lanes). library-artifacts emits lib/linux-x86_64/tcllibc-tcl9-r<N>.zip in the same run: target = linux-x86_64, build_host_platform = win32-x86_64, full provenance set, deliberately no [tests] section. build_id seeds now include the tier path so same-named artifacts in different target tiers get distinct identity digests (both suites' tool copies kept byte-identical). Step lists (build905.zig -Dsteps default, suite.tcl) and README document the lane and invocation. Consumption: libpackages.toml declares tcllibc-tcl9-linux (target linux-x86_64); vendorlib_vfs.toml install.tcllibc_tcl9_linux switches punk9linux.vfs/lib_tcl9 - replace retires the hand-dropped tcllibc, supersedes removes the stray tcllibc2.0 - so the last provenance-less accelerator hand-drops in any kit payload are gone. punkshell902 baked (G-133 payload arch scan: 6/6 match target linux-x86_64) and WSL-verified: materialized-tier accel smoke plus baked-kit smokes (default paths + a pinned variant proving the kit's own lib_tcl9 artifact tree loads with the accelerator engaged). Finding recorded: the tclkit-902 runtime bundles its own lib/tcllibc2.0 which wins default precedence - the origin of the retired stray folder name. Determinism: back-to-back re-emission byte-identical for all three artifacts; the zig Run session-env cache finding extended (FOSSIL_HOME and invocation mode churn the key; the linux ELF .so observed bit-stable across critcl re-runs, unlike the windows PE). Goal flipped achieved with evidence in the detail file; G-105 notes carry the libc decision as prior art. Docs: buildsuites AGENTS.md child index, ARCHITECTURE.md buildsuites paragraph, CHANGELOG + punkproject 0.32.2. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.commaster
28 changed files with 966 additions and 860 deletions
@ -1,4 +1,4 @@ |
|||||||
[project] |
[project] |
||||||
name = "punkshell" |
name = "punkshell" |
||||||
version = "0.32.1" |
version = "0.32.2" |
||||||
license = "BSD-2-Clause" |
license = "BSD-2-Clause" |
||||||
|
|||||||
@ -0,0 +1,93 @@ |
|||||||
|
#elf_gate.tcl (G-140): structural gate for cross-built ELF shared libraries on a |
||||||
|
#build host that cannot dlopen them (a linux .so on windows) - the load-smoke |
||||||
|
#stand-in for cross lanes; functional verification happens out-of-band on a |
||||||
|
#matching host (WSL/native-linux accelerator smokes, recorded in the goal file). |
||||||
|
# |
||||||
|
#The checks mirror the G-133 classifier's ELF branch (punkboot::utils |
||||||
|
#binary_arch_classify: ELF magic, EI_CLASS, EI_DATA, e_machine honouring |
||||||
|
#endianness) plus e_type == ET_DYN - a dlopen'd extension must be a shared |
||||||
|
#object. Self-contained plain Tcl (suite tools run under the suite-built shell, |
||||||
|
#no punkshell modules). |
||||||
|
# |
||||||
|
#args: -root <dir> scanned recursively for *.so / *.so.N members; at least |
||||||
|
# one member is required (an empty tree means the cross |
||||||
|
# build produced nothing - a failure, not a pass) |
||||||
|
# -expect <arch> required architecture: x86_64 | arm64 | i386 |
||||||
|
#exit 0: every member classifies as ELF64 LSB ET_DYN <arch>; exit 1 otherwise |
||||||
|
|
||||||
|
proc fail {msg} {puts stderr "elf_gate FAIL: $msg"; flush stderr; exit 1} |
||||||
|
proc note {msg} {puts stdout "elf_gate: $msg"; flush stdout} |
||||||
|
|
||||||
|
array set opt {-root {} -expect x86_64} |
||||||
|
foreach {k v} $argv { |
||||||
|
if {![info exists opt($k)]} {fail "unknown option '$k'"} |
||||||
|
set opt($k) $v |
||||||
|
} |
||||||
|
if {$opt(-root) eq ""} {fail "missing required option -root"} |
||||||
|
set root [file normalize $opt(-root)] |
||||||
|
if {![file isdirectory $root]} {fail "-root directory not found: $root"} |
||||||
|
|
||||||
|
#e_machine values per the G-133 classifier map (subset; extend as cross lanes appear) |
||||||
|
array set machine_of {x86_64 62 arm64 183 i386 3} |
||||||
|
if {![info exists machine_of($opt(-expect))]} { |
||||||
|
fail "-expect '$opt(-expect)' not one of: [lsort [array names machine_of]]" |
||||||
|
} |
||||||
|
set want $machine_of($opt(-expect)) |
||||||
|
|
||||||
|
proc so_files {dir} { |
||||||
|
set res {} |
||||||
|
foreach f [lsort [glob -nocomplain -directory $dir -types f *]] { |
||||||
|
set tail [file tail $f] |
||||||
|
if {[string match *.so $tail] || [regexp {\.so\.[0-9]} $tail]} { |
||||||
|
lappend res $f |
||||||
|
} |
||||||
|
} |
||||||
|
foreach d [lsort [glob -nocomplain -directory $dir -types d *]] { |
||||||
|
lappend res {*}[so_files $d] |
||||||
|
} |
||||||
|
return $res |
||||||
|
} |
||||||
|
|
||||||
|
set sofiles [so_files $root] |
||||||
|
if {![llength $sofiles]} {fail "no .so members found under $root"} |
||||||
|
|
||||||
|
set failures {} |
||||||
|
foreach so $sofiles { |
||||||
|
set rel [string range $so [string length $root]+1 end] |
||||||
|
set fd [open $so r] |
||||||
|
chan configure $fd -translation binary |
||||||
|
set head [read $fd 20] |
||||||
|
close $fd |
||||||
|
if {[string length $head] < 20} { |
||||||
|
lappend failures "$rel: too short for an ELF header ([string length $head] bytes)" |
||||||
|
continue |
||||||
|
} |
||||||
|
binary scan $head a4cucu magic eclass edata |
||||||
|
if {$magic ne "\x7fELF"} { |
||||||
|
lappend failures "$rel: not ELF (magic [binary encode hex [string range $head 0 3]])" |
||||||
|
continue |
||||||
|
} |
||||||
|
if {$eclass != 2} { |
||||||
|
lappend failures "$rel: EI_CLASS $eclass (want 2 = ELF64)" |
||||||
|
continue |
||||||
|
} |
||||||
|
if {$edata != 1} { |
||||||
|
lappend failures "$rel: EI_DATA $edata (want 1 = little-endian)" |
||||||
|
continue |
||||||
|
} |
||||||
|
binary scan $head @16susu etype emachine |
||||||
|
if {$etype != 3} { |
||||||
|
lappend failures "$rel: e_type $etype (want 3 = ET_DYN shared object)" |
||||||
|
continue |
||||||
|
} |
||||||
|
if {$emachine != $want} { |
||||||
|
lappend failures "$rel: e_machine $emachine (want $want = $opt(-expect))" |
||||||
|
continue |
||||||
|
} |
||||||
|
note "OK $rel (ELF64 LSB ET_DYN $opt(-expect), [file size $so] bytes)" |
||||||
|
} |
||||||
|
if {[llength $failures]} { |
||||||
|
fail "[llength $failures] of [llength $sofiles] members failed:\n [join $failures "\n "]" |
||||||
|
} |
||||||
|
puts "elf_gate OK: [llength $sofiles] ELF64 $opt(-expect) shared object(s) under $root" |
||||||
|
exit 0 |
||||||
@ -1,381 +1,386 @@ |
|||||||
# |
# |
||||||
# Critcl - build C extensions on-the-fly |
# Critcl - build C extensions on-the-fly |
||||||
# |
# |
||||||
# Copyright (c) 2001-2007 Jean-Claude Wippler |
# Copyright (c) 2001-2007 Jean-Claude Wippler |
||||||
# Copyright (c) 2002-2007 Steve Landers |
# Copyright (c) 2002-2007 Steve Landers |
||||||
# |
# |
||||||
# See http://wiki.tcl.tk/critcl |
# See http://wiki.tcl.tk/critcl |
||||||
# |
# |
||||||
# This is the Critcl runtime that loads the appropriate |
# This is the Critcl runtime that loads the appropriate |
||||||
# shared library when a package is requested |
# shared library when a package is requested |
||||||
# |
# |
||||||
|
|
||||||
namespace eval ::critcl::runtime {} |
namespace eval ::critcl::runtime {} |
||||||
|
|
||||||
proc ::critcl::runtime::loadlib {dir package version libname initfun tsrc mapping args} { |
proc ::critcl::runtime::loadlib {dir package version libname initfun tsrc mapping args} { |
||||||
# XXX At least parts of this can be done by the package generator, |
# XXX At least parts of this can be done by the package generator, |
||||||
# XXX like listing the Tcl files to source. The glob here allows |
# XXX like listing the Tcl files to source. The glob here allows |
||||||
# XXX code-injection after-the-fact, by simply adding a .tcl in |
# XXX code-injection after-the-fact, by simply adding a .tcl in |
||||||
# XXX the proper place. |
# XXX the proper place. |
||||||
set path [file join $dir [MapPlatform $mapping]] |
set path [file join $dir [MapPlatform $mapping]] |
||||||
set ext [info sharedlibextension] |
set ext [info sharedlibextension] |
||||||
set lib [file join $path $libname$ext] |
set lib [file join $path $libname$ext] |
||||||
set provide [list] |
set provide [list] |
||||||
|
|
||||||
# Now the runtime equivalent of a series of 'preFetch' commands. |
# Now the runtime equivalent of a series of 'preFetch' commands. |
||||||
if {[llength $args]} { |
if {[llength $args]} { |
||||||
set preload [file join $path preload$ext] |
set preload [file join $path preload$ext] |
||||||
foreach p $args { |
foreach p $args { |
||||||
set prelib [file join $path $p$ext] |
set prelib [file join $path $p$ext] |
||||||
if {[file readable $preload] && [file readable $prelib]} { |
if {[file readable $preload] && [file readable $prelib]} { |
||||||
lappend provide [list load $preload];# XXX Move this out of the loop, do only once. |
lappend provide [list load $preload];# XXX Move this out of the loop, do only once. |
||||||
lappend provide [list ::critcl::runtime::preload $prelib] |
lappend provide [list ::critcl::runtime::preload $prelib] |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
lappend provide [list load $lib $initfun] |
lappend provide [list load $lib $initfun] |
||||||
foreach t $tsrc { |
foreach t $tsrc { |
||||||
lappend loadcmd "::critcl::runtime::Fetch \$dir [list $t]" |
lappend loadcmd "::critcl::runtime::Fetch \$dir [list $t]" |
||||||
} |
} |
||||||
lappend provide "package provide $package $version" |
lappend provide "package provide $package $version" |
||||||
package ifneeded $package $version [join $provide "\n"] |
package ifneeded $package $version [join $provide "\n"] |
||||||
return |
return |
||||||
} |
} |
||||||
|
|
||||||
proc ::critcl::runtime::preFetch {path ext dll} { |
proc ::critcl::runtime::preFetch {path ext dll} { |
||||||
set preload [file join $path preload$ext] |
set preload [file join $path preload$ext] |
||||||
if {![file readable $preload]} return |
if {![file readable $preload]} return |
||||||
|
|
||||||
set prelib [file join $path $dll$ext] |
set prelib [file join $path $dll$ext] |
||||||
if {![file readable $prelib]} return |
if {![file readable $prelib]} return |
||||||
|
|
||||||
load $preload ; # Defines next command. |
load $preload ; # Defines next command. |
||||||
::critcl::runtime::preload $prelib |
::critcl::runtime::preload $prelib |
||||||
return |
return |
||||||
} |
} |
||||||
|
|
||||||
proc ::critcl::runtime::Fetch {dir t} { |
proc ::critcl::runtime::Fetch {dir t} { |
||||||
# The 'Ignore' disables compile & run functionality. |
# The 'Ignore' disables compile & run functionality. |
||||||
|
|
||||||
# Background: If the regular critcl package is already loaded, and |
# Background: If the regular critcl package is already loaded, and |
||||||
# this prebuilt package uses its defining .tcl file also as a |
# this prebuilt package uses its defining .tcl file also as a |
||||||
# 'tsources' then critcl might try to collect data and build it |
# 'tsources' then critcl might try to collect data and build it |
||||||
# because of the calls to its API, despite the necessary binaries |
# because of the calls to its API, despite the necessary binaries |
||||||
# already being present, just not in the critcl cache. That is |
# already being present, just not in the critcl cache. That is |
||||||
# redundant in the best case, and fails in the worst case (no |
# redundant in the best case, and fails in the worst case (no |
||||||
# compiler), preventing the use o a perfectly fine package. The |
# compiler), preventing the use o a perfectly fine package. The |
||||||
# 'ignore' call now tells critcl that it should ignore any calls |
# 'ignore' call now tells critcl that it should ignore any calls |
||||||
# made to it by the sourced files, and thus avoids that trouble. |
# made to it by the sourced files, and thus avoids that trouble. |
||||||
|
|
||||||
# The other case, the regular critcl package getting loaded after |
# The other case, the regular critcl package getting loaded after |
||||||
# this prebuilt package is irrelevant. At that point the tsources |
# this prebuilt package is irrelevant. At that point the tsources |
||||||
# were already run, and used the dummy procedures defined in the |
# were already run, and used the dummy procedures defined in the |
||||||
# critcl-rt.tcl, which ignore the calls by definition. |
# critcl-rt.tcl, which ignore the calls by definition. |
||||||
|
|
||||||
set t [file join $dir tcl $t] |
set t [file join $dir tcl $t] |
||||||
::critcl::Ignore $t |
::critcl::Ignore $t |
||||||
uplevel #0 [list source $t] |
uplevel #0 [list source $t] |
||||||
return |
return |
||||||
} |
} |
||||||
|
|
||||||
proc ::critcl::runtime::precopy {dll} { |
proc ::critcl::runtime::precopy {dll} { |
||||||
# This command is only used on Windows when preloading out of a |
# This command is only used on Windows when preloading out of a |
||||||
# VFS that doesn't support direct loading (usually, a Starkit) |
# VFS that doesn't support direct loading (usually, a Starkit) |
||||||
# - we preserve the dll name so that dependencies are satisfied |
# - we preserve the dll name so that dependencies are satisfied |
||||||
# - The critcl::runtime::preload command is defined in the supporting |
# - The critcl::runtime::preload command is defined in the supporting |
||||||
# "preload" package, implemented in "critcl/lib/critcl/critcl_c/preload.c" |
# "preload" package, implemented in "critcl/lib/critcl/critcl_c/preload.c" |
||||||
|
|
||||||
global env |
global env |
||||||
if {[info exists env(TEMP)]} { |
if {[info exists env(TEMP)]} { |
||||||
set dir $env(TEMP) |
set dir $env(TEMP) |
||||||
} elseif {[info exists env(TMP)]} { |
} elseif {[info exists env(TMP)]} { |
||||||
set dir $env(TMP) |
set dir $env(TMP) |
||||||
} elseif {[file exists $env(HOME)]} { |
} elseif {[file exists $env(HOME)]} { |
||||||
set dir $env(HOME) |
set dir $env(HOME) |
||||||
} else { |
} else { |
||||||
set dir . |
set dir . |
||||||
} |
} |
||||||
set dir [file join $dir TCL[pid]] |
set dir [file join $dir TCL[pid]] |
||||||
set i 0 |
set i 0 |
||||||
while {[file exists $dir]} { |
while {[file exists $dir]} { |
||||||
append dir [incr i] |
append dir [incr i] |
||||||
} |
} |
||||||
set new [file join $dir [file tail $dll]] |
set new [file join $dir [file tail $dll]] |
||||||
file mkdir $dir |
file mkdir $dir |
||||||
file copy $dll $new |
file copy $dll $new |
||||||
return $new |
return $new |
||||||
} |
} |
||||||
|
|
||||||
proc ::critcl::runtime::MapPlatform {{mapping {}}} { |
proc ::critcl::runtime::MapPlatform {{mapping {}}} { |
||||||
# A sibling of critcl::platform that applies the platform mapping |
# A sibling of critcl::platform that applies the platform mapping |
||||||
|
|
||||||
set platform [::platform::generic] |
set platform [::platform::generic] |
||||||
set version $::tcl_platform(osVersion) |
set version $::tcl_platform(osVersion) |
||||||
if {[string match "macosx-*" $platform]} { |
if {[string match "macosx-*" $platform]} { |
||||||
# "normalize" the osVersion to match OSX release numbers |
# "normalize" the osVersion to match OSX release numbers |
||||||
set v [split $version .] |
set v [split $version .] |
||||||
set v1 [lindex $v 0] |
set v1 [lindex $v 0] |
||||||
set v2 [lindex $v 1] |
set v2 [lindex $v 1] |
||||||
incr v1 -4 |
incr v1 -4 |
||||||
set version 10.$v1.$v2 |
set version 10.$v1.$v2 |
||||||
} else { |
} else { |
||||||
# Strip trailing non-version info |
# Strip trailing non-version info |
||||||
regsub -- {-.*$} $version {} version |
regsub -- {-.*$} $version {} version |
||||||
} |
} |
||||||
foreach {config map} $mapping { |
foreach {config map} $mapping { |
||||||
if {![string match $config $platform]} continue |
if {![string match $config $platform]} continue |
||||||
set minver [lindex $map 1] |
set minver [lindex $map 1] |
||||||
if {[package vcompare $version $minver] < 0} continue |
if {[package vcompare $version $minver] < 0} continue |
||||||
set platform [lindex $map 0] |
set platform [lindex $map 0] |
||||||
break |
break |
||||||
} |
} |
||||||
return $platform |
return $platform |
||||||
} |
} |
||||||
|
|
||||||
# Dummy implementation of the critcl package, if not present |
# Dummy implementation of the critcl package, if not present |
||||||
if {![llength [info commands ::critcl::Ignore]]} { |
if {![llength [info commands ::critcl::Ignore]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::Ignore {args} { |
proc ::critcl::Ignore {args} { |
||||||
namespace eval ::critcl::v {} |
namespace eval ::critcl::v {} |
||||||
set ::critcl::v::ignore([file normalize [lindex $args 0]]) . |
set ::critcl::v::ignore([file normalize [lindex $args 0]]) . |
||||||
} |
} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::api]]} { |
if {![llength [info commands ::critcl::api]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::api {args} {} |
proc ::critcl::api {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::at]]} { |
if {![llength [info commands ::critcl::at]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::at {args} {} |
proc ::critcl::at {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cache]]} { |
if {![llength [info commands ::critcl::cache]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cache {args} {} |
proc ::critcl::cache {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::ccode]]} { |
if {![llength [info commands ::critcl::ccode]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::ccode {args} {} |
proc ::critcl::ccode {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::ccommand]]} { |
if {![llength [info commands ::critcl::ccommand]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::ccommand {args} {} |
proc ::critcl::ccommand {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cdata]]} { |
if {![llength [info commands ::critcl::cdata]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cdata {args} {} |
proc ::critcl::cdata {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cdefines]]} { |
if {![llength [info commands ::critcl::cdefines]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cdefines {args} {} |
proc ::critcl::cdefines {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cflags]]} { |
if {![llength [info commands ::critcl::cflags]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cflags {args} {} |
proc ::critcl::cflags {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cheaders]]} { |
if {![llength [info commands ::critcl::cheaders]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cheaders {args} {} |
proc ::critcl::cheaders {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::check]]} { |
if {![llength [info commands ::critcl::check]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::check {args} {return 0} |
proc ::critcl::check {args} {return 0} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cinit]]} { |
if {![llength [info commands ::critcl::cinit]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cinit {args} {} |
proc ::critcl::cinit {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::clibraries]]} { |
if {![llength [info commands ::critcl::clibraries]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::clibraries {args} {} |
proc ::critcl::clibraries {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::compiled]]} { |
if {![llength [info commands ::critcl::compiled]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::compiled {args} {return 1} |
proc ::critcl::compiled {args} {return 1} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::compiling]]} { |
if {![llength [info commands ::critcl::compiling]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::compiling {args} {return 0} |
proc ::critcl::compiling {args} {return 0} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::config]]} { |
if {![llength [info commands ::critcl::config]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::config {args} {} |
proc ::critcl::config {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::cproc]]} { |
if {![llength [info commands ::critcl::cproc]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::cproc {args} {} |
proc ::critcl::cproc {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::csources]]} { |
if {![llength [info commands ::critcl::csources]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::csources {args} {} |
proc ::critcl::csources {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::debug]]} { |
if {![llength [info commands ::critcl::debug]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::debug {args} {} |
proc ::critcl::debug {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::done]]} { |
if {![llength [info commands ::critcl::done]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::done {args} {return 1} |
proc ::critcl::done {args} {return 1} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::failed]]} { |
if {![llength [info commands ::critcl::failed]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::failed {args} {return 0} |
proc ::critcl::failed {args} {return 0} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::framework]]} { |
if {![llength [info commands ::critcl::framework]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::framework {args} {} |
proc ::critcl::framework {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::include]]} { |
if {![llength [info commands ::critcl::include]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::include {args} {} |
proc ::critcl::include {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::ldflags]]} { |
if {![llength [info commands ::critcl::ldflags]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::ldflags {args} {} |
proc ::critcl::ldflags {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::license]]} { |
if {![llength [info commands ::critcl::license]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::license {args} {} |
proc ::critcl::license {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::load]]} { |
if {![llength [info commands ::critcl::load]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::load {args} {return 1} |
proc ::critcl::load {args} {return 1} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::make]]} { |
if {![llength [info commands ::critcl::make]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::make {args} {} |
proc ::critcl::make {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::meta]]} { |
if {![llength [info commands ::critcl::meta]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::meta {args} {} |
proc ::critcl::meta {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::platform]]} { |
if {![llength [info commands ::critcl::platform]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::platform {args} {} |
proc ::critcl::platform {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::preload]]} { |
if {![llength [info commands ::critcl::preload]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::preload {args} {} |
proc ::critcl::preload {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::source]]} { |
if {![llength [info commands ::critcl::source]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::source {args} {} |
proc ::critcl::source {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::tcl]]} { |
if {![llength [info commands ::critcl::tcl]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::tcl {args} {} |
proc ::critcl::tcl {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::tk]]} { |
if {![llength [info commands ::critcl::tk]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::tk {args} {} |
proc ::critcl::tk {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::tsources]]} { |
if {![llength [info commands ::critcl::tsources]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::tsources {args} {} |
proc ::critcl::tsources {args} {} |
||||||
} |
} |
||||||
if {![llength [info commands ::critcl::userconfig]]} { |
if {![llength [info commands ::critcl::userconfig]]} { |
||||||
namespace eval ::critcl {} |
namespace eval ::critcl {} |
||||||
proc ::critcl::userconfig {args} {} |
proc ::critcl::userconfig {args} {} |
||||||
} |
} |
||||||
|
|
||||||
# Define a clone of platform::generic, if needed |
# Define a clone of platform::generic, if needed |
||||||
if {![llength [info commands ::platform::generic]]} { |
if {![llength [info commands ::platform::generic]]} { |
||||||
namespace eval ::platform {} |
namespace eval ::platform {} |
||||||
proc ::platform::generic {} { |
proc ::platform::generic {} { |
||||||
global tcl_platform |
global tcl_platform |
||||||
|
|
||||||
set plat [string tolower [lindex $tcl_platform(os) 0]] |
set plat [string tolower [lindex $tcl_platform(os) 0]] |
||||||
set cpu $tcl_platform(machine) |
set cpu $tcl_platform(machine) |
||||||
|
|
||||||
switch -glob -- $cpu { |
switch -glob -- $cpu { |
||||||
sun4* { |
sun4* { |
||||||
set cpu sparc |
set cpu sparc |
||||||
} |
} |
||||||
intel - |
intel - |
||||||
ia32* - |
ia32* - |
||||||
i*86* { |
i*86* { |
||||||
set cpu ix86 |
set cpu ix86 |
||||||
} |
} |
||||||
x86_64 { |
x86_64 { |
||||||
if {$tcl_platform(wordSize) == 4} { |
if {$tcl_platform(wordSize) == 4} { |
||||||
# See Example <1> at the top of this file. |
# See Example <1> at the top of this file. |
||||||
set cpu ix86 |
set cpu ix86 |
||||||
} |
} |
||||||
} |
} |
||||||
ppc - |
ppc - |
||||||
"Power*" { |
"Power*" { |
||||||
set cpu powerpc |
set cpu powerpc |
||||||
} |
} |
||||||
"arm*" { |
"arm*" { |
||||||
set cpu arm |
set cpu arm |
||||||
} |
} |
||||||
ia64 { |
ia64 { |
||||||
if {$tcl_platform(wordSize) == 4} { |
if {$tcl_platform(wordSize) == 4} { |
||||||
append cpu _32 |
append cpu _32 |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
switch -glob -- $plat { |
switch -glob -- $plat { |
||||||
windows { |
windows { |
||||||
if {$tcl_platform(platform) == "unix"} { |
if {$tcl_platform(platform) eq "unix"} { |
||||||
set plat cygwin |
set plat cygwin |
||||||
} else { |
} else { |
||||||
set plat win32 |
set plat win32 |
||||||
} |
} |
||||||
if {$cpu eq "amd64"} { |
if {$cpu eq "amd64"} { |
||||||
# Do not check wordSize, win32-x64 is an IL32P64 platform. |
# Do not check wordSize, win32-x64 is an IL32P64 platform. |
||||||
set cpu x86_64 |
set cpu x86_64 |
||||||
} |
} |
||||||
} |
} |
||||||
sunos { |
sunos { |
||||||
set plat solaris |
set plat solaris |
||||||
if {[string match "ix86" $cpu]} { |
if {[string match "ix86" $cpu]} { |
||||||
if {$tcl_platform(wordSize) == 8} { |
if {$tcl_platform(wordSize) == 8} { |
||||||
set cpu x86_64 |
set cpu x86_64 |
||||||
} |
} |
||||||
} elseif {![string match "ia64*" $cpu]} { |
} elseif {![string match "ia64*" $cpu]} { |
||||||
# sparc |
# sparc |
||||||
if {$tcl_platform(wordSize) == 8} { |
if {$tcl_platform(wordSize) == 8} { |
||||||
append cpu 64 |
append cpu 64 |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
darwin { |
darwin { |
||||||
set plat macosx |
set major [lindex [split $tcl_platform(osVersion) .] 0] |
||||||
# Correctly identify the cpu when running as a 64bit |
if {$major > 19} { |
||||||
# process on a machine with a 32bit kernel |
set plat macos |
||||||
if {$cpu eq "ix86"} { |
} else { |
||||||
if {$tcl_platform(wordSize) == 8} { |
set plat macosx |
||||||
set cpu x86_64 |
} |
||||||
} |
# Correctly identify the cpu when running as a 64bit |
||||||
} |
# process on a machine with a 32bit kernel |
||||||
} |
if {$cpu eq "ix86"} { |
||||||
aix { |
if {$tcl_platform(wordSize) == 8} { |
||||||
set cpu powerpc |
set cpu x86_64 |
||||||
if {$tcl_platform(wordSize) == 8} { |
} |
||||||
append cpu 64 |
} |
||||||
} |
} |
||||||
} |
aix { |
||||||
hp-ux { |
set cpu powerpc |
||||||
set plat hpux |
if {$tcl_platform(wordSize) == 8} { |
||||||
if {![string match "ia64*" $cpu]} { |
append cpu 64 |
||||||
set cpu parisc |
} |
||||||
if {$tcl_platform(wordSize) == 8} { |
} |
||||||
append cpu 64 |
hp-ux { |
||||||
} |
set plat hpux |
||||||
} |
if {![string match "ia64*" $cpu]} { |
||||||
} |
set cpu parisc |
||||||
osf1 { |
if {$tcl_platform(wordSize) == 8} { |
||||||
set plat tru64 |
append cpu 64 |
||||||
} |
} |
||||||
default { |
} |
||||||
set plat [lindex [split $plat _-] 0] |
} |
||||||
} |
osf1 { |
||||||
} |
set plat tru64 |
||||||
|
} |
||||||
return "${plat}-${cpu}" |
default { |
||||||
} |
set plat [lindex [split $plat _-] 0] |
||||||
} |
} |
||||||
|
} |
||||||
|
|
||||||
|
return "${plat}-${cpu}" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@ |
|||||||
<<Undefined>> |
<<Undefined>> |
||||||
|
|||||||
Binary file not shown.
@ -1,2 +1,2 @@ |
|||||||
if {![package vsatisfies [package provide Tcl] 9.0]} {return} |
if {![package vsatisfies [package provide Tcl] 9.0]} {return} |
||||||
package ifneeded tcllibc 2.0 "[list proc __critcl_load__ {dir} { ; source [file join $dir critcl-rt.tcl] ; set path [file join $dir [::critcl::runtime::MapPlatform]] ; set ext [info sharedlibextension] ; set lib [file join $path "tcllibc$ext"] ; load $lib Tcllibc ; package provide tcllibc 2.0 ; catch {rename __critcl_load__ {}}}] ; [list __critcl_load__ $dir]" |
package ifneeded tcllibc 2.0 "[list proc __critcl_load__ {dir} { ; source [file join $dir critcl-rt.tcl] ; set path [file join $dir [::critcl::runtime::MapPlatform]] ; set ext [info sharedlibextension] ; set lib [file join $path "tcllibc$ext"] ; load $lib Tcllibc ; package provide tcllibc 2.0 ; catch {rename __critcl_load__ {}}}] ; [list __critcl_load__ $dir]" |
||||||
|
|||||||
@ -0,0 +1,53 @@ |
|||||||
|
#punkshell library artifact metadata - EMBEDDED copy (schema v2, class "library"), |
||||||
|
#written at library-artifacts emission into the staged package copy BEFORE the |
||||||
|
#zip is assembled and hashed (embed-then-hash). Finished-zip facts (sha1, size, |
||||||
|
#built) live only in the sidecar toml + sha1sums.txt, which remain the |
||||||
|
#integrity authority; this copy makes a materialized package tree self-describing. |
||||||
|
schema = 2 |
||||||
|
|
||||||
|
[artifact] |
||||||
|
name = "tcllibc-tcl9-r1.zip" |
||||||
|
class = "library" |
||||||
|
package = "tcllibc" |
||||||
|
package_version = "2.0" |
||||||
|
#folder: the installed-shape package folder the zip carries at its root |
||||||
|
folder = "tcllibc" |
||||||
|
revision = 1 |
||||||
|
target = "linux-x86_64" |
||||||
|
#tcl_generation: the Tcl major-generation the package was built/installed under |
||||||
|
#(and, for binary packages, compiled against) - part of the artifact name. |
||||||
|
tcl_generation = "tcl9" |
||||||
|
#build_id: offline correlation key re-joining a renamed copy to its record; |
||||||
|
#identical in the embedded and sidecar copies (a deterministic identity digest, |
||||||
|
#not an integrity key - the sidecar sha1 is the integrity fact). |
||||||
|
build_id = "e7030a7a-0486-9c94-00cb-7536716ea5d9" |
||||||
|
#origin: canonical artifact repo this artifact was BUILT FOR - not necessarily |
||||||
|
#where it is hosted; mirrors preserve it. |
||||||
|
origin = "https://www.gitea1.intx.com.au/jn/punkbin" |
||||||
|
#packager: declared identity, not proof - signing (minisign sidecars) is the |
||||||
|
#verification layer. |
||||||
|
packager = "Julian Noble <julian@precisium.com.au>" |
||||||
|
project = "punkshell" |
||||||
|
project_url = "unrecorded" |
||||||
|
#license: summary for the distributed package; the package's own license text |
||||||
|
#rides inside the zip (license.terms etc). |
||||||
|
license = "BSD" |
||||||
|
build_host_platform = "win32-x86_64" |
||||||
|
|
||||||
|
[library] |
||||||
|
#driving_tcl_patchlevel: patchlevel of the suite-built shell that ran the |
||||||
|
#installer/critcl - the generation witness, not a runtime version requirement. |
||||||
|
driving_tcl_patchlevel = "9.0.5" |
||||||
|
|
||||||
|
[provenance] |
||||||
|
#class: build-origin class (schema v2): suite-built | third-party | local. |
||||||
|
#NOTE for line-based consumers: '[artifact] class' above is the first 'class =' |
||||||
|
#line in the record by construction - whole-text single-key scans see that one. |
||||||
|
class = "suite-built" |
||||||
|
suite = "suite_tcl90" |
||||||
|
toolchain = "zig 0.16.0" |
||||||
|
optimize = "ReleaseFast" |
||||||
|
#critcl: version declared by the package's own critcl-generated teapot.txt |
||||||
|
critcl = "3.3.1" |
||||||
|
tcllib_checkout = "c784f6fda4516f676453a2785b3c56f1ca5999f450e80ccba6c317ba78ce4e21" |
||||||
|
critcl_checkout = "254bdffe2afc78148f79f92df8d6823a24f971bf" |
||||||
@ -1,21 +1,21 @@ |
|||||||
Package tcllibc 2.0 |
Package tcllibc 2.0 |
||||||
Meta platform linux-glibc2.22-x86_64 |
Meta platform linux-x86_64 |
||||||
Meta build::date 2025-08-20 |
Meta build::date 2026-07-30 |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
Meta generated::by {critcl 3.3.1} jnoble {critcl 3.3.1} jnoble |
||||||
Meta generated::date critcl |
Meta generated::date critcl |
||||||
Meta license BSD licensed. |
Meta require {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} |
||||||
Meta author {Andreas Kupries} |
Meta require {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} |
||||||
Meta require {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} |
Meta require {Tcl 8.5 9} {Tcl 8.5 9} |
||||||
Meta require {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} |
Meta license BSD licensed. |
||||||
Meta require {Tcl 8.5 9} {Tcl 8.5 9} |
Meta author {Andreas Kupries} |
||||||
Meta entrytclcommand {eval "[list proc __critcl_load__ {dir} { ; source [file join $dir critcl-rt.tcl] ; set path [file join $dir [::critcl::runtime::MapPlatform]] ; set ext [info sharedlibextension] ; set lib [file join $path "tcllibc$ext"] ; load $lib Tcllibc ; package provide tcllibc 2.0 ; catch {rename __critcl_load__ {}}}] ; [list __critcl_load__ $dir]"} |
Meta entrytclcommand {eval "[list proc __critcl_load__ {dir} { ; source [file join $dir critcl-rt.tcl] ; set path [file join $dir [::critcl::runtime::MapPlatform]] ; set ext [info sharedlibextension] ; set lib [file join $path "tcllibc$ext"] ; load $lib Tcllibc ; package provide tcllibc 2.0 ; catch {rename __critcl_load__ {}}}] ; [list __critcl_load__ $dir]"} |
||||||
Meta included critcl-rt.tcl linux-x86_64/tcllibc.so |
Meta included critcl-rt.tcl linux-x86_64/tcllibc.so |
||||||
|
|||||||
@ -1,381 +0,0 @@ |
|||||||
# |
|
||||||
# Critcl - build C extensions on-the-fly |
|
||||||
# |
|
||||||
# Copyright (c) 2001-2007 Jean-Claude Wippler |
|
||||||
# Copyright (c) 2002-2007 Steve Landers |
|
||||||
# |
|
||||||
# See http://wiki.tcl.tk/critcl |
|
||||||
# |
|
||||||
# This is the Critcl runtime that loads the appropriate |
|
||||||
# shared library when a package is requested |
|
||||||
# |
|
||||||
|
|
||||||
namespace eval ::critcl::runtime {} |
|
||||||
|
|
||||||
proc ::critcl::runtime::loadlib {dir package version libname initfun tsrc mapping args} { |
|
||||||
# XXX At least parts of this can be done by the package generator, |
|
||||||
# XXX like listing the Tcl files to source. The glob here allows |
|
||||||
# XXX code-injection after-the-fact, by simply adding a .tcl in |
|
||||||
# XXX the proper place. |
|
||||||
set path [file join $dir [MapPlatform $mapping]] |
|
||||||
set ext [info sharedlibextension] |
|
||||||
set lib [file join $path $libname$ext] |
|
||||||
set provide [list] |
|
||||||
|
|
||||||
# Now the runtime equivalent of a series of 'preFetch' commands. |
|
||||||
if {[llength $args]} { |
|
||||||
set preload [file join $path preload$ext] |
|
||||||
foreach p $args { |
|
||||||
set prelib [file join $path $p$ext] |
|
||||||
if {[file readable $preload] && [file readable $prelib]} { |
|
||||||
lappend provide [list load $preload];# XXX Move this out of the loop, do only once. |
|
||||||
lappend provide [list ::critcl::runtime::preload $prelib] |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
lappend provide [list load $lib $initfun] |
|
||||||
foreach t $tsrc { |
|
||||||
lappend loadcmd "::critcl::runtime::Fetch \$dir [list $t]" |
|
||||||
} |
|
||||||
lappend provide "package provide $package $version" |
|
||||||
package ifneeded $package $version [join $provide "\n"] |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
proc ::critcl::runtime::preFetch {path ext dll} { |
|
||||||
set preload [file join $path preload$ext] |
|
||||||
if {![file readable $preload]} return |
|
||||||
|
|
||||||
set prelib [file join $path $dll$ext] |
|
||||||
if {![file readable $prelib]} return |
|
||||||
|
|
||||||
load $preload ; # Defines next command. |
|
||||||
::critcl::runtime::preload $prelib |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
proc ::critcl::runtime::Fetch {dir t} { |
|
||||||
# The 'Ignore' disables compile & run functionality. |
|
||||||
|
|
||||||
# Background: If the regular critcl package is already loaded, and |
|
||||||
# this prebuilt package uses its defining .tcl file also as a |
|
||||||
# 'tsources' then critcl might try to collect data and build it |
|
||||||
# because of the calls to its API, despite the necessary binaries |
|
||||||
# already being present, just not in the critcl cache. That is |
|
||||||
# redundant in the best case, and fails in the worst case (no |
|
||||||
# compiler), preventing the use o a perfectly fine package. The |
|
||||||
# 'ignore' call now tells critcl that it should ignore any calls |
|
||||||
# made to it by the sourced files, and thus avoids that trouble. |
|
||||||
|
|
||||||
# The other case, the regular critcl package getting loaded after |
|
||||||
# this prebuilt package is irrelevant. At that point the tsources |
|
||||||
# were already run, and used the dummy procedures defined in the |
|
||||||
# critcl-rt.tcl, which ignore the calls by definition. |
|
||||||
|
|
||||||
set t [file join $dir tcl $t] |
|
||||||
::critcl::Ignore $t |
|
||||||
uplevel #0 [list source $t] |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
proc ::critcl::runtime::precopy {dll} { |
|
||||||
# This command is only used on Windows when preloading out of a |
|
||||||
# VFS that doesn't support direct loading (usually, a Starkit) |
|
||||||
# - we preserve the dll name so that dependencies are satisfied |
|
||||||
# - The critcl::runtime::preload command is defined in the supporting |
|
||||||
# "preload" package, implemented in "critcl/lib/critcl/critcl_c/preload.c" |
|
||||||
|
|
||||||
global env |
|
||||||
if {[info exists env(TEMP)]} { |
|
||||||
set dir $env(TEMP) |
|
||||||
} elseif {[info exists env(TMP)]} { |
|
||||||
set dir $env(TMP) |
|
||||||
} elseif {[file exists $env(HOME)]} { |
|
||||||
set dir $env(HOME) |
|
||||||
} else { |
|
||||||
set dir . |
|
||||||
} |
|
||||||
set dir [file join $dir TCL[pid]] |
|
||||||
set i 0 |
|
||||||
while {[file exists $dir]} { |
|
||||||
append dir [incr i] |
|
||||||
} |
|
||||||
set new [file join $dir [file tail $dll]] |
|
||||||
file mkdir $dir |
|
||||||
file copy $dll $new |
|
||||||
return $new |
|
||||||
} |
|
||||||
|
|
||||||
proc ::critcl::runtime::MapPlatform {{mapping {}}} { |
|
||||||
# A sibling of critcl::platform that applies the platform mapping |
|
||||||
|
|
||||||
set platform [::platform::generic] |
|
||||||
set version $::tcl_platform(osVersion) |
|
||||||
if {[string match "macosx-*" $platform]} { |
|
||||||
# "normalize" the osVersion to match OSX release numbers |
|
||||||
set v [split $version .] |
|
||||||
set v1 [lindex $v 0] |
|
||||||
set v2 [lindex $v 1] |
|
||||||
incr v1 -4 |
|
||||||
set version 10.$v1.$v2 |
|
||||||
} else { |
|
||||||
# Strip trailing non-version info |
|
||||||
regsub -- {-.*$} $version {} version |
|
||||||
} |
|
||||||
foreach {config map} $mapping { |
|
||||||
if {![string match $config $platform]} continue |
|
||||||
set minver [lindex $map 1] |
|
||||||
if {[package vcompare $version $minver] < 0} continue |
|
||||||
set platform [lindex $map 0] |
|
||||||
break |
|
||||||
} |
|
||||||
return $platform |
|
||||||
} |
|
||||||
|
|
||||||
# Dummy implementation of the critcl package, if not present |
|
||||||
if {![llength [info commands ::critcl::Ignore]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::Ignore {args} { |
|
||||||
namespace eval ::critcl::v {} |
|
||||||
set ::critcl::v::ignore([file normalize [lindex $args 0]]) . |
|
||||||
} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::api]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::api {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::at]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::at {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cache]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cache {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::ccode]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::ccode {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::ccommand]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::ccommand {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cdata]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cdata {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cdefines]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cdefines {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cflags]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cflags {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cheaders]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cheaders {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::check]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::check {args} {return 0} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cinit]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cinit {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::clibraries]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::clibraries {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::compiled]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::compiled {args} {return 1} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::compiling]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::compiling {args} {return 0} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::config]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::config {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::cproc]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::cproc {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::csources]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::csources {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::debug]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::debug {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::done]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::done {args} {return 1} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::failed]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::failed {args} {return 0} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::framework]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::framework {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::include]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::include {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::ldflags]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::ldflags {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::license]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::license {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::load]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::load {args} {return 1} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::make]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::make {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::meta]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::meta {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::platform]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::platform {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::preload]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::preload {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::source]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::source {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::tcl]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::tcl {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::tk]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::tk {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::tsources]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::tsources {args} {} |
|
||||||
} |
|
||||||
if {![llength [info commands ::critcl::userconfig]]} { |
|
||||||
namespace eval ::critcl {} |
|
||||||
proc ::critcl::userconfig {args} {} |
|
||||||
} |
|
||||||
|
|
||||||
# Define a clone of platform::generic, if needed |
|
||||||
if {![llength [info commands ::platform::generic]]} { |
|
||||||
namespace eval ::platform {} |
|
||||||
proc ::platform::generic {} { |
|
||||||
global tcl_platform |
|
||||||
|
|
||||||
set plat [string tolower [lindex $tcl_platform(os) 0]] |
|
||||||
set cpu $tcl_platform(machine) |
|
||||||
|
|
||||||
switch -glob -- $cpu { |
|
||||||
sun4* { |
|
||||||
set cpu sparc |
|
||||||
} |
|
||||||
intel - |
|
||||||
ia32* - |
|
||||||
i*86* { |
|
||||||
set cpu ix86 |
|
||||||
} |
|
||||||
x86_64 { |
|
||||||
if {$tcl_platform(wordSize) == 4} { |
|
||||||
# See Example <1> at the top of this file. |
|
||||||
set cpu ix86 |
|
||||||
} |
|
||||||
} |
|
||||||
ppc - |
|
||||||
"Power*" { |
|
||||||
set cpu powerpc |
|
||||||
} |
|
||||||
"arm*" { |
|
||||||
set cpu arm |
|
||||||
} |
|
||||||
ia64 { |
|
||||||
if {$tcl_platform(wordSize) == 4} { |
|
||||||
append cpu _32 |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
switch -glob -- $plat { |
|
||||||
windows { |
|
||||||
if {$tcl_platform(platform) == "unix"} { |
|
||||||
set plat cygwin |
|
||||||
} else { |
|
||||||
set plat win32 |
|
||||||
} |
|
||||||
if {$cpu eq "amd64"} { |
|
||||||
# Do not check wordSize, win32-x64 is an IL32P64 platform. |
|
||||||
set cpu x86_64 |
|
||||||
} |
|
||||||
} |
|
||||||
sunos { |
|
||||||
set plat solaris |
|
||||||
if {[string match "ix86" $cpu]} { |
|
||||||
if {$tcl_platform(wordSize) == 8} { |
|
||||||
set cpu x86_64 |
|
||||||
} |
|
||||||
} elseif {![string match "ia64*" $cpu]} { |
|
||||||
# sparc |
|
||||||
if {$tcl_platform(wordSize) == 8} { |
|
||||||
append cpu 64 |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
darwin { |
|
||||||
set plat macosx |
|
||||||
# Correctly identify the cpu when running as a 64bit |
|
||||||
# process on a machine with a 32bit kernel |
|
||||||
if {$cpu eq "ix86"} { |
|
||||||
if {$tcl_platform(wordSize) == 8} { |
|
||||||
set cpu x86_64 |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
aix { |
|
||||||
set cpu powerpc |
|
||||||
if {$tcl_platform(wordSize) == 8} { |
|
||||||
append cpu 64 |
|
||||||
} |
|
||||||
} |
|
||||||
hp-ux { |
|
||||||
set plat hpux |
|
||||||
if {![string match "ia64*" $cpu]} { |
|
||||||
set cpu parisc |
|
||||||
if {$tcl_platform(wordSize) == 8} { |
|
||||||
append cpu 64 |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
osf1 { |
|
||||||
set plat tru64 |
|
||||||
} |
|
||||||
default { |
|
||||||
set plat [lindex [split $plat _-] 0] |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
return "${plat}-${cpu}" |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@ -1 +0,0 @@ |
|||||||
<<Undefined>> |
|
||||||
Binary file not shown.
@ -1,2 +0,0 @@ |
|||||||
if {![package vsatisfies [package provide Tcl] 9.0]} {return} |
|
||||||
package ifneeded tcllibc 2.0 "[list proc __critcl_load__ {dir} { ; source [file join $dir critcl-rt.tcl] ; set path [file join $dir [::critcl::runtime::MapPlatform]] ; set ext [info sharedlibextension] ; set lib [file join $path "tcllibc$ext"] ; load $lib Tcllibc ; package provide tcllibc 2.0 ; catch {rename __critcl_load__ {}}}] ; [list __critcl_load__ $dir]" |
|
||||||
@ -1,21 +0,0 @@ |
|||||||
Package tcllibc 2.0 |
|
||||||
Meta platform linux-glibc2.22-x86_64 |
|
||||||
Meta build::date 2025-08-20 |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::by {critcl 3.3} obermeier {critcl 3.3} obermeier |
|
||||||
Meta generated::date critcl |
|
||||||
Meta license BSD licensed. |
|
||||||
Meta author {Andreas Kupries} |
|
||||||
Meta require {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} |
|
||||||
Meta require {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} {Tcl 8.5 9} |
|
||||||
Meta require {Tcl 8.5 9} {Tcl 8.5 9} |
|
||||||
Meta entrytclcommand {eval "[list proc __critcl_load__ {dir} { ; source [file join $dir critcl-rt.tcl] ; set path [file join $dir [::critcl::runtime::MapPlatform]] ; set ext [info sharedlibextension] ; set lib [file join $path "tcllibc$ext"] ; load $lib Tcllibc ; package provide tcllibc 2.0 ; catch {rename __critcl_load__ {}}}] ; [list __critcl_load__ $dir]"} |
|
||||||
Meta included critcl-rt.tcl linux-x86_64/tcllibc.so |
|
||||||
Loading…
Reference in new issue