+2009-02-06 Andreas Kupries <andreask@activestate.com>
+
+ * library/vfs.tcl.in: New file encapsulating the package load
+ process. Cleaner than the loadvfs proc, and much more suitable for
+ conversion to a teabag.
+
+ * pkgIndex.tcl.in: Cleaned up the declarations for package 'vfs'.
+ Removed the 'vfslib' package, it never was such.
+
+ * Makefile.in: Added installation of library/vfs.tcl.
+ * configure.in: Added library/vfs.tcl.in.
+ * configure: Regenerated.
+
+ * win/makefile.vc: Updated the windows build file to configure
+ vfs.tcl.in, and install vfs.tcl.
+
2009-01-22 Pat Thoyts <patthoyts@users.sourceforge.net>
* tests/vfslib.test: Make use of the core zlib and refchan features
2008-12-22 Pat Thoyts <patthoyts@users.sourceforge.net>
- * library/mk4vfs.tcl: Fix vfs::ztream to support 8.6 core zlib
+ * library/mk4vfs.tcl: Fix vfs::zstream to support 8.6 core zlib
* library/vfslib.tcl:
2008-12-12 Pat Thoyts <patthoyts@users.sourceforge.net>
# this package that need to be installed, if any.
#========================================================================
+# vfs.tcl is found in the build, as it was generated by configure from
+# library/vfs.tcl.in. This necessitated extensions to the target
+# install-lib-binaries.
+
PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ \
ftpvfs.tcl httpvfs.tcl mk4vfs.tcl starkit.tcl \
tarvfs.tcl tclprocvfs.tcl testvfs.tcl \
template/fishvfs.tcl template/globfind.tcl \
template/quotavfs.tcl template/tdelta.tcl \
template/templatevfs.tcl template/versionvfs.tcl \
- template/chrootvfs.tcl
+ template/chrootvfs.tcl vfs.tcl
#========================================================================
echo " $$p"; \
mkdir -p $(DESTDIR)$(pkglibdir)/$$destd; \
$(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
+ elif test -f $(top_builddir)/library/$$p; then \
+ destd=`dirname $$p`; \
+ echo " $$p (generated)"; \
+ mkdir -p $(DESTDIR)$(pkglibdir)/$$destd; \
+ $(INSTALL_DATA) $(top_builddir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
fi; \
done
@echo "Installing pkgIndex.tcl in $(DESTDIR)$(pkglibdir)";
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for vfs 1.4.
+# Generated by GNU Autoconf 2.59 for vfs 1.4.1.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# Identity of this package.
PACKAGE_NAME='vfs'
PACKAGE_TARNAME='vfs'
-PACKAGE_VERSION='1.4'
-PACKAGE_STRING='vfs 1.4'
+PACKAGE_VERSION='1.4.1'
+PACKAGE_STRING='vfs 1.4.1'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures vfs 1.4 to adapt to many kinds of systems.
+\`configure' configures vfs 1.4.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of vfs 1.4:";;
+ short | recursive ) echo "Configuration of vfs 1.4.1:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-vfs configure 1.4
+vfs configure 1.4.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by vfs $as_me 1.4, which was
+It was created by vfs $as_me 1.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
- ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
+ ac_config_files="$ac_config_files Makefile pkgIndex.tcl library/vfs.tcl"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
} >&5
cat >&5 <<_CSEOF
-This file was extended by vfs $as_me 1.4, which was
+This file was extended by vfs $as_me 1.4.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-vfs config.status 1.4
+vfs config.status 1.4.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"pkgIndex.tcl" ) CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
+ "library/vfs.tcl" ) CONFIG_FILES="$CONFIG_FILES library/vfs.tcl" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
# http://www.tcl.tk/ Tcl Developer Exchange
#--------------------------------------------------------------------
-AC_INIT([vfs], [1.4])
+AC_INIT([vfs], [1.4.1])
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
TEA_PROG_TCLSH
-AC_OUTPUT([Makefile pkgIndex.tcl])
+AC_OUTPUT([Makefile pkgIndex.tcl library/vfs.tcl])
--- /dev/null
+# -*- tcl -*-
+
+# Activate the binary and Tcl parts of the package, in the proper
+# order.
+
+# The location of the Tcl parts can be redirected via the environment
+# variable VFS_LIBRARY. This is for use by testing of tclvfs without
+# having to actually install the package. In that case the location of
+# the binary part is redirected through the environment variable
+# TCLLIBPATH (indirect modification of the auto_path). Not used here
+# however, but by Tcl's package management code itself when searching
+# for the package.
+
+namespace eval ::vfs {
+ variable self [file dirname [info script]]
+ variable redir [info exists ::env(VFS_LIBRARY)]
+ variable corezip [package vsatisfies [package provide Tcl] 8.6]
+}
+
+if {[lsearch -exact $::auto_path $::vfs::self] == -1} {
+ lappend ::auto_path $::vfs::self
+}
+
+load [file join $::vfs::self @PKG_LIB_FILE@]
+
+if {$::vfs::redir} {
+ set ::vfs::self $::env(VFS_LIBRARY)
+}
+
+source [file join $::vfs::self vfsUtils.tcl]
+
+if {$::vfs::corezip} {
+ source [file join $::vfs::self vfslib.tcl]
+}
+
+unset ::vfs::self ::vfs::redir ::vfs::corezip
+# -*- tcl -*-
# Tcl package index file, version 1.1
# This file was generated by hand.
#
}
package require Tcl 8.4
-namespace eval ::vfs {}
-variable ::vfs::dll [file join $dir @PKG_LIB_FILE@]
+package ifneeded vfs @PACKAGE_VERSION@ [list source [file join $dir vfs.tcl]]
-proc ::vfs::loadvfs {libdir dll} {
- if {![file exists $dll]} { return }
- set dir [file dirname $dll]
- if {[lsearch -exact $::auto_path $dir] == -1} {
- lappend ::auto_path $dir
- }
- uplevel #0 [list load $dll]
- uplevel #0 [list source [file join $libdir vfsUtils.tcl]]
- if {[package vsatisfies [package provide Tcl] 8.6]} {
- uplevel #0 [list source [file join $libdir vfslib.tcl]]
- }
-}
-
-# Allow optional redirect of VFS_LIBRARY components. Only necessary
-# for testing, but could be used elsewhere.
-if {[info exists ::env(VFS_LIBRARY)]} { set dir $::env(VFS_LIBRARY) }
-
-package ifneeded vfs @PACKAGE_VERSION@ [list ::vfs::loadvfs $dir $vfs::dll]
-
-package ifneeded starkit 1.3.3 [list source [file join $dir starkit.tcl]]
-package ifneeded vfslib 1.4 [list source [file join $dir vfslib.tcl]]
+package ifneeded starkit 1.3.3 [list source [file join $dir starkit.tcl]]
# New, for the old, keep version numbers synchronized.
package ifneeded vfs::mk4 1.10.1 [list source [file join $dir mk4vfs.tcl]]
all: setup $(PROJECT)
$(PROJECT): setup $(PRJLIB) pkgIndex
install: install-binaries install-libraries install-docs
-pkgIndex: setup $(OUT_DIR)\pkgIndex.tcl
+pkgIndex: setup $(OUT_DIR)\pkgIndex.tcl $(OUT_DIR)\vfs.tcl
test: setup $(PROJECT)
@set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
#
#-------------------------------------------------------------------------
-.PHONY: $(OUT_DIR)\pkgIndex.tcl
+.PHONY: $(OUT_DIR)\pkgIndex.tcl $(OUT_DIR)\vfs.tcl
$(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in
nmakehlp -s << $** > $@
@PKG_LIB_FILE@ $(PRJLIBNAME)
<<
+$(OUT_DIR)\vfs.tcl: $(ROOT)\library\vfs.tcl.in
+ nmakehlp -s << $** > $@
+@PACKAGE_NAME@ $(PROJECT)
+@PACKAGE_VERSION@ $(DOTVERSION)
+@PKG_LIB_FILE@ $(PRJLIBNAME)
+<<
+
#---------------------------------------------------------------------
# Installation. (EDIT)
#
install-libraries: pkgIndex
@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
@if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
+ @echo Installing package entrypoint in '$(SCRIPT_INSTALL_DIR)'
+ @$(CPY) $(OUT_DIR)\vfs.tcl "$(SCRIPT_INSTALL_DIR)"
@echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)"