[PATCH] Full-blown .star support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Full-blown .star support

Paolo Bonzini
This adds full-blown support for .star packages.  It includes a grand
reorganization of the tree so that all optional stuff is in a packages
subdirectory.  Packages are built as .star files and installed in the
same form.

packages.xml is still present because it was used to install and
distribute kernel files, but it may actually disappear if I find a good
reason to do so, together with disabled-package and quite some more
support code.

Other interesting news:

- adding a new package is extremely easy, just add a GST_PACKAGE
invocation to configure.ac, and drop a package.xml file in some
subdirectory of `packages'.  Quite a few variations are supported
properly, including generating package.xml at configure time, and
building .st files at `make' time.

- gst-package has grown some interesting options, for example to
generate the list of files in a package in a format that `make' will
understand (i.e. without specifying the srcdir) and that is independent
of the current build directory.

- the `gst' executable is as good as always, but a wrapper is created in
tests/gst, which will run `gst' with all the packages' shared objects in
the LD_LIBRARY_PATH.  This means no more "this modules could not be
loaded" errors while working in the build tree.

- one could use most of the build machinery for standalone packages,
which is good.  This would allow a tool such as Ruby's `gem' to be
written, which would either download a `.star' file from the Internet,
or download a `.tar.gz' file and build it for more complex packages.
Maybe I'll write a little script to create a template for such packages.

- thanks to all the testing infrastructure (e.g. working support for
`make installcheck'), I'm pretty sure this works well.  In fact it was
quite a nightmare to make all corner cases work.  Only thing, I haven't
checked hard if all occurrences of DESTDIR are removed from the
installed files.

- if you're using arch, updating should work fine, but this patch will
take a *long* time to apply.  If you're using CVS be careful that I
moved a lot of files around: make a diff and a backup of your tree
beforehand, and reapply it to a fresh tree.

- since browser/Run.st just had no place to live in, I changed its name
to gst-blox as done in Ubuntu, and installed it in bindir.

With this, a good 80% of the features for 3.0 is in place.  What's
missing is just the grand conversion of the sources into the new syntax.

Play with it and break it.  I'll release a new beta somewhen in July.

Paolo

2007-06-29  Paolo Bonzini  <[hidden email]>

        * kernel/PkgLoader.st: Turn baseDirectories into a block.  Replace
        #shouldReload: with #refresh:.  Support <package> as root tag for
        PackageDirectory>>#parse:.  Include test package files in #allFiles
        and #allDistFiles.  Move #loaded up to PackageInfo.  Prepend
        the owner relativeDirectory to the test package's in #baseDirectories.
        Add PackageLoader class>>#flush:.
        * scripts/Finish.st: Flush PackageLoader.
        * scripts/Package.st: Revamping, including full .star support,
        --copy and --all-files options to --dist, proper handling of srcdir
        paths, --vpath option to --list-files.

* looking for [hidden email]--2004b/smalltalk--devo--2.2--patch-427 to compare with
* comparing to [hidden email]--2004b/smalltalk--devo--2.2--patch-427
A/ packages
A/ packages/blox/tests
A/ packages/continuations
A/ packages/gdbm
A/ packages/glorp
A/ packages/iconv
A/ packages/md5
A/ packages/mysql
A/ packages/ncurses
A/ packages/stinst
A/ packages/stinst/compiler
A/ packages/xpath
A/ packages/xsl
A/ packages/zlib
D  blox/stamp-classes
D  i18n/stamp-classes
D  kernel/stamp-classes
D  tcp/stamp-classes
D  examples/Makefile.am
A  build-aux/package.m4
A  packages/blox/gtk/package.xml
A  packages/blox/tests/package.xml.in
A  packages/blox/tk/package.xml
A  packages/browser/package.xml
A  packages/continuations/package.xml
A  packages/db/package.xml
A  packages/gdbm/Makefile.am
A  packages/gdbm/package.xml
A  packages/glorp/package.xml
A  packages/gtk/package.xml
A  packages/httpd/package.xml
A  packages/i18n/package.xml
A  packages/iconv/Makefile.am
A  packages/iconv/iconv.c
A  packages/iconv/package.xml
A  packages/java/package.xml
A  packages/md5/Makefile.am
A  packages/md5/package.xml
A  packages/mysql/package.xml
A  packages/ncurses/package.xml
A  packages/net/package.xml
A  packages/numerics/package.xml
A  packages/stinst/compiler/package.xml
A  packages/stinst/parser/package.xml
A  packages/sunit/package.xml
A  packages/tcp/package.xml
A  packages/xml/package.xml
A  packages/xpath/package.xml
A  packages/xsl/package.xml
A  packages/zlib/Makefile.am
A  packages/zlib/package.xml
M  configure.ac
M  gst-package.in
M  Makefile.am
M  gst-blox.in
M  NEWS
M  TODO
M  packages.xml
M  doc/Makefile.am
M  doc/gst.texi
M  kernel/PkgLoader.st
M  packages/blox/tk/Makefile.am
M  packages/gtk/Makefile.am
M  packages/i18n/Makefile.am
M  packages/i18n/i18n.c
M  packages/tcp/Makefile.am
M  scripts/Package.st
M  scripts/Finish.st
M  tests/Makefile.am
M  {arch}/=tagging-method
/> blox packages/blox
/> browser packages/browser
/> db packages/db
/> gtk packages/gtk
/> net/httpd packages/httpd
/> i18n packages/i18n
/> java packages/java
/> net packages/net
/> numerics packages/numerics
/> compiler packages/stinst/parser
/> sunit packages/sunit
/> tcp packages/tcp
/> xml packages/xml
=> browser/Run.st gst-blox.in
=> packages.xml.in packages.xml
=> browser/test.st packages/blox/tests/test.st
=> examples/Continuations.st packages/continuations/Continuations.st
=> examples/gdbm-c.st packages/gdbm/gdbm-c.st
=> examples/gdbm.c packages/gdbm/gdbm.c
=> examples/gdbm.st packages/gdbm/gdbm.st
=> examples/gdbmtests.st packages/gdbm/gdbmtests.st
=> db/Glorp.st packages/glorp/Glorp.st
=> db/GlorpMySQL.st packages/glorp/GlorpMySQL.st
=> db/GlorpPort.st packages/glorp/GlorpPort.st
=> db/GlorpTest.st packages/glorp/GlorpTest.st
=> i18n/Sets.st packages/iconv/Sets.st
=> examples/md5.c packages/md5/md5.c
=> examples/md5.st packages/md5/md5.st
=> examples/md5tests.st packages/md5/md5tests.st
=> db/MySQL.st packages/mysql/MySQL.st
=> db/MySQLTests.st packages/mysql/MySQLTests.st
=> db/README packages/mysql/README
=> db/mysql-test.st packages/mysql/mysql-test.st
=> examples/ncurses.st packages/ncurses/ncurses.st
=> compiler/StartCompiler.st packages/stinst/compiler/StartCompiler.st
=> compiler/test.st packages/stinst/compiler/test.st
=> xml/XPath.st packages/xpath/XPath.st
=> xml/XSL.st packages/xsl/XSL.st
=> examples/PipeStream.st packages/zlib/PipeStream.st
=> examples/zlib.c packages/zlib/zlib.c
=> examples/zlib.st packages/zlib/zlib.st
=> examples/zlibtests.st packages/zlib/zlibtests.st

* modified files

--- orig/Makefile.am
+++ mod/Makefile.am
@@ -22,20 +22,20 @@ ACLOCAL_AMFLAGS = -I build-aux
 PACKAGE=smalltalk
 
 DIST_SUBDIRS = lib-src snprintfv lightning sigsegv libffi opcode libgst \
- i18n tcp examples blox/tk . gtk tests doc
+ . $(ALL_PACKAGES) tests doc
 
 SUBDIRS = lib-src lightning $(subdirs)
 if ENABLE_DISASSEMBLER
 SUBDIRS += opcode
 endif
-SUBDIRS += libgst i18n tcp examples blox/tk . doc gtk tests
+SUBDIRS += libgst . $(BUILT_PACKAGES) doc tests
 
 # Running gst inside the build directory...
 
 GST_ARGUMENTS = --no-user-files --kernel-dir="@abs_top_srcdir@/kernel" \
           --image-dir="@abs_top_builddir@"
 GST = ./gst $(GST_ARGUMENTS)
-GST_PACKAGE = GST=./gst GSTARGS='$(GST_ARGUMENTS)' ./gst-package --srcdir="$(srcdir)" -I gst.im
+GST_PACKAGE = GST=./gst GSTARGS='$(GST_ARGUMENTS)' ./gst-package -I gst.im
 
 
 ###########################################################
@@ -73,7 +73,7 @@ endif
 endif
 
 bin_SCRIPTS = gst-package gst-config gst-load gst-reload gst-sunit
-DISTCLEANFILES = termbold termnorm smalltalk-mode.el gst-mode.el
+DISTCLEANFILES = termbold termnorm smalltalk-mode.el gst-mode.el pkgrules.tmp
 CLEANFILES = gst.im $(lisp_LISP)
 
 smalltalk-mode.el: smalltalk-mode.el.in
@@ -117,48 +117,6 @@ gsticon.o: gsticon.ico
 gst.im: $(bin_PROGRAMS) $(srcdir)/kernel/stamp-classes
  $(GST) -iQ /dev/null
 
-all-local:
-
-
-###########################################################
-#
-#        Stamp classes for various packages
-#
-# Used for building the image and the documentation
-#
-###########################################################
-
-CLASS_STAMP = $(srcdir)/blox/stamp-classes $(srcdir)/tcp/stamp-classes $ \
- $(srcdir)/i18n/stamp-classes $(srcdir)/kernel/stamp-classes
-
-blox_PACKAGE=BloxTK
-tcp_PACKAGE=TCP
-i18n_PACKAGE=I18N
-kernel_PACKAGE=Kernel
-
--include $(srcdir)/blox/stamp-classes
--include $(srcdir)/kernel/stamp-classes
--include $(srcdir)/i18n/stamp-classes
--include $(srcdir)/tcp/stamp-classes
-
-all-local: $(CLASS_STAMP)
-
-# The slow rule for building the stamp-classes files uses gst-package, and
-# depends on packages.xml in order to run# when the list of files in the
-# package might have changed.  The fast rule just touches the file.  We
-# could actually do without double-colon rules by using another stamp file
-# which depends on packages.xml and rebuilds all the stamp-classes files.
-
-$(CLASS_STAMP):: packages.xml.in
-
-$(srcdir)/%/stamp-classes: packages.xml.in
- dir=$*; package=$($*_PACKAGE); \
- (echo '$@:: \'; \
-  $(GST_PACKAGE) --list-files $$package packages.xml | \
-    tr -d \\r | tr \\n ' '; \
- echo; \
- echo ' touch $@') > $@
-
 
 ###########################################################
 #
@@ -183,33 +141,47 @@ dist_noinst_DATA += \
 #
 #        Rules for installing and distributing
 #
+# More rules are created by the GST_PACKAGE macros,
+# including the stamp files used for building the
+# documentation.  Here we mimic those rules for the
+# kernel, whose file list lives in packages.xml
+#
 ###########################################################
 
-# We need to provide a basic packages.xml file when a vpath build is in use
-# so that the packages are found in subdirectories of the srcdir
-# The \( ... \) below protect against substitution in config.status
-dist-hook: gst-package
- $(SED) -e "s/@\(I18N_DISABLED\)@/disabled-/" \
-  -e "s/@\(GTK_DISABLED\)@/disabled-/" \
-  -e "s/@\(NCURSES_DISABLED\)@/disabled-/" \
-  -e "s/@\(VERSION\)@/@VERSION@/" \
-  $(srcdir)/packages.xml.in > $(distdir)/packages.xml
- $(GST_PACKAGE) --dist --distdir="$(distdir)" packages.xml
- @for i in $(CLASS_STAMP); do \
-  dir=`dirname $$i`; dir=`basename $$dir`; \
-  echo cp -p $$i $(distdir)/$$dir/stamp-classes; \
-  cp -p $$i $(distdir)/$$dir/stamp-classes; \
- done
+-include $(srcdir)/kernel/stamp-classes
+all-local: $(srcdir)/kernel/stamp-classes
+
+# The slow rule for building the stamp-classes files uses gst-package, and
+# depends on packages.xml in order to run when the list of files in the
+# package might have changed.  The fast rule just touches the file.  We
+# could actually do without double-colon rules by using another stamp file
+# which depends on packages.xml and rebuilds all the stamp-classes files.
+
+$(srcdir)/kernel/stamp-classes:: $(srcdir)/packages.xml
+ (echo '$$(srcdir)/kernel/stamp-classes:: \'; \
+  $(GST_PACKAGE) --list-files Kernel --vpath --srcdir="$(srcdir)" $(srcdir)/packages.xml | \
+    tr -d \\r | tr \\n ' '; \
+ echo; \
+ echo ' touch $$(srcdir)/kernel/stamp-classes') \
+  > $(srcdir)/kernel/stamp-classes
+
+all-local:
+clean-local::
+
+dist-hook::
+ $(GST_PACKAGE) --dist \
+  --distdir="$(distdir)" --srcdir="$(srcdir)" \
+  $(srcdir)/packages.xml
+ cp -p $(srcdir)/kernel/stamp-classes $(distdir)/kernel/stamp-classes
 
 # Build an image after installing the data; install-data runs after
 # install-exec, so the gst executable is already in bindir.
-install-data-hook: gst-package
- rm -f $(DESTDIR)$(pkgdatadir)/packages.xml
- $(GST_PACKAGE) \
-  --no-load --destdir="$(DESTDIR)" --target-dir="$(pkgdatadir)" \
-  packages.xml
+# To install the kernel files, we use gst-package in --dist mode.
+install-data-hook::
+ $(GST_PACKAGE) --dist --copy --all-files \
+  --destdir="$(DESTDIR)" --target-dir="$(pkgdatadir)" \
+  --srcdir="$(srcdir)" $(srcdir)/packages.xml
  $(mkdir_p) $(DESTDIR)$(imagedir)
- rm -f $(DESTDIR)$(imagedir)/gst.im
  cd $(DESTDIR)$(imagedir) && \
   $(DESTDIR)$(bindir)/gst --no-user-files -i \
     --kernel-dir="$(DESTDIR)$(pkgdatadir)/kernel" \
@@ -220,6 +192,7 @@ install-data-hook: gst-package
 uninstall-local:: gst-package
  $(GST_PACKAGE) \
   --uninstall --destdir="$(DESTDIR)" --target-dir="$(pkgdatadir)" \
-  packages.xml
- -rm -f $(DESTDIR)$(pkgdatadir)/packages.xml
+  --srcdir=$(srcdir) $(DESTDIR)$(pkgdatadir)/packages.xml
  -rm -f $(DESTDIR)$(imagedir)/gst.im
+
+@PACKAGE_RULES@


--- orig/NEWS
+++ mod/NEWS
@@ -2,8 +2,12 @@ List of user-visible changes in GNU Smal
 
 NEWS FROM 2.3.5 TO 2.95a
 
-o   A completely new syntax for defining classes is now present.  This will
-    be detailed in a future version of this file.
+Important changes:
+
+o   A completely new syntax for defining classes is now present.  This is
+    detailed in the manual (currently, only in the tutorial section) and
+    the entire source code of the system will be converted to the new
+    syntax.
 
 o   A different startup sequence is used which improves the possibility to
     customize GNU Smalltalk, both site-wide and per-user.  The details are
@@ -23,6 +27,42 @@ o   A different startup sequence is used
     directory as `Directory userKernel' (name subject to change).  A
     `packages.xml' file can be put there.
 
+o   Several classes not meant to be accessed by the user have been moved to
+    an internal Kernel namespace.  This also removes them from the automatically
+    generated documentation.
+
+o   GNU Smalltalk now needs InfoZIP to be installed on the machine where
+    it is running, in order to use the new compressed package facility.
+    In the future, the dependency on InfoZIP will be limited to compiling
+    GNU Smalltalk, or may be removed altogether.
+
+
+Packages improvements:
+
+o   All packages in the distribution are now installed in the new ".star"
+    format (for SmallTalk ARchive).  In the future, the configure macros
+    that are used to ease this process may be extracted in order to create
+    a standard skeleton for package tarballs.
+
+    ".star" files include at the top a package.xml file (whose format
+    is the same as the <package> tag of packages.xml).  The name of
+    ".star" file should be the same as the name of the package if the
+    package.xml file has a <name> tag.
+
+o   In install mode, gst-package automatically creates a ".star" file.
+
+o   gst-package also accepts ".star" files on the command line; in this case,
+    install mode will simply copy the file instead of rebuilding it from
+    scratch.
+
+o   Packages can specify a "testing-only" subpackage that is loaded when
+    running tests (e.g. with "gst-load --test" or "gst-sunit --package"),
+    but not when loading the package normally.  This is done with a <test>
+    tag nested into <package>.
+
+
+Other major changes:
+
 o   Added #from: to Collection, which constructs an instance of the class
     based on a conveniently specified Array.  This allows one to construct
     Dictionaries or LookupTables using
@@ -49,39 +89,21 @@ o   Image load uses copy-on-write memory
     it to the same physical memory, for different copies of the GNU Smalltalk
     virtual machine that loaded the same image.
 
-o   Processes that are garbage collected because they are waiting on a
-    semaphore that also has to be garbage collected are appropriately
-    terminated.
-
-o   Several classes not meant to be accessed by the user have been moved to
-    an internal Kernel namespace.  This also removes them from the automatically
-    generated documentation.
+o   Processes that are garbage collected before they terminate execution (e.g.
+    because they are waiting on a semaphore that is also garbage collected)
+    are appropriately terminated.
 
 o   Startup time and quit time were improved widely (the time for running
     a simple "Hello, World" program is about one fifth of 2.3.x).
 
+o   The graphical browser can now be started just by typing "gst-blox".
+
 o   The image is now installed in /usr/local/var/lib/smalltalk (which in
     most distributions will map to /var/lib/smalltalk).
 
 o   A pragma like "<category: 'bar'>" can be used to set the category
     of a method.
 
-Packages improvements:
-
-o   Packages can specify a "testing-only" subpackage that is loaded when
-    running tests (e.g. with "gst-load --test" or "gst-sunit --package"),
-    but not when loading the package normally.  This is done with a <test>
-    tag nested into <package>.
-
-o   Initial support for ZIPped package files.  These should be named ".star"
-    (SmallTalk ARchive) and include at the top a package.xml file (whose
-    format is the same as the <package> tag of packages.xml).  The name
-    of ".star" file should be the same as the name of the package if the
-    package.xml file has a <name> tag.
-
-    Currently, in order to load ".star" files, unzip should be installed
-    on the machine.
-
 
 -----------------------------------------------------------------------------
 


--- orig/TODO
+++ mod/TODO
@@ -7,7 +7,7 @@
 
 ** implement a better packaging system allowing zipped source files with
 XML package descriptions to be delivered and installed.  Investigate
-basing it on the Virtual File System infrastructure. (being done)
+basing it on the Virtual File System infrastructure. (done)
 
 ** faster startup (done)
 


--- orig/configure.ac
+++ mod/configure.ac
@@ -43,6 +43,10 @@ AC_PROG_AWK
 AC_PROG_LN_S
 GST_PROG_LN
 AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH:/sbin:/usr/sbin)
+AC_PATH_PROG(ZIP, zip, no, $PATH)
+if test "$ZIP" = no; then
+  AC_MSG_ERROR([Please install InfoZIP to use GNU Smalltalk.])
+fi
 
 AC_ARG_WITH(emacs,
 [  --without-emacs         disable Emacs modes for Smalltalk], ,
@@ -218,7 +222,7 @@ AC_REPLACE_FUNCS(putenv strdup strerror
  acosl atanl logl expl tanl sinl cosl truncl lrintl strsep strpbrk)
 AC_CHECK_FUNCS_ONCE(gethostname memcpy memmove sighold uname sbrk usleep lstat \
  grantpt popen getrusage gettimeofday fork strchr utimes utime readlink \
- sigsetmask alarm select mprotect madvise nl_langinfo waitpid \
+ sigsetmask alarm select mprotect madvise waitpid \
  setsid spawnl nanosleep pread pwrite)
 
 GST_FUNC_STRTOUL
@@ -232,62 +236,84 @@ dnl ------------------------- OTHER LIBR
 
 { echo; echo "${term_bold}Auxiliary libraries:${term_norm}"; } >& AS_MESSAGE_FD
 
-AM_LANGINFO_CODESET
-AM_ICONV
-GST_HAVE_LIB(ncurses, initscr)
 GST_HAVE_GMP
-GST_HAVE_TCLTK
 GST_HAVE_READLINE
-GST_INET_SOCKETS
-
-MODULES_EXAMPLE=""
-MODULES_TK=""
-MODULES_GTK=""
-MODULES_TCP=""
-MODULES_I18N=""
-BLOX_IMPLEMENTATION=BloxTK
-NCURSES_DISABLED="disabled-"
-I18N_DISABLED="disabled-"
-GTK_DISABLED="disabled-"
-
-AC_SUBST(MODULES_EXAMPLE)
-AC_SUBST(MODULES_TCP)
-AC_SUBST(MODULES_GTK)
-AC_SUBST(MODULES_I18N)
-AC_SUBST(MODULES_TK)
-AC_SUBST(BLOX_IMPLEMENTATION)
-AC_SUBST(GTK_DISABLED)
-AC_SUBST(I18N_DISABLED)
-AC_SUBST(NCURSES_DISABLED)
-
-AC_CHECK_HEADER(gdbm.h, MODULES_EXAMPLE="$MODULES_EXAMPLE gdbm.la")
-AC_CHECK_HEADER(zlib.h, MODULES_EXAMPLE="$MODULES_EXAMPLE zlib.la")
 
-AC_ARG_ENABLE(gtk,
-[  --enable-gtk={yes,no,blox}
+GST_PACKAGE_PREFIX([packages])
+GST_PACKAGE([BloxGTK], [blox/gtk])
+GST_PACKAGE([BloxTK], [blox/tk],
+   [GST_HAVE_TCLTK],
+   [gst_cv_tcltk_libs],
+   [Makefile], [blox-tk.la])
+GST_PACKAGE([Blox], [blox/tests], , , [package.xml])
+GST_PACKAGE([Browser], [browser])
+GST_PACKAGE([Continuations], [continuations])
+GST_PACKAGE([DB], [db])
+GST_PACKAGE([GDBM], [gdbm],
+   [AC_CHECK_HEADER([gdbm.h])],
+   [ac_cv_header_gdbm_h],
+   [Makefile], [gdbm.la])
+GST_PACKAGE([Glorp], [glorp])
+GST_PACKAGE([GTK], [gtk], [
+  AC_ARG_ENABLE(gtk,
+  [  --enable-gtk={yes,no,blox}
                           enable GTK+ bindings.  Blox/GTK is experimental.], ,
-enable_gtk=yes)
+  enable_gtk=yes)
 
-if test "$enable_gtk" != no; then
-  maybe_enable_gtk=$enable_gtk
-  enable_gtk=no
-  AM_PATH_GLIB_2_0(2.0.0, [
-    AM_PATH_GTK_2_0(2.0.0, [
-      PKG_CHECK_MODULES(ATK, atk >= 1.0.0, [
-        PKG_CHECK_MODULES(PANGO, pango >= 1.0.0, [enable_gtk=$maybe_enable_gtk])
+  if test "$enable_gtk" != no; then
+    maybe_enable_gtk=$enable_gtk
+    enable_gtk=no
+    AM_PATH_GLIB_2_0(2.0.0, [
+      AM_PATH_GTK_2_0(2.0.0, [
+        PKG_CHECK_MODULES(ATK, atk >= 1.0.0, [
+          PKG_CHECK_MODULES(PANGO, pango >= 1.0.0, [enable_gtk=$maybe_enable_gtk])
+        ])
       ])
-    ])
-  ], [], gobject)
+    ], [], gobject)
+  fi],
+  [enable_gtk],
+  [Makefile], [gst-gtk.la])
+GST_PACKAGE([WebServer], [httpd])
+GST_PACKAGE([I18N], [i18n],
+  [AC_CHECK_FUNCS_ONCE([nl_langinfo])
+  AM_LANGINFO_CODESET
+  AM_ICONV],
+  [ac_cv_func_nl_langinfo am_cv_func_iconv],
+  [Makefile], [i18n.la])
+GST_PACKAGE([Iconv], [iconv],
+  [AM_ICONV],
+  [am_cv_func_iconv],
+  [Makefile], [iconv.la])
+GST_PACKAGE([Java], [java])
+GST_PACKAGE([MD5], [md5], [], [], [Makefile], [md5.la])
+GST_PACKAGE([MySQL], [mysql])
+GST_PACKAGE([NCurses],
+  [ncurses],
+  [GST_HAVE_LIB(ncurses, initscr)],
+  [ac_cv_lib_ncurses_initscr])
+GST_PACKAGE([NetClients], [net])
+GST_PACKAGE([DhbNumericalMethods], [numerics])
+GST_PACKAGE([Compiler], [stinst/compiler])
+GST_PACKAGE([Parser], [stinst/parser])
+GST_PACKAGE([SUnit], [sunit])
+GST_PACKAGE([TCP], [tcp],
+  [GST_INET_SOCKETS],
+  [gst_cv_inet_sockets],
+  [Makefile], [tcp.la])
+GST_PACKAGE([XML], [xml])
+GST_PACKAGE([XPath], [xpath])
+GST_PACKAGE([XSL], [xsl])
+GST_PACKAGE([ZLib],
+  [zlib],
+  [AC_CHECK_HEADER([zlib.h])],
+  [ac_cv_header_zlib_h],
+  [Makefile], [zlib.la])
+
+if test "$enable_gtk" = blox; then
+  BLOX_IMPLEMENTATION=BloxGTK
+else
+  BLOX_IMPLEMENTATION=BloxTK
 fi
-
-AM_CONDITIONAL(HAVE_GTK, test "$enable_gtk" != no)
-test "$enable_gtk" != no && MODULES_GTK="gst-gtk.la" GTK_DISABLED=""
-test "$enable_gtk" = blox && BLOX_IMPLEMENTATION=BloxGTK
-test "$gst_cv_tcltk_libs" != "not found" && MODULES_TK="blox-tk.la"
-test "$gst_cv_inet_sockets" != "no" && MODULES_TCP="tcp.la"
-test "$ac_cv_lib_ncurses_initscr" = yes && NCURSES_DISABLED=""
-test "$ac_cv_func_nl_langinfo" = yes && \
-  test "$am_cv_func_iconv" = yes && MODULES_I18N="i18n.la" I18N_DISABLED=""
 
 AC_ARG_ENABLE(jit,
 [  --enable-jit            enable dynamic translation to machine code], ,
@@ -365,7 +391,8 @@ AC_CONFIG_FILES(gst-package, chmod +x gs
 AC_CONFIG_FILES(gst-load, chmod +x gst-load)
 AC_CONFIG_FILES(gst-reload, chmod +x gst-reload)
 AC_CONFIG_FILES(gst-sunit, chmod +x gst-sunit)
-AC_CONFIG_FILES(packages.xml)
+AC_CONFIG_FILES(gst-blox, chmod +x gst-blox)
+AC_CONFIG_FILES(tests/gst, chmod +x tests/gst)
 AC_CONFIG_FILES(libc.la)
 
 dnl Master Makefile
@@ -375,20 +402,4 @@ dnl VM makefiles
 AC_CONFIG_FILES(doc/Makefile lib-src/Makefile libgst/Makefile)
 AC_CONFIG_FILES(opcode/Makefile lightning/Makefile tests/Makefile)
 
-dnl Modules makefiles
-AC_CONFIG_FILES(blox/tk/Makefile examples/Makefile)
-AC_CONFIG_FILES(i18n/Makefile tcp/Makefile)
-AC_CONFIG_FILES(gtk/Makefile)
-
-dnl Support VPATH builds off a CVS repository.  When building from
-dnl the tarball, a suitable packages.xml file is put in the root source
-dnl directory by `make dist'.
-AC_CONFIG_COMMANDS($srcdir/packages.xml, [
-  if test -f $srcdir/packages.xml; then
-    :
-  else
-    $as_ln_s `pwd`/packages.xml $srcdir/packages.xml
-  fi
-])
-
 AC_OUTPUT


--- orig/doc/Makefile.am
+++ mod/doc/Makefile.am
@@ -39,19 +39,19 @@ $(srcdir)/gst.1: $(top_srcdir)/libgst/li
 
 PUBLISHED_NAMESPACES = Smalltalk SystemExceptions NetClients VFS
 
-$(srcdir)/blox.texi: $(top_srcdir)/blox/stamp-classes
+$(srcdir)/blox.texi: $(top_srcdir)/packages/blox/tk/stamp-classes
  rm -f $(srcdir)/blox.texi
  cd $(srcdir) && @abs_top_builddir@/gst -I @abs_top_builddir@/gst.im \
     -f ../scripts/GenLibDoc.st BLOX BloxTK blox.texi Blox.st
  test -f $(srcdir)/blox.texi && touch $(srcdir)/gst-libs.texi
 
-$(srcdir)/tcp.texi: $(top_srcdir)/tcp/stamp-classes
+$(srcdir)/tcp.texi: $(top_srcdir)/packages/tcp/stamp-classes
  rm -f $(srcdir)/tcp.texi
  cd $(srcdir) && @abs_top_builddir@/gst -I @abs_top_builddir@/gst.im \
     -f ../scripts/GenLibDoc.st TCP TCP tcp.texi TCP.st
  test -f $(srcdir)/tcp.texi && touch $(srcdir)/gst-libs.texi
 
-$(srcdir)/i18n.texi: $(top_srcdir)/i18n/stamp-classes
+$(srcdir)/i18n.texi: $(top_srcdir)/packages/i18n/stamp-classes
  rm -f $(srcdir)/i18n.texi
  cd $(srcdir) && @abs_top_builddir@/gst -I @abs_top_builddir@/gst.im \
     -f ../scripts/GenLibDoc.st I18N I18N i18n.texi Load.st Collation.st


--- orig/doc/gst.texi
+++ mod/doc/gst.texi
@@ -1888,16 +1888,12 @@ to the inspector, namespace support and
 To start the browser you can simply type:
 
 @example
-    gst -qK browser/Run.st
+    gst-blox
 @end example
 
 This will load any requested packages, then, if all goes well, a
 worksheet window with a menu named @dfn{Smalltalk} will appear in the
-top-left corner of the screen. You might want to file-in
-@file{browser/Run.st} from your @file{.stinit} file (@pxref{Operation, ,
-Startup sequence}) or to run it automatically through ObjectMemory
-(@pxref{Memory access}).
-
+top-left corner of the screen.
 
 @node Smalltalk-in-Smalltalk
 @section The Smalltalk-in-Smalltalk library


--- orig/browser/Run.st
+++ mod/gst-blox.in
@@ -1,3 +1,5 @@
+#! @bindir@/gst -f
+
 "======================================================================
 |
 |   Smalltalk GUI launching script


--- orig/gst-package.in
+++ mod/gst-package.in
@@ -32,7 +32,7 @@
 
 OPTIONS='-h|--help --version --load --no-load --no-install --uninstall --dist
  -t|--target-directory: --list-files: --list-packages
- --srcdir: --distdir|--destdir:
+ --srcdir: --distdir|--destdir: --copy --all-files --vpath
  -n|--dry-run -I|--image-file:'
 
 prefix=@prefix@
@@ -89,12 +89,7 @@ getopt "$@" | {
   if $list; then
     gst scripts/Package.st "$@"
   else
-    {
-      echo ': ${INSTALL=@INSTALL@}'
-      echo ': ${LN_S=@LN_S@}'
-      echo run_cmd=$run_cmd
-      gst scripts/Package.st "$@"
-    } | sh && \
+    INSTALL='@INSTALL@' LN_S='@LN_S@' ZIP='@ZIP@' gst scripts/Package.st "$@" | sh
 
     if test "$run_cmd" = eval && test "$load_test,$load_dry_run" != ,-n; then
       packages=`eval gst scripts/Package.st \


--- orig/kernel/PkgLoader.st
+++ mod/kernel/PkgLoader.st
@@ -72,7 +72,7 @@ information on a Smalltalk package, and
 XML.'!
 
 PackageGroup subclass: #PackageDirectory
- instanceVariableNames: 'packages fileName baseDirectories'
+ instanceVariableNames: 'packages fileName baseDirectories baseDirCache'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Language-Packaging'
@@ -265,6 +265,14 @@ extractDependenciesFor: packagesList ifM
     ^toBeLoaded
 !
 
+refresh
+    self refresh: ##(Date newDay: 1 month: #jan year: 1900)
+!
+
+refresh: aLoadDate
+    self subclassResponsibility
+! !
+
 
 !Kernel.PackageDirectories class methodsFor: 'instance creation'!
 
@@ -302,12 +310,8 @@ includesKey: aString
     ^dirs anySatisfy: [ :each | each includesKey: aString ]
 !
 
-shouldReload: loadDate
-    ^dirs anySatisfy: [ :each | each shouldReload: loadDate ]
-!
-
-refresh
-    dirs do: [ :each | each refresh ]
+refresh: aLoadDate
+    dirs do: [ :each | each refresh: aLoadDate ]
 ! !
 
 !Kernel.PackageDirectories methodsFor: 'initializing'!
@@ -323,10 +327,10 @@ new
     self shouldNotImplement
 !
 
-on: aString baseDirectories: anArray
+on: aString baseDirectories: aBlock
     ^super new
  fileName: aString;
- baseDirectories: anArray
+ baseDirectories: aBlock
 ! !
 
 !Kernel.PackageDirectory methodsFor: 'accessing'!
@@ -339,12 +343,8 @@ fileName: aString
     fileName := aString
 !
 
-baseDirectories
-    ^baseDirectories
-!
-
-baseDirectories: anArray
-    baseDirectories := anArray
+baseDirectories: aBlock
+    baseDirectories := aBlock
 !
 
 at: aString ifAbsent: aBlock
@@ -362,36 +362,36 @@ includesKey: aString
 
 !Kernel.PackageDirectory methodsFor: 'refreshing'!
 
-shouldReload: loadDate
-    | file |
-    file := File name: fileName.
-    file exists ifFalse: [ packages := LookupTable new. ^false ].
-    ^file lastModifyTime > loadDate
-!
-
-refresh
+refresh: loadDate
     "Private - Process the XML source in the packages file, creating
      Package objects along the way."
 
-    packages := LookupTable new.
-    self refreshPackageList.
-    self refreshStarList
-!
+    | dir file allDirs |
+    file := File name: fileName.
+    dir := Directory name: file path.
 
-refreshPackageList
-    | file allDirs |
     allDirs := Smalltalk imageLocal
- ifTrue: [ { Directory image }, baseDirectories ]
- ifFalse: [ baseDirectories ].
-
-    allDirs isEmpty ifTrue: [ ^self ].
+ ifTrue: [ { Directory image }, baseDirectories value ]
+ ifFalse: [ baseDirectories value ].
+    
+    ((file exists and: [ file lastModifyTime > loadDate ])
+        or: [ (dir exists and: [ dir lastModifyTime > loadDate ])
+        or: [ allDirs ~= baseDirCache ]]) ifTrue: [
+    packages := LookupTable new.
+    baseDirCache := allDirs.
+    self refreshPackageList.
+    self refreshStarList: dir ].
+!
 
+refreshPackageList
+    | file |
+    baseDirCache isEmpty ifTrue: [ ^self ].
     file := [ FileStream open: fileName mode: FileStream read ]
  on: Error
  do: [ :ex | ^self ].
 
     [
-        [ self parse: file baseDirectories: allDirs ]
+        [ self parse: file ]
     on: PackageNotAvailable
     do: [ :ex | ex resignalAs: PackageSkip new ] ]
         ensure: [ file close ].
@@ -399,11 +399,8 @@ refreshPackageList
     packages := packages reject: [ :each | each isDisabled ]
 !
 
-refreshStarList
-    | dir |
-    dir := Directory name: (File pathFor: fileName).
-    dir exists ifFalse: [ ^self].
-
+refreshStarList: dir
+    dir exists ifFalse: [ ^self ].
     dir
  namesMatching: '*.star'
  do: [ :starName |
@@ -412,7 +409,7 @@ refreshStarList
     packages at: package name put: package ]
 !
 
-parse: file baseDirectories: baseDirs
+parse: file
     | open ch cdata tag package |
     open := false.
     [ cdata := cdata isNil
@@ -427,19 +424,19 @@ parse: file baseDirectories: baseDirs
  ch == $! ifTrue: [ file skipTo: $> ].
  ch == $/ ifTrue: [
     file next.
-    ^(tag := file upTo: $>) = 'packages'
- ifTrue: [ packages ]
- ifFalse: [ ^self error: 'unmatched end tag ', tag ] ].
+    (tag := file upTo: $>) = 'packages' ifTrue: [ ^self ].
+    ^self error: 'unmatched end tag ', tag ].
 
  ch isAlphaNumeric ifTrue: [
     open
  ifFalse: [
     tag := file upTo: $>.
-    tag = 'packages' ifFalse: [
- ^self error: 'expected packages tag' ].
-            tag = 'package' ifTrue: [
- package := Package new parse: file tag: 'package' ].
-    open := true ]
+            tag = 'package'
+ ifTrue: [ package := Package new parse: file tag: 'package' ]
+ ifFalse: [
+    tag = 'packages' ifFalse: [
+ ^self error: 'expected packages tag' ].
+    open := true ] ]
  ifTrue: [
     file skip: -1.
     package := Package parse: file ].
@@ -449,15 +446,16 @@ parse: file baseDirectories: baseDirs
             ^self error: 'missing package name in ', fileName ].
 
  [
-    package baseDirectories: baseDirs.
+    package baseDirectories: baseDirCache.
     packages at: package name put: package ]
  on: PackageSkip
- do: [ :ex | ex return ] ].
+ do: [ :ex | ex return ].
+ open ifFalse: [ ^self ] ].
+
     package := nil ] ]
 ! !
 
 
-
 !Kernel.PackageInfo methodsFor: 'accessing'!
 
 fileIn
@@ -611,7 +609,20 @@ files
 allFiles
     "Answer an OrderedCollection of all the files, both built and
      distributed, that are part of the package."
-    ^self files, self builtFiles!
+    | result |
+    result := self files, self builtFiles.
+    self test isNil ifFalse: [
+ result := result, (self test allFiles: self test relativeDirectory) ].
+    ^result!
+
+allDistFiles
+    "Answer an OrderedCollection of all the files, both built and
+     distributed, that are part of the package."
+    | result |
+    result := self files.
+    self test isNil ifFalse: [
+ result := result, (self test allDistFiles: self test relativeDirectory) ].
+    ^result!
 
 fileIns
     "Answer a (modifiable) OrderedCollections of files that are to be
@@ -654,8 +665,21 @@ relativeDirectory
 directory
     "Answer the base directory from which to load the package."
     self subclassResponsibility!
+
+loaded
+    ^self name notNil and: [ Smalltalk hasFeatures: self name ]
 ! !
 
+!Kernel.PackageInfo methodsFor: 'private - subpackages'!
+
+allFiles: prefix
+    prefix isNil ifTrue: [ ^self allFiles ].
+    ^self allFiles collect: [ :each | Directory append: each to: prefix ]!
+
+allDistFiles: prefix
+    prefix isNil ifTrue: [ ^self allDistFiles ].
+    ^self allDistFiles collect: [ :each | Directory append: each to: prefix ]! !
+
 
 !Kernel.StarPackage class methodsFor: 'accessing'!
 
@@ -722,7 +746,7 @@ callouts
     ^self loadedPackage callouts!
 
 relativeDirectory
-    ^'.'!
+    ^nil!
 
 directory
     ^fileName, '#uzip'!
@@ -954,9 +978,6 @@ createNamespace
     ].
     ^ns!
 
-loaded
-    ^self name notNil and: [ Smalltalk hasFeatures: self name ]!
-
 primFileIn
     "Private - File in the given package without paying attention at
      dependencies and C callout availability"
@@ -1061,11 +1082,6 @@ owner: aPackage
     owner := aPackage.
 !
 
-relativeDirectory
-    "Answer the base directory from which to load the package."
-    ^super relativeDirectory ifNil: [owner relativeDirectory]
-!
-
 namespace
     "Answer the namespace in which the package is loaded."
     ^super namespace ifNil: [owner namespace]
@@ -1073,7 +1089,9 @@ namespace
 
 baseDirectories
     "Answer the namespace in which the package is loaded."
-    ^super baseDirectories ifNil: [owner baseDirectories]
+    ^super baseDirectories ifNil: [
+ owner baseDirectories collect: [ :each |
+    Directory append: owner relativeDirectory to: each ] ]
 ! !
 
 
@@ -1157,8 +1175,8 @@ ignoreCallouts: aBoolean
 
 flush
     "Set to reload the `packages.xml' file the next time it is needed."
-    loadDate := nil.
-    root := nil
+    root := nil.
+    loadDate := ##(Date newDay: 1 month: #jan year: 1900)
 !
 
 refresh
@@ -1173,22 +1191,21 @@ refresh
      searched.  For a packages.xml directory in the local image directory,
      finally, only directory 3 is searched."
     | state |
-    loadDate isNil ifFalse: [
- (root shouldReload: loadDate) ifFalse: [ ^self ]
-    ].
-
-    loadDate := Date dateAndTimeNow.
-    root := Kernel.PackageDirectories new.
-    root add: (Kernel.PackageDirectory
+    root isNil ifTrue: [
+ self flush.
+        root := Kernel.PackageDirectories new.
+        root add: (Kernel.PackageDirectory
   on: self packageFileName
-  baseDirectories: { Directory userBase.  Directory kernel, '/..' }).
-    root add: (Kernel.PackageDirectory
+  baseDirectories: [ { Directory userBase. Directory kernel, '/..' } ]).
+        root add: (Kernel.PackageDirectory
   on: self userPackageFileName
-  baseDirectories: { Directory userBase.  }).
-    root add: (Kernel.PackageDirectory
+  baseDirectories: [ { Directory userBase. } ]).
+        root add: (Kernel.PackageDirectory
   on: self localPackageFileName
-  baseDirectories: #()).
-    root refresh
+  baseDirectories: [ #() ]) ].
+
+    root refresh: loadDate.
+    loadDate := Date dateAndTimeNow.
 ! !
 
 
@@ -1264,4 +1281,3 @@ rebuildPackageFile
         root printOn: file
     ] ensure: [ file close ]
 ! !
-


--- orig/packages.xml.in
+++ mod/packages.xml
@@ -1,153 +1,6 @@
-<!-- GNU Smalltalk @VERSION@ package description file -->
-
 <packages>
 <package>
-  <name>Blox</name>
-  <prereq>@BLOX_IMPLEMENTATION@</prereq>
-  <namespace>BLOX</namespace>
-  <directory>browser</directory>
-
-  <file>test.st</file>
-  <file>ChangeLog</file>
-</package>
-
-<@GTK_DISABLED@package>
-  <name>GTK</name>
-  <namespace>GTK</namespace>
-  <filein>GtkDecl.st</filein>
-  <filein>Libs.st</filein>
-  <filein>Structs.st</filein>
-  <filein>MoreStructs.st</filein>
-  <filein>Enums.st</filein>
-  <filein>Funcs.st</filein>
-  <filein>MoreFuncs.st</filein>
-  <filein>GtkImpl.st</filein>
-
-  <module>gst-gtk</module>
-  <directory>gtk</directory>
-
-  <built-file>Structs.st</built-file>
-  <built-file>Enums.st</built-file>
-  <built-file>Funcs.st</built-file>
-  <built-file>Libs.st</built-file>
-  <file>GtkDecl.st</file>
-  <file>GtkImpl.st</file>
-  <file>MoreFuncs.st</file>
-  <file>MoreStructs.st</file>
-  <file>example_arrow.st</file>
-  <file>example_aspectframe.st</file>
-  <file>example_buttonbox.st</file>
-  <file>example_entry.st</file>
-  <file>example_eventbox.st</file>
-  <file>example_hello.st</file>
-  <file>example_tictactoe.st</file>
-  <file>example_tree.st</file>
-</@GTK_DISABLED@package>
-
-<package>
-  <name>BloxGTK</name>
-  <namespace>BLOX</namespace>
-  <prereq>GTK</prereq>
-  <provides>Blox</provides>
-
-  <filein>BloxBasic.st</filein>
-  <filein>BloxWidgets.st</filein>
-  <filein>BloxText.st</filein>
-  <filein>BloxExtend.st</filein>
-  <filein>Blox.st</filein>
-  <filein>../../browser/test.st</filein>
-  <directory>blox/gtk</directory>
-
-  <file>Blox.st</file>
-  <file>BloxBasic.st</file>
-  <file>BloxWidgets.st</file>
-  <file>BloxText.st</file>
-  <file>BloxExtend.st</file>
-</package>
-
-<package>
-  <name>BloxTK</name>
-  <namespace>BLOX</namespace>
-  <provides>Blox</provides>
-
-  <filein>BloxBasic.st</filein>
-  <filein>BloxWidgets.st</filein>
-  <filein>BloxText.st</filein>
-  <filein>BloxCanvas.st</filein>
-  <filein>BloxExtend.st</filein>
-  <filein>Blox.st</filein>
-  <filein>../../browser/test.st</filein>
-  <module>blox-tk</module>
-  <directory>blox/tk</directory>
-
-  <file>Blox.st</file>
-  <file>BloxBasic.st</file>
-  <file>BloxWidgets.st</file>
-  <file>BloxText.st</file>
-  <file>BloxCanvas.st</file>
-  <file>BloxExtend.st</file>
-  <file>colors.txt</file>
-</package>
-
-<package>
-  <name>Browser</name>
-  <namespace>BLOX.BLOXBrowser</namespace>
-  <prereq>Blox</prereq>
-  <prereq>Parser</prereq>
-  <filein>Load.st</filein>
-  <filein>GuiData.st</filein>
-  <filein>View.st</filein>
-  <filein>Manager.st</filein>
-  <filein>RadioForm.st</filein>
-  <filein>Menu.st</filein>
-  <filein>ModalDialog.st</filein>
-  <filein>PList.st</filein>
-  <filein>PText.st</filein>
-  <filein>PCode.st</filein>
-  <filein>ButtonForm.st</filein>
-  <filein>BrowShell.st</filein>
-  <filein>BrowserMain.st</filein>
-  <filein>ClassHierBrow.st</filein>
-  <filein>ClassBrow.st</filein>
-  <filein>NamespBrow.st</filein>
-  <filein>MethSetBrow.st</filein>
-  <filein>Inspector.st</filein>
-  <filein>DictInspect.st</filein>
-  <filein>MethInspect.st</filein>
-  <filein>StrcInspect.st</filein>
-  <filein>DebugSupport.st</filein>
-  <filein>Debugger.st</filein>
-  <filein>Notifier.st</filein>
-
-  <directory>browser</directory>
-
-  <file>BrowShell.st</file>
-  <file>Inspector.st</file>
-  <file>Notifier.st</file>
-  <file>View.st</file>
-  <file>BrowserMain.st</file>
-  <file>Load.st</file>
-  <file>PCode.st</file>
-  <file>bear.gif</file>
-  <file>ClassBrow.st</file>
-  <file>Manager.st</file>
-  <file>PList.st</file>
-  <file>ButtonForm.st</file>
-  <file>test.st</file>
-  <file>ClassHierBrow.st</file>
-  <file>Menu.st</file>
-  <file>PText.st</file>
-  <file>DebugSupport.st</file>
-  <file>Debugger.st</file>
-  <file>MethInspect.st</file>
-  <file>RadioForm.st</file>
-  <file>NamespBrow.st</file>
-  <file>DictInspect.st</file>
-  <file>MethSetBrow.st</file>
-  <file>Run.st</file>
-  <file>GuiData.st</file>
-  <file>ModalDialog.st</file>
-  <file>StrcInspect.st</file>
+  <name>Regex</name>
 </package>
 
 <disabled-package>
@@ -178,422 +31,6 @@
   <file>StreamStack.st</file>
 </disabled-package>
 
-<package>
-  <name>Compiler</name>
-  <namespace>STInST</namespace>
-  <prereq>Parser</prereq>
-  <filein>StartCompiler.st</filein>
-  <directory>compiler</directory>
-
-  <file>StartCompiler.st</file>
-  <file>test.st</file>
-  <file>ChangeLog</file>
-</package>
-
-<@I18N_DISABLED@package>
-  <name>Iconv</name>
-  <namespace>I18N</namespace>
-
-  <filein>Sets.st</filein>
-
-  <module>i18n</module>
-  <directory>i18n</directory>
-
-  <file>Sets.st</file>
-</@I18N_DISABLED@package>
-
-<@I18N_DISABLED@package>
-  <name>I18N</name>
-  <namespace>I18N</namespace>
-  <prereq>Iconv</prereq>
-
-  <filein>Locale.st</filein>
-  <filein>Expression.st</filein>
-  <filein>GetText.st</filein>
-  <filein>Numbers.st</filein>
-  <filein>Times.st</filein>
-
-  <module>i18n</module>
-  <directory>i18n</directory>
-
-  <file>Locale.st</file>
-  <file>Expression.st</file>
-  <file>GetText.st</file>
-  <file>Numbers.st</file>
-  <file>Times.st</file>
-  <file>Collation.st</file>
-  <file>ChangeLog</file>
-</@I18N_DISABLED@package>
-
-<package>
-  <name>DB</name>
-  <namespace>Jdm</namespace>
-  <filein>DB.st</filein>
-  <directory>db</directory>
-
-  <file>DB.st</file>
-  <file>README</file>
-  <file>ChangeLog</file>
-</package>
-
-<package>
-  <name>DhbNumericalMethods</name>
-  <namespace>Dhb</namespace>
-
-  <filein>Basic.st</filein>
-  <filein>Statistics.st</filein>
-  <filein>RNG.st</filein>
-  <filein>Approximation.st</filein>
-  <filein>Matrixes.st</filein>
-  <filein>Functions.st</filein>
-  <filein>Optimization.st</filein>
-  <filein>Distributions.st</filein>
-  <filein>Integration.st</filein>
-  <filein>NumericsAdds.st</filein>
-  <directory>numerics</directory>
-
-  <test>
-    <sunit>Dhb.DhbTestCase*</sunit>
-    <filein>NumericsTests.st</filein>
-  </test>
-
-  <file>NumericsTests.st</file>
-  <file>Approximation.st</file>
-  <file>Basic.st</file>
-  <file>Distributions.st</file>
-  <file>Functions.st</file>
-  <file>Integration.st</file>
-  <file>Matrixes.st</file>
-  <file>Optimization.st</file>
-  <file>RNG.st</file>
-  <file>Statistics.st</file>
-  <file>NumericsAdds.st</file>
-</package>
-
-<package>
-  <name>GDBM</name>
-  <filein>gdbm-c.st</filein>
-  <filein>gdbm.st</filein>
-  <module>gdbm</module>
-  <directory>examples</directory>
-
-  <test>
-    <sunit>GDBMTest</sunit>
-    <filein>gdbmtests.st</filein>
-  </test>
-
-  <file>gdbm.st</file>
-  <file>gdbm-c.st</file>
-  <file>gdbmtests.st</file>
-</package>
-
-<@NCURSES_DISABLED@package>
-  <name>NCurses</name>
-  <filein>ncurses.st</filein>
-  <library>libncurses</library>
-  <directory>examples</directory>
-
-  <file>ncurses.st</file>
-</@NCURSES_DISABLED@package>
-
-<package>
-  <name>ZLib</name>
-  <filein>PipeStream.st</filein>
-  <filein>zlib.st</filein>
-  <module>zlib</module>
-  <directory>examples</directory>
-
-  <test>
-   <sunit>ZlibStreamTest</sunit>
-   <filein>zlibtests.st</filein>
-  </test>
-
-  <file>PipeStream.st</file>
-  <file>zlib.st</file>
-  <file>zlibtests.st</file>
-</package>
-
-<package>
-  <name>MD5</name>
-  <filein>md5.st</filein>
-  <module>md5</module>
-  <directory>examples</directory>
-
-  <test>
-   <sunit>MD5Test</sunit>
-   <filein>md5tests.st</filein>
-  </test>
-
-  <file>md5.st</file>
-  <file>md5tests.st</file>
-</package>
-
-<package>
-  <name>MySQL</name>
-  <namespace>Jdm.MySQL</namespace>
-  <prereq>DB</prereq>
-  <prereq>TCP</prereq>
-  <prereq>SUnit</prereq>
-  <filein>MySQL.st</filein>
-  <filein>MySQLTests.st</filein>
-  <directory>db</directory>
-
-  <file>MySQL.st</file>
-  <file>MySQLTests.st</file>
-  <file>mysql-test.st</file>
-</package>
-
-<package>
-  <name>Glorp</name>
-  <prereq>MySQL</prereq>
-  <prereq>SUnit</prereq>
-  <filein>GlorpPort.st</filein>
-  <filein>Glorp.st</filein>
-  <filein>GlorpMySQL.st</filein>
-  <filein>GlorpTest.st</filein>
-  <directory>db</directory>
-
-  <file>GlorpPort.st</file>
-  <file>Glorp.st</file>
-  <file>GlorpMySQL.st</file>
-  <file>GlorpTest.st</file>
-</package>
-
-<package>
-  <name>NetClients</name>
-  <prereq>TCP</prereq>
-  <prereq>SUnit</prereq>
-  <filein>Load.st</filein>
-  <directory>net</directory>
-
-  <file>Base.st</file>
-  <file>HTTP.st</file>
-  <file>Load.st</file>
-  <file>NetServer.st</file>
-  <file>MIME.st</file>
-  <file>ContentHandler.st</file>
-  <file>FTP.st</file>
-  <file>IMAP.st</file>
-  <file>NNTP.st</file>
-  <file>POP.st</file>
-  <file>SMTP.st</file>
-  <file>URIResolver.st</file>
-  <file>ChangeLog</file>
-</package>
-
-<package>
-  <name>Parser</name>
-
-  <namespace>STInST</namespace>
-  <filein>RBToken.st</filein>
-  <filein>RBParseNodes.st</filein>
-  <filein>RBParser.st</filein>
-  <filein>ParseTreeSearcher.st</filein>
-  <filein>RBFormatter.st</filein>
-  <filein>OrderedSet.st</filein>
-  <filein>STFileParser.st</filein>
-  <filein>STCompLit.st</filein>
-  <filein>STSymTable.st</filein>
-  <filein>STCompiler.st</filein>
-  <filein>STDecompiler.st</filein>
-  <filein>STLoaderObjs.st</filein>
-  <filein>STLoader.st</filein>
-  <filein>SqueakParser.st</filein>
-  <filein>SIFParser.st</filein>
-  <filein>Exporter.st</filein>
-
-  <test>
-   <sunit>STInST.Tests.TestStandardRewrites</sunit>
-   <filein>RewriteTests.st</filein>
-  </test>
-
-  <directory>compiler</directory>
-
-  <file>ParseTreeSearcher.st</file>
-  <file>RBFormatter.st</file>
-  <file>RBParseNodes.st</file>
-  <file>RBParser.st</file>
-  <file>RBToken.st</file>
-  <file>OrderedSet.st</file>
-  <file>STCompLit.st</file>
-  <file>STCompiler.st</file>
-  <file>STDecompiler.st</file>
-  <file>STLoader.st</file>
-  <file>STLoaderObjs.st</file>
-  <file>STSymTable.st</file>
-  <file>RewriteTests.st</file>
-  <file>SqueakParser.st</file>
-  <file>SIFParser.st</file>
-  <file>Exporter.st</file>
-</package>
-
-<package>
-  <name>Regex</name>
-  <directory>examples</directory>
-</package>
-
-<package>
-  <name>SUnit</name>
-
-  <filein>SUnitPreload.st</filein>
-  <filein>SUnit.st</filein>
-  <filein>SUnitScript.st</filein>
-  <directory>sunit</directory>
-
-  <test>
-    <sunit>SUnitTest</sunit>
-    <sunit>TestSuitesScriptTest</sunit>
-    <filein>SUnitTests.st</filein>
-    <filein>SUnitScriptTests.st</filein>
-  </test>
-
-  <file>SUnit.st</file>
-  <file>SUnitPreload.st</file>
-  <file>SUnitTests.st</file>
-  <file>SUnitScript.st</file>
-  <file>SUnitScriptTests.st</file>
-</package>
-
-<package>
-  <name>TCP</name>
-  <namespace>TCP</namespace>
-  <filein>Buffers.st</filein>
-  <filein>Datagram.st</filein>
-  <filein>SocketAddress.st</filein>
-  <filein>AbstractSocketImpl.st</filein>
-  <filein>IPSocketImpl.st</filein>
-  <filein>Sockets.st</filein>
-  <filein>Tests.st</filein>
-  <filein>cfuncs.st</filein>
-  <filein>init.st</filein>
-
-  <module>tcp</module>
-  <directory>tcp</directory>
-
-  <file>Buffers.st</file>
-  <file>Datagram.st</file>
-  <file>SocketAddress.st</file>
-  <file>AbstractSocketImpl.st</file>
-  <file>IPSocketImpl.st</file>
-  <file>Sockets.st</file>
-  <file>Tests.st</file>
-  <file>cfuncs.st</file>
-  <file>init.st</file>
-  <file>ChangeLog</file>
-</package>
-
-<package>
-  <name>WebServer</name>
-  <namespace>NetClients.WikiWorks</namespace>
-  <prereq>NetClients</prereq>
-  <filein>WebServer.st</filein>
-  <filein>FileServer.st</filein>
-  <filein>WikiServer.st</filein>
-  <filein>STT.st</filein>
-  <filein>Haiku.st</filein>
-
-  <directory>net/httpd</directory>
-
-  <file>FileServer.st</file>
-  <file>Haiku.st</file>
-  <file>STT.st</file>
-  <file>WebServer.st</file>
-  <file>WikiServer.st</file>
-  <file>edit.jpg</file>
-  <file>example1.stt</file>
-  <file>example2.stt</file>
-  <file>find.jpg</file>
-  <file>head.jpg</file>
-  <file>help.jpg</file>
-  <file>history.jpg</file>
-  <file>next.jpg</file>
-  <file>prev.jpg</file>
-  <file>recent.jpg</file>
-  <file>rename.jpg</file>
-  <file>test.st</file>
-  <file>top.jpg</file>
-</package>
-
-<package>
-  <name>Java</name>
-  <prereq>TCP</prereq>
-  <filein>Java.st</filein>
-  <directory>java</directory>
-
-  <file>Java.st</file>
-  <file>JavaClassFiles.st</file>
-  <file>JavaMetaobjects.st</file>
-  <file>JavaTranslation.st</file>
-  <file>JavaRuntime.st</file>
-  <file>JavaExtensions.st</file>
-  <file>extract-native.awk</file>
-  <file>gnu_gcj_convert_IOConverter.st</file>
-  <file>gnu_gcj_runtime_StackTrace.st</file>
-  <file>gnu_gcj_runtime_StringBuffer.st</file>
-  <file>gnu_java_net_PlainDatagramSocketImpl.st</file>
-  <file>gnu_java_net_PlainSocketImpl.st</file>
-  <file>gnu_java_nio_FileLockImpl.st</file>
-  <file>gnu_java_nio_SelectorImpl.st</file>
-  <file>java_io_File.st</file>
-  <file>java_io_FileDescriptor.st</file>
-  <file>java_io_ObjectInputStream.st</file>
-  <file>java_io_VMObjectStreamClass.st</file>
-  <file>java_lang_Character.st</file>
-  <file>java_lang_Class.st</file>
-  <file>java_lang_ConcreteProcess.st</file>
-  <file>java_lang_Double.st</file>
-  <file>java_lang_Float.st</file>
-  <file>java_lang_Math.st</file>
-  <file>java_lang_Object.st</file>
-  <file>java_lang_Runtime.st</file>
-  <file>java_lang_String.st</file>
-  <file>java_lang_StringBuffer.st</file>
-  <file>java_lang_System.st</file>
-  <file>java_lang_Thread.st</file>
-  <file>java_lang_VMClassLoader.st</file>
-  <file>java_lang_ref_Reference.st</file>
-  <file>java_lang_reflect_Array.st</file>
-  <file>java_lang_reflect_Constructor.st</file>
-  <file>java_lang_reflect_Field.st</file>
-  <file>java_lang_reflect_Method.st</file>
-  <file>java_lang_reflect_Proxy.st</file>
-  <file>java_net_InetAddress.st</file>
-  <file>java_net_NetworkInterface.st</file>
-  <file>java_nio_DirectByteBufferImpl.st</file>
-  <file>java_nio_channels_FileChannelImpl.st</file>
-  <file>java_text_Collator.st</file>
-  <file>java_util_ResourceBundle.st</file>
-  <file>java_util_TimeZone.st</file>
-  <file>java_util_zip_Deflater.st</file>
-  <file>java_util_zip_Inflater.st</file>
-</package>
-
-<package>
-  <name>XML</name>
-  <filein>XML.st</filein>
-  <directory>xml</directory>
-
-  <file>XML.st</file>
-  <file>ChangeLog</file>
-</package>
-
-<package>
-  <name>XPath</name>
-  <prereq>XML</prereq>
-  <filein>XPath.st</filein>
-  <directory>xml</directory>
-  <file>XPath.st</file>
-</package>
-
-<package>
-  <name>XSL</name>
-  <prereq>XML</prereq>
-  <prereq>XPath</prereq>
-  <filein>XSL.st</filein>
-  <directory>xml</directory>
-  <file>XSL.st</file>
-</package>
-
 <disabled-package>
   <name>OtherExamples</name>
   <directory>unsupported</directory>
@@ -627,17 +64,6 @@
   <file>torture.st</file>
 </disabled-package>
 
-<package>
-  <name>Continuations</name>
-  <sunit>ContinuationTest AmbTest</sunit>
-  <prereq>SUnit</prereq>
-
-  <filein>Continuations.st</filein>
-
-  <directory>examples</directory>
-  <file>Continuations.st</file>
-</package>
-
 <disabled-package>
   <name>Examples</name>
   <directory>examples</directory>


--- orig/blox/tk/Makefile.am
+++ mod/packages/blox/tk/Makefile.am
@@ -1,5 +1,4 @@
-pkglib_LTLIBRARIES = @MODULES_TK@
-EXTRA_LTLIBRARIES = blox-tk.la
+pkglib_LTLIBRARIES = blox-tk.la
 
 gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
  -no-undefined -export-symbols-regex gst_initModule


--- orig/gtk/Makefile.am
+++ mod/packages/gtk/Makefile.am
@@ -8,8 +8,7 @@ gst_module_ldflags = -rpath $(pkglibdir)
 
 ALL_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(PANGO_LIBS) $(ATK_LIBS)
 
-EXTRA_LTLIBRARIES = gst-gtk.la
-pkglib_LTLIBRARIES = @MODULES_GTK@
+pkglib_LTLIBRARIES = gst-gtk.la
 gst_gtk_la_LDFLAGS = $(gst_module_ldflags)
 gst_gtk_la_LIBADD = $(ALL_LIBS)
 dist_gst_gtk_la_SOURCES = gst-gtk.c placer.c
@@ -34,8 +33,6 @@ GLIB_FILES = \
 
 LOCAL_FILES = $(srcdir)/placer.h
 
-if HAVE_GTK
-
 nodist_noinst_DATA = Structs.st Funcs.st Enums.st Libs.st
 nodist_noinst_SCRIPTS = cpp structs funcs mk_sizeof mk_enums
 
@@ -93,8 +90,8 @@ enums.c: mk_enums cpp order
  LANG=C; export LANG; xargs ./cpp < order | ./mk_enums > enums.c
 
 order: order.st Makefile $(LOCAL_FILES)
- PKG_CONFIG='$(PKG_CONFIG)' ../gst \
-  -I ../gst.im -f $(srcdir)/order.st \
+ PKG_CONFIG='$(PKG_CONFIG)' ../../gst \
+  -I ../../gst.im -f $(srcdir)/order.st \
   -Pg -Patk -Ppango \
   `$(PKG_CONFIG) --cflags-only-I gobject-2.0` \
   `$(PKG_CONFIG) --cflags-only-I gdk-2.0` \
@@ -116,8 +113,3 @@ order: order.st Makefile $(LOCAL_FILES)
  echo "$$i" ;; \
     esac; \
   done > order
-
-endif   # HAVE_GTK
-
-dist-hook:
- for i in $(CLEANFILES); do rm -f $(distdir)/$$i; done


--- orig/i18n/Makefile.am
+++ mod/packages/i18n/Makefile.am
@@ -1,11 +1,10 @@
-pkglib_LTLIBRARIES = @MODULES_I18N@
-EXTRA_LTLIBRARIES = i18n.la
+pkglib_LTLIBRARIES = i18n.la
 
 gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
  -no-undefined -export-symbols-regex gst_initModule
 
 i18n_la_LDFLAGS = $(gst_module_ldflags)
-i18n_la_LIBADD = $(LTLIBICONV) $(top_builddir)/lib-src/library.la
+i18n_la_LIBADD = $(top_builddir)/lib-src/library.la
 i18n_la_SOURCES = i18n.c localcharset.c
 
 AM_CPPFLAGS = -I$(top_srcdir)/libgst -I$(top_srcdir)/lib-src \


--- orig/i18n/i18n.c
+++ mod/packages/i18n/i18n.c
@@ -58,7 +58,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <langinfo.h>
-#include <iconv.h>
 #include <errno.h>
 
 #if defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(Win32) || defined(__WIN32)
@@ -271,36 +270,6 @@ loadLocale (OOP localeOOP, const char *s
   return charset;
 }
 
-mst_Boolean
-iconvWrapper (iconv_t handle, OOP readBufferOOP, int readPos,
-      int readCount, OOP writeBufferOOP, int writeCount,
-      OOP bytesLeftOOP)
-{
-  const char *inbuf;
-  size_t inbytesleft;
-  char *outbuf;
-  size_t outbytesleft;
-  int save_errno;
-
-  gst_object bytesLeft, readBuffer, writeBuffer;
-
-  readBuffer = OOP_TO_OBJ (readBufferOOP);
-  inbuf = &STRING_OOP_AT (readBuffer, readPos);
-  inbytesleft = readCount;
-
-  writeBuffer = OOP_TO_OBJ (writeBufferOOP);
-  outbuf = &STRING_OOP_AT (writeBuffer, 1);
-  outbytesleft = writeCount;
-
-  iconv (handle, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-  save_errno = errno;
-  errno = 0;
-
-  bytesLeft = OOP_TO_OBJ (bytesLeftOOP);
-  ARRAY_OOP_AT (bytesLeft, 1) = vmProxy->intToOOP (inbytesleft);
-  ARRAY_OOP_AT (bytesLeft, 2) = vmProxy->intToOOP (outbytesleft);
-  return (save_errno != EILSEQ);
-}
 
 const char *
 localeDirectory (void)
@@ -382,7 +351,4 @@ gst_initModule (VMProxy * proxy)
   vmProxy = proxy;
   vmProxy->defineCFunc ("i18n_load", loadLocale);
   vmProxy->defineCFunc ("i18n_localeDirectory", localeDirectory);
-  vmProxy->defineCFunc ("iconv_open", iconv_open);
-  vmProxy->defineCFunc ("iconv_close", iconv_close);
-  vmProxy->defineCFunc ("iconvWrapper", iconvWrapper);
 }


--- orig/tcp/Makefile.am
+++ mod/packages/tcp/Makefile.am
@@ -1,5 +1,4 @@
-pkglib_LTLIBRARIES = @MODULES_TCP@
-EXTRA_LTLIBRARIES = tcp.la
+pkglib_LTLIBRARIES = tcp.la
 
 gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
  -no-undefined -export-symbols-regex gst_initModule


--- orig/scripts/Finish.st
+++ mod/scripts/Finish.st
@@ -55,4 +55,5 @@ ImageFilePath := newImagePath.
 KernelFilePath := newKernelBasePath, '/kernel'.
 UserFileBasePath := nil!
 
+PackageLoader flush!
 ObjectMemory snapshot!


--- orig/scripts/Package.st
+++ mod/scripts/Package.st
@@ -30,6 +30,10 @@
 
 
 Package extend [
+    srcdir [
+ ^self baseDirectories last
+    ]
+
     isStarPackageBody [
  ^'*.star#uzip' match: self baseDirectories first
     ]
@@ -47,13 +51,23 @@ Package extend [
     ]
 ]
 
+Kernel.PackageDirectory subclass: StarPackageFile [
+    refreshStarList: dir [
+ | package |
+ package := Kernel.StarPackage fileName: self fileName.
+        packages at: package name put: package loadedPackage
+    ]
+
+    refreshPackageList []
+]
+
 Kernel.PackageDirectory subclass: PackageFile [
-    refreshStarList []
+    refreshStarList: dir []
 
     refreshPackageList [
         | file |
  file := FileStream open: fileName mode: FileStream read.
- [ self parse: file baseDirectories: baseDirectories ]
+ [ self parse: file ]
     ensure: [ file close ].
     ]
 ]
@@ -71,20 +85,37 @@ Kernel.PackageDirectories subclass: Pack
     ifFalse: [
  PackageFile
     on: fileName
-    baseDirectories: (self baseDirsFor: fileName) ]
+    baseDirectories: [ self baseDirsFor: fileName ] ]
     ifTrue: [
- PackageFile
-    on: fileName, '#uzip/package.xml'
-    baseDirectories: fileName, '#uzip' ].
+ StarPackageFile
+    on: fileName
+    baseDirectories: [ fileName, '#uzip' ] ].
 
  packageFile refresh.
  self add: packageFile.
     ]
 
     baseDirsFor: fileName [
- ^self srcdir isNil
-    ifTrue: [ { (File name: fileName) path } ]
-    ifFalse: [ { (File name: fileName) path. srcdir } ]
+ | file srcdirPath builddirPrefix |
+ file := File name: fileName.
+ self srcdir isNil ifTrue: [ ^{ file path } ].
+
+ "See if the file is in srcdir or builddir.  In any case, we want to
+ look for files first in the builddir, and secondarily in srcdir."
+ srcdirPath := file pathFrom: srcdir.
+ builddirPrefix := (Directory name: Directory working) pathFrom: srcdir.
+ ^(srcdirPath startsWith: builddirPrefix, Directory pathSeparatorString)
+    ifFalse: [
+ "file is in srcdir."
+ { File pathFor: srcdirPath. file path } ]
+    ifTrue: [ {
+ "file is in builddir."
+ file path.
+ Directory append: (File pathFor: fileName) to: self srcdir } ]
+    ]
+
+    filesDo: aBlock [
+ (dirs collect: [ :each | each fileName ]) asSet do: aBlock
     ]
 
     srcdir [
@@ -97,31 +128,36 @@ Kernel.PackageDirectories subclass: Pack
 ]
 
 File extend [
+    emitZipDir: dir [
+ self emitRemove.
+ ('cmd %1 \$ZIP -qr %2 .' % { dir. self }) displayNl
+    ]
+
     emitRemove [
- ('cmd rm -f %1' % { self }) displayNl
+ ('cmd . rm -f %1' % { self }) displayNl
     ]
 
     emitSymlink: dest [
- self isDirectory ifTrue: [ ^(Directory name: dest) emitMkdir ].
- ('cmd \$LN_S -f %1 %2' % { self. File name: dest }) displayNl
+ ('cmd . \$LN_S -f %1 %2' % { self. dest }) displayNl
     ]
 
     emitInstall: dest [
  | mode |
  mode := self isExecutable ifTrue: [ 8r755 ] ifFalse: [ 8r644 ].
- ('cmd \$INSTALL -m %1 %2 %3'
+ ('cmd . \$INSTALL -m %1 %2 %3'
     % { mode printString: 8. self. File name: dest }) displayNl
     ]
 ]
 
 Directory extend [
     emitMkdir [
- ('cmd \$mkdir_p %1' % { self }) displayNl
+ ('cmd . \$mkdir_p %1' % { self }) displayNl
     ]
 ]
 
 Object subclass: Command [
-    | packages installDir |
+    | packages installDir dryRun copy allFiles |
+
     validateDestDir: destdir installDir: instDir [
  instDir isNil ifTrue: [ ^self ].
  ((Directory name: instDir) name ~= instDir
@@ -130,7 +166,7 @@ Object subclass: Command [
     ]
 
     destDir: destdir installDir: instDir [
- self validateDestDir: destdir installDir: installDir.
+ self validateDestDir: destdir installDir: instDir.
  instDir isNil
     ifTrue: [ installDir := destdir, self defaultInstallDir ]
     ifFalse: [ installDir := destdir, instDir ]
@@ -139,28 +175,64 @@ Object subclass: Command [
     defaultInstallDir [ ^Directory image ]
     installDir [ ^installDir ]
 
+    dryRun [ ^dryRun ]
+    dryRun: aBoolean [ dryRun := aBoolean ]
+    copy [ ^copy ]
+    copy: aBoolean [ copy := aBoolean ]
+    allFiles [ ^allFiles ]
+    allFiles: aBoolean [ allFiles := aBoolean ]
+
     packages [
  packages isNil ifTrue: [ packages := PackageFiles new ].
  ^packages
     ]
 
-    srcdir: aString [ self packages srcdir: aString ]
+    srcdir [
+ ^self packages srcdir ifNil: [ '.' ]
+    ]
+    srcdir: aString [
+ (aString = '.' or: [ (File fullNameFor: aString) = Directory working ])
+    ifTrue: [ self packages srcdir: nil ]
+    ifFalse: [ self packages srcdir: aString ]
+    ]
+
     addAllFiles: aCollection [ self packages addAllFiles: aCollection ]
 
+    prolog [ ]
     run [ self packages do: [ :pkg | pkg runCommand: self ] ]
-    runOnStar: self [ self runOnPackage: self ]
-    runOnPackage: self [ ]
+    runOnStar: aStarPackage [ self runOnPackage: aStarPackage ]
+    runOnPackage: aPackage [ ]
+
+    listFiles: listFiles vpath: aBoolean [
+ | base vpathBase |
+ base := Directory name: self installDir.
+ vpathBase := Directory name: self srcdir.
 
-    listFiles: listFiles [
         listFiles do: [ :each || package |
     package := self packages at: each.
     package allFiles do: [ :file |
- (package findPathFor: file) displayNl ] ]
+ | path relativePath |
+ path := package findPathFor: file.
+ relativePath := base pathTo: path.
+ (aBoolean and: [ (relativePath indexOfSubCollection: '../') > 0 ])
+    ifTrue: [ relativePath := vpathBase pathTo: path ].
+
+ relativePath displayNl ] ]
     ]
 ]
 
 Command subclass: ShellCommand [
-    run [
+    emitVariable: aString default: command [
+ ('%1="%2"' % { aString. (Smalltalk getenv: aString) ifNil: [ command ] })
+    displayNl.
+    ]
+
+    prolog [
+ ('run_cmd=%<:|eval>1' % { dryRun }) displayNl.
+ self emitVariable: 'INSTALL' default: 'install-sh'.
+ self emitVariable: 'LN_S' default: 'ln -s'.
+ self emitVariable: 'ZIP' default: 'zip'.
+
  stdout nextPutAll:
 'case "$INSTALL" in
   */install-sh | *"/install-sh -c" | \
@@ -224,108 +296,165 @@ mkdir_p ()
 }
 
 cmd () {
+  (dir="$1"
+  shift
   save_INSTALL=$INSTALL
   INSTALL=$display_INSTALL
   mkdir_p="mkdir -p"
-  eval echo "$@"
+  case "$dir" in
+    .) eval echo "$@" ;;
+    *) eval echo cd $dir \\\&\\\& "$@" ;;
+  esac
   INSTALL=$save_INSTALL
   mkdir_p=mkdir_p
-  $run_cmd "$@"
+  eval cd "$dir"
+  $run_cmd "$@")
+}
+
+mkdtemp () {
+  # Create a temporary directory $tmp in $TMPDIR (default /tmp).
+  # Use mktemp if possible; otherwise fall back on mkdir,
+  # with $RANDOM to make collisions less likely.
+  : ${TMPDIR=/tmp}
+
+  for i in 1 2 3 4 5 6 7 8 9 10; do
+    if test $i = 1 && test "$run_cmd" != :; then
+      tmp=`(umask 077 && mktemp -d "$TMPDIR/gstar-XXXXXX") 2>/dev/null`
+    else
+      tmp=$TMPDIR/foo$$-$RANDOM
+      test "$run_cmd" != : && break
+      mkdir -m700 "$tmp" 2>/dev/null
+    fi
+    result=$?
+    test -n "$tmp" && test -d "$tmp" && break
+    test $i = 10 && exit $?
+  done
+  trap "rm -rf \"\$tmp\"" 0 1 2 3 15
+  echo "mkdir -m700 \"$tmp\""
 }
 
 set -e
 '.
-        super run
     ]
 ]
 
 ShellCommand subclass: PkgDist [
-    validateDestDir: destdir installDir: installDir [
- destdir isEmpty ifTrue: [
+    validateDestDir: destdir installDir: instDir [
+ (destdir isEmpty and: [ instDir isNil ]) ifTrue: [
     self error: 'using --dist without specifying --distdir' ].
     ]
 
     defaultInstallDir [ ^'' ]
+    run [
+ super run.
+
+ "Distribute package files, unless they are automatically generated
+ from autoconf."
+ packages filesDo: [ :each |
+    | destName autoconfName srcdir |
+    destName := File stripPathFrom: each.
+    srcdir := Directory append: (File pathFor: each) to: self srcdir.
+    autoconfName := destName, '.in'.
+    ((Directory name: srcdir) includes: autoconfName)
+ ifFalse: [
+    self distribute: (File name: each)
+ as: destName
+ in: nil ] ]
+    ]
+
+    distribute: srcFile as: file in: dir [
+ | destName baseDir |
+ baseDir := self installDir.
+ dir isNil ifFalse: [
+    baseDir := Directory append: dir to: baseDir ].
+ destName := Directory append: file to: baseDir.
+ copy
+    ifTrue: [ srcFile emitInstall: destName ]
+    ifFalse: [ srcFile emitSymlink: destName ]
+    ]
+
     runOnPackage: aPackage [
  | dirs files baseDir |
- files := aPackage files.
-        dirs := files collect: [ :file |
-    Directory append: (File pathFor: file) to: aPackage relativeDirectory ].
+ files := allFiles
+    ifTrue: [ aPackage allFiles ]
+    ifFalse: [ aPackage allDistFiles ].
+
+        dirs := files collect: [ :file | File pathFor: file ].
+ dirs := dirs asSet asOrderedCollection.
+
+ aPackage relativeDirectory isNil ifFalse: [
+    dirs := dirs collect: [ :dir |
+ Directory append: dir to: aPackage relativeDirectory ] ].
 
-        dirs asSet asSortedCollection do: [ :dir || destName |
+        dirs do: [ :dir || destName |
     destName := Directory append: dir to: self installDir.
     (Directory name: destName) emitMkdir ].
 
- baseDir := Directory append: aPackage relativeDirectory to: self installDir.
         files do: [ :file || srcFile destName |
     srcFile := File name: (aPackage findPathFor: file).
-    destName := Directory append: file to: baseDir.
-    srcFile emitSymlink: destName ]
+    self distribute: srcFile as: file in: aPackage relativeDirectory ]
+    ]
+    runOnStar: aPackage [
+ self error: 'cannot distribute sources from .star file'
     ]
 ]
 
 ShellCommand subclass: PkgInstall [
-    prolog [
-        | destFile mergeResult |
- super prolog.
-
-        "Create the installation directory.  Then, if we are installing, add
-         packages.xml to the list and merge the supplied packages files with it.
-         This is temporary, as installation will create .star packages later on."
+    run [
+        "Create the installation directory."
         (Directory name: self installDir) emitMkdir.
-
-        "This is also temporary.  To merge the packages.xml file, we need to
-         really create the file.  This screws up --dry-run but, again, it's
-         temporary.  For distribution it is not necessary, because the distdir
- should have already been created."
-        ((Directory name: self installDir) name subStrings: $/)
-    inject: (Directory name: '/')
-    into: [ :old :each || dir |
-        dir := old directoryAt: each.
-        dir exists ifFalse: [ dir := Directory create: dir name ].
-        dir ].
-
- "Do merge the package files.  So far we did this in install mode only,
- but it actually makes more sense to do it in distribution mode."
-        destFile := File name: self installDir, '/packages.xml'.
- mergeResult := packages copy.
-        destFile exists ifTrue: [
-    "In this case, we can pass problematic packages through."
-    [ mergeResult addFile: destFile name ]
- on: Kernel.PackageNotAvailable
- do: [ :ex | ex resume ] ].
-
-        destFile withWriteStreamDo: [ :s | mergeResult printOn: s ].
+ super run.
     ]
 
     runOnPackage: aPackage [
- "Right now this is almost a copy of PkgDist>>#runOnPackage:, but
- this will change when this will create a .star file."
- | dirs files baseDir |
- files := aPackage allFiles.
-        dirs := files collect: [ :file |
-    Directory append: (File pathFor: file) to: aPackage relativeDirectory ].
-
-        dirs asSet asSortedCollection do: [ :dir || destName |
-    destName := Directory append: dir to: self installDir.
-    (Directory name: destName) emitMkdir ].
+ | pkg destFile dirs files baseDir |
+        'mkdtemp' displayNl.
+ baseDir := '\"\$tmp\"/%1' % { aPackage name }.
+ pkg := aPackage copy.
+ pkg relativeDirectory: nil.
+
+ ('cmd . \$mkdir_p ', baseDir) displayNl.
+ ('$run_cmd cat \> %1/package.xml << ''__<EOF>__''
+%2
+__<EOF>__' % { baseDir. pkg }) displayNl.
+
+ files := pkg allFiles.
+        dirs := files collect: [ :file | File pathFor: file ].
+ dirs asSet asSortedCollection do: [ :dir |
+    ('cmd . \$mkdir_p %1/%2' % { baseDir. dir }) displayNl ].
 
- baseDir := Directory append: aPackage relativeDirectory to: self installDir.
         files do: [ :file || srcFile destName |
     srcFile := File name: (aPackage findPathFor: file).
-    destName := Directory append: file to: baseDir.
-    srcFile emitInstall: destName ]
+    ('cmd . \$LN_S -f %1 %2/%3' % { srcFile. baseDir. file }) displayNl ].
+
+ destFile := Directory append: aPackage name, '.star' to: self installDir.
+ (File name: destFile) emitZipDir: baseDir.
+    ]
+
+    runOnStar: aPackage [
+ | destFile |
+ destFile := Directory append: aPackage name, '.star' to: self installDir.
+ (File name: aPackage starFileName) emitInstall: destFile.
     ]
 ]
 
 ShellCommand subclass: PkgUninstall [
+    run [
+        super run.
+        packages filesDo: [ :each | (File name: each) emitRemove ]
+    ]
+
     runOnPackage: aPackage [
  | baseDir |
- baseDir := Directory append: aPackage relativeDirectory to: self installDir.
+ baseDir := self installDir.
+ aPackage relativeDirectory isNil
+    ifFalse: [ baseDir := Directory append: aPackage relativeDirectory to: baseDir ].
  aPackage allFiles do: [ :file || destName |
     destName := (Directory append: file to: baseDir).
     (File name: destName) emitRemove ]
     ]
+
+    runOnStar: aPackage [ ]
 ]
 
 Command subclass: PkgList [
@@ -336,7 +465,7 @@ PkgList subclass: PkgPackageList [
     runOnPackage: aPackage [ aPackage name displayNl ]
 ]
 
-| srcdir installDir mode listFiles destdir packageFiles helpString |
+| srcdir installDir mode listFiles destdir packageFiles helpString dryRun vpath |
 
 mode := PkgInstall.
 listFiles := OrderedCollection new.
@@ -345,6 +474,10 @@ destdir := ''.
 srcdir := nil.
 packageFiles := OrderedCollection new.
 packages := PackageFiles new.
+vpath := false.
+dryRun := false.
+allFiles := false.
+copy := false.
 
 helpString :=
 'Usage:
@@ -354,7 +487,7 @@ helpString :=
  --test                  run unit tests after merging
  --load                  also load the Smalltalk files in the image
         --uninstall             remove the packages mentioned in the FILES
-        --dist                  create symbolic links of non-built files
+        --dist                  copy files instead of creating STAR files.
         --list-files PKG        just output the list of files in the package
         --list-packages         just output the list of packages in the files
  --srcdir DIR            look for non-built files in directory DIR
@@ -365,6 +498,13 @@ helpString :=
  --help                  display this message and exit
  --version               print version information and exit
 
+--list-files suboptions:
+ --vpath Omit path to srcdir for files that are there
+
+--dist suboptions:
+        --all-files             Process all files, not just non-built ones
+        --copy                  Do not create symbolic links
+
 Except in uninstall and list files mode, gst-package requires write
 access to the GNU Smalltalk image directory, and merges the XML package
 files on the command line with that file.
@@ -373,12 +513,13 @@ The default target directory is $install
 
 [
     Smalltalk
-        "--load, --image-file, --dry-run are processed by gst-package.
+        "--load and --image-file are processed by gst-package.
  --no-load present for backwards compatibility, it is now the default.
  --no-install is also present for backwards compatibility."
         arguments: '-h|--help --no-load --load --no-install --uninstall
             --dist -t|--target-directory: --list-files: --list-packages
-            --srcdir: --distdir|--destdir: -n|--dry-run -I|--image-file:'
+            --srcdir: --distdir|--destdir: -n|--dry-run --all-files
+    --vpath --copy -I|--image-file:'
 
         do: [ :opt :arg |
             opt = 'help' ifTrue: [
@@ -394,16 +535,27 @@ The default target directory is $install
             opt = 'list-files' ifTrue: [ mode := PkgList. listFiles add: arg ].
             opt = 'srcdir' ifTrue: [ srcdir := arg ].
             opt = 'destdir' ifTrue: [ destdir := arg ].
-
-            opt isNil ifTrue: [ packageFiles add: arg ] ].
+            opt = 'dry-run' ifTrue: [ dryRun := true ].
+            opt = 'all-files' ifTrue: [ allFiles := true ].
+            opt = 'copy' ifTrue: [ copy := true ].
+            opt = 'vpath' ifTrue: [ vpath := true ].
+
+            opt isNil ifTrue: [ packageFiles add: arg ] ]
+        ifError: [
+            helpString displayOn: stderr.
+            ObjectMemory quit: 1 ].
 
     "Validate the installation and source directory."
     mode new
         destDir: destdir installDir: installDir;
  srcdir: srcdir;
  addAllFiles: packageFiles;
+ dryRun: dryRun;
+ allFiles: allFiles;
+ copy: copy;
+ prolog;
  run;
- listFiles: listFiles
+ listFiles: listFiles vpath: vpath
 ]
     on: Error
     do: [ :ex |


--- orig/tests/Makefile.am
+++ mod/tests/Makefile.am
@@ -19,7 +19,7 @@ quit.st random-bench.ok random-bench.st
 sets.st sieve.ok sieve.st strcat.ok strcat.st strings.ok strings.st \
 Ansi.st AnsiDB.st AnsiInit.st AnsiLoad.st AnsiRun.st
 
-CLEANFILES = gst.im gst
+CLEANFILES = gst.im
 DISTCLEANFILES = atconfig
 
 .PHONY: regress
@@ -28,14 +28,12 @@ regress:
  cd $(srcdir) || exit 1; \
  for test in $(filter $(low_level_tests) $(benchmark_tests), $(TESTS)); do \
   result=`echo $$test | $(SED) 's/st$$/ok/'`; \
-  @abs_top_builddir@/gst -I @abs_top_builddir@/gst.im \
-    -r $$test 2>&1 | tee $$result; \
+  ./gst -I @abs_top_builddir@/gst.im -r $$test 2>&1 | tee $$result; \
  done
 
 gst.im: ../kernel/stamp-classes AnsiLoad.st Ansi.st AnsiDB.st
- cp $(top_builddir)/gst.im .
- cd $(srcdir) && \
-  @abs_top_builddir@/gst -SI @abs_top_builddir@/tests/gst.im AnsiLoad.st
+ echo "PackageLoader fileInPackage: #SUnit. ObjectMemory snapshot: 'gst.im'" | ./gst -I ../gst.im -
+ cd $(srcdir) && @abs_builddir@/gst -SI @abs_top_builddir@/tests/gst.im AnsiLoad.st
 
 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
  {                                      \
@@ -53,9 +51,6 @@ check-local: gst atconfig $(TESTSUITE)
 clean-local:
  -$(SHELL) '$(TESTSUITE)' --clean
 
-gst: ../gst
- $(LN_S) ../gst .
-
 installcheck-local: atconfig $(TESTSUITE)
  if test -z "$(DESTDIR)"; then \
   $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) AUTOTEST_PATH=$(bindir); \


--- orig/{arch}/=tagging-method
+++ mod/{arch}/=tagging-method
@@ -169,7 +169,6 @@ precious ^Makefile(\.in)?$
 # configure-generated files
 
 precious ^(config|stdintx)\.h$
-precious ^packages\.xml$
 
 #unrecognized ^(.*\.)?core$
 #unrecognized ^tests/.*\..*out$
@@ -178,7 +177,7 @@ precious ^packages\.xml$
 # Files which match the following pattern are treated as source files.
 # Traversal _does_ descend into source directories:
 
-source ^.*\.([chlysS]|def|inl|awk|gperf|sh|el|ico|sed|sin|gif|jpg|png|stamp|stt?|supp|txt|i?cc|msvc|am|in|m4|ac|at|frag)$
+source ^.*\.([chlysS]|def|inl|awk|gperf|sh|el|ico|sed|sin|gif|jpg|png|stamp|stt?|supp|txt|i?cc|msvc|am|in|m4|ac|at|frag|xml)$
 source ^config\.(rpath|charset)$
 
 # GNU common files



* added files

--- /dev/null
+++ mod/build-aux/package.m4
@@ -0,0 +1,104 @@
+dnl I'd like this to be edited in -*- Autoconf -*- mode...
+dnl
+
+AC_DEFUN([GST_PACKAGE_PREFIX], [
+m4_define([_GST_PKG_PREFIX], [$1/])])
+
+m4_define([_GST_RULES_PREPARE],
+[m4_expand_once([
+  PACKAGE_RULES=pkgrules.tmp
+  rm -f pkgrules.tmp])
+  AC_SUBST_FILE([PACKAGE_RULES])])
+
+m4_define([_GST_PKG_ENABLE], [
+  cat >> pkgrules.tmp << \EOF
+all-local: $1.star
+EOF
+  m4_if([$3], [], [],
+    [PACKAGE_DLOPEN_FLAGS="$PACKAGE_DLOPEN_FLAGS m4_foreach_w(GST_Lib,
+ [$3], [-dlopen \"\${abs_top_builddir}/_GST_PKG_DIR/GST_Lib\"])"])
+  m4_foreach_w(GST_File, [$2],
+       [m4_if(GST_File, Makefile,
+      [BUILT_PACKAGES="$BUILT_PACKAGES _GST_PKG_DIR"])])])
+
+m4_define([_GST_PKG_IF_FILE], [dnl
+m4_define([_GST_COND], [$4])dnl
+m4_foreach_w(GST_File, [$1],
+    [m4_if(GST_File, $2, [m4_define([_GST_COND], [$3])])])dnl
+_GST_COND])
+
+m4_define([_GST_PKG_PREFIX], [])
+AC_DEFUN([GST_PACKAGE], [
+  $3
+  AC_MSG_CHECKING([whether to install $1])
+  _GST_RULES_PREPARE
+  m4_define([_GST_PKG_DIR], [_GST_PKG_PREFIX[]$2])dnl
+  m4_define([_GST_PKG_XML], [_GST_PKG_DIR/package.xml])dnl
+  m4_define([_GST_PKG_DISTDIR], [$(distdir)/_GST_PKG_DIR])dnl
+  m4_define([_GST_PKG_STAMP], [_GST_PKG_DIR/stamp-classes])dnl
+  m4_define([_GST_PKG_XML_IN],
+    [_GST_PKG_IF_FILE([$5], [package.xml],
+      [$(srcdir)/_GST_PKG_DIR/package.xml.in],
+      [_GST_PKG_XML])])dnl
+
+  cat >> pkgrules.tmp << \EOF
+$1.star: _GST_PKG_XML $(srcdir)/_GST_PKG_STAMP
+ _GST_PKG_IF_FILE([$5], [Makefile], [cd _GST_PKG_DIR && $(MAKE)
+ ])$(GST_[]PACKAGE) --srcdir=$(srcdir) --target-directory=. $<
+
+clean-local::
+ -rm -f $1.star
+
+uninstall-local::
+ $(GST_[]PACKAGE) --srcdir=$(srcdir) --target-directory=$(pkgdatadir) --destdir=$(DESTDIR) --uninstall $(DESTDIR)$(pkgdatadir)/$1.star
+
+install-data-hook:: $1.star
+ $(GST_[]PACKAGE) --srcdir=$(srcdir) --target-directory=$(pkgdatadir) --destdir=$(DESTDIR) $1.star
+
+dist-hook:: _GST_PKG_XML
+ $(GST_[]PACKAGE) --srcdir=$(srcdir) --target-directory=_GST_PKG_DISTDIR --dist $<
+
+dist-hook:: $(srcdir)/_GST_PKG_STAMP
+ cp -p $< _GST_PKG_DISTDIR/stamp-classes
+
+-include $(srcdir)/_GST_PKG_STAMP
+$(srcdir)/_GST_PKG_STAMP:: _GST_PKG_XML_IN
+ (echo '$1_FILES = \'; \
+  $(GST_[]PACKAGE) --srcdir=$(srcdir) --vpath --list-files $1 $< | \
+    tr -d \\r | tr \\n " "; \
+ echo; \
+ echo '$$($1_FILES):'; \
+ echo '$$(srcdir)/_GST_PKG_STAMP:: $$($1_FILES)'; \
+ echo ' touch $$(srcdir)/_GST_PKG_STAMP') > $(srcdir)/_GST_PKG_STAMP
+EOF
+
+    m4_if([$4], [],
+      [_GST_PKG_ENABLE([$1], [$5], [$6])
+      AC_MSG_RESULT([yes])],
+
+      [(for i in $4; do
+ eval ac_var='${'$i'-bad}'
+ case "$ac_var" in
+  no | 'not needed' )
+    exit 1 ;;
+  bad )
+    AC_MSG_WARN([variable $i not set, proceeding as if \"no\"])
+    exit 1 ;;
+ esac
+      done)
+      if test $? = 0; then
+        _GST_PKG_ENABLE([$1], [$5], [$6])
+ AC_MSG_RESULT([yes])
+      else
+ AC_MSG_RESULT([no])
+      fi
+      ])
+
+  m4_if([$5], [], [],
+    [_GST_PKG_IF_FILE([$5], [Makefile], [ALL_PACKAGES="$ALL_PACKAGES _GST_PKG_DIR"])
+    AC_CONFIG_FILES(m4_foreach_w(GST_File, [$5], [_GST_PKG_DIR/GST_File ])) ])
+
+  AC_SUBST([ALL_PACKAGES])
+  AC_SUBST([BUILT_PACKAGES])
+  AC_SUBST([PACKAGE_DLOPEN_FLAGS])
+])dnl
--- /dev/null
+++ mod/packages/blox/gtk/package.xml
@@ -0,0 +1,19 @@
+<package>
+  <name>BloxGTK</name>
+  <namespace>BLOX</namespace>
+  <prereq>GTK</prereq>
+  <provides>Blox</provides>
+
+  <filein>BloxBasic.st</filein>
+  <filein>BloxWidgets.st</filein>
+  <filein>BloxText.st</filein>
+  <filein>BloxExtend.st</filein>
+  <filein>Blox.st</filein>
+
+  <file>Blox.st</file>
+  <file>BloxBasic.st</file>
+  <file>BloxWidgets.st</file>
+  <file>BloxText.st</file>
+  <file>BloxExtend.st</file>
+</package>
+
--- /dev/null
+++ mod/packages/blox/tests/package.xml.in
@@ -0,0 +1,7 @@
+<package>
+  <name>Blox</name>
+  <prereq>@BLOX_IMPLEMENTATION@</prereq>
+  <namespace>BLOX</namespace>
+
+  <file>test.st</file>
+</package>
--- /dev/null
+++ mod/packages/blox/tk/package.xml
@@ -0,0 +1,22 @@
+<package>
+  <name>BloxTK</name>
+  <namespace>BLOX</namespace>
+  <provides>Blox</provides>
+
+  <filein>BloxBasic.st</filein>
+  <filein>BloxWidgets.st</filein>
+  <filein>BloxText.st</filein>
+  <filein>BloxCanvas.st</filein>
+  <filein>BloxExtend.st</filein>
+  <filein>Blox.st</filein>
+  <module>blox-tk</module>
+
+  <file>Blox.st</file>
+  <file>BloxBasic.st</file>
+  <file>BloxWidgets.st</file>
+  <file>BloxText.st</file>
+  <file>BloxCanvas.st</file>
+  <file>BloxExtend.st</file>
+  <file>colors.txt</file>
+  <file>ChangeLog</file>
+</package>
--- /dev/null
+++ mod/packages/browser/package.xml
@@ -0,0 +1,57 @@
+<package>
+  <name>Browser</name>
+  <namespace>BLOX.BLOXBrowser</namespace>
+  <prereq>Blox</prereq>
+  <prereq>Parser</prereq>
+  <filein>Load.st</filein>
+  <filein>GuiData.st</filein>
+  <filein>View.st</filein>
+  <filein>Manager.st</filein>
+  <filein>RadioForm.st</filein>
+  <filein>Menu.st</filein>
+  <filein>ModalDialog.st</filein>
+  <filein>PList.st</filein>
+  <filein>PText.st</filein>
+  <filein>PCode.st</filein>
+  <filein>ButtonForm.st</filein>
+  <filein>BrowShell.st</filein>
+  <filein>BrowserMain.st</filein>
+  <filein>ClassHierBrow.st</filein>
+  <filein>ClassBrow.st</filein>
+  <filein>NamespBrow.st</filein>
+  <filein>MethSetBrow.st</filein>
+  <filein>Inspector.st</filein>
+  <filein>DictInspect.st</filein>
+  <filein>MethInspect.st</filein>
+  <filein>StrcInspect.st</filein>
+  <filein>DebugSupport.st</filein>
+  <filein>Debugger.st</filein>
+  <filein>Notifier.st</filein>
+
+
+  <file>BrowShell.st</file>
+  <file>Inspector.st</file>
+  <file>Notifier.st</file>
+  <file>View.st</file>
+  <file>BrowserMain.st</file>
+  <file>Load.st</file>
+  <file>PCode.st</file>
+  <file>bear.gif</file>
+  <file>ClassBrow.st</file>
+  <file>Manager.st</file>
+  <file>PList.st</file>
+  <file>ButtonForm.st</file>
+  <file>ClassHierBrow.st</file>
+  <file>Menu.st</file>
+  <file>PText.st</file>
+  <file>DebugSupport.st</file>
+  <file>Debugger.st</file>
+  <file>MethInspect.st</file>
+  <file>RadioForm.st</file>
+  <file>NamespBrow.st</file>
+  <file>DictInspect.st</file>
+  <file>MethSetBrow.st</file>
+  <file>GuiData.st</file>
+  <file>ModalDialog.st</file>
+  <file>StrcInspect.st</file>
+</package>
--- /dev/null
+++ mod/packages/continuations/package.xml
@@ -0,0 +1,9 @@
+<package>
+  <name>Continuations</name>
+  <sunit>ContinuationTest AmbTest</sunit>
+  <prereq>SUnit</prereq>
+
+  <filein>Continuations.st</filein>
+
+  <file>Continuations.st</file>
+</package>
--- /dev/null
+++ mod/packages/db/package.xml
@@ -0,0 +1,7 @@
+<package>
+  <name>DB</name>
+  <namespace>Jdm</namespace>
+  <filein>DB.st</filein>
+
+  <file>DB.st</file>
+</package>
--- /dev/null
+++ mod/packages/gdbm/Makefile.am
@@ -0,0 +1,9 @@
+gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
+        -no-undefined -export-symbols-regex gst_initModule
+
+pkglib_LTLIBRARIES = gdbm.la
+gdbm_la_SOURCES = gdbm.c
+gdbm_la_LIBADD = -lgdbm
+gdbm_la_LDFLAGS = $(gst_module_ldflags)
+
+AM_CPPFLAGS = -I$(top_srcdir)/libgst -I$(top_srcdir)/lib-src
--- /dev/null
+++ mod/packages/gdbm/package.xml
@@ -0,0 +1,15 @@
+<package>
+  <name>GDBM</name>
+  <filein>gdbm-c.st</filein>
+  <filein>gdbm.st</filein>
+  <module>gdbm</module>
+
+  <test>
+    <sunit>GDBMTest</sunit>
+    <filein>gdbmtests.st</filein>
+  </test>
+
+  <file>gdbm.st</file>
+  <file>gdbm-c.st</file>
+  <file>gdbmtests.st</file>
+</package>
--- /dev/null
+++ mod/packages/glorp/package.xml
@@ -0,0 +1,14 @@
+<package>
+  <name>Glorp</name>
+  <prereq>MySQL</prereq>
+  <prereq>SUnit</prereq>
+  <filein>GlorpPort.st</filein>
+  <filein>Glorp.st</filein>
+  <filein>GlorpMySQL.st</filein>
+  <filein>GlorpTest.st</filein>
+
+  <file>GlorpPort.st</file>
+  <file>Glorp.st</file>
+  <file>GlorpMySQL.st</file>
+  <file>GlorpTest.st</file>
+</package>
--- /dev/null
+++ mod/packages/gtk/package.xml
@@ -0,0 +1,32 @@
+<package>
+  <name>GTK</name>
+  <namespace>GTK</namespace>
+  <filein>GtkDecl.st</filein>
+  <filein>Libs.st</filein>
+  <filein>Structs.st</filein>
+  <filein>MoreStructs.st</filein>
+  <filein>Enums.st</filein>
+  <filein>Funcs.st</filein>
+  <filein>MoreFuncs.st</filein>
+  <filein>GtkImpl.st</filein>
+
+  <module>gst-gtk</module>
+
+  <built-file>Structs.st</built-file>
+  <built-file>Enums.st</built-file>
+  <built-file>Funcs.st</built-file>
+  <built-file>Libs.st</built-file>
+  <file>GtkDecl.st</file>
+  <file>GtkImpl.st</file>
+  <file>MoreFuncs.st</file>
+  <file>MoreStructs.st</file>
+  <file>example_arrow.st</file>
+  <file>example_aspectframe.st</file>
+  <file>example_buttonbox.st</file>
+  <file>example_entry.st</file>
+  <file>example_eventbox.st</file>
+  <file>example_hello.st</file>
+  <file>example_tictactoe.st</file>
+  <file>example_tree.st</file>
+</package>
+
--- /dev/null
+++ mod/packages/httpd/package.xml
@@ -0,0 +1,30 @@
+<package>
+  <name>WebServer</name>
+  <namespace>NetClients.WikiWorks</namespace>
+  <prereq>NetClients</prereq>
+  <filein>WebServer.st</filein>
+  <filein>FileServer.st</filein>
+  <filein>WikiServer.st</filein>
+  <filein>STT.st</filein>
+  <filein>Haiku.st</filein>
+
+
+  <file>FileServer.st</file>
+  <file>Haiku.st</file>
+  <file>STT.st</file>
+  <file>WebServer.st</file>
+  <file>WikiServer.st</file>
+  <file>edit.jpg</file>
+  <file>example1.stt</file>
+  <file>example2.stt</file>
+  <file>find.jpg</file>
+  <file>head.jpg</file>
+  <file>help.jpg</file>
+  <file>history.jpg</file>
+  <file>next.jpg</file>
+  <file>prev.jpg</file>
+  <file>recent.jpg</file>
+  <file>rename.jpg</file>
+  <file>test.st</file>
+  <file>top.jpg</file>
+</package>
--- /dev/null
+++ mod/packages/i18n/package.xml
@@ -0,0 +1,21 @@
+<package>
+  <name>I18N</name>
+  <namespace>I18N</namespace>
+  <prereq>Iconv</prereq>
+
+  <filein>Locale.st</filein>
+  <filein>Expression.st</filein>
+  <filein>GetText.st</filein>
+  <filein>Numbers.st</filein>
+  <filein>Times.st</filein>
+
+  <module>i18n</module>
+
+  <file>Locale.st</file>
+  <file>Expression.st</file>
+  <file>GetText.st</file>
+  <file>Numbers.st</file>
+  <file>Times.st</file>
+  <file>Collation.st</file>
+  <file>ChangeLog</file>
+</package>
--- /dev/null
+++ mod/packages/iconv/Makefile.am
@@ -0,0 +1,10 @@
+pkglib_LTLIBRARIES = iconv.la
+
+gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
+ -no-undefined -export-symbols-regex gst_initModule
+
+iconv_la_LDFLAGS = $(gst_module_ldflags)
+iconv_la_LIBADD = $(LTLIBICONV) $(top_builddir)/lib-src/library.la
+iconv_la_SOURCES = iconv.c
+
+AM_CPPFLAGS = -I$(top_srcdir)/libgst -I$(top_srcdir)/lib-src
--- /dev/null
+++ mod/packages/iconv/iconv.c
@@ -0,0 +1,102 @@
+/***********************************************************************
+ *
+ *      C interface to i18n functions
+ *
+ *
+ ***********************************************************************/
+
+/***********************************************************************
+ *
+ * Copyright 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ * Written by Paolo Bonzini.
+ *
+ * This file is part of GNU Smalltalk.
+ *
+ * GNU Smalltalk is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2, or (at your option) any later
+ * version.
+ *
+ * Linking GNU Smalltalk statically or dynamically with other modules is
+ * making a combined work based on GNU Smalltalk.  Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * In addition, as a special exception, the Free Software Foundation
+ * give you permission to combine GNU Smalltalk with free software
+ * programs or libraries that are released under the GNU LGPL and with
+ * independent programs running under the GNU Smalltalk virtual machine.
+ *
+ * You may copy and distribute such a system following the terms of the
+ * GNU GPL for GNU Smalltalk and the licenses of the other code
+ * concerned, provided that you include the source code of that other
+ * code when and as the GNU GPL requires distribution of source code.
+ *
+ * Note that people who make modified versions of GNU Smalltalk are not
+ * obligated to grant this special exception for their modified
+ * versions; it is their choice whether to do so.  The GNU General
+ * Public License gives permission to release a modified version without
+ * this exception; this exception also makes it possible to release a
+ * modified version which carries forward this exception.
+ *
+ * GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * GNU Smalltalk; see the file COPYING.  If not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  
+ *
+ ***********************************************************************/
+
+#include "config.h"
+#include "gstpub.h"
+#include <stdio.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <iconv.h>
+#include <errno.h>
+
+static VMProxy *vmProxy;
+
+mst_Boolean
+iconvWrapper (iconv_t handle, OOP readBufferOOP, int readPos,
+      int readCount, OOP writeBufferOOP, int writeCount,
+      OOP bytesLeftOOP)
+{
+  const char *inbuf;
+  size_t inbytesleft;
+  char *outbuf;
+  size_t outbytesleft;
+  int save_errno;
+
+  gst_object bytesLeft, readBuffer, writeBuffer;
+
+  readBuffer = OOP_TO_OBJ (readBufferOOP);
+  inbuf = &STRING_OOP_AT (readBuffer, readPos);
+  inbytesleft = readCount;
+
+  writeBuffer = OOP_TO_OBJ (writeBufferOOP);
+  outbuf = &STRING_OOP_AT (writeBuffer, 1);
+  outbytesleft = writeCount;
+
+  iconv (handle, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+  save_errno = errno;
+  errno = 0;
+
+  bytesLeft = OOP_TO_OBJ (bytesLeftOOP);
+  ARRAY_OOP_AT (bytesLeft, 1) = vmProxy->intToOOP (inbytesleft);
+  ARRAY_OOP_AT (bytesLeft, 2) = vmProxy->intToOOP (outbytesleft);
+  return (save_errno != EILSEQ);
+}
+
+void
+gst_initModule (VMProxy * proxy)
+{
+  vmProxy = proxy;
+  vmProxy->defineCFunc ("iconv_open", iconv_open);
+  vmProxy->defineCFunc ("iconv_close", iconv_close);
+  vmProxy->defineCFunc ("iconvWrapper", iconvWrapper);
+}
--- /dev/null
+++ mod/packages/iconv/package.xml
@@ -0,0 +1,10 @@
+<package>
+  <name>Iconv</name>
+  <namespace>I18N</namespace>
+
+  <filein>Sets.st</filein>
+
+  <module>iconv</module>
+
+  <file>Sets.st</file>
+</package>
--- /dev/null
+++ mod/packages/java/package.xml
@@ -0,0 +1,52 @@
+<package>
+  <name>Java</name>
+  <prereq>TCP</prereq>
+  <filein>Java.st</filein>
+
+  <file>Java.st</file>
+  <file>JavaClassFiles.st</file>
+  <file>JavaMetaobjects.st</file>
+  <file>JavaTranslation.st</file>
+  <file>JavaRuntime.st</file>
+  <file>JavaExtensions.st</file>
+  <file>extract-native.awk</file>
+  <file>gnu_gcj_convert_IOConverter.st</file>
+  <file>gnu_gcj_runtime_StackTrace.st</file>
+  <file>gnu_gcj_runtime_StringBuffer.st</file>
+  <file>gnu_java_net_PlainDatagramSocketImpl.st</file>
+  <file>gnu_java_net_PlainSocketImpl.st</file>
+  <file>gnu_java_nio_FileLockImpl.st</file>
+  <file>gnu_java_nio_SelectorImpl.st</file>
+  <file>java_io_File.st</file>
+  <file>java_io_FileDescriptor.st</file>
+  <file>java_io_ObjectInputStream.st</file>
+  <file>java_io_VMObjectStreamClass.st</file>
+  <file>java_lang_Character.st</file>
+  <file>java_lang_Class.st</file>
+  <file>java_lang_ConcreteProcess.st</file>
+  <file>java_lang_Double.st</file>
+  <file>java_lang_Float.st</file>
+  <file>java_lang_Math.st</file>
+  <file>java_lang_Object.st</file>
+  <file>java_lang_Runtime.st</file>
+  <file>java_lang_String.st</file>
+  <file>java_lang_StringBuffer.st</file>
+  <file>java_lang_System.st</file>
+  <file>java_lang_Thread.st</file>
+  <file>java_lang_VMClassLoader.st</file>
+  <file>java_lang_ref_Reference.st</file>
+  <file>java_lang_reflect_Array.st</file>
+  <file>java_lang_reflect_Constructor.st</file>
+  <file>java_lang_reflect_Field.st</file>
+  <file>java_lang_reflect_Method.st</file>
+  <file>java_lang_reflect_Proxy.st</file>
+  <file>java_net_InetAddress.st</file>
+  <file>java_net_NetworkInterface.st</file>
+  <file>java_nio_DirectByteBufferImpl.st</file>
+  <file>java_nio_channels_FileChannelImpl.st</file>
+  <file>java_text_Collator.st</file>
+  <file>java_util_ResourceBundle.st</file>
+  <file>java_util_TimeZone.st</file>
+  <file>java_util_zip_Deflater.st</file>
+  <file>java_util_zip_Inflater.st</file>
+</package>
--- /dev/null
+++ mod/packages/md5/Makefile.am
@@ -0,0 +1,9 @@
+gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
+        -no-undefined -export-symbols-regex gst_initModule
+
+pkglib_LTLIBRARIES = md5.la
+md5_la_SOURCES = md5.c
+md5_la_LIBADD = ../../lib-src/library.la
+md5_la_LDFLAGS = $(gst_module_ldflags)
+
+AM_CPPFLAGS = -I$(top_srcdir)/libgst -I$(top_srcdir)/lib-src
--- /dev/null
+++ mod/packages/md5/package.xml
@@ -0,0 +1,13 @@
+<package>
+  <name>MD5</name>
+  <filein>md5.st</filein>
+  <module>md5</module>
+
+  <test>
+   <sunit>MD5Test</sunit>
+   <filein>md5tests.st</filein>
+  </test>
+
+  <file>md5.st</file>
+  <file>md5tests.st</file>
+</package>
--- /dev/null
+++ mod/packages/mysql/package.xml
@@ -0,0 +1,14 @@
+<package>
+  <name>MySQL</name>
+  <namespace>Jdm.MySQL</namespace>
+  <prereq>DB</prereq>
+  <prereq>TCP</prereq>
+  <prereq>SUnit</prereq>
+  <filein>MySQL.st</filein>
+  <filein>MySQLTests.st</filein>
+
+  <file>MySQL.st</file>
+  <file>MySQLTests.st</file>
+  <file>mysql-test.st</file>
+  <file>README</file>
+</package>
--- /dev/null
+++ mod/packages/ncurses/package.xml
@@ -0,0 +1,7 @@
+<package>
+  <name>NCurses</name>
+  <filein>ncurses.st</filein>
+  <library>libncurses</library>
+
+  <file>ncurses.st</file>
+</package>
--- /dev/null
+++ mod/packages/net/package.xml
@@ -0,0 +1,20 @@
+<package>
+  <name>NetClients</name>
+  <prereq>TCP</prereq>
+  <prereq>SUnit</prereq>
+  <filein>Load.st</filein>
+
+  <file>Base.st</file>
+  <file>HTTP.st</file>
+  <file>Load.st</file>
+  <file>NetServer.st</file>
+  <file>MIME.st</file>
+  <file>ContentHandler.st</file>
+  <file>FTP.st</file>
+  <file>IMAP.st</file>
+  <file>NNTP.st</file>
+  <file>POP.st</file>
+  <file>SMTP.st</file>
+  <file>URIResolver.st</file>
+  <file>ChangeLog</file>
+</package>
--- /dev/null
+++ mod/packages/numerics/package.xml
@@ -0,0 +1,32 @@
+<package>
+  <name>DhbNumericalMethods</name>
+  <namespace>Dhb</namespace>
+
+  <filein>Basic.st</filein>
+  <filein>Statistics.st</filein>
+  <filein>RNG.st</filein>
+  <filein>Approximation.st</filein>
+  <filein>Matrixes.st</filein>
+  <filein>Functions.st</filein>
+  <filein>Optimization.st</filein>
+  <filein>Distributions.st</filein>
+  <filein>Integration.st</filein>
+  <filein>NumericsAdds.st</filein>
+
+  <test>
+    <sunit>Dhb.DhbTestCase*</sunit>
+    <filein>NumericsTests.st</filein>
+  </test>
+
+  <file>NumericsTests.st</file>
+  <file>Approximation.st</file>
+  <file>Basic.st</file>
+  <file>Distributions.st</file>
+  <file>Functions.st</file>
+  <file>Integration.st</file>
+  <file>Matrixes.st</file>
+  <file>Optimization.st</file>
+  <file>RNG.st</file>
+  <file>Statistics.st</file>
+  <file>NumericsAdds.st</file>
+</package>
--- /dev/null
+++ mod/packages/stinst/compiler/package.xml
@@ -0,0 +1,10 @@
+<package>
+  <name>Compiler</name>
+  <namespace>STInST</namespace>
+  <prereq>Parser</prereq>
+  <filein>StartCompiler.st</filein>
+
+  <file>StartCompiler.st</file>
+  <file>test.st</file>
+</package>
+
--- /dev/null
+++ mod/packages/stinst/parser/package.xml
@@ -0,0 +1,46 @@
+<package>
+  <name>Parser</name>
+
+  <namespace>STInST</namespace>
+  <filein>RBToken.st</filein>
+  <filein>RBParseNodes.st</filein>
+  <filein>RBParser.st</filein>
+  <filein>ParseTreeSearcher.st</filein>
+  <filein>RBFormatter.st</filein>
+  <filein>OrderedSet.st</filein>
+  <filein>STFileParser.st</filein>
+  <filein>STCompLit.st</filein>
+  <filein>STSymTable.st</filein>
+  <filein>STCompiler.st</filein>
+  <filein>STDecompiler.st</filein>
+  <filein>STLoaderObjs.st</filein>
+  <filein>STLoader.st</filein>
+  <filein>SqueakParser.st</filein>
+  <filein>SIFParser.st</filein>
+  <filein>Exporter.st</filein>
+
+  <test>
+   <sunit>STInST.Tests.TestStandardRewrites</sunit>
+   <filein>RewriteTests.st</filein>
+  </test>
+
+
+  <file>ParseTreeSearcher.st</file>
+  <file>RBFormatter.st</file>
+  <file>RBParseNodes.st</file>
+  <file>RBParser.st</file>
+  <file>RBToken.st</file>
+  <file>OrderedSet.st</file>
+  <file>STCompLit.st</file>
+  <file>STCompiler.st</file>
+  <file>STDecompiler.st</file>
+  <file>STLoader.st</file>
+  <file>STLoaderObjs.st</file>
+  <file>STSymTable.st</file>
+  <file>RewriteTests.st</file>
+  <file>SqueakParser.st</file>
+  <file>SIFParser.st</file>
+  <file>Exporter.st</file>
+  <file>STFileParser.st</file>
+  <file>ChangeLog</file>
+</package>
--- /dev/null
+++ mod/packages/sunit/package.xml
@@ -0,0 +1,20 @@
+<package>
+  <name>SUnit</name>
+
+  <filein>SUnitPreload.st</filein>
+  <filein>SUnit.st</filein>
+  <filein>SUnitScript.st</filein>
+
+  <test>
+    <sunit>SUnitTest</sunit>
+    <sunit>TestSuitesScriptTest</sunit>
+    <filein>SUnitTests.st</filein>
+    <filein>SUnitScriptTests.st</filein>
+  </test>
+
+  <file>SUnit.st</file>
+  <file>SUnitPreload.st</file>
+  <file>SUnitTests.st</file>
+  <file>SUnitScript.st</file>
+  <file>SUnitScriptTests.st</file>
+</package>
--- /dev/null
+++ mod/packages/tcp/package.xml
@@ -0,0 +1,26 @@
+<package>
+  <name>TCP</name>
+  <namespace>TCP</namespace>
+  <filein>Buffers.st</filein>
+  <filein>Datagram.st</filein>
+  <filein>SocketAddress.st</filein>
+  <filein>AbstractSocketImpl.st</filein>
+  <filein>IPSocketImpl.st</filein>
+  <filein>Sockets.st</filein>
+  <filein>Tests.st</filein>
+  <filein>cfuncs.st</filein>
+  <filein>init.st</filein>
+
+  <module>tcp</module>
+
+  <file>Buffers.st</file>
+  <file>Datagram.st</file>
+  <file>SocketAddress.st</file>
+  <file>AbstractSocketImpl.st</file>
+  <file>IPSocketImpl.st</file>
+  <file>Sockets.st</file>
+  <file>Tests.st</file>
+  <file>cfuncs.st</file>
+  <file>init.st</file>
+  <file>ChangeLog</file>
+</package>
--- /dev/null
+++ mod/packages/xml/package.xml
@@ -0,0 +1,7 @@
+<package>
+  <name>XML</name>
+  <filein>XML.st</filein>
+
+  <file>XML.st</file>
+  <file>ChangeLog</file>
+</package>
--- /dev/null
+++ mod/packages/xpath/package.xml
@@ -0,0 +1,6 @@
+<package>
+  <name>XPath</name>
+  <prereq>XML</prereq>
+  <filein>XPath.st</filein>
+  <file>XPath.st</file>
+</package>
--- /dev/null
+++ mod/packages/xsl/package.xml
@@ -0,0 +1,7 @@
+<package>
+  <name>XSL</name>
+  <prereq>XML</prereq>
+  <prereq>XPath</prereq>
+  <filein>XSL.st</filein>
+  <file>XSL.st</file>
+</package>
--- /dev/null
+++ mod/packages/zlib/Makefile.am
@@ -0,0 +1,9 @@
+gst_module_ldflags = -rpath $(pkglibdir) -release $(VERSION) -module \
+        -no-undefined -export-symbols-regex gst_initModule
+
+pkglib_LTLIBRARIES = zlib.la
+zlib_la_SOURCES = zlib.c
+zlib_la_LIBADD = -lz
+zlib_la_LDFLAGS = $(gst_module_ldflags)
+
+AM_CPPFLAGS = -I$(top_srcdir)/libgst -I$(top_srcdir)/lib-src
--- /dev/null
+++ mod/packages/zlib/package.xml
@@ -0,0 +1,15 @@
+<package>
+  <name>ZLib</name>
+  <filein>PipeStream.st</filein>
+  <filein>zlib.st</filein>
+  <module>zlib</module>
+
+  <test>
+   <sunit>ZlibStreamTest</sunit>
+   <filein>zlibtests.st</filein>
+  </test>
+
+  <file>PipeStream.st</file>
+  <file>zlib.st</file>
+  <file>zlibtests.st</file>
+</package>


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk