[51437] branches/images-and-archives/base

blb at macports.org blb at macports.org
Sun May 24 23:16:36 PDT 2009


Revision: 51437
          http://trac.macports.org/changeset/51437
Author:   blb at macports.org
Date:     2009-05-24 23:16:35 -0700 (Sun, 24 May 2009)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/images-and-archives/base/Mk/macports.tea.mk
    branches/images-and-archives/base/config.guess
    branches/images-and-archives/base/config.sub
    branches/images-and-archives/base/configure
    branches/images-and-archives/base/configure.ac
    branches/images-and-archives/base/doc/Makefile
    branches/images-and-archives/base/doc/macports.conf.5
    branches/images-and-archives/base/doc/prefix.mtree.in
    branches/images-and-archives/base/portmgr/bots/trac.rb
    branches/images-and-archives/base/src/Makefile.in
    branches/images-and-archives/base/src/cflib1.0/CFLib.c
    branches/images-and-archives/base/src/config.h.in
    branches/images-and-archives/base/src/cregistry/Makefile
    branches/images-and-archives/base/src/darwintracelib1.0/Makefile
    branches/images-and-archives/base/src/macports1.0/Makefile
    branches/images-and-archives/base/src/macports1.0/macports.c
    branches/images-and-archives/base/src/macports1.0/macports.tcl
    branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in
    branches/images-and-archives/base/src/macports1.0/macports_fastload.tcl.in
    branches/images-and-archives/base/src/package1.0/Makefile
    branches/images-and-archives/base/src/package1.0/portarchive.tcl
    branches/images-and-archives/base/src/pextlib1.0/Makefile
    branches/images-and-archives/base/src/pextlib1.0/Pextlib.c
    branches/images-and-archives/base/src/pextlib1.0/curl.c
    branches/images-and-archives/base/src/pextlib1.0/fgetln.c
    branches/images-and-archives/base/src/pextlib1.0/filemap.c
    branches/images-and-archives/base/src/pextlib1.0/fs-traverse.c
    branches/images-and-archives/base/src/pextlib1.0/md5cmd.c
    branches/images-and-archives/base/src/pextlib1.0/readline.c
    branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c
    branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c
    branches/images-and-archives/base/src/pextlib1.0/strcasecmp.c
    branches/images-and-archives/base/src/pextlib1.0/tests/symlink.tcl
    branches/images-and-archives/base/src/pextlib1.0/tracelib.c
    branches/images-and-archives/base/src/pextlib1.0/tty.c
    branches/images-and-archives/base/src/pextlib1.0/tty.h
    branches/images-and-archives/base/src/pextlib1.0/uid.c
    branches/images-and-archives/base/src/pextlib1.0/vercomp.c
    branches/images-and-archives/base/src/pextlib1.0/xinstall.c
    branches/images-and-archives/base/src/port/Makefile
    branches/images-and-archives/base/src/port/port.tcl
    branches/images-and-archives/base/src/port/portindex.tcl
    branches/images-and-archives/base/src/port1.0/Makefile
    branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in
    branches/images-and-archives/base/src/port1.0/portconfigure.tcl
    branches/images-and-archives/base/src/port1.0/portdestroot.tcl
    branches/images-and-archives/base/src/port1.0/portextract.tcl
    branches/images-and-archives/base/src/port1.0/portlivecheck.tcl
    branches/images-and-archives/base/src/port1.0/portutil.tcl
    branches/images-and-archives/base/src/programs/Makefile.in
    branches/images-and-archives/base/src/registry1.0/Makefile
    branches/images-and-archives/base/src/registry1.0/receipt_flat.tcl
    branches/images-and-archives/base/src/registry1.0/registry.tcl
    branches/images-and-archives/base/src/registry2.0/Makefile
    branches/images-and-archives/base/src/registry2.0/registry.c
    branches/images-and-archives/base/src/tclobjc1.0/tclobjc.m

Added Paths:
-----------
    branches/images-and-archives/base/src/pkg_mkindex.sh.in

Removed Paths:
-------------
    branches/images-and-archives/base/src/pextlib1.0/tests/fifo.tcl
    branches/images-and-archives/base/src/pextlib1.0/tests/socketpair.tcl
    branches/images-and-archives/base/src/pkg_mkindex.tcl

Property Changed:
----------------
    branches/images-and-archives/base/
    branches/images-and-archives/base/src/
    branches/images-and-archives/base/src/macports1.0/
    branches/images-and-archives/base/src/package1.0/
    branches/images-and-archives/base/src/pextlib1.0/
    branches/images-and-archives/base/src/port1.0/
    branches/images-and-archives/base/src/registry1.0/
    branches/images-and-archives/base/src/registry2.0/


Property changes on: branches/images-and-archives/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-50936
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-51433
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/images-and-archives/base/Mk/macports.tea.mk
===================================================================
--- branches/images-and-archives/base/Mk/macports.tea.mk	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/Mk/macports.tea.mk	2009-05-25 06:16:35 UTC (rev 51437)
@@ -8,17 +8,20 @@
 .c.o:
 	${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${CFLAGS} ${SHLIB_CFLAGS} $< -o $@
 
+all:: ${SHLIB_NAME} pkgIndex.tcl
+
 $(SHLIB_NAME):: ${OBJS}
 	${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS}
 
-all:: ${SHLIB_NAME}
+pkgIndex.tcl:
+	$(SILENT) ../pkg_mkindex.sh .
 
 clean::
-	rm -f ${OBJS} ${SHLIB_NAME} so_locations
+	rm -f ${OBJS} ${SHLIB_NAME} so_locations pkgIndex.tcl
 
 distclean:: clean
 
 install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}

Modified: branches/images-and-archives/base/config.guess
===================================================================
--- branches/images-and-archives/base/config.guess	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/config.guess	2009-05-25 06:16:35 UTC (rev 51437)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2009-02-03'
+timestamp='2009-04-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -324,6 +324,9 @@
 	case `/usr/bin/uname -p` in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
@@ -1115,8 +1118,11 @@
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3

Modified: branches/images-and-archives/base/config.sub
===================================================================
--- branches/images-and-archives/base/config.sub	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/config.sub	2009-05-25 06:16:35 UTC (rev 51437)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2009-02-03'
+timestamp='2009-04-17'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -272,6 +272,7 @@
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
 	| mt \
 	| msp430 \
 	| nios | nios2 \

Modified: branches/images-and-archives/base/configure
===================================================================
--- branches/images-and-archives/base/configure	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/configure	2009-05-25 06:16:35 UTC (rev 51437)
@@ -645,7 +645,6 @@
 MPCONFIGDIR_EXPANDED
 prefix_expanded
 OUR_INCLUDED_PACKAGES
-CONDITIONAL_PACKAGES
 TCL_CC
 TCL_DEFS
 SHLIB_SUFFIX
@@ -689,7 +688,6 @@
 MPCONFIGDIR
 PORTSDIR
 EXTRA_PROGS
-REPLACEMENT_PROGS
 HAVE_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER
 HAVE_FRAMEWORK_IOKIT
 HAVE_FRAMEWORK_SYSTEMCONFIGURATION
@@ -715,19 +713,26 @@
 SED_EXT
 OPEN
 XAR
+PAX
 BZIP2
 GNUMAKE
 GNUTAR
 XCODEBUILD
 LAUNCHCTL
 HAVE_LAUNCHD
+HDIUTIL
 MAKE
+ZIP
+UNZIP
 TAR
 SED
 RSYNC
+RMDIR
+GZIP
 GIT
 SVN
 CVS
+CP
 MTREE
 LN_S
 SET_MAKE
@@ -2324,7 +2329,7 @@
     { $as_echo "$as_me:$LINENO: WARNING: Please upgrade at http://store.apple.com/" >&5
 $as_echo "$as_me: WARNING: Please upgrade at http://store.apple.com/" >&2;}
     ;;
-  10.1.[0-4]|10.2.[0-7]|10.3.[0-8]|10.4.[0-9]|10.4.10|10.5.[0-5])
+  10.1.[0-4]|10.2.[0-7]|10.3.[0-8]|10.4.[0-9]|10.4.10|10.5.[0-6])
     { $as_echo "$as_me:$LINENO: WARNING: This version of Mac OS X is out of date" >&5
 $as_echo "$as_me: WARNING: This version of Mac OS X is out of date" >&2;}
     { $as_echo "$as_me:$LINENO: WARNING: Please run Software Update to update it" >&5
@@ -3743,6 +3748,46 @@
 fi
 
 
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $CP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CP="$CP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CP=$ac_cv_path_CP
+if test -n "$CP"; then
+  { $as_echo "$as_me:$LINENO: result: $CP" >&5
+$as_echo "$CP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 # Extract the first word of "cvs", so it can be a program name with args.
 set dummy cvs; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -3863,6 +3908,86 @@
 fi
 
 
+# Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GZIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $GZIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+  { $as_echo "$as_me:$LINENO: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "rmdir", so it can be a program name with args.
+set dummy rmdir; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RMDIR+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $RMDIR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+RMDIR=$ac_cv_path_RMDIR
+if test -n "$RMDIR"; then
+  { $as_echo "$as_me:$LINENO: result: $RMDIR" >&5
+$as_echo "$RMDIR" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 # Extract the first word of "rsync", so it can be a program name with args.
 set dummy rsync; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -3983,6 +4108,86 @@
 fi
 
 
+# Extract the first word of "unzip", so it can be a program name with args.
+set dummy unzip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_UNZIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $UNZIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+UNZIP=$ac_cv_path_UNZIP
+if test -n "$UNZIP"; then
+  { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5
+$as_echo "$UNZIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "zip", so it can be a program name with args.
+set dummy zip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ZIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $ZIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ZIP=$ac_cv_path_ZIP
+if test -n "$ZIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ZIP" >&5
+$as_echo "$ZIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 # Extract the first word of "make", so it can be a program name with args.
 set dummy make; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -4023,6 +4228,46 @@
 fi
 
 
+# Extract the first word of "hdiutil", so it can be a program name with args.
+set dummy hdiutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HDIUTIL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $HDIUTIL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HDIUTIL="$HDIUTIL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_HDIUTIL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+HDIUTIL=$ac_cv_path_HDIUTIL
+if test -n "$HDIUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $HDIUTIL" >&5
+$as_echo "$HDIUTIL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 # Extract the first word of "launchd", so it can be a program name with args.
 set dummy launchd; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -4272,6 +4517,46 @@
 fi
 
 
+# Extract the first word of "pax", so it can be a program name with args.
+set dummy pax; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PAX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $PAX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PAX="$PAX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PAX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PAX=$ac_cv_path_PAX
+if test -n "$PAX"; then
+  { $as_echo "$as_me:$LINENO: result: $PAX" >&5
+$as_echo "$PAX" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 # Extract the first word of "xar", so it can be a program name with args.
 set dummy xar; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -4694,9 +4979,6 @@
 
 
 
-# Determine if we want to install conditional packages
-CONDITIONAL_PACKAGES=
-
 # Foundation checks
 
 
@@ -6577,12 +6859,7 @@
 
 
 
-# tclobjc requires objc (runtime and foundation) support
-if test x$OBJC_RUNTIME != xnone -a x$OBJC_FOUNDATION != xnone; then
-	CONDITIONAL_PACKAGES="tclobjc1.0 $CONDITIONAL_PACKAGES"
-fi
 
-
 	FRAMEWORK_LIBS="-framework CoreFoundation"
 
 	{ $as_echo "$as_me:$LINENO: checking for CoreFoundation framework" >&5
@@ -6974,7 +7251,6 @@
 
 
 
-
 # set default ports-directory
 PORTS_DIR_DEFAULT=`pwd | sed -e "s/base/ports/"`
 
@@ -9989,82 +10265,6 @@
 
 
 
-# Do we have curl_easy_strerror?
-
-
-{ $as_echo "$as_me:$LINENO: checking for curl_easy_strerror in -lcurl" >&5
-$as_echo_n "checking for curl_easy_strerror in -lcurl... " >&6; }
-if test "${ac_cv_lib_curl_curl_easy_strerror+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcurl $LDFLAGS_LIBCURL $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char curl_easy_strerror ();
-int
-main ()
-{
-return curl_easy_strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_curl_curl_easy_strerror=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_curl_curl_easy_strerror=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_curl_curl_easy_strerror" >&5
-$as_echo "$ac_cv_lib_curl_curl_easy_strerror" >&6; }
-if test "x$ac_cv_lib_curl_curl_easy_strerror" = x""yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_CURL_EASY_STRERROR 1
-_ACEOF
-
-fi
-
-
 # Determine if we need to install some bundled packages
 OUR_INCLUDED_PACKAGES=
 
@@ -10308,7 +10508,6 @@
 
 
 
-
 # misc variables that need to be expanded for substitution into tcl
 
 oldprefix=$prefix
@@ -10330,9 +10529,12 @@
 
 
 # Output
-ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile portmgr/fedora/macports.spec src/Makefile src/macports1.0/macports_autoconf.tcl src/tclobjc1.0/Makefile src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl src/programs/Makefile src/macports1.0/macports_fastload.tcl setupenv.bash"
+ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile portmgr/fedora/macports.spec src/Makefile src/macports1.0/macports_autoconf.tcl src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl src/programs/Makefile src/macports1.0/macports_fastload.tcl setupenv.bash"
 
 
+ac_config_files="$ac_config_files src/pkg_mkindex.sh"
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -10939,12 +11141,12 @@
     "portmgr/fedora/macports.spec") CONFIG_FILES="$CONFIG_FILES portmgr/fedora/macports.spec" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "src/macports1.0/macports_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/macports1.0/macports_autoconf.tcl" ;;
-    "src/tclobjc1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/tclobjc1.0/Makefile" ;;
     "src/port1.0/port_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/port1.0/port_autoconf.tcl" ;;
     "src/registry1.0/registry_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/registry1.0/registry_autoconf.tcl" ;;
     "src/programs/Makefile") CONFIG_FILES="$CONFIG_FILES src/programs/Makefile" ;;
     "src/macports1.0/macports_fastload.tcl") CONFIG_FILES="$CONFIG_FILES src/macports1.0/macports_fastload.tcl" ;;
     "setupenv.bash") CONFIG_FILES="$CONFIG_FILES setupenv.bash" ;;
+    "src/pkg_mkindex.sh") CONFIG_FILES="$CONFIG_FILES src/pkg_mkindex.sh" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -11555,6 +11757,11 @@
 
   esac
 
+
+  case $ac_file$ac_mode in
+    "src/pkg_mkindex.sh":F) chmod +x src/pkg_mkindex.sh ;;
+
+  esac
 done # for ac_tag
 
 

Modified: branches/images-and-archives/base/configure.ac
===================================================================
--- branches/images-and-archives/base/configure.ac	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/configure.ac	2009-05-25 06:16:35 UTC (rev 51437)
@@ -32,7 +32,7 @@
     AC_MSG_WARN([This version of Mac OS X is not supported])
     AC_MSG_WARN([Please upgrade at http://store.apple.com/])
     ;;
-  10.1.[[0-4]]|10.2.[[0-7]]|10.3.[[0-8]]|10.4.[[0-9]]|10.4.10|10.5.[[0-5]])
+  10.1.[[0-4]]|10.2.[[0-7]]|10.3.[[0-8]]|10.4.[[0-9]]|10.4.10|10.5.[[0-6]])
     AC_MSG_WARN([This version of Mac OS X is out of date])
     AC_MSG_WARN([Please run Software Update to update it])
     ;;
@@ -84,19 +84,26 @@
 AC_PROG_MAKE_SET
 AC_PROG_LN_S
 AC_PATH_PROG(MTREE, [mtree], [], [$PATH:/usr/sbin])
+AC_PATH_PROG(CP, [cp], [])
 AC_PATH_PROG(CVS, [cvs], [])
 AC_PATH_PROG(SVN, [svn], [])
 AC_PATH_PROG(GIT, [git], [])
+AC_PATH_PROG(GZIP, [gzip], [])
+AC_PATH_PROG(RMDIR, [rmdir], [])
 AC_PATH_PROG(RSYNC, [rsync], [])
 AC_PATH_PROG(SED, [sed])
 AC_PATH_PROG(TAR, [tar])
+AC_PATH_PROG(UNZIP, [unzip])
+AC_PATH_PROG(ZIP, [zip])
 AC_PATH_PROG(MAKE, [make])
+AC_PATH_PROG(HDIUTIL, [hdiutil], [])
 AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
 AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
 AC_PATH_PROG(XCODEBUILD, [xcodebuild], [])
 AC_PATH_PROGS(GNUTAR, [gnutar gtar], [], [$PATH:/usr/local/bin])
 AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [], [$PATH:/usr/local/bin])
 AC_PATH_PROG(BZIP2, [bzip2], [])
+AC_PATH_PROG(PAX, [pax], [])
 AC_PATH_PROG(XAR, [xar], [])
 AC_PATH_PROG(OPEN, [open], [])
 
@@ -127,22 +134,13 @@
 MP_COMPILER_ATTRIBUTE_UNUSED
 MP_COMPILER_ATTRIBUTE_LF_PRIVATE
 
-# Determine if we want to install conditional packages
-CONDITIONAL_PACKAGES=
-
 # Foundation checks
 ACX_PTHREAD
 MP_OBJC_RUNTIME
 MP_OBJC_FOUNDATION
 
-# tclobjc requires objc (runtime and foundation) support
-if test x$OBJC_RUNTIME != xnone -a x$OBJC_FOUNDATION != xnone; then
-	CONDITIONAL_PACKAGES="tclobjc1.0 $CONDITIONAL_PACKAGES"
-fi
-
 MP_PROG_DAEMONDO
 
-AC_SUBST(REPLACEMENT_PROGS)
 AC_SUBST(EXTRA_PROGS)
 
 # set default ports-directory
@@ -228,13 +226,6 @@
 ## libcurl
 MP_LIBCURL_FLAGS
 
-# Do we have curl_easy_strerror?
-AH_TEMPLATE([HAVE_CURL_EASY_STRERROR],
-	       [Define to 1 if you have the curl_easy_strerror function.])
-AC_CHECK_LIB([curl], [curl_easy_strerror],
-	[AC_DEFINE([HAVE_CURL_EASY_STRERROR])],[],
-	[$LDFLAGS_LIBCURL])
-
 # Determine if we need to install some bundled packages
 OUR_INCLUDED_PACKAGES=
 
@@ -345,7 +336,6 @@
 AC_SUBST(TCL_DEFS)
 AC_SUBST(TCL_STUB_LIB_SPEC)
 AC_SUBST(TCL_CC)
-AC_SUBST(CONDITIONAL_PACKAGES)
 AC_SUBST(OUR_INCLUDED_PACKAGES)
 
 # misc variables that need to be expanded for substitution into tcl
@@ -383,7 +373,6 @@
 	portmgr/fedora/macports.spec
 	src/Makefile
 	src/macports1.0/macports_autoconf.tcl
-	src/tclobjc1.0/Makefile
 	src/port1.0/port_autoconf.tcl
 	src/registry1.0/registry_autoconf.tcl
 	src/programs/Makefile
@@ -391,4 +380,6 @@
 	setupenv.bash
 ])
 
+AC_CONFIG_FILES([src/pkg_mkindex.sh], [chmod +x src/pkg_mkindex.sh])
+
 AC_OUTPUT

Modified: branches/images-and-archives/base/doc/Makefile
===================================================================
--- branches/images-and-archives/base/doc/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/doc/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -40,14 +40,17 @@
 		$(LN_S) share/man ${INSTALLDIR}/man; \
 	fi
 
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf ${DESTDIR}${mpconfigdir}/macports.conf.default
 	if test ! -e ${DESTDIR}${mpconfigdir}/macports.conf ; then \
 		set -x; \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 macports.conf ${DESTDIR}${mpconfigdir}; \
 	fi
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 sources.conf ${DESTDIR}${mpconfigdir}/sources.conf.default
 	if test ! -e ${DESTDIR}${mpconfigdir}/sources.conf ; then \
 		set -x; \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 sources.conf ${DESTDIR}${mpconfigdir}; \
 	fi
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 variants.conf ${DESTDIR}${mpconfigdir}/variants.conf.default
 	if test ! -e ${DESTDIR}${mpconfigdir}/variants.conf ; then \
 		set -x; \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 variants.conf ${DESTDIR}${mpconfigdir}; \

Modified: branches/images-and-archives/base/doc/macports.conf.5
===================================================================
--- branches/images-and-archives/base/doc/macports.conf.5	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/doc/macports.conf.5	2009-05-25 06:16:35 UTC (rev 51437)
@@ -127,7 +127,7 @@
 specified types in one step. Unarchive uses multiple types as a search list to locate any existing archive,
 with the first found match being used.
 .br
-Supported types are: tgz, tar, tbz, tbz2, tlz, xar, zip, cpgz, cpio
+Supported types are: tgz, tar, tbz, tbz2, tlz, txz, xar, zip, cpgz, cpio
 .br
 .Ic Default:
 tgz

Modified: branches/images-and-archives/base/doc/prefix.mtree.in
===================================================================
--- branches/images-and-archives/base/doc/prefix.mtree.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/doc/prefix.mtree.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -231,7 +231,7 @@
             ..
             zh_TW.Big5
             ..
-	..
+        ..
         skel
         ..
     ..
@@ -240,9 +240,9 @@
     var
         macports
             distfiles
-	    ..
+            ..
             receipts
-        ..
+            ..
             registry
             ..
         ..

Modified: branches/images-and-archives/base/portmgr/bots/trac.rb
===================================================================
--- branches/images-and-archives/base/portmgr/bots/trac.rb	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/portmgr/bots/trac.rb	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,61 +1,66 @@
 #
-#	trac.rb
+#   trac.rb
 #
-#	Plugin to rbot (http://ruby-rbot.org/), an irc bot, to provide
-#	services related to MacPorts trac systemfor the #macports channel
-#	on freenode.net, created from PortPlugin by James D. Berry
+#   Plugin to rbot (http://ruby-rbot.org/), an irc bot, to provide
+#   services related to MacPorts trac systemfor the #macports channel
+#   on freenode.net, created from PortPlugin by James D. Berry
 #
-#	By Andrea D'Amore
+#   By Andrea D'Amore
 #
-#	$Id: $
+#   $Id: $
 
 require 'stringio'
 
 class TracPlugin < Plugin
 
-	def help(plugin, topic="")
-		case topic
-		  when "ticket"
-			return "ticket <ticket no.> => show http link for ticket # <ticket no.>"
-		  when "faq"
-			return "faq => show FAQs' URL"
-		  when "guide"
-			return "guide [chunked] => show The Guide's URL. Don't Panic."		 
-		  else
-			return "trac module provides: !ticket, !faq, !guide"
-		end
-	end
+    def help(plugin, topic="")
+        case topic
+          when "ticket"
+            return "ticket <ticket no.> => show http link for ticket # <ticket no.>"
+          when "faq"
+            return "faq => show FAQs' URL"
+          when "guide"
+            return "guide [chunked] => show The Guide's URL. Don't Panic."       
+          else
+            return "trac module provides: !ticket, !faq, !guide"
+        end
+    end
 
-	def ticket(m, params)
-		number = params[:number][/^#?(\d*)$/,1]
-		if ( number )
-			url = "http://trac.macports.org/ticket/"+number
-			m.reply "#{url}"
-		else
-			m.reply "Use either #1234 or 1234 for ticket number"
-		end
-	end
+    def ticket(m, params)
+        number = params[:number][/^#?(\d*)$/,1]
+        if ( number )
+            url = "http://trac.macports.org/ticket/"+number
+            m.reply "#{url}"
+        else
+            m.reply "Use either #1234 or 1234 for ticket number"
+        end
+    end
 
-	def faq(m, params)
-		m.reply "FAQs are at: http://trac.macports.org/wiki/FAQ"
-	end
+    def faq(m, params)
+        m.reply "FAQs are at: http://trac.macports.org/wiki/FAQ"
+    end
 
-	def guide(m, params)
-		if ( params[:parm] == "chunked" )
-			m.reply "http://guide.macports.org/chunked/index.html"
-		else
-			m.reply "http://guide.macports.org/"
-		end
-	end
-	
-	def team(m, params)
-		m.reply "http://trac.macports.org/wiki/MacPortsDevelopers"
-	end
+    def paste(m, params)
+        m.reply "Paste texts more than 3 rows using: http://paste.lisp.org/new/macports"
+    end
 
+    def guide(m, params)
+        if ( params[:parm] == "chunked" )
+            m.reply "http://guide.macports.org/chunked/index.html"
+        else
+            m.reply "http://guide.macports.org/"
+        end
+    end
+    
+    def team(m, params)
+        m.reply "http://trac.macports.org/wiki/MacPortsDevelopers"
+    end
+
 end
 
 plugin = TracPlugin.new
-plugin.map 'ticket :number', :action => 'ticket'
-plugin.map 'faq :parm', :action => 'faq', :defaults => {:parm => ""}
-plugin.map 'guide :parm', :action => 'guide', :defaults => {:parm => ""}
-plugin.map 'team', :action => 'team'
\ No newline at end of file
+plugin.map 'ticket :number',    :action => 'ticket'
+plugin.map 'faq',               :action => 'faq'
+plugin.map 'paste',             :action => 'paste'
+plugin.map 'guide :parm',       :action => 'guide',     :defaults => {:parm => ""}
+plugin.map 'team',              :action => 'team'
\ No newline at end of file


Property changes on: branches/images-and-archives/base/src
___________________________________________________________________
Modified: svn:ignore
   - config.h
Makefile

   + config.h
Makefile
pkg_mkindex.sh


Modified: branches/images-and-archives/base/src/Makefile.in
===================================================================
--- branches/images-and-archives/base/src/Makefile.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/Makefile.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -6,8 +6,7 @@
 			pextlib1.0 \
 			registry1.0 \
 			registry2.0 \
-			darwintracelib1.0 \
-			@CONDITIONAL_PACKAGES@
+			darwintracelib1.0
 SUBDIR=		${TCLPKG} port programs
 
 all::

Modified: branches/images-and-archives/base/src/cflib1.0/CFLib.c
===================================================================
--- branches/images-and-archives/base/src/cflib1.0/CFLib.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/cflib1.0/CFLib.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1346,7 +1346,7 @@
 		}
 	};
 
-	if(Tcl_InitStubs(interp, "8.3", 0) == NULL)
+	if(Tcl_InitStubs(interp, "8.4", 0) == NULL)
 		return TCL_ERROR;
 
 	for (i = 0; sig[i].name != NULL; ++i) {

Modified: branches/images-and-archives/base/src/config.h.in
===================================================================
--- branches/images-and-archives/base/src/config.h.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/config.h.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -24,9 +24,6 @@
 /* Define to 1 if you have the <crt_externs.h> header file. */
 #undef HAVE_CRT_EXTERNS_H
 
-/* Define to 1 if you have the curl_easy_strerror function. */
-#undef HAVE_CURL_EASY_STRERROR
-
 /* Define to 1 if you have the declaration of `completion_matches', and to 0
    if you don't. */
 #undef HAVE_DECL_COMPLETION_MATCHES

Modified: branches/images-and-archives/base/src/cregistry/Makefile
===================================================================
--- branches/images-and-archives/base/src/cregistry/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/cregistry/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -24,4 +24,4 @@
 
 test:
 
-install:: ${STLIB_NAME}
+install:: all

Modified: branches/images-and-archives/base/src/darwintracelib1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/darwintracelib1.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/darwintracelib1.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,8 +1,19 @@
 OBJS=		darwintrace.o
 SHLIB_NAME=	darwintrace${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/darwintrace1.0
+INSTALLDIR=	${DESTDIR}${datadir}/macports/Tcl/darwintrace1.0
 
-test::
+include ../../Mk/macports.autoconf.mk
 
-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
+all:: ${SHLIB_NAME}
+
+$(SHLIB_NAME):: ${OBJS}
+	${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${SHLIB_LDFLAGS} ${LIBS}
+
+clean::
+	rm -f ${OBJS} ${SHLIB_NAME} so_locations
+
+distclean:: clean
+
+install:: all
+	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}


Property changes on: branches/images-and-archives/base/src/macports1.0
___________________________________________________________________
Modified: svn:ignore
   - *.dylib
macports_autoconf.tcl
macports_fastload.tcl

   + *.dylib
macports_autoconf.tcl
macports_fastload.tcl
pkgIndex.tcl


Modified: branches/images-and-archives/base/src/macports1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/macports1.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/macports1.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -15,7 +15,7 @@
 distclean:: clean
 	rm -f macports_autoconf.tcl macports_fastload.tcl ${SHLIB_NAME}
 
-install::
+install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 
 	$(SILENT) set -x; for file in ${SRCS}; do \
@@ -24,4 +24,4 @@
 
 	echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
 
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}

Modified: branches/images-and-archives/base/src/macports1.0/macports.c
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/macports1.0/macports.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -51,7 +51,7 @@
 int
 Macports_Init(Tcl_Interp *interp)
 {
-	if (Tcl_InitStubs(interp, "8.3", 0) == NULL)
+	if (Tcl_InitStubs(interp, "8.4", 0) == NULL)
 		return TCL_ERROR;
 	Tcl_CreateObjCommand(interp, "macports::version", macports__version, NULL, NULL);
 	if (Tcl_PkgProvide(interp, "macports", "1.0") != TCL_OK)

Modified: branches/images-and-archives/base/src/macports1.0/macports.tcl
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -19,7 +19,7 @@
 # 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
 #    may be used to endorse or promote products derived from this software
 #    without specific prior written permission.
-# 
+#
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -56,14 +56,14 @@
         mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
         applications_dir frameworks_dir universal_target universal_sysroot universal_archs $user_options \
         os_arch os_endian os_major os_platform os_version"
-    
+
     # deferred options are only computed when needed.
     # they are not exported to the trace thread.
     # they are not exported to the interpreter in system_options array.
     variable portinterp_deferred_options "xcodeversion xcodebuildcmd"
-    
+
     variable open_mports {}
-    
+
     variable ui_priorities "debug info msg error warn"
 }
 
@@ -171,7 +171,7 @@
         }
         default {
             return ""
-        } 
+        }
     }
 }
 
@@ -198,7 +198,7 @@
         msg {
             if {[ui_isset ports_quiet]} {
                 return {}
-            } else {    
+            } else {
                 return {stdout}
             }
         }
@@ -258,7 +258,7 @@
 proc macports::setxcodeinfo {name1 name2 op} {
     global macports::xcodeversion
     global macports::xcodebuildcmd
-    
+
     trace remove variable macports::xcodeversion read macports::setxcodeinfo
     trace remove variable macports::xcodebuildcmd read macports::setxcodeinfo
 
@@ -280,7 +280,7 @@
                 set macports::xcodeversion "2.0orlower"
             }
         }
-        
+
         if {![info exists xcodebuildcmd]} {
             set macports::xcodebuildcmd "xcodebuild"
         }
@@ -319,7 +319,7 @@
     } else {
         upvar $up_variations variations
     }
-    
+
     global auto_path env tcl_platform
     global macports::autoconf::macports_conf_path
     global macports::macports_user_dir
@@ -370,7 +370,7 @@
         # Otherwise define the user directory as a direcotory that will never exist
         set macports::macports_user_dir "/dev/null/NO_HOME_DIR"
     }
-    
+
     # Configure the search path for configuration files
     set conf_files ""
     lappend conf_files "${macports_conf_path}/macports.conf"
@@ -381,7 +381,7 @@
         set PORTSRC $env(PORTSRC)
         lappend conf_files ${PORTSRC}
     }
-    
+
     # Process the first configuration file we find on conf_files list
     foreach file $conf_files {
         if [file exists $file] {
@@ -398,7 +398,7 @@
             close $fd
         }
     }
-    
+
     # Process per-user only settings
     set per_user "${macports_user_dir}/user.conf"
     if [file exists $per_user] {
@@ -413,7 +413,7 @@
         }
         close $fd
     }
-    
+
     if {![info exists sources_conf]} {
         return -code error "sources_conf must be set in ${macports_conf_path}/macports.conf or in your ${macports_user_dir}/macports.conf file"
     }
@@ -500,7 +500,7 @@
     if {[info exists portdbformat]} {
         if { $portdbformat == "sqlite" } {
             return -code error "SQLite is not yet supported for registry storage."
-        } 
+        }
         set registry.format receipt_${portdbformat}
     } else {
         set registry.format receipt_flat
@@ -583,7 +583,7 @@
     if {![file isdirectory $portsharepath]} {
         return -code error "Data files directory '$portsharepath' must exist"
     }
-    
+
     if {![info exists libpath]} {
         set libpath "${prefix}/share/macports/Tcl"
     }
@@ -593,7 +593,7 @@
     } else {
         set env(PATH) "$binpath"
     }
-    
+
     # Set startupitem default type (can be overridden by portfile)
     if {![info exists macports::startupitem_type]} {
         set macports::startupitem_type "default"
@@ -611,7 +611,7 @@
     if {![info exists macports::mp_remote_submit_url]} {
         set macports::mp_remote_submit_url "${macports::mp_remote_url}/submit"
     }
-    
+
     # Default mp configure options
     if {![info exists macports::configureccache]} {
         set macports::configureccache no
@@ -649,7 +649,7 @@
     if {![info exists macports::universal_archs]} {
         set macports::universal_archs {ppc i386}
     }
-    
+
     # Platform Settings
     set os_arch $tcl_platform(machine)
     if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
@@ -673,7 +673,7 @@
     if {[info exists extra_env]} {
         set keepenvkeys [concat ${keepenvkeys} ${extra_env}]
     }
-    
+
     foreach envkey [array names env] {
         if {[lsearch $keepenvkeys $envkey] == -1} {
             array unset env $envkey
@@ -714,7 +714,7 @@
             unsetenv $envkey
         }
     }
-    
+
     # Proxy handling (done this late since Pextlib is needed)
     if {![info exists proxy_override_env] } {
         set proxy_override_env "no"
@@ -785,7 +785,6 @@
     $workername alias mport_exec mportexec
     $workername alias mport_open mportopen
     $workername alias mport_close mportclose
-    $workername alias mport_search mportsearch
     $workername alias mport_lookup mportlookup
 
     # instantiate the UI call-backs
@@ -794,7 +793,7 @@
     }
     $workername alias ui_prefix ui_prefix
     $workername alias ui_channels ui_channels
-    
+
     # Export some utility functions defined here.
     $workername alias macports_create_thread macports::create_thread
     $workername alias getportworkpath_from_buildpath macports::getportworkpath_from_buildpath
@@ -833,7 +832,7 @@
             $workername eval set $opt \{[set $opt]\}
         }
     }
-    
+
     foreach opt $portinterp_deferred_options {
         global macports::$opt
         # define the trace hook.
@@ -847,7 +846,7 @@
         $workername eval "trace add variable ::$opt read ::trace_$opt"
         # define some value now
         $workername eval set $opt "?"
-    }       
+    }
 
     foreach {opt val} $options {
         $workername eval set user_options($opt) $val
@@ -891,7 +890,7 @@
             thread::send -async $result "set macports::$opt \"$val\""
         }
     }
-    
+
     return $result
 }
 
@@ -1076,7 +1075,7 @@
     macports::worker_init $workername $portpath $porturl [macports::getportbuildpath $portpath] $options $filteredvariations
 
     $workername eval source Portfile
-    
+
     # add the default universal variant, but only if
     # it will work and another one isn't already present
     if {[$workername eval default_universal_variant_allowed]} {
@@ -1106,7 +1105,7 @@
 proc mporttraverse {func {root .}} {
     # Save the current directory
     set pwd [pwd]
-    
+
     # Join the root.
     set pathToRoot [file join $pwd $root]
 
@@ -1124,7 +1123,7 @@
                   [file exists [file join $pathToPort "Portfile"]]} {
                     # Call the function.
                     $func [file join $category $port]
-                    
+
                     # Restore the current directory because some
                     # functions changes it.
                     cd $pathToRoot
@@ -1132,7 +1131,7 @@
             }
         }
     }
-    
+
     # Restore the current directory.
     cd $pwd
 }
@@ -1182,7 +1181,7 @@
     set depline [lindex [split $depspec :] 1]
     set prefix [_mportkey $mport prefix]
     set frameworks_dir [_mportkey $mport frameworks_dir]
-    
+
     if {[info exists env(DYLD_FRAMEWORK_PATH)]} {
         lappend search_path $env(DYLD_FRAMEWORK_PATH)
     } else {
@@ -1218,12 +1217,12 @@
 proc _bintest {mport depspec} {
     global env
     set depregex [lindex [split $depspec :] 1]
-    set prefix [_mportkey $mport prefix] 
-    
+    set prefix [_mportkey $mport prefix]
+
     set search_path [split $env(PATH) :]
-    
+
     set depregex \^$depregex\$
-    
+
     return [_mportsearchpath $depregex $search_path 1]
 }
 
@@ -1232,8 +1231,8 @@
 proc _pathtest {mport depspec} {
     global env
     set depregex [lindex [split $depspec :] 1]
-    set prefix [_mportkey $mport prefix] 
-    
+    set prefix [_mportkey $mport prefix]
+
     # separate directory from regex
     set fullname $depregex
 
@@ -1267,23 +1266,33 @@
     }
 }
 
+# Determine if the named port is active (only for image mode)
+proc _portnameactive {portname} {
+    if {[catch {set reslist [registry::active $portname]}]} {
+        return 0
+    } else {
+        return [expr [llength $reslist] > 0]
+    }
+}
+
 ### _mportispresent is private; may change without notice
 
 # Determine if some depspec is satisfied or if the given port is installed
 # and active
 # We actually start with the registry (faster?)
 #
-# mport     the port to test (to figure out if it's present)
+# mport     the port declaring the dep (context in which to evaluate $prefix etc)
 # depspec   the dependency test specification (path, bin, lib, etc.)
 proc _mportispresent {mport depspec} {
-    ui_debug "Searching for dependency: [ditem_key $mport provides]"
-    set res [_mportactive $mport]
+    set portname [lindex [split $depspec :] end]
+    ui_debug "Searching for dependency: $portname"
+    set res [_portnameactive $portname]
     if {$res != 0} {
-        ui_debug "Found Dependency: receipt exists for [ditem_key $mport provides]"
+        ui_debug "Found Dependency: receipt exists for $portname"
         return 1
     } else {
         # The receipt test failed, use one of the depspec regex mechanisms
-        ui_debug "Didn't find receipt, going to depspec regex for: [ditem_key $mport provides]"
+        ui_debug "Didn't find receipt, going to depspec regex for: $portname"
         set type [lindex [split $depspec :] 0]
         switch $type {
             lib { return [_libtest $mport $depspec] }
@@ -1330,7 +1339,7 @@
     if {[$workername eval check_variants variations $target] != 0} {
         return 1
     }
-    
+
     # Before we build the port, we must build its dependencies.
     # XXX: need a more general way of comparing against targets
     set dlist {}
@@ -1340,7 +1349,7 @@
         || $target == "archive"
         || $target == "dmg" || $target == "mdmg"
         || $target == "pkg" || $target == "mpkg"
-        || $target == "rpm" || $target == "dpkg" 
+        || $target == "rpm" || $target == "dpkg"
         || $target == "srpm"|| $target == "portpkg" } {
 
         ui_msg -nonewline "--->  Computing dependencies for [_mportkey $mport name]"
@@ -1352,11 +1361,11 @@
             return 1
         }
         ui_msg ""
-        
+
         # Select out the dependents along the critical path,
         # but exclude this mport, we might not be installing it.
         set dlist [dlist_append_dependents $macports::open_mports $mport {}]
-        
+
         dlist_delete dlist $mport
 
         # install them
@@ -1370,7 +1379,7 @@
             ui_error $errstring
             return 1
         }
-        
+
         # Close the dependencies, we're done installing them.
         foreach ditem $dlist {
             mportclose $ditem
@@ -1388,7 +1397,7 @@
     if {[string equal $target "install"]} {
         set target activate
     }
-    
+
     # Build this port with the specified target
     set result [$workername eval eval_targets $target]
 
@@ -1601,7 +1610,7 @@
     global macports::portdbpath macports::sources
     set matches [list]
     set easy [expr { $field == "name" }]
-    
+
     set found 0
     foreach source $sources {
         set flags [lrange $source 1 end]
@@ -1621,7 +1630,7 @@
                         set name [lindex $line 0]
                         set len [lindex $line 1]
                         set line [read $fd $len]
-                        
+
                         if {$easy} {
                             set target $name
                         } else {
@@ -1629,7 +1638,7 @@
                             if {![info exists portinfo($field)]} continue
                             set target $portinfo($field)
                         }
-                        
+
                         switch $matchstyle {
                             exact {
                                 set matchres [expr 0 == ( {$case_sensitive == "yes"} ? [string compare $pattern $target] : [string compare -nocase $pattern $target] )]
@@ -1642,7 +1651,7 @@
                                 set matchres [expr {$case_sensitive == "yes"} ? [regexp -- $pattern $target] : [regexp -nocase -- $pattern $target]]
                             }
                         }
-                        
+
                         if {$matchres == 1} {
                             if {$easy} {
                                 array set portinfo $line
@@ -1703,7 +1712,7 @@
 # the use of the quick index.
 proc mportlookup {name} {
     global macports::portdbpath macports::sources
-    
+
     set sourceno 0
     set matches [list]
     foreach source $sources {
@@ -1728,7 +1737,7 @@
                     set name [lindex $line 0]
                     set len [lindex $line 1]
                     set line [read $fd $len]
-                        
+
                     array set portinfo $line
 
                     switch -regexp -- [macports::getprotocol ${source}] {
@@ -1788,7 +1797,7 @@
 # it first if necessary.
 proc _mports_load_quickindex {args} {
     global macports::sources macports::quick_index
-    
+
     set sourceno 0
     foreach source $sources {
         unset -nocomplain quicklist
@@ -1915,18 +1924,18 @@
     } else {
         upvar accDeps accDeps
     }
-    
+
     # progress indicator
     if {![macports::ui_isset ports_debug]} {
         ui_info -nonewline "."
         flush stdout
     }
-        
+
     # Determine deptypes to look for based on target
     switch $target {
         configure   -
         build       { set deptypes "depends_lib depends_build" }
-        
+
         test        -
         destroot    -
         imagefile   -
@@ -1942,7 +1951,7 @@
         dpkg        -
         ""          { set deptypes "depends_lib depends_build depends_run" }
     }
-    
+
     # Gather the dependencies for deptypes
     foreach deptype $deptypes {
         # Add to the list of dependencies if the option exists and isn't empty.
@@ -1952,11 +1961,11 @@
     }
 
     set subPorts {}
-    
+
     foreach depspec $depends {
         # grab the portname portion of the depspec
         set dep_portname [lindex [split $depspec :] end]
-        
+
         # Find the porturl
         if {[catch {set res [mportlookup $dep_portname]} error]} {
             global errorInfo
@@ -1964,7 +1973,7 @@
             ui_error "Internal error: port lookup failed: $error"
             return 1
         }
-        
+
         array unset portinfo
         array set portinfo [lindex $res 1]
         if {[info exists portinfo(porturl)]} {
@@ -1974,18 +1983,17 @@
             return 1
         }
 
-        set options [ditem_key $mport options]
-        set variations [ditem_key $mport variations]
-
-        # Figure out the subport.   
-        set subport [mportopen $porturl $options $variations]
-
         # Is that dependency satisfied or this port installed?
         # If we don't skip or if it is not, add it to the list.
-        if {!$skipSatisfied || ![_mportispresent $subport $depspec]} {
+        if {!$skipSatisfied || ![_mportispresent $mport $depspec]} {
+            set options [ditem_key $mport options]
+            set variations [ditem_key $mport variations]
+            # Figure out the subport.
+            set subport [mportopen $porturl $options $variations]
+            
             # Append the sub-port's provides to the port's requirements list.
             ditem_append_unique $mport requires "[ditem_key $subport provides]"
-    
+
             if {$recurseDeps} {
                 # Skip the port if it's already in the accumulated list.
                 if {![info exists accDeps($dep_portname)]} {
@@ -2009,7 +2017,7 @@
             }
         }
     }
-    
+
     return 0
 }
 
@@ -2018,7 +2026,7 @@
     global macports::prefix macports::portdbpath macports::libpath macports::rsync_server macports::rsync_dir macports::rsync_options
     global macports::autoconf::macports_version macports::autoconf::rsync_path
     array set options $optionslist
-    
+
     # syncing ports tree.
     if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
         ui_msg "--->  Updating the ports tree"
@@ -2026,14 +2034,14 @@
             return -code error "Couldn't sync the ports tree: $result"
         }
     }
-    
+
     # create the path to the to be downloaded sources if it doesn't exist
     set mp_source_path [file join $portdbpath sources ${rsync_server} ${rsync_dir}/]
     if {![file exists $mp_source_path]} {
         file mkdir $mp_source_path
     }
     ui_debug "MacPorts sources location: $mp_source_path"
-    
+
     # sync the MacPorts sources
     ui_msg "--->  Updating MacPorts base sources using rsync"
     if { [catch { system "$rsync_path $rsync_options rsync://${rsync_server}/${rsync_dir} $mp_source_path" } result ] } {
@@ -2091,7 +2099,7 @@
             } else {
                 set tclpackage $libpath
             }
-            
+
             set configure_args "--prefix=$prefix --with-tclpackage=$tclpackage --with-install-user=$owner --with-install-group=$group --with-directory-mode=$perms"
             # too many users have an incompatible readline in /usr/local, see ticket #10651
             if {$os_platform != "darwin" || $prefix == "/usr/local"
@@ -2100,7 +2108,7 @@
             } else {
                 ui_warn "Disabling readline support due to readline in /usr/local"
             }
-            
+
             # do the actual configure, build and installation of new base
             ui_msg "Installing new MacPorts release in $prefix as $owner:$group; permissions $perms; Tcl-Package in $tclpackage\n"
             if { [catch { system "cd $mp_source_path && ./configure $configure_args && make && make install" } result] } {
@@ -2178,29 +2186,34 @@
     if { [catch {set ilist [registry::installed $portname ""]} result] } {
         if {$result == "Registry error: $portname not registered as installed." } {
             ui_debug "$portname is *not* installed by MacPorts"
-            # open porthandle
-            set porturl $portinfo(porturl)
-            if {![info exists porturl]} {
-                set porturl file://./
-            }
-            # Merge the global variations into the specified
-            foreach { variation value } $globalvarlist {
-                if { ![info exists variations($variation)] } {
-                    set variations($variation) $value
+
+            # We need to pass _mportispresent a reference to the mport that is
+            # actually declaring the dependency on the one we're checking for.
+            # We got here via _upgrade_dependencies, so we grab it from 2 levels up.
+            upvar 2 workername parentworker
+            if {![_mportispresent $parentworker $dspec ] } {
+                # open porthandle
+                set porturl $portinfo(porturl)
+                if {![info exists porturl]} {
+                    set porturl file://./
                 }
-            }
+                # Merge the global variations into the specified
+                foreach { variation value } $globalvarlist {
+                    if { ![info exists variations($variation)] } {
+                        set variations($variation) $value
+                    }
+                }
 
-            if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
+                if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
                     global errorInfo
                     ui_debug "$errorInfo"
                     ui_error "Unable to open port: $result"
                     return 1
-            }
-            # While we're at it, update the portinfo
-            array unset portinfo
-            array set portinfo [mportinfo $workername]
-
-            if {![_mportispresent $workername $dspec ] } {
+                }
+                # While we're at it, update the portinfo
+                array unset portinfo
+                array set portinfo [mportinfo $workername]
+                
                 # upgrade its dependencies first
                 _upgrade_dependencies portinfo depscache globalvarlist variationslist options
                 # now install it
@@ -2208,15 +2221,17 @@
                     global errorInfo
                     ui_debug "$errorInfo"
                     ui_error "Unable to exec port: $result"
+                    catch {mportclose $workername}
                     return 1
                 }
                 if {$result > 0} {
                     ui_error "Problem while installing $portname"
+                    catch {mportclose $workername}
                     return $result
                 }
                 # we just installed it, so mark it done in the cache
-                # and update ilist
                 set depscache(port:${portname}) 1
+                mportclose $workername
             } else {
                 # dependency is satisfied by something other than the named port
                 ui_debug "$portname not installed, soft dependency satisfied"
@@ -2373,7 +2388,7 @@
                     }
                 }
             }
-
+            mportclose $workername
             return 0
         } else {
             set epoch_override 1
@@ -2392,6 +2407,7 @@
             global errorInfo
             ui_debug "$errorInfo"
             ui_error "Unable to upgrade port: $result"
+            catch {mportclose $workername}
             return 1
         }
     }
@@ -2408,6 +2424,7 @@
             global errorInfo
             ui_debug "$errorInfo"
             ui_error "Uninstall $portname ${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants) failed: $result"
+            catch {mportclose $workername}
             return 1
         }
         if {!$force_cur} {
@@ -2426,6 +2443,7 @@
             global errorInfo
             ui_debug "$errorInfo"
             ui_error "Deactivating $portname ${version_active}_${revision_active} failed: $result"
+            catch {mportclose $workername}
             return 1
         }
     }
@@ -2441,9 +2459,10 @@
         global errorInfo
         ui_debug "$errorInfo"
         ui_error "Couldn't activate $portname ${version_in_tree}_${revision_in_tree}: $result"
+        catch {mportclose $workername}
         return 1
     }
-    
+
     if {[info exists uninstall_later] && $uninstall_later == yes} {
         foreach i $ilist {
             set version [lindex $i 1]
@@ -2459,6 +2478,7 @@
                 global errorInfo
                 ui_debug "$errorInfo"
                 ui_error "Uninstall $portname @${version}_${revision}${variant} failed: $result"
+                catch {mportclose $workername}
                 return 1
             }
         }
@@ -2482,7 +2502,7 @@
         }
     }
 
-    
+
     # close the port handle
     mportclose $workername
 }
@@ -2494,19 +2514,19 @@
     upvar $portinfoname portinfo $depscachename depscache \
           $globalvarlistname globalvarlist $variationslistname variationslist \
           $optionsname options
-    
+
     # If we're following dependents, we only want to follow this port's
     # dependents, not those of all its dependencies. Otherwise, we would
     # end up processing this port's dependents n+1 times (recursively!),
     # where n is the number of dependencies this port has, since this port
     # is of course a dependent of each of its dependencies. Plus the
     # dependencies could have any number of unrelated dependents.
-        
+
     # So we save whether we're following dependents, unset the option
     # while doing the dependencies, and restore it afterwards.
     set saved_do_dependents [info exists options(ports_do_dependents)]
     unset -nocomplain options(ports_do_dependents)
-    
+
     # each dep type is upgraded
     foreach dtype {depends_build depends_lib depends_run} {
         if {[info exists portinfo($dtype)]} {
@@ -2514,7 +2534,7 @@
                 set d [lindex [split $i :] end]
                 if {![llength [array get depscache port:${d}]] && ![llength [array get depscache $i]]} {
                     upgrade $d $i $globalvarlist $variationslist [array get options] depscache
-                } 
+                }
             }
         }
     }
@@ -2614,7 +2634,7 @@
             if {[file exists $selected_version]} {
                 file delete $selected_version
             }
-            symlink $version $selected_version 
+            symlink $version $selected_version
             return
         }
         show {

Modified: branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -32,9 +32,12 @@
 package provide macports 1.0
 
 namespace eval macports::autoconf {
+    variable gzip_path "@GZIP@"
     variable macports_conf_path "@MPCONFIGDIR_EXPANDED@"
     variable macports_version "@MACPORTS_VERSION@"
     variable macports_user_dir "~/.macports"
+    variable open_path "@OPEN@"
     variable rsync_path "@RSYNC@"
-    variable open_path "@OPEN@"
+    variable tar_command "@TAR_CMD@"
+    variable tar_path "@TAR@"
 }

Modified: branches/images-and-archives/base/src/macports1.0/macports_fastload.tcl.in
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports_fastload.tcl.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/macports1.0/macports_fastload.tcl.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -73,8 +73,11 @@
 set dir [file join "@TCL_PACKAGE_DIR@" macports1.0]
 catch {source [file join $dir pkgIndex.tcl]}
 
-foreach dir [glob -directory "@prefix_expanded@" -join share macports Tcl *] {
-	catch {source [file join $dir pkgIndex.tcl]}
+set sharetcldir [file join "@prefix_expanded@" share macports Tcl]
+if {[file exists $sharetcldir]} {
+	foreach dir [glob -directory $sharetcldir *] {
+		catch {source [file join $dir pkgIndex.tcl]}
+	}
 }
 
 if { "@SQLITE3_DIR@" != "" } {


Property changes on: branches/images-and-archives/base/src/package1.0
___________________________________________________________________
Added: svn:ignore
   + pkgIndex.tcl


Modified: branches/images-and-archives/base/src/package1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/package1.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/package1.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -5,17 +5,21 @@
 
 include ../../Mk/macports.autoconf.mk
 
-all::
+all:: pkgIndex.tcl
 
+pkgIndex.tcl:
+	$(SILENT) ../pkg_mkindex.sh .
+
 clean::
+	rm -f pkgIndex.tcl
 
-distclean::
+distclean:: clean
 
 test::
 
-install::
+install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(SILENT)set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}

Modified: branches/images-and-archives/base/src/package1.0/portarchive.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portarchive.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/package1.0/portarchive.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -159,13 +159,13 @@
 	switch -regex ${archive.type} {
 		cp(io|gz) {
 			set pax "pax"
-			if {[catch {set pax [binaryInPath $pax]} errmsg] == 0} {
+			if {[catch {set pax [findBinary $pax ${portutil::autoconf::pax_path}]} errmsg] == 0} {
 				ui_debug "Using $pax"
 				set archive.cmd "$pax"
 				set archive.pre_args {-w -v -x cpio}
 				if {[regexp {z$} ${archive.type}]} {
 					set gzip "gzip"
-					if {[catch {set gzip [binaryInPath $gzip]} errmsg] == 0} {
+					if {[catch {set gzip [findBinary $gzip ${portutil::autoconf::gzip_path}]} errmsg] == 0} {
 						ui_debug "Using $gzip"
 						set archive.args {.}
 						set archive.post_args "| $gzip -c9 > ${archive.path}"
@@ -181,9 +181,9 @@
 				return -code error "No '$pax' was found on this system!"
 			}
 		}
-		t(ar|bz|lz|gz) {
+		t(ar|bz|lz|xz|gz) {
 			set tar "tar"
-			if {[catch {set tar [binaryInPath $tar]} errmsg] == 0} {
+			if {[catch {set tar [findBinary $tar ${portutil::autoconf::tar_path}]} errmsg] == 0} {
 				ui_debug "Using $tar"
 				set archive.cmd "$tar"
 				set archive.pre_args {-cvf}
@@ -194,11 +194,19 @@
 					} elseif {[regexp {lz$} ${archive.type}]} {
 						set gzip "lzma"
 						set level 7
+					} elseif {[regexp {xz$} ${archive.type}]} {
+						set gzip "xz"
+						set level 6
 					} else {
 						set gzip "gzip"
 						set level 9
 					}
-					if {[catch {set gzip [binaryInPath $gzip]} errmsg] == 0} {
+					if {[info exists portutil::autoconf::${gzip}_path]} {
+					    set hint [set portutil::autoconf::${gzip}_path]
+					} else {
+					    set hint ""
+					}
+					if {[catch {set gzip [findBinary $gzip $hint]} errmsg] == 0} {
 						ui_debug "Using $gzip"
 						set archive.args {- .}
 						set archive.post_args "| $gzip -c$level > ${archive.path}"
@@ -216,7 +224,7 @@
 		}
 		xar {
 			set xar "xar"
-			if {[catch {set xar [binaryInPath $xar]} errmsg] == 0} {
+			if {[catch {set xar [findBinary $xar ${portutil::autoconf::xar_path}]} errmsg] == 0} {
 				ui_debug "Using $xar"
 				set archive.cmd "$xar"
 				set archive.pre_args {-cvf}
@@ -229,7 +237,7 @@
 		xpkg {
 			set xar "xar"
 			set compression "bzip2"
-			if {[catch {set xar [binaryInPath $xar]} errmsg] == 0} {
+			if {[catch {set xar [findBinary $xar ${portutil::autoconf::xar_path}]} errmsg] == 0} {
 				ui_debug "Using $xar"
 				set archive.cmd "$xar"
 				set archive.pre_args "-cv --exclude='\./\+.*' --compression=${compression} -n ${archive.metaname} -s ${archive.metapath} -f"
@@ -241,7 +249,7 @@
 		}
 		zip {
 			set zip "zip"
-			if {[catch {set zip [binaryInPath $zip]} errmsg] == 0} {
+			if {[catch {set zip [findBinary $zip ${portutil::autoconf::zip_path}]} errmsg] == 0} {
 				ui_debug "Using $zip"
 				set archive.cmd "$zip"
 				set archive.pre_args {-ry9}


Property changes on: branches/images-and-archives/base/src/pextlib1.0
___________________________________________________________________
Modified: svn:ignore
   - *.dylib
   + *.dylib
pkgIndex.tcl


Modified: branches/images-and-archives/base/src/pextlib1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -17,9 +17,9 @@
 .PHONY: test
 
 test:: ${SHLIB_NAME}
+	${TCLSH} tests/checksums.tcl ${SHLIB_NAME}
 	${TCLSH} tests/curl.tcl ${SHLIB_NAME}
-	${TCLSH} tests/checksums.tcl ${SHLIB_NAME}
 	${TCLSH} tests/filemap.tcl ${SHLIB_NAME}
-	${TCLSH} tests/fifo.tcl ${SHLIB_NAME}
 	${TCLSH} tests/fs-traverse.tcl ${SHLIB_NAME}
-	${TCLSH} tests/socketpair.tcl ${SHLIB_NAME}
+	${TCLSH} tests/symlink.tcl ${SHLIB_NAME}
+	${TCLSH} tests/unsetenv.tcl ${SHLIB_NAME}

Modified: branches/images-and-archives/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/Pextlib.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/Pextlib.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -36,16 +36,13 @@
 #include <config.h>
 #endif
 
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <ctype.h>
 #include <errno.h>
 #include <grp.h>
-
-#if HAVE_STRING_H
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#endif
 
 #if HAVE_STRINGS_H
 #include <strings.h>
@@ -136,7 +133,8 @@
 
 #define CBUFSIZ 30
 
-char *ui_escape(const char *source)
+static char *
+ui_escape(const char *source)
 {
 	char *d, *dest;
 	const char *s;
@@ -173,7 +171,8 @@
 	return dest;
 }
 
-int ui_info(Tcl_Interp *interp, char *mesg)
+int
+ui_info(Tcl_Interp *interp, char *mesg)
 {
 	const char ui_proc_start[] = "ui_info [subst -nocommands -novariables {";
 	const char ui_proc_end[] = "}]";
@@ -728,76 +727,6 @@
 	return TCL_OK;
 }
 
-/**
- * Take a file descriptor and generate a Tcl channel out of it.
- * Syntax is:
- * mkchannelfromfd fd [r|w|rw]
- * Use r to generate a read-only channel, w for a write only channel or rw
- * for a read/write channel (the default).
- */
-int MkChannelFromFdCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-	Tcl_Channel theChannel;
-	int fd;
-	int readOrWrite = TCL_READABLE | TCL_WRITABLE;
-
-	if ((objc != 2) && (objc != 3)) {
-		Tcl_WrongNumArgs(interp, 1, objv, "fd [r|w|rw]");
-		return TCL_ERROR;
-	}
-	
-	if (objc == 3) {
-		char* readOrWrite_as_char_star;
-		readOrWrite_as_char_star = strdup(Tcl_GetString(objv[2]));
-		if (readOrWrite_as_char_star == NULL) {
-			return TCL_ERROR;
-		}
-
-		if ((readOrWrite_as_char_star[0] == 'r')
-			&& (readOrWrite_as_char_star[1] == '\0')) {
-			readOrWrite = TCL_READABLE;
-		} else if ((readOrWrite_as_char_star[0] == 'w')
-			&& (readOrWrite_as_char_star[1] == '\0')) {
-			readOrWrite = TCL_WRITABLE;
-		} else if ((readOrWrite_as_char_star[0] == 'r')
-			&& (readOrWrite_as_char_star[1] == 'w')
-			&& (readOrWrite_as_char_star[2] == '\0')) {
-			readOrWrite = TCL_READABLE | TCL_WRITABLE;
-		} else {
-			Tcl_AppendResult(interp, "Bad mode. Use r, w or rw", NULL);
-			free(readOrWrite_as_char_star);
-			return TCL_ERROR;
-		}
-
-		free(readOrWrite_as_char_star);
-	}
-
-	{
-		char* fd_as_char_star;
-		fd_as_char_star = strdup(Tcl_GetString(objv[1]));
-		if (fd_as_char_star == NULL) {
-			return TCL_ERROR;
-		}
-
-		if (Tcl_GetInt(interp, fd_as_char_star, &fd) != TCL_OK) {
-			free(fd_as_char_star);
-			return TCL_ERROR;
-		}
-		free(fd_as_char_star);
-	}
-
-	theChannel = Tcl_MakeFileChannel((ClientData)(intptr_t)fd, readOrWrite);
-	if (theChannel == NULL) {
-		return TCL_ERROR;
-	}
-	
-	/* register the channel in the current interpreter */
-	Tcl_RegisterChannel(interp, theChannel);
-	Tcl_AppendResult(interp, Tcl_GetChannelName(theChannel), (char *) NULL);
-
-	return TCL_OK;
-}
-
 int MkdtempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 	char *template, *sp;
@@ -879,54 +808,6 @@
 	return TCL_OK;
 }
 
-/**
- * Call mkfifo(2).
- * Generate a Tcl error if something wrong occurred.
- *
- * Syntax is:
- * mkfifo path mode
- */
-int MkfifoCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-	char* path;
-	mode_t mode;
-
-	if (objc != 3) {
-		Tcl_WrongNumArgs(interp, 1, objv, "path mode");
-		return TCL_ERROR;
-	}
-	
-	{
-		char* mode_as_char_star;
-		int mode_as_int;
-		mode_as_char_star = strdup(Tcl_GetString(objv[2]));
-		if (mode_as_char_star == NULL) {
-			return TCL_ERROR;
-		}
-
-		if (Tcl_GetInt(interp, mode_as_char_star, &mode_as_int) != TCL_OK) {
-			free(mode_as_char_star);
-			return TCL_ERROR;
-		}
-		free(mode_as_char_star);
-		mode = (mode_t) mode_as_int;
-	}
-
-	path = strdup(Tcl_GetString(objv[1]));
-	if (path == NULL) {
-		return TCL_ERROR;
-	}
-
-	if (mkfifo(path, mode) != 0) {
-		Tcl_AppendResult(interp, "mkfifo failed: ", strerror(errno), NULL);
-		free(path);
-		return TCL_ERROR;
-	}
-
-	free(path);
-	return TCL_OK;
-}
-
 int ExistsuserCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 	Tcl_Obj *tcl_result;
@@ -1030,7 +911,7 @@
 	mode_t oldmode;
 
 	if (objc != 2) {
-		Tcl_WrongNumArgs(interp, 1, objv, "numask");
+		Tcl_WrongNumArgs(interp, 1, objv, "mode");
 		return TCL_ERROR;
 	}
 
@@ -1104,38 +985,6 @@
 }
 
 /**
- * Call socketpair to generate a socket pair in the Unix domain.
- * Syntax is:
- * unixsocketpair
- *
- * Generate a Tcl error if something goes wrong.
- * Return a list with the file descriptors of the pair.
- */
-int UnixSocketPairCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-	Tcl_Obj* result;
-	int pair[2];
-
-	if (objc != 1) {
-		Tcl_WrongNumArgs(interp, 1, objv, NULL);
-		return TCL_ERROR;
-	}
-	
-	if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) < 0) {
-		Tcl_AppendResult(interp, "socketpair failed: ", strerror(errno), NULL);
-		return TCL_ERROR;
-	}
-	
-	/* build a list out of the pair */
-	result = Tcl_NewListObj(0, NULL);
-	Tcl_ListObjAppendElement(interp, result, Tcl_NewIntObj(pair[0]));
-	Tcl_ListObjAppendElement(interp, result, Tcl_NewIntObj(pair[1]));
-	Tcl_SetObjResult(interp, result);
-
-	return TCL_OK;
-}
-
-/**
  * symlink value target
  * Create a symbolic link at target pointing to value
  * See symlink(2) for possible errors
@@ -1274,7 +1123,7 @@
 
 int Pextlib_Init(Tcl_Interp *interp)
 {
-	if (Tcl_InitStubs(interp, "8.3", 0) == NULL)
+	if (Tcl_InitStubs(interp, "8.4", 0) == NULL)
 		return TCL_ERROR;
 
 	Tcl_CreateObjCommand(interp, "system", SystemCmd, NULL, NULL);
@@ -1297,9 +1146,6 @@
 	Tcl_CreateObjCommand(interp, "sha1", SHA1Cmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "umask", UmaskCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "sudo", SudoCmd, NULL, NULL);
-	Tcl_CreateObjCommand(interp, "mkfifo", MkfifoCmd, NULL, NULL);
-	Tcl_CreateObjCommand(interp, "unixsocketpair", UnixSocketPairCmd, NULL, NULL);
-	Tcl_CreateObjCommand(interp, "mkchannelfromfd", MkChannelFromFdCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "pipe", PipeCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "curl", CurlCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "symlink", CreateSymlinkCmd, NULL, NULL);

Modified: branches/images-and-archives/base/src/pextlib1.0/curl.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/curl.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/curl.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -34,14 +34,11 @@
 #include <config.h>
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <ctype.h>
 #include <errno.h>
-
-#if HAVE_STRING_H
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#endif
 
 #ifdef HAVE_UTIME_H
 #include <utime.h>
@@ -50,18 +47,9 @@
 #include <curl/curl.h>
 
 #include <tcl.h>
-#include <tclDecls.h>
 
 #include "curl.h"
 
-/* Avoid a warning with Tcl < 8.4, even if Tcl_GetIndexFromObj's tablePtr
-probably isn't modified. */
-#if (TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION >= 4)
-typedef CONST char* tableEntryString;
-#else
-typedef char* tableEntryString;
-#endif
-
 /*
  * Some compiled-in constants that we may wish to change later, given more
  * empirical data.  These represent "best guess" values for now.
@@ -81,6 +69,7 @@
 int SetResultFromCurlErrorCode(Tcl_Interp* interp, CURLcode inErrorCode);
 int CurlFetchCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 int CurlIsNewerCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
+int CurlGetSizeCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 
 /* ========================================================================= **
  * Entry points
@@ -108,18 +97,16 @@
 			theResult = TCL_OK;
 			break;
 		
-		default:
-#ifdef HAVE_CURL_EASY_STRERROR
-			Tcl_SetResult(interp, (char*) curl_easy_strerror(inErrorCode), TCL_VOLATILE);
+		default: {
+#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */
+			Tcl_SetResult(interp, (char *)curl_easy_strerror(inErrorCode), TCL_VOLATILE);
 #else
-			{
-				char theErrorString[512];
-				(void) snprintf(theErrorString, sizeof(theErrorString),
-					"curl error %i", inErrorCode);
-				Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);				
-			}
+			char theErrorString[512];
+			(void)snprintf(theErrorString, sizeof(theErrorString), "curl error %i", inErrorCode);
+			Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
 #endif
 			theResult = TCL_ERROR;
+		}
 	}
 	
 	return theResult;
@@ -829,7 +816,7 @@
     	kCurlGetSize
     } EOption;
     
-	static tableEntryString options[] = {
+	static const char *options[] = {
 		"fetch", "isnewer", "getsize", NULL
 	};
 	int theResult = TCL_OK;

Modified: branches/images-and-archives/base/src/pextlib1.0/fgetln.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/fgetln.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/fgetln.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -35,10 +35,7 @@
 #if !HAVE_FGETLN
 #include <stdio.h>
 #include <stdlib.h>
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
 #define BUFCHUNKS	BUFSIZ
 

Modified: branches/images-and-archives/base/src/pextlib1.0/filemap.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/filemap.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/filemap.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -34,15 +34,12 @@
 #include <config.h>
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <ctype.h>
 #include <errno.h>
 #include <grp.h>
-
-#if HAVE_STRING_H
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#endif
 
 #if HAVE_STRINGS_H
 #include <strings.h>
@@ -222,6 +219,7 @@
 int SetResultFromErrorCode(Tcl_Interp* interp, int inErrorCode);
 SFilemapObject* GetObjectFromVarName(Tcl_Interp* interp, Tcl_Obj* inVarName);
 int FilemapCloseCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
+int FilemapCreateCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 int FilemapExistsCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 int FilemapGetCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 int FilemapIsReadOnlyCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
@@ -709,6 +707,8 @@
 					ckfree((char*) theSubnode);
 					*theSubnodeCursor = 0;
 				}
+				
+				theSubnodeCursor++;
 			}
 		}
 		

Modified: branches/images-and-archives/base/src/pextlib1.0/fs-traverse.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/fs-traverse.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/fs-traverse.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -58,6 +58,8 @@
 
 #include <tcl.h>
 
+#include "fs-traverse.h"
+
 static int do_traverse(Tcl_Interp *interp, int flags, char * CONST *targets, Tcl_Obj *varname, Tcl_Obj *body);
 
 #define F_DEPTH 0x1

Modified: branches/images-and-archives/base/src/pextlib1.0/md5cmd.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/md5cmd.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/md5cmd.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -34,12 +34,10 @@
 #include <config.h>
 #endif
 
-#include <tcl.h>
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
+#include <tcl.h>
+
 #if defined(HAVE_LIBCRYPTO) && !defined(HAVE_LIBMD)
 
 /* Minimal wrapper around OpenSSL's libcrypto, as a compatibility

Modified: branches/images-and-archives/base/src/pextlib1.0/readline.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/readline.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/readline.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -12,16 +12,13 @@
 #include <config.h>
 #endif
 
+#include <stdio.h>
+#include <string.h>
+
 #if HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include <stdio.h>
-
 #if HAVE_READLINE_READLINE_H
 #include <readline/readline.h>
 #endif
@@ -31,9 +28,9 @@
 #endif
 
 #include <tcl.h>
+
 #include "readline.h"
 
-
 /* Globals */
 #if HAVE_READLINE_READLINE_H
 Tcl_Interp* completion_interp = NULL;

Modified: branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -34,12 +34,10 @@
 #include <config.h>
 #endif
 
-#include <tcl.h>
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
+#include <tcl.h>
+
 #if !defined(HAVE_LIBMD)
 
 /* We do not have libmd.

Modified: branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -35,12 +35,10 @@
 #include <config.h>
 #endif
 
-#include <tcl.h>
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
+#include <tcl.h>
+
 #if defined(HAVE_LIBCRYPTO) && !defined(HAVE_LIBMD)
 
 /* Minimal wrapper around OpenSSL's libcrypto, as a compatibility

Modified: branches/images-and-archives/base/src/pextlib1.0/strcasecmp.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/strcasecmp.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/strcasecmp.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -30,9 +30,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <ctype.h>
 #include <string.h>
-#include <ctype.h>
 
+#include "strcasecmp.h"
+
 /* ------------------------------------------------------------------------- **
  * xstrcasecmp
  * ------------------------------------------------------------------------- */

Deleted: branches/images-and-archives/base/src/pextlib1.0/tests/fifo.tcl
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tests/fifo.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/tests/fifo.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,39 +0,0 @@
-# Test file for Pextlib's mkfifo.
-# Requires r/w access to /tmp/
-# Syntax:
-# tclsh mkfifo.tcl <Pextlib name>
-
-proc main {pextlibname} {
-	load $pextlibname
-	
-	set fifo_path "/tmp/macports-pextlib-fifo"
-	
-	file delete -force $fifo_path
-
-	# Create the named pipe.
-	mkfifo $fifo_path 0700
-	
-	# Check it exists.
-	if {![file exists $fifo_path]} {
-		puts {![file exists $fifo_path]}
-		exit 1
-	}
-
-	# Check it's a fifo.
-	if {[file type $fifo_path] != "fifo"} {
-		puts {[file type $fifo_path] != "fifo"}
-		exit 1
-	}
-
-	file delete -force $fifo_path
-	
-	set fifo_path "/tmp/macports-pextlib-fifo-dummydir/foo"
-
-	# Test that mkfifo returns an error if the directory doesn't exist.
-	if {![catch {mkfifo $fifo_path}]} {
-		puts {![catch {mkfifo $fifo_path}]}
-		exit 1
-	}
-}
-
-main $argv
\ No newline at end of file

Deleted: branches/images-and-archives/base/src/pextlib1.0/tests/socketpair.tcl
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tests/socketpair.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/tests/socketpair.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,51 +0,0 @@
-# Test file for Pextlib's unixsocketpair and mkchannelfromfd.
-# Syntax:
-# tclsh socketpair.tcl <Pextlib name>
-
-proc main {pextlibname} {
-	load $pextlibname
-
-	# Create a socket pair.
-	set pair [unixsocketpair]
-	
-	# Create the two channels.
-	set channel1 [mkchannelfromfd [lindex $pair 0] r]
-	set channel0 [mkchannelfromfd [lindex $pair 1] w]
-	
-	# Create a fileevent on channel 1
-	fileevent $channel1 readable [list read1 $channel1]
-	
-	# Define the list of what we are going to write in it.
-	global buffer bufferWasEmptied
-	set buffer [list hello world]
-	
-	# Write that stuff.
-	foreach word $buffer {
-		puts $channel0 $word
-		flush $channel0
-	}
-	
-	# Wait for that stuff to have been read.
-	vwait bufferWasEmptied
-}
-
-proc read1 {chan} {
-	global buffer bufferWasEmptied
-	if {![eof $chan]} {
-		set line [gets $chan]
-		set expected [lindex $buffer 0]
-		if {$line != $expected} {
-			puts {$line != $expected}
-			exit 1
-		}
-		set buffer [lreplace $buffer 0 0]
-		if {$buffer == {}} {
-			set bufferWasEmptied 1
-		}
-	} else {
-		puts "EOF!"
-		exit 1
-	}
-}
-
-main $argv

Modified: branches/images-and-archives/base/src/pextlib1.0/tests/symlink.tcl
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tests/symlink.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/tests/symlink.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,7 +1,7 @@
 # Test file for Pextlib's symlink.
 # Requires r/w access to /tmp/
 # Syntax:
-# tclsh mkfifo.tcl <Pextlib name>
+# tclsh symlink.tcl <Pextlib name>
 
 proc main {pextlibname} {
     load $pextlibname

Modified: branches/images-and-archives/base/src/pextlib1.0/tracelib.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tracelib.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/tracelib.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -465,7 +465,7 @@
 	return TCL_OK;
 }
 
-static int TracelibCleanCmd(Tcl_Interp * interp UNUSED)
+static int TracelibCleanCmd(Tcl_Interp * interp)
 {
 	#define safe_free(x) do{free(x); x=0;}while(0);
 	cleanuping=1;
@@ -489,6 +489,7 @@
 	enable_fence=0;
 	#undef safe_free
 	cleanuping=0;
+	Tcl_Eval(interp, "registry::close_file_map");
 	return TCL_OK;
 }
 

Modified: branches/images-and-archives/base/src/pextlib1.0/tty.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tty.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/tty.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -45,6 +45,8 @@
 
 #include <tcl.h>
 
+#include "tty.h"
+
 int IsattyCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
         Tcl_Obj *tcl_result;

Modified: branches/images-and-archives/base/src/pextlib1.0/tty.h
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tty.h	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/tty.h	2009-05-25 06:16:35 UTC (rev 51437)
@@ -36,8 +36,6 @@
 #ifndef _PEXTLIB_TTY_H
 #define _PEXTLIB_TTY_H
 
-#include <tcl.h>
-
 /**
  * A wrapper for isatty(3)
  */

Modified: branches/images-and-archives/base/src/pextlib1.0/uid.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/uid.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/uid.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -8,21 +8,17 @@
  *
  */
  
-#include "uid.h"
-#include "grp.h"
-
 #if HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#include <grp.h>
+#include <string.h>
+
 #if HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -41,6 +37,8 @@
 
 #include <tcl.h>
 
+#include "uid.h"
+
 /*
 	getuid
 	

Modified: branches/images-and-archives/base/src/pextlib1.0/vercomp.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/vercomp.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/vercomp.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -38,18 +38,13 @@
 #include <config.h>
 #endif
 
-#include <stdlib.h>
 #include <ctype.h>
-#include <tcl.h>
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
-#if HAVE_STRINGS_H
-#include <strings.h>
-#endif
+#include <tcl.h>
 
+#include "vercomp.h"
+
 /*
  * If A is newer than B, return an integer > 0
  * If A and B are equal, return 0

Modified: branches/images-and-archives/base/src/pextlib1.0/xinstall.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/xinstall.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pextlib1.0/xinstall.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -78,6 +78,8 @@
 #define _PATH_DEVNULL	"/dev/null"
 #endif
 
+#include "xinstall.h"
+
 #ifndef MAXBSIZE
 #define MAXBSIZE 65536
 #endif

Copied: branches/images-and-archives/base/src/pkg_mkindex.sh.in (from rev 51433, trunk/base/src/pkg_mkindex.sh.in)
===================================================================
--- branches/images-and-archives/base/src/pkg_mkindex.sh.in	                        (rev 0)
+++ branches/images-and-archives/base/src/pkg_mkindex.sh.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -0,0 +1,44 @@
+#!/bin/bash
+# pkg_mkindex.sh
+#
+# Copyright (c) 2009 The MacPorts Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+TCLSH=@TCLSH@
+GREP=@GREP@
+
+if [ $# = 0 ]; then
+    echo "Usage: $0 <directory list>"
+    exit 1
+fi
+
+for dir in $@; do
+    echo "pkg_mkIndex -verbose -- $dir *.tcl *.dylib *.so" | $TCLSH 2>&1 \
+        | $GREP "^warning: " && exit 1
+done
+
+exit 0

Deleted: branches/images-and-archives/base/src/pkg_mkindex.tcl
===================================================================
--- branches/images-and-archives/base/src/pkg_mkindex.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/pkg_mkindex.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,37 +0,0 @@
-#!/usr/bin/env tclsh
-# pkg_mkindex.tcl
-#
-# Copyright (c) 2002 Apple Computer, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-if {$argc < 1} {
-	puts "Usage: $argv0 <directory list>"
-	exit
-}
-foreach dir $argv {
-	pkg_mkIndex -verbose -- $dir *.tcl *.dylib *.so
-}

Modified: branches/images-and-archives/base/src/port/Makefile
===================================================================
--- branches/images-and-archives/base/src/port/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -8,6 +8,8 @@
 
 include ../../Mk/macports.autoconf.mk
 
+.PHONY: mkdirs
+
 all: ${SCRIPTS}
 
 portmirror: portmirror.tcl ../../Mk/macports.autoconf.mk
@@ -29,7 +31,7 @@
 
 distclean: clean
 
-install: port portindex portmirror mkdirs
+install: all mkdirs
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/bin
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/var/macports
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 555 port portindex portmirror ${INSTALLDIR}/bin/

Modified: branches/images-and-archives/base/src/port/port.tcl
===================================================================
--- branches/images-and-archives/base/src/port/port.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port/port.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1797,6 +1797,7 @@
             puts "$file does not exist."
         }
     }
+    registry::close_file_map
     
     return 0
 }
@@ -2263,6 +2264,7 @@
             }
         }
     }
+    registry::close_file_map
 
     return $status
 }

Modified: branches/images-and-archives/base/src/port/portindex.tcl
===================================================================
--- branches/images-and-archives/base/src/port/portindex.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port/portindex.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -60,7 +60,9 @@
             set portinfo(portarchive) [file join [file dirname $portdir] [file tail $portdir]].tgz
             cd [file join $directory [file dirname $portinfo(portdir)]]
             puts "Archiving port $portinfo(name) to [file join $outdir $portinfo(portarchive)]"
-            if {[catch {exec tar -cf - [file tail $portdir] | gzip -c >[file join $outdir $portinfo(portarchive)]} result]} {
+            set tar [findBinary tar $macports::autoconf::tar_path]
+            set gzip [findBinary gzip $macports::autoconf::gzip_path]
+            if {[catch {exec $tar -cf - [file tail $portdir] | $gzip -c >[file join $outdir $portinfo(portarchive)]} result]} {
                 puts stderr "Failed to create port archive $portinfo(portarchive): $result"
                 exit 1
             }


Property changes on: branches/images-and-archives/base/src/port1.0
___________________________________________________________________
Modified: svn:ignore
   - port_autoconf.tcl

   + port_autoconf.tcl
pkgIndex.tcl


Modified: branches/images-and-archives/base/src/port1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/port1.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -13,19 +13,23 @@
 
 .PHONY: test
 
-all::
+all:: pkgIndex.tcl
 
+pkgIndex.tcl:
+	$(SILENT) ../pkg_mkindex.sh .
+
 clean::
+	rm -f pkgIndex.tcl
 
-distclean::
+distclean:: clean
 	rm -f port_autoconf.tcl
 
-install::
+install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(SILENT)set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
 
 test::
 	${TCLSH} tests/portutil.tcl

Modified: branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -31,15 +31,24 @@
 package provide port 1.0
 
 namespace eval portutil::autoconf {
+	variable bzip2_path "@BZIP2@"
+	variable cp_path "@CP@"
 	variable cvs_path "@CVS@"
 	variable svn_path "@SVN@"
 	variable git_path "@GIT@"
+	variable gzip_path "@GZIP@"
+	variable rmdir_path "@RMDIR@"
 	variable rsync_path "@RSYNC@"
+	variable unzip_path "@UNZIP@"
+	variable zip_path "@ZIP@"
 	variable mtree_path "@MTREE@"
+	variable pax_path "@PAX@"
 	variable xar_path "@XAR@"
 	variable sed_command "@SED@"
 	variable sed_ext_flag "@SED_EXT@"
 	variable tar_command "@TAR_CMD@"
+	variable tar_path "@TAR@"
+	variable hdiutil_path "@HDIUTIL@"
 	variable have_launchd "@HAVE_LAUNCHD@"
 	variable launchctl_path "@LAUNCHCTL@"
 	variable install_command "@INSTALL@"

Modified: branches/images-and-archives/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -302,7 +302,6 @@
                 cc   { set ret /usr/bin/gcc-4.2 }
                 objc { set ret /usr/bin/gcc-4.2 }
                 cxx  { set ret /usr/bin/g++-4.2 }
-                cpp  { set ret /usr/bin/cpp-4.2 }
             }
         }
         llvm-gcc-4.2 {

Modified: branches/images-and-archives/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portdestroot.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/portdestroot.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -182,6 +182,9 @@
     # but NOT on Jaguar (Darwin 6.x)
     if {![regexp {darwin6} "${os.platform}${os.version}"]} {
         set manpath "${destroot}${prefix}/share/man"
+        set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
+        set gunzip "$gzip -d"
+        set bunzip2 "[findBinary bzip2 ${portutil::autoconf::bzip2_path}] -d"
         if {[file isdirectory ${manpath}] && [file type ${manpath}] == "directory"} {
             ui_info "$UI_PREFIX [format [msgcat::mc "Compressing man pages for %s"] ${portname}]"
             set found 0
@@ -197,17 +200,17 @@
                             if {[regexp "^(.*\[.\]${manindex}\[a-z\]*)\[.\]gz\$" ${manfile} gzfile manfile]} {
                                 set found 1
                                 system "cd ${manpath} && \
-                                gunzip -f [file join ${mandir} ${gzfile}] && \
-                                gzip -9vf [file join ${mandir} ${manfile}]"
+                                $gunzip -f [file join ${mandir} ${gzfile}] && \
+                                $gzip -9vf [file join ${mandir} ${manfile}]"
                             } elseif {[regexp "^(.*\[.\]${manindex}\[a-z\]*)\[.\]bz2\$" ${manfile} bz2file manfile]} {
                                 set found 1
                                 system "cd ${manpath} && \
-                                bunzip2 -f [file join ${mandir} ${bz2file}] && \
-                                gzip -9vf [file join ${mandir} ${manfile}]"
+                                $bunzip2 -f [file join ${mandir} ${bz2file}] && \
+                                $gzip -9vf [file join ${mandir} ${manfile}]"
                             } elseif {[regexp "\[.\]${manindex}\[a-z\]*\$" ${manfile}]} {
                                 set found 1
                                 system "cd ${manpath} && \
-                                gzip -9vf [file join ${mandir} ${manfile}]"
+                                $gzip -9vf [file join ${mandir} ${manfile}]"
                             }
                             set gzmanfile ${manfile}.gz
                             set gzmanfilepath [file join ${mandirpath} ${gzmanfile}]

Modified: branches/images-and-archives/base/src/port1.0/portextract.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portextract.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/portextract.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -53,7 +53,7 @@
 default extract.only {[portextract::disttagclean $distfiles]}
 
 default extract.dir {${workpath}}
-default extract.cmd gzip
+default extract.cmd {[findBinary gzip ${portutil::autoconf::gzip_path}]}
 default extract.pre_args -dc
 default extract.post_args {"| ${portutil::autoconf::tar_command} -xf -"}
 default extract.mkdir no
@@ -85,11 +85,11 @@
     }
 
     if {[tbool use_bzip2]} {
-        option extract.cmd [binaryInPath "bzip2"]
+        option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
     } elseif {[tbool use_lzma]} {
         option extract.cmd [binaryInPath "lzma"]
     } elseif {[tbool use_zip]} {
-        option extract.cmd [binaryInPath "unzip"]
+        option extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}]
         option extract.pre_args -q
         option extract.post_args "-d [option extract.dir]"
     } elseif {[tbool use_7z]} {
@@ -101,9 +101,9 @@
         set dmg_tmp_dir [exec mktemp -d -q "/tmp/mports.XXXXXXXX"]
         set dmg_mount ${dmg_tmp_dir}/${worksrcdir}
         file mkdir ${dmg_mount}
-        option extract.cmd [binaryInPath "hdiutil"]
+        option extract.cmd [findBinary hdiutil ${portutil::autoconf::hdiutil_path}]
         option extract.pre_args attach
-        option extract.post_args "-private -readonly -nobrowse -mountpoint ${dmg_mount} && [binaryInPath "cp"] -Rp ${dmg_mount} ${extract.dir} && ${extract.cmd} detach ${dmg_mount} && [binaryInPath "rmdir"] ${dmg_mount} ${dmg_tmp_dir}"
+        option extract.post_args "-private -readonly -nobrowse -mountpoint ${dmg_mount} && [findBinary cp  ${portutil::autoconf::cp_path}] -Rp ${dmg_mount} ${extract.dir} && ${extract.cmd} detach ${dmg_mount} && [findBinary rmdir  ${portutil::autoconf::rmdir_path}] ${dmg_mount} ${dmg_tmp_dir}"
     }
 }
 

Modified: branches/images-and-archives/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portlivecheck.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/portlivecheck.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -74,41 +74,6 @@
     ui_debug "Portfile modification date is [clock format $port_moddate]"
     ui_debug "Port (livecheck) version is ${livecheck.version}"
 
-    # Determine the default type depending on the mirror.
-    if {${livecheck.check} eq "default"} {
-        if {$has_master_sites} {
-            foreach {master_site} ${master_sites} {
-                if {[regexp {^(sourceforge|freshmeat|googlecode|gnu)(?::([^:]+))?} ${master_site} _ site subdir]} {
-                    if {${subdir} ne "" && ${livecheck.name} eq "default"} {
-                        set livecheck.name ${subdir}
-                    }
-                    set livecheck.check ${site}
-
-                    break
-                }
-            }
-        }
-        if {${livecheck.check} eq "default"} {
-            set livecheck.check "freshmeat"
-        }
-        if {$has_homepage} {
-            if {[regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]} {
-                if {${livecheck.name} eq "default"} {
-                    set livecheck.name $tag
-                }
-                set livecheck.check "googlecode"
-            } elseif {[regexp {^http://www.gnu.org/software/([^/]+)} $homepage _ tag]} {
-                if {${livecheck.name} eq "default"} {
-                    set livecheck.name $tag
-                }
-                set livecheck.check "gnu"
-            }
-        }
-    }
-    if {${livecheck.name} eq "default"} {
-        set livecheck.name $name
-    }
-
     # Copied over from portfetch in parts
     set fetch_options {}
     if {[string length ${fetch.user}] || [string length ${fetch.password}]} {
@@ -122,52 +87,46 @@
         lappend fetch_options "--ignore-ssl-cert"
     }
 
-    # Perform the check depending on the type.
-    switch ${livecheck.check} {
-        "freshmeat" {
-            if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
-                set livecheck.url "http://freshmeat.net/projects/${livecheck.name}/releases.atom"
+    # Check _resources/port1.0/livecheck for available types.
+    set types_dir [getdefaultportresourcepath "port1.0/livecheck"]
+    if {[catch {set available_types [glob -directory $types_dir -tails -types f *.tcl]} result]} {
+        return -code 1 "No available types were found. Check '$types_dir'."
+    }
+
+    # Convert available_types from a list of files (e.g., { freshmeat.tcl
+    # gnu.tcl ... }) into a string in the format "type|type|..." (e.g.,
+    # "freshmeat|gnu|...").
+    set available_types [regsub -all {\.tcl} [join $available_types |] {}]
+
+    if {${livecheck.check} eq "default"} {
+        # Determine the default type from the mirror.
+        if {$has_master_sites} {
+            foreach {master_site} ${master_sites} {
+                if {[regexp "^($available_types)(?::(\[^:\]+))?" ${master_site} _ site subdir]} {
+                    if {${subdir} ne "" && ${livecheck.name} eq "default"} {
+                        set livecheck.name ${subdir}
+                    }
+                    set livecheck.check ${site}
+
+                    break
+                }
             }
-            if {${livecheck.regex} eq ""} {
-                set livecheck.regex [list "(?i)<title>${livecheck.name} (.*)</title>"]
-            }
-            set livecheck.check "regex"
         }
-        "sourceforge" {
-            if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
-                set livecheck.url "http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}"
-            }
-            if {${livecheck.distname} eq "default"} {
-                set livecheck.distname ${livecheck.name}
-            }
-            if {${livecheck.regex} eq ""} {
-                set livecheck.regex [list "<title>[quotemeta ${livecheck.distname}] (.*) released.*</title>"]
-            }
-            set livecheck.check "regex"
+        # If the default type cannot be determined from the mirror, use the
+        # fallback type (which is a symlink to one of the available types).
+        if {${livecheck.check} eq "default"} {
+            set livecheck.check "fallback"
         }
-        "googlecode" {
-            if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
-                set livecheck.url "http://code.google.com/p/${livecheck.name}/downloads/list"
-            }
-            if {${livecheck.distname} eq "default"} {
-                set livecheck.distname [regsub ***=[quotemeta ${livecheck.version}] [quotemeta [file tail [lindex ${distfiles} 0]]] (.*)]
-            }
-            if {${livecheck.regex} eq ""} {
-                set livecheck.regex [list "<a href=\"http://[quotemeta ${livecheck.name}].googlecode.com/files/${livecheck.distname}\""]
-            }
-            set livecheck.check "regex"
+        # If livecheck.name is still "default", set it to $name.
+        if {${livecheck.name} eq "default"} {
+            set livecheck.name $name
         }
-        "gnu" {
-            if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
-                set livecheck.url "http://ftp.gnu.org/gnu/${livecheck.name}/?C=M&O=D"
-            }
-            if {${livecheck.distname} eq "default"} {
-                set livecheck.distname ${livecheck.name}
-            }
-            if {${livecheck.regex} eq ""} {
-                set livecheck.regex [list "[quotemeta ${livecheck.distname}]-(\\d+(?:\\.\\d+)*)"]
-            }
-            set livecheck.check "regex"
+
+        # Load the defaults from _resources/port1.0/livecheck/${livecheck.check}.tcl.
+        set defaults_file "$types_dir/${livecheck.check}.tcl"
+        ui_debug "Loading the defaults from '$defaults_file'"
+        if {[catch {source $defaults_file} result]} {
+            return -code 1 "The defaults could not be loaded from '$defaults_file'."
         }
     }
 

Modified: branches/images-and-archives/base/src/port1.0/portutil.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -2050,52 +2050,6 @@
     }
 }
 
-
-# builds the specified port (looked up in the index) to the specified target
-# doesn't yet support options or variants...
-# newworkpath defines the port's workpath - useful for when one port relies
-# on the source, etc, of another
-proc portexec_int {portname target {newworkpath ""}} {
-    ui_debug "Executing $target ($portname)"
-    set variations [list]
-    if {$newworkpath == ""} {
-        array set options [list]
-    } else {
-        set options(workpath) ${newworkpath}
-    }
-
-    set res [mport_lookup $portname]
-    if {[llength $res] < 2} {
-        ui_error "Dependency $portname not found"
-        return -1
-    }
-
-    array set portinfo [lindex $res 1]
-    set porturl $portinfo(porturl)
-    if {[catch {set worker [mport_open $porturl [array get options] $variations]} result]} {
-        global errorInfo
-        ui_debug "$errorInfo"
-        ui_error "Opening $portname $target failed: $result"
-        return -1
-    }
-    if {[catch {mport_exec $worker $target} result] || $result != 0} {
-        global errorInfo
-        ui_debug "$errorInfo"
-        ui_error "Execution $portname $target failed: $result"
-        mport_close $worker
-        return -1
-    }
-    mport_close $worker
-
-    return 0
-}
-
-# portfile primitive that calls portexec_int with newworkpath == ${workpath}
-proc portexec {portname target} {
-    global workpath
-    return [portexec_int $portname $target $workpath]
-}
-
 proc adduser {name args} {
     global os.platform
     set passwd {*}
@@ -2190,6 +2144,20 @@
     return -code error [format [msgcat::mc "Failed to locate '%s' in path: '%s'"] $binary $env(PATH)];
 }
 
+# find a binary either in a path defined at MacPorts' configuration time
+# or in the PATH environment variable through binaryInPath (fallback)
+proc findBinary {prog {autoconf_hint ""}} {
+    if {${autoconf_hint} != "" && [file executable ${autoconf_hint}]} {
+        return ${autoconf_hint}
+    } else {
+        if {[catch {set cmd_path [binaryInPath ${prog}]} result] == 0} {
+            return ${cmd_path}
+        } else {
+            return -code error "${result} or at its MacPorts configuration time location, did you move it?"
+        }
+    }
+}
+
 # Set the UI prefix to something standard (so it can be grepped for in output)
 proc set_ui_prefix {} {
     global UI_PREFIX env
@@ -2222,10 +2190,10 @@
     switch -regex $type {
         cp(io|gz) {
             set pax "pax"
-            if {[catch {set pax [binaryInPath $pax]} errmsg] == 0} {
+            if {[catch {set pax [findBinary $pax ${portutil::autoconf::pax_path}]} errmsg] == 0} {
                 if {[regexp {z$} $type]} {
                     set gzip "gzip"
-                    if {[catch {set gzip [binaryInPath $gzip]} errmsg] == 0} {
+                    if {[catch {set gzip [findBinary $gzip ${portutil::autoconf::gzip_path}]} errmsg] == 0} {
                         return 0
                     }
                 } else {
@@ -2233,18 +2201,25 @@
                 }
             }
         }
-        t(ar|bz|lz|gz) {
+        t(ar|bz|lz|xz|gz) {
             set tar "tar"
-            if {[catch {set tar [binaryInPath $tar]} errmsg] == 0} {
+            if {[catch {set tar [findBinary $tar ${portutil::autoconf::tar_path}]} errmsg] == 0} {
                 if {[regexp {z2?$} $type]} {
                     if {[regexp {bz2?$} $type]} {
                         set gzip "bzip2"
                     } elseif {[regexp {lz$} $type]} {
                         set gzip "lzma"
+                    } elseif {[regexp {xz$} $type]} {
+                        set gzip "xz"
                     } else {
                         set gzip "gzip"
                     }
-                    if {[catch {set gzip [binaryInPath $gzip]} errmsg] == 0} {
+                    if {[info exists portutil::autoconf::${gzip}_path]} {
+                        set hint [set portutil::autoconf::${gzip}_path]
+                    } else {
+                        set hint ""
+                    }
+                    if {[catch {set gzip [findBinary $gzip $hint]} errmsg] == 0} {
                         return 0
                     }
                 } else {
@@ -2254,15 +2229,15 @@
         }
         xar {
             set xar "xar"
-            if {[catch {set xar [binaryInPath $xar]} errmsg] == 0} {
+            if {[catch {set xar [findBinary $xar ${portutil::autoconf::xar_path}]} errmsg] == 0} {
                 return 0
             }
         }
         zip {
             set zip "zip"
-            if {[catch {set zip [binaryInPath $zip]} errmsg] == 0} {
+            if {[catch {set zip [findBinary $zip ${portutil::autoconf::zip_path}]} errmsg] == 0} {
                 set unzip "unzip"
-                if {[catch {set unzip [binaryInPath $unzip]} errmsg] == 0} {
+                if {[catch {set unzip [findBinary $unzip ${portutil::autoconf::unzip_path}]} errmsg] == 0} {
                     return 0
                 }
             }

Modified: branches/images-and-archives/base/src/programs/Makefile.in
===================================================================
--- branches/images-and-archives/base/src/programs/Makefile.in	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/programs/Makefile.in	2009-05-25 06:16:35 UTC (rev 51437)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBDIR=	@REPLACEMENT_PROGS@ @EXTRA_PROGS@
+SUBDIR=	@EXTRA_PROGS@
 
 include ../../Mk/macports.subdir.mk
 


Property changes on: branches/images-and-archives/base/src/registry1.0
___________________________________________________________________
Modified: svn:ignore
   - registry_autoconf.tcl

   + registry_autoconf.tcl
pkgIndex.tcl


Modified: branches/images-and-archives/base/src/registry1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/registry1.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/registry1.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -4,18 +4,22 @@
 
 include ../../Mk/macports.autoconf.mk
 
-all::
+all:: pkgIndex.tcl
 
+pkgIndex.tcl:
+	$(SILENT) ../pkg_mkindex.sh .
+
 clean::
+	rm -f pkgIndex.tcl
 
 distclean:: clean
 	rm -f registry_autoconf.tcl
 
-install::
+install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(SILENT)set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
 
 test::

Modified: branches/images-and-archives/base/src/registry1.0/receipt_flat.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/receipt_flat.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/registry1.0/receipt_flat.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -295,6 +295,7 @@
 
 	# Save the file_map afterwards
 	write_file_map
+	close_file_map
 	
 	# Save the entry to new format.
 	write_entry $ref $name $version $revision $variants
@@ -481,6 +482,9 @@
 	set x [glob -nocomplain -types d ${query_path}]
 	set rlist [list]
 	foreach p $x {
+		if {![file isfile [file join $p receipt.bz2]] && ![file isfile [file join $p receipt]]} {
+			continue
+		}
 		set plist [list]
 		regexp {([-_a-zA-Z0-9\.]+)_([0-9]*)([+-_a-zA-Z0-9]*)$} [lindex [file split $p] end] match version revision variants
 		lappend plist [lindex [file split $p] end-1]
@@ -721,6 +725,19 @@
 	return 1
 }
 
+##
+# close the file map.
+# important to do this so the lock is released.
+# do not do anything if the file map wasn't open.
+#
+proc close_file_map {args} {
+	variable file_map
+
+	if { [info exists file_map] } {
+		filemap close file_map
+	}
+}
+
 # Dependency Map Code
 proc open_dep_map {args} {
 	global macports::registry.path

Modified: branches/images-and-archives/base/src/registry1.0/registry.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/registry.tcl	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/registry1.0/registry.tcl	2009-05-25 06:16:35 UTC (rev 51437)
@@ -264,6 +264,7 @@
 	open_file_map
         set r [${macports::registry.format}::register_bulk_files $files $port]
 	write_file_map
+	close_file_map
 	return $r
 }
 
@@ -277,6 +278,11 @@
 	return [${macports::registry.format}::write_file_map $args]
 }
 
+proc close_file_map {args} {
+	global macports::registry.format
+	return [${macports::registry.format}::close_file_map $args]
+}
+
 # Dependency Map Code
 proc register_dependencies {deps name} {
 


Property changes on: branches/images-and-archives/base/src/registry2.0
___________________________________________________________________
Modified: svn:ignore
   - registry.dylib

   + registry.dylib
pkgIndex.tcl


Modified: branches/images-and-archives/base/src/registry2.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/registry2.0/Makefile	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/registry2.0/Makefile	2009-05-25 06:16:35 UTC (rev 51437)
@@ -19,10 +19,10 @@
 	${TCLSH} tests/entry.tcl ${SHLIB_NAME}
 	${TCLSH} tests/depends.tcl ${SHLIB_NAME}
 
-install::
+install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
 	$(SILENT) set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}

Modified: branches/images-and-archives/base/src/registry2.0/registry.c
===================================================================
--- branches/images-and-archives/base/src/registry2.0/registry.c	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/registry2.0/registry.c	2009-05-25 06:16:35 UTC (rev 51437)
@@ -288,7 +288,7 @@
  * It creates the global commands made available in the registry namespace.
  */
 int Registry_Init(Tcl_Interp* interp) {
-    if (Tcl_InitStubs(interp, "8.3", 0) == NULL) {
+    if (Tcl_InitStubs(interp, "8.4", 0) == NULL) {
         return TCL_ERROR;
     }
     Tcl_CreateObjCommand(interp, "registry::open", registry_open, NULL, NULL);

Modified: branches/images-and-archives/base/src/tclobjc1.0/tclobjc.m
===================================================================
--- branches/images-and-archives/base/src/tclobjc1.0/tclobjc.m	2009-05-25 06:11:36 UTC (rev 51436)
+++ branches/images-and-archives/base/src/tclobjc1.0/tclobjc.m	2009-05-25 06:16:35 UTC (rev 51437)
@@ -229,7 +229,7 @@
 
 int Tclobjc_Init(Tcl_Interp *interp)
 {
-	if(Tcl_InitStubs(interp, "8.3", 0) == NULL)
+	if(Tcl_InitStubs(interp, "8.4", 0) == NULL)
 		return (TCL_ERROR);
 
 	/* Register custom Tcl_Obj types */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090524/7dfaf7ba/attachment-0001.html>


More information about the macports-changes mailing list