aboutsummaryrefslogtreecommitdiff
path: root/tea/pkgIndex.tcl.in
diff options
context:
space:
mode:
Diffstat (limited to 'tea/pkgIndex.tcl.in')
-rw-r--r--tea/pkgIndex.tcl.in40
1 files changed, 35 insertions, 5 deletions
diff --git a/tea/pkgIndex.tcl.in b/tea/pkgIndex.tcl.in
index f95f7d3893dd..c93fcc6854e5 100644
--- a/tea/pkgIndex.tcl.in
+++ b/tea/pkgIndex.tcl.in
@@ -1,10 +1,40 @@
# -*- tcl -*-
-# Tcl package index file, version 1.1
+# Tcl package index file
#
+# Unless this file is named pkgIndex.tcl.in, you are probably looking
+# at an automatically generated/filtered copy and should probably not
+# edit it.
+#
+# Adapted from https://core.tcl-lang.org/tcltls
+@if TEAISH_VSATISFIES_CODE
+@TEAISH_VSATISFIES_CODE@
+@endif
if {[package vsatisfies [package provide Tcl] 9.0-]} {
- package ifneeded sqlite3 @PACKAGE_VERSION@ \
- [list load [file join $dir @PKG_LIB_FILE9@] sqlite3]
+ package ifneeded {@TEAISH_PKGNAME@} {@TEAISH_VERSION@} [list apply {{dir} {
+@if TEAISH_ENABLE_DLL
+ load [file join $dir {@TEAISH_DLL9@}] @TEAISH_LOAD_PREFIX@
+@endif
+@if TEAISH_PKGINIT_TCL_TAIL
+ set initScript [file join $dir {@TEAISH_PKGINIT_TCL_TAIL@}]
+ if {[file exists $initScript]} {
+ source -encoding utf-8 $initScript
+ }
+@endif
+ }} $dir]
} else {
- package ifneeded sqlite3 @PACKAGE_VERSION@ \
- [list load [file join $dir @PKG_LIB_FILE8@] sqlite3]
+ package ifneeded {@TEAISH_PKGNAME@} {@TEAISH_VERSION@} [list apply {{dir} {
+@if TEAISH_ENABLE_DLL
+ if {[string tolower [file extension {@TEAISH_DLL8@}]] in [list .dll .dylib .so]} {
+ load [file join $dir {@TEAISH_DLL8@}] @TEAISH_LOAD_PREFIX@
+ } else {
+ load {} @TEAISH_LOAD_PREFIX@
+ }
+@endif
+@if TEAISH_PKGINIT_TCL_TAIL
+ set initScript [file join $dir {@TEAISH_PKGINIT_TCL_TAIL@}]
+ if {[file exists $initScript]} {
+ source -encoding utf-8 $initScript
+ }
+@endif
+ }} $dir]
}