Skip to content

Commit

Permalink
Fix zip dependency [f36e5b33], ttrace load failures [aa8e96b4], [4527…
Browse files Browse the repository at this point in the history
…e21f].
  • Loading branch information
apn committed Dec 9, 2024
2 parents 21cdf69 + 5ca308c commit 2eb7ce5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 120 deletions.
24 changes: 2 additions & 22 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ THREAD_VFS_ROOT = libthread.vfs
THREAD_VFS_PATH = ${THREAD_VFS_ROOT}/thread_library

ZIPFS_BUILD = @ZIPFS_BUILD@
NATIVE_ZIP = @ZIP_PROG@
ZIP_PROG_OPTIONS = @ZIP_PROG_OPTIONS@
ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@
SHARED_BUILD = @SHARED_BUILD@
INSTALL_LIBRARIES = @INSTALL_LIBRARIES@
INSTALL_MSGS = @INSTALL_MSGS@
Expand Down Expand Up @@ -227,21 +224,10 @@ ${THREAD_ZIP_FILE}: ${ZIP_INSTALL_OBJS}
@rm -rf ${THREAD_VFS_ROOT}
@mkdir -p ${THREAD_VFS_PATH}
@echo "creating ${THREAD_VFS_PATH} (prepare compression)"
@if \
ln -s $(srcdir)/lib/* ${THREAD_VFS_PATH}/; \
then : ; else \
cp -a $(srcdir)/lib/* ${THREAD_VFS_PATH}; \
fi
@cp -a $(srcdir)/lib/* ${THREAD_VFS_PATH};
@find ${THREAD_VFS_ROOT} -type d -empty -delete
@echo "creating ${THREAD_ZIP_FILE} from ${THREAD_VFS_PATH}"
if test -f ../../minizip.exe; then \
cp ../../minizip.exe . ; \
fi
@(zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}' || \
echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?") 2>/dev/null`; \
echo 'cd ${THREAD_VFS_ROOT} &&' $$zip '${ZIP_PROG_OPTIONS} ../${THREAD_ZIP_FILE} ${ZIP_PROG_VFSSEARCH}'; \
cd ${THREAD_VFS_ROOT} && \
$$zip ${ZIP_PROG_OPTIONS} ../${THREAD_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null)
@echo "zipfs mkzip ${THREAD_ZIP_FILE} ${THREAD_VFS_PATH} ${THREAD_VFS_PATH}" | $(TCLSH)


#========================================================================
Expand Down Expand Up @@ -323,13 +309,7 @@ $(PKG_LIB_FILE): $(PKG_OBJECTS) ${THREAD_ZIP_FILE}
-rm -f $(PKG_LIB_FILE)
${MAKE_LIB}
@if test "${ZIPFS_BUILD}" = "1" ; then \
if test "x$(MACHER)" = "x" ; then \
cat ${THREAD_ZIP_FILE} >> ${PKG_LIB_FILE}; \
else $(MACHER) append ${PKG_LIB_FILE} ${THREAD_ZIP_FILE} /tmp/macher_output; \
mv /tmp/macher_output ${PKG_LIB_FILE}; chmod u+x ${PKG_LIB_FILE}; \
fi; \
${NATIVE_ZIP} -A ${PKG_LIB_FILE} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
fi

$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
Expand Down
93 changes: 0 additions & 93 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,6 @@ INSTALL_MSGS
INSTALL_LIBRARIES
THREAD_ZIP_FILE
ZIPFS_BUILD
ZIP_INSTALL_OBJS
ZIP_PROG_VFSSEARCH
ZIP_PROG_OPTIONS
ZIP_PROG
MACHER_PROG
TCLSH_PROG
VC_MANIFEST_EMBED_EXE
VC_MANIFEST_EMBED_DLL
Expand Down Expand Up @@ -9433,94 +9428,6 @@ esac
fi

if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
#
# Find a native zip implementation
#

MACHER_PROG=""
ZIP_PROG=""
ZIP_PROG_OPTIONS=""
ZIP_PROG_VFSSEARCH=""
ZIP_INSTALL_OBJS=""

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for macher" >&5
printf %s "checking for macher... " >&6; }
if test ${ac_cv_path_macher+y}
then :
printf %s "(cached) " >&6
else case e in #(
e)
search_path=`echo ${PATH} | sed -e 's/:/ /g'`
for dir in $search_path ; do
for j in `ls -r $dir/macher 2> /dev/null` \
`ls -r $dir/macher 2> /dev/null` ; do
if test x"$ac_cv_path_macher" = x ; then
if test -f "$j" ; then
ac_cv_path_macher=$j
break
fi
fi
done
done
;;
esac
fi

if test -f "$ac_cv_path_macher" ; then
MACHER_PROG="$ac_cv_path_macher"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHER_PROG" >&5
printf "%s\n" "$MACHER_PROG" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found macher in environment" >&5
printf "%s\n" "Found macher in environment" >&6; }
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
printf %s "checking for zip... " >&6; }
if test ${ac_cv_path_zip+y}
then :
printf %s "(cached) " >&6
else case e in #(
e)
search_path=`echo ${PATH} | sed -e 's/:/ /g'`
for dir in $search_path ; do
for j in `ls -r $dir/zip 2> /dev/null` \
`ls -r $dir/zip 2> /dev/null` ; do
if test x"$ac_cv_path_zip" = x ; then
if test -f "$j" ; then
ac_cv_path_zip=$j
break
fi
fi
done
done
;;
esac
fi

if test -f "$ac_cv_path_zip" ; then
ZIP_PROG="$ac_cv_path_zip"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5
printf "%s\n" "$ZIP_PROG" >&6; }
ZIP_PROG_OPTIONS="-rq"
ZIP_PROG_VFSSEARCH="*"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5
printf "%s\n" "Found INFO Zip in environment" >&6; }
# Use standard arguments for zip
else
# It is not an error if an installed version of Zip can't be located.
# We can use the locally distributed minizip instead
ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
ZIP_PROG_OPTIONS="-o -r"
ZIP_PROG_VFSSEARCH="*"
ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH. Building minizip" >&5
printf "%s\n" "No zip found on PATH. Building minizip" >&6; }
fi






ZIPFS_BUILD=1
THREAD_ZIP_FILE=lib${PACKAGE_NAME}${PACKAGE_VERSION}.zip
else
Expand Down
4 changes: 0 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ AC_ARG_ENABLE(zipfs,
AS_HELP_STRING([--enable-zipfs],[build with Zipfs support (default: on)]),
[tcl_ok=$enableval], [tcl_ok=yes])
if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
#
# Find a native zip implementation
#
TEA_ZIPFS_SUPPORT
ZIPFS_BUILD=1
THREAD_ZIP_FILE=lib${PACKAGE_NAME}${PACKAGE_VERSION}.zip
else
Expand Down
3 changes: 2 additions & 1 deletion pkgIndex.tcl.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ package ifneeded ttrace @PACKAGE_VERSION@ [list ::apply {{dir} {
source [file join $dir .. lib ttrace.tcl]
} elseif {[file readable [file join $dir ttrace.tcl]]} {
source [file join $dir ttrace.tcl]
} elseif {![catch {zipfs mount [file join $dir @PKG_LIB_FILE@] //zipfs:/lib/thread}]} {
} elseif {[file exists //zipfs:/lib/thread/ttrace.tcl] ||
![catch {zipfs mount [file join $dir @PKG_LIB_FILE@] //zipfs:/lib/thread}]} {
source //zipfs:/lib/thread/ttrace.tcl
}
if {[namespace which ::ttrace::update] ne ""} {
Expand Down

0 comments on commit 2eb7ce5

Please sign in to comment.