Skip to content

Commit 1b20079

Browse files
author
jan.nijtmans
committed
Allow ttrace.tcl to be mounted through zipfs in a static executable
1 parent a9e5e9f commit 1b20079

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

configure

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9470,11 +9470,11 @@ esac
94709470
fi
94719471

94729472
if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
9473-
ZIPFS_BUILD=1
9474-
THREAD_ZIP_FILE=lib${PACKAGE_NAME}${PACKAGE_VERSION}.zip
9473+
ZIPFS_BUILD=1
9474+
THREAD_ZIP_FILE=lib${PACKAGE_NAME}${PACKAGE_VERSION}.zip
94759475
else
9476-
ZIPFS_BUILD=0
9477-
THREAD_ZIP_FILE=
9476+
ZIPFS_BUILD=0
9477+
THREAD_ZIP_FILE=
94789478
fi
94799479
fi
94809480

configure.ac

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ TEA_PROG_TCLSH
206206
#--------------------------------------------------------------------
207207
if test "${TCL_MAJOR_VERSION}" -gt 8; then
208208
AC_ARG_ENABLE(zipfs,
209-
AS_HELP_STRING([--enable-zipfs],[build with Zipfs support (default: on)]),
210-
[tcl_ok=$enableval], [tcl_ok=yes])
209+
AS_HELP_STRING([--enable-zipfs],[build with Zipfs support (default: on)]),
210+
[tcl_ok=$enableval], [tcl_ok=yes])
211211
if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
212-
ZIPFS_BUILD=1
213-
THREAD_ZIP_FILE=lib${PACKAGE_NAME}${PACKAGE_VERSION}.zip
212+
ZIPFS_BUILD=1
213+
THREAD_ZIP_FILE=lib${PACKAGE_NAME}${PACKAGE_VERSION}.zip
214214
else
215-
ZIPFS_BUILD=0
216-
THREAD_ZIP_FILE=
215+
ZIPFS_BUILD=0
216+
THREAD_ZIP_FILE=
217217
fi
218218
fi
219219

pkgIndex.tcl.in

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@ package ifneeded [string totitle @PACKAGE_NAME@] @PACKAGE_VERSION@ \
3030
# package ttrace uses some support machinery.
3131

3232
package ifneeded ttrace @PACKAGE_VERSION@ [list ::apply {{dir} {
33-
if {[info exists ::env(TCL_THREAD_LIBRARY)] &&
34-
[file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} {
33+
if {[info exists ::env(TCL_THREAD_LIBRARY)]
34+
&& [file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} {
3535
source $::env(TCL_THREAD_LIBRARY)/ttrace.tcl
3636
} elseif {[file readable [file join $dir .. lib ttrace.tcl]]} {
3737
source [file join $dir .. lib ttrace.tcl]
3838
} elseif {[file readable [file join $dir ttrace.tcl]]} {
3939
source [file join $dir ttrace.tcl]
40-
} elseif {[file exists //zipfs:/lib/thread/ttrace.tcl] ||
41-
![catch {zipfs mount [file join $dir @PKG_LIB_FILE9@] //zipfs:/lib/thread}]} {
40+
} elseif {[file exists //zipfs:/lib/thread/ttrace.tcl]
41+
|| ![catch {zipfs mount [file join $dir @PKG_LIB_FILE9@] //zipfs:/lib/thread}]} {
4242
source //zipfs:/lib/thread/ttrace.tcl
43+
} elseif {[file exists //zipfs:/app/thread_library/ttrace.tcl]
44+
|| ![catch {zipfs mount [file join $dir @PKG_LIB_FILE9@] //zipfs:/app/thread_library}]} {
45+
source //zipfs:/app/thread_library/ttrace.tcl
4346
}
4447
if {[namespace which ::ttrace::update] ne ""} {
4548
::ttrace::update

0 commit comments

Comments
 (0)