[52362] branches/new-help-system/base

raimue at macports.org raimue at macports.org
Sun Jun 14 20:11:26 PDT 2009


Revision: 52362
          http://trac.macports.org/changeset/52362
Author:   raimue at macports.org
Date:     2009-06-14 20:11:26 -0700 (Sun, 14 Jun 2009)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/new-help-system/base/LICENSE
    branches/new-help-system/base/Mk/macports.tea.mk
    branches/new-help-system/base/aclocal.m4
    branches/new-help-system/base/config.guess
    branches/new-help-system/base/config.sub
    branches/new-help-system/base/configure
    branches/new-help-system/base/configure.ac
    branches/new-help-system/base/doc/Makefile
    branches/new-help-system/base/doc/macports.conf.5
    branches/new-help-system/base/doc/macports.conf.in
    branches/new-help-system/base/doc/portfile.7
    branches/new-help-system/base/doc/portgroup.7
    branches/new-help-system/base/doc/prefix.mtree.in
    branches/new-help-system/base/portmgr/bots/port.rb
    branches/new-help-system/base/portmgr/bots/trac.rb
    branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl
    branches/new-help-system/base/portmgr/packaging/dpkgall.tcl
    branches/new-help-system/base/portmgr/packaging/packageall.tcl
    branches/new-help-system/base/portmgr/packaging/rpmall.tcl
    branches/new-help-system/base/src/Makefile.in
    branches/new-help-system/base/src/cflib1.0/CFLib.c
    branches/new-help-system/base/src/config.h.in
    branches/new-help-system/base/src/cregistry/Makefile
    branches/new-help-system/base/src/darwintracelib1.0/Makefile
    branches/new-help-system/base/src/macports1.0/Makefile
    branches/new-help-system/base/src/macports1.0/macports.c
    branches/new-help-system/base/src/macports1.0/macports.tcl
    branches/new-help-system/base/src/macports1.0/macports_autoconf.tcl.in
    branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in
    branches/new-help-system/base/src/package1.0/Makefile
    branches/new-help-system/base/src/package1.0/portarchive.tcl
    branches/new-help-system/base/src/package1.0/portdmg.tcl
    branches/new-help-system/base/src/package1.0/portdpkg.tcl
    branches/new-help-system/base/src/package1.0/portmdmg.tcl
    branches/new-help-system/base/src/package1.0/portmpkg.tcl
    branches/new-help-system/base/src/package1.0/portpkg.tcl
    branches/new-help-system/base/src/package1.0/portportpkg.tcl
    branches/new-help-system/base/src/package1.0/portrpm.tcl
    branches/new-help-system/base/src/package1.0/portsrpm.tcl
    branches/new-help-system/base/src/package1.0/portunarchive.tcl
    branches/new-help-system/base/src/pextlib1.0/Makefile
    branches/new-help-system/base/src/pextlib1.0/Pextlib.c
    branches/new-help-system/base/src/pextlib1.0/curl.c
    branches/new-help-system/base/src/pextlib1.0/fgetln.c
    branches/new-help-system/base/src/pextlib1.0/filemap.c
    branches/new-help-system/base/src/pextlib1.0/fs-traverse.c
    branches/new-help-system/base/src/pextlib1.0/md5cmd.c
    branches/new-help-system/base/src/pextlib1.0/readline.c
    branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c
    branches/new-help-system/base/src/pextlib1.0/sha1cmd.c
    branches/new-help-system/base/src/pextlib1.0/strcasecmp.c
    branches/new-help-system/base/src/pextlib1.0/tests/symlink.tcl
    branches/new-help-system/base/src/pextlib1.0/tracelib.c
    branches/new-help-system/base/src/pextlib1.0/tty.c
    branches/new-help-system/base/src/pextlib1.0/tty.h
    branches/new-help-system/base/src/pextlib1.0/uid.c
    branches/new-help-system/base/src/pextlib1.0/uid.h
    branches/new-help-system/base/src/pextlib1.0/vercomp.c
    branches/new-help-system/base/src/pextlib1.0/xinstall.c
    branches/new-help-system/base/src/port/Makefile
    branches/new-help-system/base/src/port/port-help.tcl
    branches/new-help-system/base/src/port/port.tcl
    branches/new-help-system/base/src/port/portindex.tcl
    branches/new-help-system/base/src/port1.0/Makefile
    branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in
    branches/new-help-system/base/src/port1.0/portactivate.tcl
    branches/new-help-system/base/src/port1.0/portbuild.tcl
    branches/new-help-system/base/src/port1.0/portchecksum.tcl
    branches/new-help-system/base/src/port1.0/portclean.tcl
    branches/new-help-system/base/src/port1.0/portconfigure.tcl
    branches/new-help-system/base/src/port1.0/portdepends.tcl
    branches/new-help-system/base/src/port1.0/portdestroot.tcl
    branches/new-help-system/base/src/port1.0/portdistcheck.tcl
    branches/new-help-system/base/src/port1.0/portdistfiles.tcl
    branches/new-help-system/base/src/port1.0/portextract.tcl
    branches/new-help-system/base/src/port1.0/portfetch.tcl
    branches/new-help-system/base/src/port1.0/portinstall.tcl
    branches/new-help-system/base/src/port1.0/portlint.tcl
    branches/new-help-system/base/src/port1.0/portlivecheck.tcl
    branches/new-help-system/base/src/port1.0/portmain.tcl
    branches/new-help-system/base/src/port1.0/portmirror.tcl
    branches/new-help-system/base/src/port1.0/portpatch.tcl
    branches/new-help-system/base/src/port1.0/portstartupitem.tcl
    branches/new-help-system/base/src/port1.0/portsubmit.tcl
    branches/new-help-system/base/src/port1.0/porttest.tcl
    branches/new-help-system/base/src/port1.0/porttrace.tcl
    branches/new-help-system/base/src/port1.0/portutil.tcl
    branches/new-help-system/base/src/programs/Makefile.in
    branches/new-help-system/base/src/registry1.0/Makefile
    branches/new-help-system/base/src/registry1.0/portimage.tcl
    branches/new-help-system/base/src/registry1.0/portuninstall.tcl
    branches/new-help-system/base/src/registry1.0/receipt_flat.tcl
    branches/new-help-system/base/src/registry1.0/registry.tcl
    branches/new-help-system/base/src/registry2.0/Makefile
    branches/new-help-system/base/src/registry2.0/registry.c
    branches/new-help-system/base/src/tclobjc1.0/tclobjc.m

Added Paths:
-----------
    branches/new-help-system/base/src/pkg_mkindex.sh.in

Removed Paths:
-------------
    branches/new-help-system/base/src/pextlib1.0/tests/fifo.tcl
    branches/new-help-system/base/src/pextlib1.0/tests/socketpair.tcl
    branches/new-help-system/base/src/pkg_mkindex.tcl

Property Changed:
----------------
    branches/new-help-system/base/
    branches/new-help-system/base/src/
    branches/new-help-system/base/src/macports1.0/
    branches/new-help-system/base/src/package1.0/
    branches/new-help-system/base/src/pextlib1.0/
    branches/new-help-system/base/src/port1.0/
    branches/new-help-system/base/src/registry1.0/
    branches/new-help-system/base/src/registry2.0/


Property changes on: branches/new-help-system/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:49341-50867
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:49341-52361
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/new-help-system/base/LICENSE
===================================================================
--- branches/new-help-system/base/LICENSE	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/LICENSE	2009-06-15 03:11:26 UTC (rev 52362)
@@ -1,4 +1,4 @@
-Copyright (c) 2002 - 2003, Apple Computer, Inc.
+Copyright (c) 2002 - 2003, Apple Inc.
 Copyright (c) 2004 - 2009, The MacPorts Project.
 All rights reserved.
 
@@ -10,7 +10,7 @@
 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., The MacPorts Project nor the
+3. Neither the name of Apple Inc., The MacPorts Project nor the
    names of its contributors may be used to endorse or promote products
    derived from this software without specific prior written permission.
 

Modified: branches/new-help-system/base/Mk/macports.tea.mk
===================================================================
--- branches/new-help-system/base/Mk/macports.tea.mk	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/Mk/macports.tea.mk	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/aclocal.m4
===================================================================
--- branches/new-help-system/base/aclocal.m4	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/aclocal.m4	2009-06-15 03:11:26 UTC (rev 52362)
@@ -490,36 +490,12 @@
 #---------------------------------------
 AC_DEFUN([MP_UNIVERSAL_OPTIONS],[
 
-    AC_ARG_WITH(universal-target,[AS_HELP_STRING([--with-universal-target=MDT],[Universal MACOSX_DEPLOYMENT_TARGET version])], UNIVERSAL_TARGET=${withval})
-    AC_ARG_WITH(universal-sysroot,[AS_HELP_STRING([--with-universal-sysroot=SDK],[Universal SDK sysroot (with complete path)])], UNIVERSAL_SYSROOT=${withval})
     AC_ARG_WITH(universal-archs,[AS_HELP_STRING([--with-universal-archs="CPU"],[Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
 
-	MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
-
-	if test "x$UNIVERSAL_TARGET" = "x"; then
-	    UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
-	fi
-
-	if test "x$UNIVERSAL_SYSROOT" = "x"; then
-	    if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
-	    else
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
-	    fi
-	fi
-
 	if test "x$UNIVERSAL_ARCHS" = "x"; then
 	    UNIVERSAL_ARCHS="ppc i386"
 	fi
-    
-    AC_MSG_CHECKING([for Universal MDT version])
-    AC_MSG_RESULT([$UNIVERSAL_TARGET])
-    AC_SUBST(UNIVERSAL_TARGET)
 
-    AC_MSG_CHECKING([for Universal SDK sysroot])
-    AC_MSG_RESULT([$UNIVERSAL_SYSROOT])
-    AC_SUBST(UNIVERSAL_SYSROOT)
-
     AC_MSG_CHECKING([for Universal CPU architectures])
     AC_MSG_RESULT([$UNIVERSAL_ARCHS])
     AC_SUBST(UNIVERSAL_ARCHS)

Modified: branches/new-help-system/base/config.guess
===================================================================
--- branches/new-help-system/base/config.guess	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/config.guess	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/config.sub
===================================================================
--- branches/new-help-system/base/config.sub	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/config.sub	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/configure
===================================================================
--- branches/new-help-system/base/configure	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/configure	2009-06-15 03:11:26 UTC (rev 52362)
@@ -645,7 +645,6 @@
 MPCONFIGDIR_EXPANDED
 prefix_expanded
 OUR_INCLUDED_PACKAGES
-CONDITIONAL_PACKAGES
 TCL_CC
 TCL_DEFS
 SHLIB_SUFFIX
@@ -677,8 +676,6 @@
 READLINK_IS_NOT_P1003_1A
 CPP
 UNIVERSAL_ARCHS
-UNIVERSAL_SYSROOT
-UNIVERSAL_TARGET
 MPFRAMEWORKSDIR
 MPAPPLICATIONSDIR
 DSTMODE
@@ -689,7 +686,6 @@
 MPCONFIGDIR
 PORTSDIR
 EXTRA_PROGS
-REPLACEMENT_PROGS
 HAVE_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER
 HAVE_FRAMEWORK_IOKIT
 HAVE_FRAMEWORK_SYSTEMCONFIGURATION
@@ -715,19 +711,39 @@
 SED_EXT
 OPEN
 XAR
+PAX
+MKBOM
+LSBOM
 BZIP2
 GNUMAKE
 GNUTAR
 XCODEBUILD
 LAUNCHCTL
 HAVE_LAUNCHD
+HDIUTIL
 MAKE
+BSDMAKE
+ZIP
+UNZIP
 TAR
 SED
 RSYNC
+RMDIR
+PATCH
+NICE
+LIPO
+GZIP
+HG
 GIT
 SVN
 CVS
+FILE
+DSCL
+DITTO
+DIFF
+CPIO
+CP
+CHOWN
 MTREE
 LN_S
 SET_MAKE
@@ -744,6 +760,7 @@
 LDFLAGS
 CFLAGS
 CC
+DEVELOPER_DIR
 XCODE_SELECT
 DEFAULTS
 SW_VERS
@@ -812,8 +829,6 @@
 with_shared_directory
 with_applications_dir
 with_frameworks_dir
-with_universal_target
-with_universal_sysroot
 with_universal_archs
 enable_readline
 with_tcl
@@ -1503,10 +1518,6 @@
   --with-shared-directory Use 0775 permissions for installed directories
   --with-applications-dir Applications installation directory.
   --with-frameworks-dir   Frameworks installation directory.
-  --with-universal-target=MDT
-                          Universal MACOSX_DEPLOYMENT_TARGET version
-  --with-universal-sysroot=SDK
-                          Universal SDK sysroot (with complete path)
   --with-universal-archs="CPU"
                           Universal CPU architectures (space separated)
   --with-tcl              directory containing tcl configuration (tclConfig.sh)
@@ -2324,7 +2335,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
@@ -2343,8 +2354,11 @@
   DEVELOPER_DIR=`$XCODE_SELECT -print-path`
   { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
 $as_echo "$DEVELOPER_DIR" >&6; }
+else
+  DEVELOPER_DIR=/Developer
 fi
 
+
 XCODEPLIST=$DEVELOPER_DIR/Applications/Xcode.app/Contents/version.plist
 if test -r "$XCODEPLIST"; then
   { $as_echo "$as_me:$LINENO: checking Xcode version" >&5
@@ -3743,6 +3757,287 @@
 fi
 
 
+# Extract the first word of "chown", so it can be a program name with args.
+set dummy chown; 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_CHOWN+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $CHOWN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CHOWN="$CHOWN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/sbin"
+for as_dir in $as_dummy
+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_CHOWN="$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
+CHOWN=$ac_cv_path_CHOWN
+if test -n "$CHOWN"; then
+  { $as_echo "$as_me:$LINENO: result: $CHOWN" >&5
+$as_echo "$CHOWN" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+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 "cpio", so it can be a program name with args.
+set dummy cpio; 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_CPIO+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $CPIO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CPIO="$CPIO" # 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_CPIO="$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
+CPIO=$ac_cv_path_CPIO
+if test -n "$CPIO"; then
+  { $as_echo "$as_me:$LINENO: result: $CPIO" >&5
+$as_echo "$CPIO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "diff", so it can be a program name with args.
+set dummy diff; 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_DIFF+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $DIFF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DIFF="$DIFF" # 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_DIFF="$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
+DIFF=$ac_cv_path_DIFF
+if test -n "$DIFF"; then
+  { $as_echo "$as_me:$LINENO: result: $DIFF" >&5
+$as_echo "$DIFF" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "ditto", so it can be a program name with args.
+set dummy ditto; 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_DITTO+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $DITTO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DITTO="$DITTO" # 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_DITTO="$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
+DITTO=$ac_cv_path_DITTO
+if test -n "$DITTO"; then
+  { $as_echo "$as_me:$LINENO: result: $DITTO" >&5
+$as_echo "$DITTO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "dscl", so it can be a program name with args.
+set dummy dscl; 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_DSCL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $DSCL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DSCL="$DSCL" # 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_DSCL="$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
+DSCL=$ac_cv_path_DSCL
+if test -n "$DSCL"; then
+  { $as_echo "$as_me:$LINENO: result: $DSCL" >&5
+$as_echo "$DSCL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "file", so it can be a program name with args.
+set dummy file; 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_FILE+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $FILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FILE="$FILE" # 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_FILE="$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
+FILE=$ac_cv_path_FILE
+if test -n "$FILE"; then
+  { $as_echo "$as_me:$LINENO: result: $FILE" >&5
+$as_echo "$FILE" >&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 +4158,246 @@
 fi
 
 
+# Extract the first word of "hg", so it can be a program name with args.
+set dummy hg; 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_HG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $HG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HG="$HG" # 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_HG="$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
+HG=$ac_cv_path_HG
+if test -n "$HG"; then
+  { $as_echo "$as_me:$LINENO: result: $HG" >&5
+$as_echo "$HG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+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 "lipo", so it can be a program name with args.
+set dummy lipo; 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_LIPO+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $LIPO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LIPO="$LIPO" # 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_LIPO="$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
+LIPO=$ac_cv_path_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "nice", so it can be a program name with args.
+set dummy nice; 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_NICE+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $NICE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NICE="$NICE" # 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_NICE="$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
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+  { $as_echo "$as_me:$LINENO: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "patch", so it can be a program name with args.
+set dummy patch; 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_PATCH+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $PATCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATCH="$PATCH" # 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_PATCH="$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
+PATCH=$ac_cv_path_PATCH
+if test -n "$PATCH"; then
+  { $as_echo "$as_me:$LINENO: result: $PATCH" >&5
+$as_echo "$PATCH" >&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 +4518,126 @@
 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 "bsdmake", so it can be a program name with args.
+set dummy bsdmake; 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_BSDMAKE+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $BSDMAKE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BSDMAKE="$BSDMAKE" # 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_BSDMAKE="$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
+BSDMAKE=$ac_cv_path_BSDMAKE
+if test -n "$BSDMAKE"; then
+  { $as_echo "$as_me:$LINENO: result: $BSDMAKE" >&5
+$as_echo "$BSDMAKE" >&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 +4678,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 +4967,126 @@
 fi
 
 
+# Extract the first word of "lsbom", so it can be a program name with args.
+set dummy lsbom; 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_LSBOM+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $LSBOM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LSBOM="$LSBOM" # 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_LSBOM="$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
+LSBOM=$ac_cv_path_LSBOM
+if test -n "$LSBOM"; then
+  { $as_echo "$as_me:$LINENO: result: $LSBOM" >&5
+$as_echo "$LSBOM" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "mkbom", so it can be a program name with args.
+set dummy mkbom; 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_MKBOM+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MKBOM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MKBOM="$MKBOM" # 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_MKBOM="$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
+MKBOM=$ac_cv_path_MKBOM
+if test -n "$MKBOM"; then
+  { $as_echo "$as_me:$LINENO: result: $MKBOM" >&5
+$as_echo "$MKBOM" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+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 +5509,6 @@
 
 
 
-# Determine if we want to install conditional packages
-CONDITIONAL_PACKAGES=
-
 # Foundation checks
 
 
@@ -6577,12 +7389,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 +7781,6 @@
 
 
 
-
 # set default ports-directory
 PORTS_DIR_DEFAULT=`pwd | sed -e "s/base/ports/"`
 
@@ -7263,54 +8069,16 @@
 
 
 
-# Check whether --with-universal-target was given.
-if test "${with_universal_target+set}" = set; then
-  withval=$with_universal_target; UNIVERSAL_TARGET=${withval}
-fi
-
-
-# Check whether --with-universal-sysroot was given.
-if test "${with_universal_sysroot+set}" = set; then
-  withval=$with_universal_sysroot; UNIVERSAL_SYSROOT=${withval}
-fi
-
-
 # Check whether --with-universal-archs was given.
 if test "${with_universal_archs+set}" = set; then
   withval=$with_universal_archs; UNIVERSAL_ARCHS=${withval}
 fi
 
 
-	MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
-
-	if test "x$UNIVERSAL_TARGET" = "x"; then
-	    UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
-	fi
-
-	if test "x$UNIVERSAL_SYSROOT" = "x"; then
-	    if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
-	    else
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
-	    fi
-	fi
-
 	if test "x$UNIVERSAL_ARCHS" = "x"; then
 	    UNIVERSAL_ARCHS="ppc i386"
 	fi
 
-    { $as_echo "$as_me:$LINENO: checking for Universal MDT version" >&5
-$as_echo_n "checking for Universal MDT version... " >&6; }
-    { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_TARGET" >&5
-$as_echo "$UNIVERSAL_TARGET" >&6; }
-
-
-    { $as_echo "$as_me:$LINENO: checking for Universal SDK sysroot" >&5
-$as_echo_n "checking for Universal SDK sysroot... " >&6; }
-    { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_SYSROOT" >&5
-$as_echo "$UNIVERSAL_SYSROOT" >&6; }
-
-
     { $as_echo "$as_me:$LINENO: checking for Universal CPU architectures" >&5
 $as_echo_n "checking for Universal CPU architectures... " >&6; }
     { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_ARCHS" >&5
@@ -9989,82 +10757,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=
 
@@ -10246,7 +10938,7 @@
 
 # Check whether --with-trace-sdk was given.
 if test "${with_trace_sdk+set}" = set; then
-  withval=$with_trace_sdk; test -d /Developer/SDKs/$withval && cat >>confdefs.h <<_ACEOF
+  withval=$with_trace_sdk; test -d ${DEVELOPER_DIR}/SDKs/$withval && cat >>confdefs.h <<_ACEOF
 #define TRACE_SDK "${withval}"
 _ACEOF
 
@@ -10308,7 +11000,6 @@
 
 
 
-
 # misc variables that need to be expanded for substitution into tcl
 
 oldprefix=$prefix
@@ -10330,9 +11021,12 @@
 
 
 # Output
-ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf doc/asciidoc.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 doc/asciidoc.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
@@ -10940,12 +11634,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;}
@@ -11556,6 +12250,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/new-help-system/base/configure.ac
===================================================================
--- branches/new-help-system/base/configure.ac	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/configure.ac	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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])
     ;;
@@ -48,7 +48,10 @@
   AC_MSG_CHECKING(Xcode location)
   DEVELOPER_DIR=`$XCODE_SELECT -print-path`
   AC_MSG_RESULT([$DEVELOPER_DIR])
+else
+  DEVELOPER_DIR=/Developer
 fi
+AC_SUBST(DEVELOPER_DIR)
 
 XCODEPLIST=$DEVELOPER_DIR/Applications/Xcode.app/Contents/version.plist
 if test -r "$XCODEPLIST"; then
@@ -84,19 +87,39 @@
 AC_PROG_MAKE_SET
 AC_PROG_LN_S
 AC_PATH_PROG(MTREE, [mtree], [], [$PATH:/usr/sbin])
+AC_PATH_PROG(CHOWN, [chown], [], [$PATH:/usr/sbin])
+AC_PATH_PROG(CP, [cp], [])
+AC_PATH_PROG(CPIO, [cpio], [])
+AC_PATH_PROG(DIFF, [diff], [])
+AC_PATH_PROG(DITTO, [ditto], [])
+AC_PATH_PROG(DSCL, [dscl], [])
+AC_PATH_PROG(FILE, [file], [])
 AC_PATH_PROG(CVS, [cvs], [])
 AC_PATH_PROG(SVN, [svn], [])
 AC_PATH_PROG(GIT, [git], [])
+AC_PATH_PROG(HG, [hg], [])
+AC_PATH_PROG(GZIP, [gzip], [])
+AC_PATH_PROG(LIPO, [lipo], [])
+AC_PATH_PROG(NICE, [nice], [])
+AC_PATH_PROG(PATCH, [patch], [])
+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(BSDMAKE, [bsdmake])
 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(LSBOM, [lsbom], [])
+AC_PATH_PROG(MKBOM, [mkbom], [])
+AC_PATH_PROG(PAX, [pax], [])
 AC_PATH_PROG(XAR, [xar], [])
 AC_PATH_PROG(OPEN, [open], [])
 
@@ -127,22 +150,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 +242,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=
 
@@ -322,7 +329,7 @@
 	trace-sdk,
 	AS_HELP_STRING([--with-trace-sdk=SDK],
 		[SDK for redirection in trace lib (for example MacOSX10.4u.sdk)]),
-	[test -d /Developer/SDKs/$withval && AC_DEFINE_UNQUOTED([TRACE_SDK], "${withval}")], [])
+	[test -d ${DEVELOPER_DIR}/SDKs/$withval && AC_DEFINE_UNQUOTED([TRACE_SDK], "${withval}")], [])
 
 # Allows building of shared libraries
 SC_ENABLE_SHARED
@@ -345,7 +352,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
@@ -384,7 +390,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
@@ -392,4 +397,6 @@
 	setupenv.bash
 ])
 
+AC_CONFIG_FILES([src/pkg_mkindex.sh], [chmod +x src/pkg_mkindex.sh])
+
 AC_OUTPUT

Modified: branches/new-help-system/base/doc/Makefile
===================================================================
--- branches/new-help-system/base/doc/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/doc/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -71,14 +71,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/new-help-system/base/doc/macports.conf.5
===================================================================
--- branches/new-help-system/base/doc/macports.conf.5	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/doc/macports.conf.5	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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
@@ -161,16 +161,6 @@
 .br
 .Ic Default:
 yes
-.It Va universal_target
-The MACOSX_DEPLOYMENT_TARGET to use for +universal variant
-.br
-.Ic Example:
-10.4
-.It Va universal_sysroot
-The SDK "sysroot" full path to use for +universal variant
-.br
-.Ic Example:
-/Developer/SDKs/MacOSX10.4u.sdk
 .It Va universal_archs
 The machine architectures to use for +universal variant
 (multiple architecture entries should be space separated)

Modified: branches/new-help-system/base/doc/macports.conf.in
===================================================================
--- branches/new-help-system/base/doc/macports.conf.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/doc/macports.conf.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -21,6 +21,9 @@
 # paths are given in the example; it need not be uncommented.  Customizing binpath is intended for advanced users only.
 #binpath		@prefix_expanded@/bin:@prefix_expanded@/sbin:/bin:/sbin:/usr/bin:/usr/sbin
 
+# Directory containing Xcode Tools
+developer_dir       @DEVELOPER_DIR@
+
 # Directory containing Applications from ports.
 applications_dir	@MPAPPLICATIONSDIR@
 
@@ -47,7 +50,7 @@
 # Unarchive uses multiple types as a search list to locate the archive,
 # first archive to match one of the specified types in order is used.
 #
-# Supported types: tgz (default), tar, tbz, tbz2, tlz, xar, zip, cpgz, cpio
+# Supported types: tgz (default), tar, tbz, tbz2, tlz, txz, xar, zip, cpgz, cpio
 portarchivetype		tgz
 
 # Use ccache (C/C++ compiler cache) - see http://ccache.samba.org/
@@ -86,12 +89,6 @@
 
 # Options for Universal Binaries (+universal variant)
 
-# MACOSX_DEPLOYMENT_TARGET
-universal_target	@UNIVERSAL_TARGET@
-
-# the SDK "sysroot" to use 
-universal_sysroot	@UNIVERSAL_SYSROOT@
-
 # machine architectures
 universal_archs		@UNIVERSAL_ARCHS@
 

Modified: branches/new-help-system/base/doc/portfile.7
===================================================================
--- branches/new-help-system/base/doc/portfile.7	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/doc/portfile.7	2009-06-15 03:11:26 UTC (rev 52362)
@@ -1936,6 +1936,11 @@
 .Ar template .
 See
 .Xr mkstemp 3 .
+.It Ic mkdtemp Ar template
+Create a temporary directory using a
+.Ar template .
+See
+.Xr mkdtemp 3 .
 .It Ic md5 Ar
 Compute the MD5 hashes of the file(s).
 .It Ic rpm-vercomp Ar versionA Ar versionB

Modified: branches/new-help-system/base/doc/portgroup.7
===================================================================
--- branches/new-help-system/base/doc/portgroup.7	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/doc/portgroup.7	2009-06-15 03:11:26 UTC (rev 52362)
@@ -158,26 +158,6 @@
 .Bd -literal -offset indent -compact
 xcode.destroot.settings SKIP_INSTALL=NO
 .Ed
-.It Ic xcode.universal.settings
-Settings passed to the xcode build tool when the +universal variant is selected. These settings should be in the X=Y form.
-.br
-.Sy Type:
-.Em optional
-.br
-.Sy Default:
-.Bd -literal -offset indent -compact
-ARCHS="${universal_archs}" MACOSX_DEPLOYMENT_TARGET=${universal_target}
-.Ed
-.It Ic xcode.universal.sdk
-SDK to use when the +universal variant is selected. The argument may be an absolute path to an SDK, or the canonical name of an SDK.
-.br
-.Sy Type:
-.Em optional
-.br
-.Sy Default:
-.Bd -literal -offset indent -compact
-${universal_sysroot}
-.Ed
 .El
 .Sh STANDARD PORTFILE VARIABLES AFFECTING XCODE PORTGROUP
 The following standard Portfile variables actually affect
@@ -285,6 +265,7 @@
 .It Ic set_local_library
 Sets GNUSTEP_LOCAL_LIBRARY according to the FilesystemLayout
 .br
+.El
 .Pp
 .Sh GNUSTEP PORTGROUP SUGAR
 Portfiles using gnustep PortGroup do not need to define the following variables:

Modified: branches/new-help-system/base/doc/prefix.mtree.in
===================================================================
--- branches/new-help-system/base/doc/prefix.mtree.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/doc/prefix.mtree.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -231,7 +231,7 @@
             ..
             zh_TW.Big5
             ..
-	..
+        ..
         skel
         ..
     ..
@@ -240,9 +240,9 @@
     var
         macports
             distfiles
-	    ..
+            ..
             receipts
-        ..
+            ..
             registry
             ..
         ..

Modified: branches/new-help-system/base/portmgr/bots/port.rb
===================================================================
--- branches/new-help-system/base/portmgr/bots/port.rb	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/portmgr/bots/port.rb	2009-06-15 03:11:26 UTC (rev 52362)
@@ -146,7 +146,7 @@
 	
 	def portversion(m, params)
 		if !isPseudo(m, params[:portname])
-			doPort(m, "info", "--version", params[:portname])
+			doPort(m, "info", "--version --revision --line --pretty", params[:portname])
 		end
 	end
 	

Modified: branches/new-help-system/base/portmgr/bots/trac.rb
===================================================================
--- branches/new-help-system/base/portmgr/bots/trac.rb	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/portmgr/bots/trac.rb	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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

Modified: branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -289,6 +289,16 @@
     } else {
         set variants ""
     }
+    if {[info exists portinfo(depends_fetch)]} {
+        set depends_fetch $portinfo(depends_fetch)
+    } else {
+        set depends_fetch ""
+    }
+    if {[info exists portinfo(depends_extract)]} {
+        set depends_extract $portinfo(depends_extract)
+    } else {
+        set depends_extract ""
+    }
     if {[info exists portinfo(depends_build)]} {
         set depends_build $portinfo(depends_build)
     } else {
@@ -326,6 +336,16 @@
         set primary 0
     }
 
+    foreach fetch_dep $depends_fetch {
+        set fetch_dep [sql_escape $fetch_dep]
+        puts $sqlfile_fd "INSERT INTO dependencies VALUES ('$portname', '$fetch_dep');"
+    }
+    
+    foreach extract_dep $depends_extract {
+        set extract_dep [sql_escape $extract_dep]
+        puts $sqlfile_fd "INSERT INTO dependencies VALUES ('$portname', '$extract_dep');"
+    }
+
     foreach build_dep $depends_build {
         set build_dep [sql_escape $build_dep]
         puts $sqlfile_fd "INSERT INTO dependencies VALUES ('$portname', '$build_dep');"

Modified: branches/new-help-system/base/portmgr/packaging/dpkgall.tcl
===================================================================
--- branches/new-help-system/base/portmgr/packaging/dpkgall.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/portmgr/packaging/dpkgall.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -875,6 +875,12 @@
 		if {$includeBuildDeps == "true" && [info exists portinfo(depends_build)]} { 
 			eval "lappend depends $portinfo(depends_build)"
 		}
+		if {$includeBuildDeps == "true" && [info exists portinfo(depends_fetch)]} { 
+			eval "lappend depends $portinfo(depends_fetch)"
+		}
+		if {$includeBuildDeps == "true" && [info exists portinfo(depends_extract)]} { 
+			eval "lappend depends $portinfo(depends_extract)"
+		}
 		foreach depspec $depends {
 			set dep [lindex [split $depspec :] end]
 			set x [get_dependencies_recurse $dep $includeBuildDeps]

Modified: branches/new-help-system/base/portmgr/packaging/packageall.tcl
===================================================================
--- branches/new-help-system/base/portmgr/packaging/packageall.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/portmgr/packaging/packageall.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -149,6 +149,13 @@
 		if {$includeBuildDeps != "" && [info exists portinfo(depends_build)]} { 
 			eval "lappend depends $portinfo(depends_build)"
 		}
+		if {$includeBuildDeps != "" && [info exists portinfo(depends_fetch)]} { 
+			eval "lappend depends $portinfo(depends_fetch)"
+		}
+		if {$includeBuildDeps != "" && [info exists portinfo(depends_extract)]} { 
+			eval "lappend depends $portinfo(depends_extract)"
+		}
+		
 		foreach depspec $depends {
 			set dep [lindex [split $depspec :] end]
 			set x [get_dependencies $dep $includeBuildDeps]

Modified: branches/new-help-system/base/portmgr/packaging/rpmall.tcl
===================================================================
--- branches/new-help-system/base/portmgr/packaging/rpmall.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/portmgr/packaging/rpmall.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -154,6 +154,12 @@
 		if {$includeBuildDeps != "" && [info exists portinfo(depends_build)]} { 
 			eval "lappend depends $portinfo(depends_build)"
 		}
+		if {$includeBuildDeps != "" && [info exists portinfo(depends_fetch)]} { 
+			eval "lappend depends $portinfo(depends_fetch)"
+		}
+		if {$includeBuildDeps != "" && [info exists portinfo(depends_extract)]} { 
+			eval "lappend depends $portinfo(depends_extract)"
+		}
 		foreach depspec $depends {
 			set dep [lindex [split $depspec :] end]
 			set x [get_dependencies $dep $includeBuildDeps]


Property changes on: branches/new-help-system/base/src
___________________________________________________________________
Modified: svn:ignore
   - config.h
Makefile

   + config.h
Makefile
pkg_mkindex.sh


Modified: branches/new-help-system/base/src/Makefile.in
===================================================================
--- branches/new-help-system/base/src/Makefile.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/Makefile.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -6,8 +6,7 @@
 			pextlib1.0 \
 			registry1.0 \
 			registry2.0 \
-			darwintracelib1.0 \
-			@CONDITIONAL_PACKAGES@
+			darwintracelib1.0
 SUBDIR=		${TCLPKG} port programs
 
 all::
@@ -15,6 +14,7 @@
 distclean::
 	rm -f config.h
 	rm -f Makefile
+	rm -f pkg_mkindex.sh
 
 test::
 

Modified: branches/new-help-system/base/src/cflib1.0/CFLib.c
===================================================================
--- branches/new-help-system/base/src/cflib1.0/CFLib.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/cflib1.0/CFLib.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/config.h.in
===================================================================
--- branches/new-help-system/base/src/config.h.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/config.h.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/cregistry/Makefile
===================================================================
--- branches/new-help-system/base/src/cregistry/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/cregistry/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -24,4 +24,4 @@
 
 test:
 
-install:: ${STLIB_NAME}
+install:: all

Modified: branches/new-help-system/base/src/darwintracelib1.0/Makefile
===================================================================
--- branches/new-help-system/base/src/darwintracelib1.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/darwintracelib1.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/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/new-help-system/base/src/macports1.0/Makefile
===================================================================
--- branches/new-help-system/base/src/macports1.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/macports1.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/macports1.0/macports.c
===================================================================
--- branches/new-help-system/base/src/macports1.0/macports.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/macports1.0/macports.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/macports1.0/macports.tcl
===================================================================
--- branches/new-help-system/base/src/macports1.0/macports.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/macports1.0/macports.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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
@@ -45,7 +45,7 @@
         porttrace portverbose destroot_umask variants_conf rsync_server rsync_options \
         rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
         mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
-        applications_dir frameworks_dir universal_target universal_sysroot universal_archs \
+        applications_dir frameworks_dir developer_dir universal_archs \
         macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip"
     variable user_options "submitter_name submitter_email submitter_key"
     variable portinterp_options "\
@@ -54,15 +54,15 @@
         portarchivetype portautoclean porttrace portverbose destroot_umask rsync_server \
         rsync_options rsync_dir startupitem_type place_worksymlink \
         mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
-        applications_dir frameworks_dir universal_target universal_sysroot universal_archs $user_options"
-    
+        applications_dir frameworks_dir developer_dir universal_archs $user_options"
+
     # 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"
 }
 
@@ -170,7 +170,7 @@
         }
         default {
             return ""
-        } 
+        }
     }
 }
 
@@ -197,7 +197,7 @@
         msg {
             if {[ui_isset ports_quiet]} {
                 return {}
-            } else {    
+            } else {
                 return {stdout}
             }
         }
@@ -236,7 +236,7 @@
 }
 
 # check for a binary in the path
-# returns an error code if it can not be found
+# returns an error code if it cannot be found
 proc macports::binaryInPath {prog} {
     global env
     foreach dir [split $env(PATH) :] {
@@ -257,7 +257,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
 
@@ -279,7 +279,7 @@
                 set macports::xcodeversion "2.0orlower"
             }
         }
-        
+
         if {![info exists xcodebuildcmd]} {
             set macports::xcodebuildcmd "xcodebuild"
         }
@@ -318,7 +318,7 @@
     } else {
         upvar $up_variations variations
     }
-    
+
     global auto_path env
     global macports::autoconf::macports_conf_path
     global macports::macports_user_dir
@@ -350,8 +350,6 @@
     global macports::configurepipe
     global macports::buildnicevalue
     global macports::buildmakejobs
-    global macports::universal_target
-    global macports::universal_sysroot
     global macports::universal_archs
 
     # Set the system encoding to utf-8
@@ -364,7 +362,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"
@@ -375,7 +373,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] {
@@ -392,7 +390,7 @@
             close $fd
         }
     }
-    
+
     # Process per-user only settings
     set per_user "${macports_user_dir}/user.conf"
     if [file exists $per_user] {
@@ -407,7 +405,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"
     }
@@ -493,7 +491,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
@@ -505,7 +503,7 @@
     } else {
         set registry.installtype image
     }
-    
+
     # Autoclean mode, whether to automatically call clean after "install"
     if {![info exists portautoclean]} {
         set macports::portautoclean "yes"
@@ -597,7 +595,7 @@
     if {![file isdirectory $portsharepath]} {
         return -code error "Data files directory '$portsharepath' must exist"
     }
-    
+
     if {![info exists libpath]} {
         set libpath "${prefix}/share/macports/Tcl"
     }
@@ -607,7 +605,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"
@@ -625,7 +623,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
@@ -644,26 +642,17 @@
     if {![info exists macports::buildmakejobs]} {
         set macports::buildmakejobs 0
     }
+    
+    # Default Xcode Tools path
+    if {![info exists macports::developer_dir]} {
+        set macports::developer_dir "/Developer"
+    }
 
     # Default mp universal options
-    if {![info exists macports::universal_target]} {
-        if {[file exists /Developer/SDKs/MacOSX10.5.sdk]} {
-            set macports::universal_target "10.5"
-        } else {
-            set macports::universal_target "10.4"
-        }
-    }
-    if {![info exists macports::universal_sysroot]} {
-        if {[file exists /Developer/SDKs/MacOSX10.5.sdk]} {
-            set macports::universal_sysroot "/Developer/SDKs/MacOSX10.5.sdk"
-        } else {
-            set macports::universal_sysroot "/Developer/SDKs/MacOSX10.4u.sdk"
-        }
-    }
     if {![info exists macports::universal_archs]} {
         set macports::universal_archs {ppc i386}
     }
-    
+
     # ENV cleanup.
     set keepenvkeys {
         DISPLAY DYLD_FALLBACK_FRAMEWORK_PATH
@@ -678,7 +667,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
@@ -719,7 +708,7 @@
             unsetenv $envkey
         }
     }
-    
+
     # Proxy handling (done this late since Pextlib is needed)
     if {![info exists proxy_override_env] } {
         set proxy_override_env "no"
@@ -790,7 +779,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
@@ -799,7 +787,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
@@ -837,7 +825,7 @@
             $workername eval set $opt \{[set $opt]\}
         }
     }
-    
+
     foreach opt $portinterp_deferred_options {
         global macports::$opt
         # define the trace hook.
@@ -851,7 +839,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
@@ -899,7 +887,7 @@
             thread::send -async $result "set macports::$opt \"$val\""
         }
     }
-    
+
     return $result
 }
 
@@ -911,11 +899,11 @@
     if {![file writable $fetchdir]} {
         return -code error "Port remote fetch failed: You do not have permission to write to $fetchdir"
     }
-    if {[catch {exec curl -L -s -S -o [file join $fetchdir $fetchfile] $url} result]} {
+    if {[catch {curl fetch $url [file join $fetchdir $fetchfile]} result]} {
         return -code error "Port remote fetch failed: $result"
     }
     cd $fetchdir
-    if {[catch {exec tar -zxf $fetchfile} result]} {
+    if {[catch {exec [findBinary tar $macports::autoconf::tar_path] -zxf $fetchfile} result]} {
         return -code error "Port extract failed: $result"
     }
     if {[regexp {(.+).tgz} $fetchfile match portdir] != 1} {
@@ -1084,7 +1072,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]} {
@@ -1097,7 +1085,7 @@
         error "Error evaluating variants"
     }
 
-    ditem_key $mport provides [$workername eval return \$portname]
+    ditem_key $mport provides [$workername eval return \$name]
 
     return $mport
 }
@@ -1114,7 +1102,7 @@
 proc mporttraverse {func {root .}} {
     # Save the current directory
     set pwd [pwd]
-    
+
     # Join the root.
     set pathToRoot [file join $pwd $root]
 
@@ -1132,7 +1120,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
@@ -1140,7 +1128,7 @@
             }
         }
     }
-    
+
     # Restore the current directory.
     cd $pwd
 }
@@ -1190,7 +1178,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 {
@@ -1226,12 +1214,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]
 }
 
@@ -1240,8 +1228,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
 
@@ -1271,40 +1259,50 @@
 proc _mportinstalled {mport} {
     # Check for the presence of the port in the registry
     set workername [ditem_key $mport workername]
-    return [$workername eval registry_exists_for_name \${portname}]
+    return [$workername eval registry_exists_for_name \${name}]
 }
 
 # Determine if a port is active (only for image mode)
 proc _mportactive {mport} {
     set workername [ditem_key $mport workername]
-    if {[catch {set reslist [$workername eval registry_active \${portname}]}]} {
+    if {[catch {set reslist [$workername eval registry_active \${name}]}]} {
         return 0
     } else {
         return [expr [llength $reslist] > 0]
     }
 }
 
+# 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, if we're in image mode).
 # 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 portname [lindex [split $depspec :] end]
+    ui_debug "Searching for dependency: $portname"
     if {[string equal ${macports::registry.installtype} "image"]} {
-        set res [_mportactive $mport]
+        set res [_portnameactive $portname]
     } else {
-        set res [_mportinstalled $mport]
+        set res [registry::entry_exists_for_name $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] }
@@ -1317,6 +1315,30 @@
     }
 }
 
+### _mportconflictsinstalled is private; may change without notice
+
+# Determine if the port, per the conflicts option, has any conflicts with
+# what is installed.
+#
+# mport   the port to check for conflicts
+# Returns a list of which installed ports conflict, or an empty list if none
+proc _mportconflictsinstalled {mport conflictinfo} {
+    set conflictlist {}
+    if {[llength $conflictinfo] > 0} {
+        ui_debug "Checking for conflicts against [_mportkey $mport name]"
+        foreach conflictport ${conflictinfo} {
+            if {[_mportispresent $mport port:${conflictport}]} {
+                lappend conflictlist $conflictport
+            }
+        }
+    } else {
+        ui_debug "[_mportkey $mport name] has no conflicts"
+    }
+
+    return $conflictlist
+}
+
+
 ### _mportexec is private; may change without notice
 
 proc _mportexec {target mport} {
@@ -1353,17 +1375,19 @@
     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 {}
-    if {$target == "configure" || $target == "build"
+    if {   $target == "fetch" || $target == "checksum"
+        || $target == "extract" || $target == "patch"
+        || $target == "configure" || $target == "build"
         || $target == "test"
         || $target == "destroot" || $target == "install"
         || $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]"
@@ -1375,11 +1399,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
@@ -1390,7 +1414,7 @@
         } else {
             set result [dlist_eval $dlist _mportinstalled [list _mportexec "install"]]
         }
-        
+
         if {$result != {}} {
             set errstring "The following dependencies failed to build:"
             foreach ditem $result {
@@ -1399,7 +1423,7 @@
             ui_error $errstring
             return 1
         }
-        
+
         # Close the dependencies, we're done installing them.
         foreach ditem $dlist {
             mportclose $ditem
@@ -1417,7 +1441,7 @@
     if { [string equal ${macports::registry.installtype} "image"] && [string equal $target "install"] } {
         set target activate
     }
-    
+
     # Build this port with the specified target
     set result [$workername eval eval_targets $target]
 
@@ -1612,7 +1636,7 @@
                     # sync just a PortIndex file
                     set indexfile [macports::getindex $source]
                     file mkdir [file dirname $indexfile]
-                    exec curl -L -s -S -o $indexfile $source/PortIndex
+                    curl $source/PortIndex $indexfile
                 }
             }
             default {
@@ -1630,7 +1654,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]
@@ -1650,7 +1674,7 @@
                         set name [lindex $line 0]
                         set len [lindex $line 1]
                         set line [read $fd $len]
-                        
+
                         if {$easy} {
                             set target $name
                         } else {
@@ -1658,7 +1682,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] )]
@@ -1671,7 +1695,7 @@
                                 set matchres [expr {$case_sensitive == "yes"} ? [regexp -- $pattern $target] : [regexp -nocase -- $pattern $target]]
                             }
                         }
-                        
+
                         if {$matchres == 1} {
                             if {$easy} {
                                 array set portinfo $line
@@ -1732,7 +1756,7 @@
 # the use of the quick index.
 proc mportlookup {name} {
     global macports::portdbpath macports::sources
-    
+
     set sourceno 0
     set matches [list]
     foreach source $sources {
@@ -1757,7 +1781,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}] {
@@ -1817,7 +1841,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
@@ -1934,28 +1958,38 @@
 #                  dependencies ports.
 # accDeps -> accumulator for recursive calls
 # return 0 if everything was ok, an non zero integer otherwise.
-proc mportdepends {mport {target ""} {recurseDeps 1} {skipSatisfied 1} {accDepsFlag 0}} {
+proc mportdepends {mport {target ""} {recurseDeps 1} {skipSatisfied 1}} {
 
     array set portinfo [mportinfo $mport]
     set depends {}
     set deptypes {}
-    if {$accDepsFlag == 0} {
-        array set accDeps {}
-    } else {
-        upvar accDeps accDeps
-    }
-    
+
     # progress indicator
     if {![macports::ui_isset ports_debug]} {
         ui_info -nonewline "."
         flush stdout
     }
-        
+    
+    if {[info exists portinfo(conflicts)] && ($target == "" || $target == "install")} {
+        set conflictports [_mportconflictsinstalled $mport $portinfo(conflicts)]
+        if {[llength ${conflictports}] != 0} {
+            if {[macports::global_option_isset ports_force]} {
+                ui_warn "Force option set; installing $portinfo(name) despite conflicts with: ${conflictports}"
+            } else {
+                return -code error "Can't install $portinfo(name) because conflicting ports are installed: ${conflictports}"
+            }
+        }
+    }
+
     # Determine deptypes to look for based on target
     switch $target {
+        fetch       -
+        checksum    { set deptypes "depends_fetch" }
+        extract     -
+        patch       { set deptypes "depends_fetch depends_extract" }
         configure   -
-        build       { set deptypes "depends_lib depends_build" }
-        
+        build       { set deptypes "depends_fetch depends_extract depends_lib depends_build" }
+
         test        -
         destroot    -
         install     -
@@ -1968,9 +2002,9 @@
         rpm         -
         srpm        -
         dpkg        -
-        ""          { set deptypes "depends_lib depends_build depends_run" }
+        ""          { set deptypes "depends_fetch depends_extract 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.
@@ -1980,50 +2014,46 @@
     }
 
     set subPorts {}
-    
+    set options [ditem_key $mport options]
+    set variations [ditem_key $mport variations]
+
     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
-            ui_debug "$errorInfo"
-            ui_error "Internal error: port lookup failed: $error"
-            return 1
-        }
-        
-        array unset portinfo
-        array set portinfo [lindex $res 1]
-        if {[info exists portinfo(porturl)]} {
-            set porturl $portinfo(porturl)
-        } else {
-            ui_error "Dependency '$dep_portname' not found."
-            return 1
-        }
+        # 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 $mport $depspec]} {
+            # grab the portname portion of the depspec
+            set dep_portname [lindex [split $depspec :] end]
 
-        set options [ditem_key $mport options]
-        set variations [ditem_key $mport variations]
+            # Find the porturl
+            if {[catch {set res [mportlookup $dep_portname]} error]} {
+                global errorInfo
+                ui_debug "$errorInfo"
+                ui_error "Internal error: port lookup failed: $error"
+                return 1
+            }
 
-        # Figure out the subport.   
-        set subport [mportopen $porturl $options $variations]
+            array unset portinfo
+            array set portinfo [lindex $res 1]
+            if {![info exists portinfo(porturl)]} {
+                ui_error "Dependency '$dep_portname' not found."
+                return 1
+            }
 
-        # 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]} {
-            # 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)]} {
-                    # Add it to the list
-                    set accDeps($dep_portname) 1
-
-                    # We'll recursively iterate on it.
+            # Figure out the subport. Check the open_mports list first, since
+            # we potentially leak mport references if we mportopen each time,
+            # because mportexec only closes each open mport once.
+            set subport [dlist_search $macports::open_mports porturl $portinfo(porturl)]
+            if {$subport == {}} {
+                # We haven't opened this one yet.
+                set subport [mportopen $portinfo(porturl) $options $variations]
+                if {$recurseDeps} {
+                    # Add to the list we need to recurse on.
                     lappend subPorts $subport
                 }
             }
+
+            # Append the sub-port's provides to the port's requirements list.
+            ditem_append_unique $mport requires "[ditem_key $subport provides]"
         }
     }
 
@@ -2031,13 +2061,13 @@
     if {$recurseDeps} {
         foreach subport $subPorts {
             # Sub ports should be installed (all dependencies must be satisfied).
-            set res [mportdepends $subport "" $recurseDeps $skipSatisfied 1]
+            set res [mportdepends $subport "" $recurseDeps $skipSatisfied]
             if {$res != 0} {
                 return $res
             }
         }
     }
-    
+
     return 0
 }
 
@@ -2046,7 +2076,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"
@@ -2054,14 +2084,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 ] } {
@@ -2104,9 +2134,8 @@
             set owner [file attributes ${prefix} -owner]
             set group [file attributes ${prefix} -group]
             set perms [string range [file attributes ${prefix} -permissions] end-3 end]
-            set installing_user [exec /usr/bin/id -un]
-            if {![string equal $installing_user $owner]} {
-                return -code error "User $installing_user does not own ${prefix} - try using sudo"
+            if {![string equal $tcl_platform(user) $owner]} {
+                return -code error "User $tcl_platform(user) does not own ${prefix} - try using sudo"
             }
             ui_debug "Permissions OK"
 
@@ -2119,10 +2148,19 @@
             } 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 {$tcl_platform(os) != "Darwin" || $prefix == "/usr/local"
+                || ([glob -nocomplain "/usr/local/lib/lib{readline,history}*"] == "" && [glob -nocomplain "/usr/local/include/readline/*.h"] == "")} {
+                append configure_args " --enable-readline"
+            } 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 --prefix=$prefix --with-tclpackage=$tclpackage --with-install-user=$owner --with-install-group=$group --with-directory-mode=$perms && make && make install" } result] } {
+            if { [catch { system "cd $mp_source_path && ./configure $configure_args && make && make install" } result] } {
                 return -code error "Error installing new MacPorts base: $result"
             }
         }
@@ -2135,7 +2173,7 @@
     # set the MacPorts sources to the right owner
     set sources_owner [file attributes [file join $portdbpath sources/] -owner]
     ui_debug "Setting MacPorts sources ownership to $sources_owner"
-    if { [catch { exec chown -R $sources_owner [file join $portdbpath sources/] } result] } {
+    if { [catch { exec [findBinary chown $macports::autoconf::chown_path] -R $sources_owner [file join $portdbpath sources/] } result] } {
         return -code error "Couldn't change permissions of the MacPorts sources at $mp_source_path to $sources_owner: $result"
     }
 
@@ -2199,29 +2237,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
@@ -2229,15 +2272,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"
@@ -2394,7 +2439,7 @@
                     }
                 }
             }
-
+            mportclose $workername
             return 0
         } else {
             set epoch_override 1
@@ -2417,6 +2462,7 @@
             global errorInfo
             ui_debug "$errorInfo"
             ui_error "Unable to upgrade port: $result"
+            catch {mportclose $workername}
             return 1
         }
     }
@@ -2434,6 +2480,7 @@
             global errorInfo
             ui_debug "$errorInfo"
             ui_error "Uninstall $portname ${version_installed}_${revision_installed}${variant_installed} failed: $result"
+            catch {mportclose $workername}
             return 1
         }
         if {!$force_cur} {
@@ -2452,6 +2499,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} {
@@ -2470,6 +2518,7 @@
                 global errorInfo
                 ui_debug "$errorInfo"
                 ui_error "Deactivating $portname ${version_active}_${revision_active} failed: $result"
+                catch {mportclose $workername}
                 return 1
             }
         }
@@ -2486,9 +2535,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]
@@ -2504,6 +2554,7 @@
                 global errorInfo
                 ui_debug "$errorInfo"
                 ui_error "Uninstall $portname @${version}_${revision}${variant} failed: $result"
+                catch {mportclose $workername}
                 return 1
             }
         }
@@ -2527,7 +2578,7 @@
         }
     }
 
-    
+
     # close the port handle
     mportclose $workername
 }
@@ -2539,27 +2590,27 @@
     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} {
+    foreach dtype {depends_fetch depends_extract depends_build depends_lib depends_run} {
         if {[info exists portinfo($dtype)]} {
             foreach i $portinfo($dtype) {
                 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
-                } 
+                }
             }
         }
     }
@@ -2659,7 +2710,7 @@
             if {[file exists $selected_version]} {
                 file delete $selected_version
             }
-            symlink $version $selected_version 
+            symlink $version $selected_version
             return
         }
         show {

Modified: branches/new-help-system/base/src/macports1.0/macports_autoconf.tcl.in
===================================================================
--- branches/new-help-system/base/src/macports1.0/macports_autoconf.tcl.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/macports1.0/macports_autoconf.tcl.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -32,9 +32,13 @@
 package provide macports 1.0
 
 namespace eval macports::autoconf {
+    variable chown_path "@CHOWN@"
+    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/new-help-system/base/src/macports1.0/macports_fastload.tcl.in
===================================================================
--- branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/package1.0
___________________________________________________________________
Added: svn:ignore
   + pkgIndex.tcl


Modified: branches/new-help-system/base/src/package1.0/Makefile
===================================================================
--- branches/new-help-system/base/src/package1.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/package1.0/portarchive.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portarchive.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portarchive.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -67,7 +67,7 @@
 	global UI_PREFIX target_state_fd
 	global variations package.destpath workpath
 	global ports_force ports_source_only ports_binary_only
-	global portname portversion portrevision portvariants
+	global name version revision portvariants
 	global archive.destpath archive.type archive.meta
 	global archive.file archive.path archive.fulldestpath
 
@@ -100,17 +100,17 @@
 	if {[check_statefile target org.macports.archive $target_state_fd]} {
 		return 0
 	} elseif {[check_statefile target org.macports.unarchive $target_state_fd] && ([info exists ports_binary_only] && $ports_binary_only == "yes")} {
-		ui_debug "Skipping archive ($portname) since binary-only is set"
+		ui_debug "Skipping archive ($name) since binary-only is set"
 		set skipped 1
 	} elseif {[info exists ports_source_only] && $ports_source_only == "yes"} {
-		ui_debug "Skipping archive ($portname) since source-only is set"
+		ui_debug "Skipping archive ($name) since source-only is set"
 		set skipped 1
 	} else {
 		set unsupported 0
 		set any_missing no
 		foreach archive.type [option portarchivetype] {
 			if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
-				set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
+				set archive.file "${name}-${version}_${revision}${portvariants}.[option os.arch].${archive.type}"
 				set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
 				if {![file exists ${archive.path}]} {
 				    set any_missing yes
@@ -122,14 +122,14 @@
 		}
 		if {!$any_missing} {
 			# might be nice to allow forcing, but let's fix #16061 first
-			ui_debug "Skipping archive ($portname) since archive(s) already exist"
+			ui_debug "Skipping archive ($name) since archive(s) already exist"
 			set skipped 1
 		}
 		if {${archive.type} == "xpkg"} {
 			set archive.meta true
 		}
 		if {[llength [option portarchivetype]] == $unsupported} {
-			ui_debug "Skipping archive ($portname) since specified archive types not supported"
+			ui_debug "Skipping archive ($name) since specified archive types not supported"
 			set skipped 1
 		}
 	}
@@ -143,12 +143,12 @@
 
 proc portarchive::archive_start {args} {
 	global UI_PREFIX
-	global portname portversion portrevision portvariants
+	global name version revision portvariants
 
 	if {[llength [option portarchivetype]] > 1} {
-		ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [join [option portarchivetype] {, }] archives for %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+		ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [join [option portarchivetype] {, }] archives for %s %s_%s%s"] $name $version $revision $portvariants]"
 	} else {
-		ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [option portarchivetype] archive for %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+		ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [option portarchivetype] archive for %s %s_%s%s"] $name $version $revision $portvariants]"
 	}
 
 	return 0
@@ -170,13 +170,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}"
@@ -192,9 +192,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}
@@ -205,11 +205,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}"
@@ -227,7 +235,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}
@@ -240,7 +248,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"
@@ -252,7 +260,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}
@@ -288,7 +296,7 @@
 proc portarchive::archive_main {args} {
 	global UI_PREFIX variations
 	global workpath destpath portpath ports_force
-	global portname portepoch portversion portrevision portvariants
+	global name epoch version revision portvariants
 	global archive.fulldestpath archive.type archive.file archive.path
 	global archive.meta archive.metaname archive.metapath
 	global os.platform os.arch
@@ -305,7 +313,7 @@
 
 	# Copy state file into destroot for archiving
 	# +STATE contains a copy of the MacPorts state information
-    set statefile [file join $workpath .macports.${portname}.state]
+    set statefile [file join $workpath .macports.${name}.state]
 	file copy -force $statefile [file join $destpath "+STATE"]
 
 	# Copy Portfile into destroot for archiving
@@ -340,18 +348,21 @@
 	# files and checksums
 	set control [list]
 	set fd [open [file join $destpath "+CONTENTS"] w]
-	puts $fd "@name ${portname}-${portversion}_${portrevision}${portvariants}"
-	puts $fd "@portname ${portname}"
-	puts $fd "@portepoch ${portepoch}"
-	puts $fd "@portversion ${portversion}"
-	puts $fd "@portrevision ${portrevision}"
+	puts $fd "@name ${name}-${version}_${revision}${portvariants}"
+	puts $fd "@portname ${name}"
+	puts $fd "@portepoch ${epoch}"
+	puts $fd "@portversion ${version}"
+	puts $fd "@portrevision ${revision}"
 	set vlist [lsort -ascii [array names variations]]
 	foreach v $vlist {
 		if {![string equal $v [option os.platform]] && ![string equal $v [option os.arch]]} {
 			puts $fd "@portvariant +${v}"
 		}
 	}
-	foreach fullpath [exec find $destpath ! -type d] {
+	fs-traverse fullpath $destpath {
+	    if {[file isdirectory $fullpath]} {
+	        continue
+	    }
 		set relpath [strsed $fullpath "s|^$destpath/||"]
 		if {![regexp {^[+]} $relpath]} {
 			puts $fd "$relpath"
@@ -380,10 +391,10 @@
 		# TODO: split contents into <buildinfo> (new) and <package> (current)
 		#       see existing <portpkg> for the matching source package layout
 
-		putel $sd name ${portname}
-		putel $sd epoch ${portepoch}
-		putel $sd version ${portversion}
-		putel $sd revision ${portrevision}
+		putel $sd name ${name}
+		putel $sd epoch ${epoch}
+		putel $sd version ${version}
+		putel $sd revision ${revision}
 		putel $sd major 0
 		putel $sd minor 0
 
@@ -408,7 +419,7 @@
 
             # Emit dependencies provided by this package
             puts $sd "<provides>"
-                set name ${portname}
+                set name ${name}
                 puts $sd "<item>"
                 putel $sd name $name
                 putel $sd major 0
@@ -416,15 +427,17 @@
                 puts $sd "</item>"
             puts $sd "</provides>"
             
-    set res [mport_lookup $portname]
+    set res [mport_lookup $name]
     if {[llength $res] < 2} {
-        ui_error "Dependency $portname not found"
+        ui_error "Dependency $name not found"
     } else {
     array set portinfo [lindex $res 1]
 
             # Emit build, library, and runtime dependencies
             puts $sd "<requires>"
             foreach {key type} {
+                depends_fetch "fetch"
+                depends_extract "extract"
                 depends_build "build"
                 depends_lib "library"
                 depends_run "runtime"
@@ -450,7 +463,7 @@
 	foreach archive.type [option portarchivetype] {
 		if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
 			# Define archive file/path
-			set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
+			set archive.file "${name}-${version}_${revision}${portvariants}.[option os.arch].${archive.type}"
 			set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
 
 			# Setup archive command
@@ -473,7 +486,7 @@
 
 proc portarchive::archive_finish {args} {
 	global UI_PREFIX
-	global portname portversion portrevision portvariants
+	global name version revision portvariants
 	global destpath
 
 	# Cleanup all control files when finished
@@ -484,9 +497,9 @@
 	}
 
 	if {[llength [option portarchivetype]] > 1} {
-		ui_info "$UI_PREFIX [format [msgcat::mc "Archives for %s %s_%s%s packaged"] $portname $portversion $portrevision $portvariants]"
+		ui_info "$UI_PREFIX [format [msgcat::mc "Archives for %s %s_%s%s packaged"] $name $version $revision $portvariants]"
 	} else {
-		ui_info "$UI_PREFIX [format [msgcat::mc "Archive for %s %s_%s%s packaged"] $portname $portversion $portrevision $portvariants]"
+		ui_info "$UI_PREFIX [format [msgcat::mc "Archive for %s %s_%s%s packaged"] $name $version $revision $portvariants]"
 	}
 	return 0
 }

Modified: branches/new-help-system/base/src/package1.0/portdmg.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portdmg.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portdmg.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -44,11 +44,11 @@
 set_ui_prefix
 
 proc portdmg::dmg_main {args} {
-    global portname portversion portrevision package.destpath UI_PREFIX
+    global name version revision package.destpath UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${name} ${version}]"
     
-    return [package_dmg $portname $portversion $portrevision]
+    return [package_dmg $name $version $revision]
 }
 
 proc portdmg::package_dmg {portname portversion portrevision} {
@@ -89,20 +89,23 @@
         set subdev 2
     }
     
-    if {[system "hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
+    set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
+    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
     }
-    if {[catch {set devicename [exec hdid ${tmp_image} | grep s${subdev} | awk "{ print \$1 }"]} error]} {
+    if {[catch {set attach_output [exec $hdiutil attach -puppetstrings ${tmp_image} | grep s${subdev}]} error]} {
         return -code error [format [msgcat::mc "Failed to attach temporary image: %s"] ${error}]
     }
-    set mount_point [exec mount | grep "${devicename}"]
+    set attach_output [split $attach_output "\t"]
+    set devicename [string trim [lindex $attach_output 0]]
+    set mount_point [string trim [lindex $attach_output 2]]
     regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
-    system "ditto -rsrcFork ${pkgpath} '${mount_point}/${portname}-${portversion}.pkg'"
-    system "hdiutil detach ${devicename} -quiet"
-    if {[system "hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
+    system "[findBinary ditto $portutil::autoconf::ditto_path] -rsrcFork ${pkgpath} '${mount_point}/${portname}-${portversion}.pkg'"
+    system "$hdiutil detach ${devicename} -quiet"
+    if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
         return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
     }
-    if {[system "hdiutil internet-enable -quiet -yes ${final_image}"] != ""} {
+    if {[system "$hdiutil internet-enable -quiet -yes ${final_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to internet-enable: %s"] ${final_image}]
     }
     file delete -force "${tmp_image}"

Modified: branches/new-help-system/base/src/package1.0/portdpkg.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portdpkg.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portdpkg.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -50,16 +50,16 @@
 proc portdpkg::main {args} {
 	global UI_PREFIX destpath os.arch os.platform
     
-	ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option portname] [option portversion]]"
+	ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option name] [option version]]"
 
 	# get deplist
-	set deps [make_dependency_list [option portname]]
+	set deps [make_dependency_list [option name]]
 	set deps [lsort -unique $deps]
 	foreach dep $deps {
 		set name [lindex [split $dep /] 0]
 		set vers [lindex [split $dep /] 1]
 		# don't re-package ourself
-		if {$name != [option portname]} {
+		if {$name != [option name]} {
 			lappend dependencies "${name} (>= ${vers})"
 		}
 	}
@@ -93,9 +93,9 @@
 	
 	# Create dpkg version number
 	if {[expr [option epoch] != 0]} {
-		set pkg_version "[option epoch]:[option portversion]"
+		set pkg_version "[option epoch]:[option version]"
 	} else {
-		set pkg_version "[option portversion]"
+		set pkg_version "[option version]"
 	}
 	if {[expr [option revision] != 0]} {
 		append pkg_version "-[option revision]"
@@ -110,7 +110,7 @@
 	} elseif {[exists description]} {
 		set pkg_long_description " [option description]\n"
 	} else {
-		set pkg_long_description " [option portname]\n"
+		set pkg_long_description " [option name]\n"
 	}
 
 	if {[exists homepage]} {
@@ -137,7 +137,7 @@
 		set pkg_arch "${os.platform}-${pkg_arch}"
 	}
 
-	puts $controlfd "Package: [option portname]"
+	puts $controlfd "Package: [option name]"
 	puts $controlfd "Architecture: ${pkg_arch}"
 	puts $controlfd "Version: ${pkg_version}"
 	puts $controlfd "Section: ${pkg_category}"

Modified: branches/new-help-system/base/src/package1.0/portmdmg.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portmdmg.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portmdmg.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -44,11 +44,11 @@
 set_ui_prefix
 
 proc portmdmg::mdmg_main {args} {
-    global portname portversion portrevision package.destpath UI_PREFIX
+    global name version revision package.destpath UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${name} ${version}]"
     
-    return [package_mdmg $portname $portversion $portrevision]
+    return [package_mdmg $name $version $revision]
 }
 
 proc portmdmg::package_mdmg {portname portversion portrevision} {
@@ -88,27 +88,30 @@
 	# Apple_partition_scheme (Apple_partition_map is at s1)
         set subdev 2
     }
-    
+
+  set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
   if {false} {
-    if {[system "hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
+    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
     }
-    if {[catch {set devicename [exec hdid ${tmp_image} | grep s${subdev} | awk "{ print \$1 }"]} error]} {
+    if {[catch {set attach_output [exec $hdiutil attach -puppetstrings ${tmp_image} | grep s${subdev}]} error]} {
         return -code error [format [msgcat::mc "Failed to attach temporary image: %s"] ${error}]
     }
-    set mount_point [exec mount | grep "${devicename}"]
+    set attach_output [split $attach_output "\t"]
+    set devicename [string trim [lindex $attach_output 0]]
+    set mount_point [string trim [lindex $attach_output 2]]
     regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
-    system "ditto -rsrcFork ${mpkgpath} '${mount_point}/${portname}-${portversion}.mpkg'"
-    system "hdiutil detach ${devicename} -quiet"
+    system "[findBinary ditto $portutil::autoconf::ditto_path] -rsrcFork ${mpkgpath} '${mount_point}/${portname}-${portversion}.mpkg'"
+    system "$hdiutil detach ${devicename} -quiet"
   } else {
-    if {[system "hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${mpkgpath} ${tmp_image}"] != ""} {
+    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${mpkgpath} ${tmp_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
     }
   }
-    if {[system "hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
+    if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
         return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
     }
-    if {[system "hdiutil internet-enable -quiet -yes ${final_image}"] != ""} {
+    if {[system "$hdiutil internet-enable -quiet -yes ${final_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to internet-enable: %s"] ${final_image}]
     }
     file delete -force "${tmp_image}"

Modified: branches/new-help-system/base/src/package1.0/portmpkg.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portmpkg.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portmpkg.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -47,12 +47,12 @@
 set_ui_prefix
 
 proc portmpkg::mpkg_main {args} {
-    global portname portversion portrevision package.destpath package.flat UI_PREFIX
+    global name version revision package.destpath package.flat UI_PREFIX
 
     # Make sure the destination path exists.
     system "mkdir -p ${package.destpath}"
 
-    return [package_mpkg $portname $portversion $portrevision]
+    return [package_mpkg $name $version $revision]
 }
 
 proc portmpkg::make_dependency_list {portname} {

Modified: branches/new-help-system/base/src/package1.0/portpkg.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portpkg.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portpkg.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -55,11 +55,11 @@
 set_ui_prefix
 
 proc portpkg::pkg_main {args} {
-    global portname portversion portrevision package.type package.destpath package.flat UI_PREFIX
+    global name version revision package.type package.destpath package.flat UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating pkg for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating pkg for %s-%s"] ${name} ${version}]"
 
-    return [package_pkg $portname $portversion $portrevision]
+    return [package_pkg $name $version $revision]
 }
 
 proc portpkg::package_pkg {portname portversion portrevision} {
@@ -73,7 +73,7 @@
         return 0
     }
 
-    set packagemaker "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
+    set packagemaker "[option developer_dir]/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
     if ([file exists "$packagemaker"]) {
         set resourcepath ${workpath}/pkg_resources
     } else {
@@ -81,7 +81,8 @@
     }
 
     set language "English"
-    system "mkdir -p -m 0755 ${resourcepath}/$language.lproj"
+    file mkdir "${resourcepath}/${language}.lproj"
+    file attributes "${resourcepath}/${language}.lproj" -permissions 0755
 	
     # long_description, description, or homepage may not exist
     foreach variable {long_description description homepage} {
@@ -135,8 +136,8 @@
         write_PkgInfo ${pkgpath}/Contents/PkgInfo
         write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion $portrevision
 
-        system "mkbom ${destpath} ${pkgpath}/Contents/Archive.bom"
-        system "cd ${destpath} && pax -x cpio -w -z . > ${pkgpath}/Contents/Archive.pax.gz"
+        system "[findBinary mkbom $portutil::autoconf::mkbom_path] ${destpath} ${pkgpath}/Contents/Archive.bom"
+        system "cd ${destpath} && [findBinary pax $portutil::autoconf::pax_path] -x [findBinary cpio $portutil::autoconf::cpio_path] -w -z . > ${pkgpath}/Contents/Archive.pax.gz"
 
         write_description_plist ${resourcepath}/Description.plist $portname $portversion $description
         write_sizes_file ${resourcepath}/Archive.sizes ${portname} ${portversion} ${pkgpath} ${destpath}
@@ -146,9 +147,10 @@
     foreach dir {etc var tmp} {
         if ([file exists "${destpath}/private/$dir"]) {
             # restore any directories that were moved, to avoid confusing the rest of the ports system.
-            system "mv ${destpath}/private/$dir ${destpath}/$dir; rmdir ${destpath}/private 2>/dev/null"
+            file rename ${destpath}/private/$dir ${destpath}/$dir
         }
     }
+    catch {file delete ${destpath}/private}
 
     return 0
 }
@@ -297,7 +299,7 @@
 
 proc portpkg::write_sizes_file {sizesfile portname portversion pkgpath destpath} {
     
-    if {[catch {set numFiles [exec lsbom -s ${pkgpath}/Contents/Archive.bom | wc -l]} result]} {
+    if {[catch {set numFiles [llength [split [exec [findBinary lsbom $portutil::autoconf::lsbom_path] -s ${pkgpath}/Contents/Archive.bom] "\n"]]} result]} {
         return -code error [format [msgcat::mc "Reading package bom failed: %s"] $result]
     }
     if {[catch {set compressedSize [expr [dirSize ${pkgpath}] / 1024]} result]} {

Modified: branches/new-help-system/base/src/package1.0/portportpkg.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portportpkg.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portportpkg.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -90,18 +90,18 @@
 
 
 proc portportpkg::create_portpkg {} {
-    global portname portversion prefix UI_PREFIX workpath portpath
+    global name prefix UI_PREFIX workpath portpath
 
 	set xar [xar_path]
 	
     set dirname "portpkg"
     set dirpath "${workpath}/${dirname}"
-    set pkgpath "${workpath}/${portname}.portpkg"
+    set pkgpath "${workpath}/${name}.portpkg"
     set metaname "portpkg_meta.xml"
     set metapath "${workpath}/${metaname}"
     
     # Expose and default some global variables
-    set vars " portname portversion maintainers categories description \
+    set vars " maintainers categories description \
     	long_description master_sites homepage epoch version revision \
     	PortInfo \
     	submitter_name submitter_email submitter_key \
@@ -141,7 +141,7 @@
 		puts $sd "</submitter>"
 		
 		puts $sd "<package>"
-			putel $sd name $portname
+			putel $sd name $name
 			putel $sd homepage $homepage
 			putlist $sd categories category $categories
 			putlist $sd maintainers maintainer $maintainers
@@ -187,7 +187,7 @@
     # Create portpkg.xar, including the metadata and the portpkg directory contents
     set cmd "cd ${workpath}; ${xar} -cf ${pkgpath} --exclude \\.DSStore --exclude \\.svn ${dirname} -s ${metapath} -n ${metaname}"
     if {[system $cmd] != ""} {
-		return -code error [format [msgcat::mc "Failed to create portpkg for port : %s"] $portname]
+		return -code error [format [msgcat::mc "Failed to create portpkg for port : %s"] $name]
     }
     
     return ${pkgpath}
@@ -195,9 +195,9 @@
 
 
 proc portportpkg::portpkg_main {args} {
-    global portname portversion portverbose prefix UI_PREFIX workpath portpath
+    global name version portverbose prefix UI_PREFIX workpath portpath
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating portpkg for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating portpkg for %s-%s"] ${name} ${version}]"
 
     # Make sure we have a work directory
     file mkdir ${workpath}

Modified: branches/new-help-system/base/src/package1.0/portrpm.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portrpm.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portrpm.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -46,11 +46,11 @@
 set_ui_prefix
 
 proc portrpm::rpm_main {args} {
-    global portname portversion portrevision UI_PREFIX
+    global name version revision UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating RPM package for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating RPM package for %s-%s"] ${name} ${version}]"
     
-    return [rpm_pkg $portname $portversion $portrevision]
+    return [rpm_pkg $name $version $revision]
 }
 
 proc portrpm::rpm_pkg {portname portversion portrevision} {

Modified: branches/new-help-system/base/src/package1.0/portsrpm.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portsrpm.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portsrpm.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -47,11 +47,11 @@
 set_ui_prefix
 
 proc portsrpm::srpm_main {args} {
-    global portname portversion portrevision UI_PREFIX
+    global name version revision UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating SRPM package for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating SRPM package for %s-%s"] ${name} ${version}]"
     
-    return [srpm_pkg $portname $portversion $portrevision]
+    return [srpm_pkg $name $version $revision]
 }
 
 proc portsrpm::srpm_pkg {portname portversion portrevision} {
@@ -135,10 +135,13 @@
     foreach {name array} $res {
         array set portinfo $array
 	
-        if {[info exists portinfo(depends_build)] || [info exists portinfo(depends_lib)]} {
-            # get the union of depends_build and depends_lib
+        if {[info exists portinfo(depends_fetch)] || [info exists portinfo(depends_extract)]
+            || [info exists portinfo(depends_build)] || [info exists portinfo(depends_lib)]} {
+            # get the union of depends_fetch, depends_extract, depends_build and depends_lib
             # xxx: only examines the portfile component of the depspec
             set depends {}
+            if {[info exists portinfo(depends_fetch)]} { eval "lappend depends $portinfo(depends_fetch)" }
+            if {[info exists portinfo(depends_extract)]} { eval "lappend depends $portinfo(depends_extract)" }
             if {[info exists portinfo(depends_build)]} { eval "lappend depends $portinfo(depends_build)" }
             if {[info exists portinfo(depends_lib)]} { eval "lappend depends $portinfo(depends_lib)" }
 	    

Modified: branches/new-help-system/base/src/package1.0/portunarchive.tcl
===================================================================
--- branches/new-help-system/base/src/package1.0/portunarchive.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/package1.0/portunarchive.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -63,7 +63,7 @@
 proc portunarchive::unarchive_init {args} {
 	global UI_PREFIX target_state_fd variations workpath
 	global ports_force ports_source_only ports_binary_only
-	global portname portversion portrevision portvariants portpath
+	global name version revision portvariants portpath
 	global unarchive.srcpath unarchive.type unarchive.file unarchive.path unarchive.fullsrcpath
 
 	# Check mode in case archive called directly by user
@@ -95,20 +95,20 @@
 	if {[check_statefile target org.macports.unarchive $target_state_fd]} {
 		return 0
 	} elseif {[info exists ports_source_only] && $ports_source_only == "yes"} {
-		ui_debug "Skipping unarchive ($portname) since source-only is set"
+		ui_debug "Skipping unarchive ($name) since source-only is set"
 		set skipped 1
 	} elseif {[check_statefile target org.macports.destroot $target_state_fd]} {
-		ui_debug "Skipping unarchive ($portname) since destroot completed"
+		ui_debug "Skipping unarchive ($name) since destroot completed"
 		set skipped 1
 	} elseif {[info exists ports_force] && $ports_force == "yes"} {
-		ui_debug "Skipping unarchive ($portname) since force is set"
+		ui_debug "Skipping unarchive ($name) since force is set"
 		set skipped 1
 	} else {
 		set found 0
 		set unsupported 0
 		foreach unarchive.type [option portarchivetype] {
 			if {[catch {archiveTypeIsSupported ${unarchive.type}} errmsg] == 0} {
-				set unarchive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${unarchive.type}"
+				set unarchive.file "${name}-${version}_${revision}${portvariants}.[option os.arch].${unarchive.type}"
 				set unarchive.path "[file join ${unarchive.fullsrcpath} ${unarchive.file}]"
 				if {[file exist ${unarchive.path}]} {
 					set found 1
@@ -125,12 +125,12 @@
 			ui_debug "Found [string toupper ${unarchive.type}] archive: ${unarchive.path}"
 		} else {
 			if {[info exists ports_binary_only] && $ports_binary_only == "yes"} {
-				return -code error "Archive for ${portname} ${portversion}_${portrevision}${portvariants} not found, required when binary-only is set!"
+				return -code error "Archive for ${name} ${version}_${revision}${portvariants} not found, required when binary-only is set!"
 			} else {
 				if {[llength [option portarchivetype]] == $unsupported} {
-					ui_debug "Skipping unarchive ($portname) since specified archive types not supported"
+					ui_debug "Skipping unarchive ($name) since specified archive types not supported"
 				} else {
-					ui_debug "Skipping unarchive ($portname) since no archive found"
+					ui_debug "Skipping unarchive ($name) since no archive found"
 				}
 				set skipped 1
 			}
@@ -145,10 +145,10 @@
 }
 
 proc portunarchive::unarchive_start {args} {
-	global UI_PREFIX portname portversion portrevision portvariants
+	global UI_PREFIX name version revision portvariants
 	global unarchive.type
 
-	ui_msg "$UI_PREFIX [format [msgcat::mc "Unpacking ${unarchive.type} archive for %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+	ui_msg "$UI_PREFIX [format [msgcat::mc "Unpacking ${unarchive.type} archive for %s %s_%s%s"] $name $version $revision $portvariants]"
 
 	return 0
 }
@@ -170,7 +170,7 @@
 	switch -regex ${unarchive.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 unarchive.cmd "$pax"
 				if {[info exists env(USER)] && $env(USER) == "root"} {
@@ -181,7 +181,7 @@
 				if {[regexp {z$} ${unarchive.type}]} {
 					set unarchive.args {.}
 					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 unarchive.pipe_cmd "$gzip -d -c ${unarchive.path} |"
 					} else {
@@ -196,9 +196,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 unarchive.cmd "$tar"
 				set unarchive.pre_args {-xvpf}
@@ -208,10 +208,17 @@
 						set gzip "bzip2"
 					} elseif {[regexp {lz$} ${unarchive.type}]} {
 						set gzip "lzma"
+					} elseif {[regexp {xz$} ${unarchive.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} {
 						ui_debug "Using $gzip"
 						set unarchive.pipe_cmd "$gzip -d -c ${unarchive.path} |"
 					} else {
@@ -228,7 +235,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 unarchive.cmd "$xar"
 				set unarchive.pre_args {-xvpf}
@@ -240,7 +247,7 @@
 		}
 		zip {
 			set unzip "unzip"
-			if {[catch {set unzip [binaryInPath $unzip]} errmsg] == 0} {
+			if {[catch {set unzip [findBinary $unzip ${portutil::autoconf::unzip_path}]} errmsg] == 0} {
 				ui_debug "Using $unzip"
 				set unarchive.cmd "$unzip"
 				if {[info exists env(USER)] && $env(USER) == "root"} {
@@ -264,7 +271,7 @@
 
 proc portunarchive::unarchive_main {args} {
 	global UI_PREFIX
-	global portname portversion portrevision portvariants
+	global name version revision portvariants
 	global unarchive.dir unarchive.file unarchive.pipe_cmd
 
 	# Setup unarchive command
@@ -287,12 +294,12 @@
 }
 
 proc portunarchive::unarchive_finish {args} {
-	global UI_PREFIX target_state_fd unarchive.file portname workpath destpath
+	global UI_PREFIX target_state_fd unarchive.file name workpath destpath
 
 	# Reset state file with archive version
-    set statefile [file join $workpath .macports.${portname}.state]
+    set statefile [file join $workpath .macports.${name}.state]
 	file copy -force [file join $destpath "+STATE"] $statefile
-	exec touch $statefile
+	file mtime $statefile [clock seconds]
 
 # Hack to temporarily move com.apple.* strings in statefiles extracted from old archives
 # to the org.macports.* namespace. "temporarily" because old archives will still have a


Property changes on: branches/new-help-system/base/src/pextlib1.0
___________________________________________________________________
Modified: svn:ignore
   - *.dylib
   + *.dylib
pkgIndex.tcl


Modified: branches/new-help-system/base/src/pextlib1.0/Makefile
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/Pextlib.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/Pextlib.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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[] = "}]";
@@ -575,7 +574,7 @@
 
 	if(onoblock && ounlock) {
 	  /* should not be specified together */
-	  Tcl_SetResult(interp, "-noblock can not be used with -unlock", TCL_STATIC);
+	  Tcl_SetResult(interp, "-noblock cannot be used with -unlock", TCL_STATIC);
 	  return TCL_ERROR;
 	}
 	  
@@ -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);
@@ -1319,6 +1165,7 @@
 	Tcl_CreateObjCommand(interp, "setegid", setegidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "name_to_uid", name_to_uidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "uid_to_name", uid_to_nameCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "uname_to_gid", uname_to_gidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "name_to_gid", name_to_gidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "gid_to_name", gid_to_nameCmd, NULL, NULL);
 	

Modified: branches/new-help-system/base/src/pextlib1.0/curl.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/curl.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/curl.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/fgetln.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/fgetln.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/fgetln.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/filemap.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/filemap.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/filemap.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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>
@@ -95,7 +92,6 @@
 #endif
 
 #include <tcl.h>
-#include <tclDecls.h>
 
 #include "filemap.h"
 #include "strcasecmp.h"
@@ -222,6 +218,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 +706,8 @@
 					ckfree((char*) theSubnode);
 					*theSubnodeCursor = 0;
 				}
+				
+				theSubnodeCursor++;
 			}
 		}
 		

Modified: branches/new-help-system/base/src/pextlib1.0/fs-traverse.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/fs-traverse.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/fs-traverse.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/md5cmd.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/md5cmd.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/md5cmd.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/readline.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/readline.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/readline.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/rmd160cmd.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/sha1cmd.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/sha1cmd.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/sha1cmd.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/strcasecmp.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/strcasecmp.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/strcasecmp.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -30,9 +30,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <ctype.h>
 #include <string.h>
-#include <ctype.h>
 
+#include "strcasecmp.h"
+
 /* ------------------------------------------------------------------------- **
  * xstrcasecmp
  * ------------------------------------------------------------------------- */

Deleted: branches/new-help-system/base/src/pextlib1.0/tests/fifo.tcl
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/tests/fifo.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/tests/fifo.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/tests/socketpair.tcl
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/tests/socketpair.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/tests/socketpair.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/tests/symlink.tcl
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/tests/symlink.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/tests/symlink.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/tracelib.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/tracelib.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/tracelib.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -82,6 +82,10 @@
 	}
 	
 	name=strdup(Tcl_GetString(objv[2]));
+	if (!name) {
+	    Tcl_SetResult(interp, "memory allocation failed", TCL_STATIC);
+	    return TCL_ERROR;
+	}
 	
 	return TCL_OK;
 }
@@ -107,8 +111,12 @@
 	
 	len=strlen(Tcl_GetString(objv[2]))+2;
 	sandbox=(char*)malloc(len);
+	if (!sandbox) {
+	    Tcl_SetResult(interp, "memory allocation failed", TCL_STATIC);
+	    return TCL_ERROR;
+	}
 	memset(sandbox, 0, len);
-	strcpy(sandbox, Tcl_GetString(objv[2]));
+	strlcpy(sandbox, Tcl_GetString(objv[2]), len);
 	for(t=sandbox;(t=strchr(t+1, ':'));)
 	{
 		/* : -> \0 */
@@ -210,10 +218,23 @@
 	{
 		char * t, * _;
 		
-		filemap=(char*)malloc(1024);
+		size_t remaining = 1024;
+		filemap=(char*)malloc(remaining);
+		if (!filemap) {
+		    ui_warn("send_file_map: memory allocation failed");
+	        return;
+		}
 		t=filemap;
 		
-		#define append_allow(path, resolution) do{strcpy(t, path); t+=strlen(t)+1; *t++=resolution; *t++=0;}while(0);
+		#define append_allow(path, resolution) do { strlcpy(t, path, remaining); \
+		                                            if (remaining < (strlen(t)+3)) \
+		                                                remaining=0; \
+		                                            else \
+		                                                remaining-=strlen(t)+3; \
+		                                            t+=strlen(t)+1; \
+		                                            *t++=resolution; \
+		                                            *t++=0; \
+		                                          } while(0);
 		if(enable_fence)
 		{
 			for(_=sandbox; *_; _+=strlen(_)+1)
@@ -223,27 +244,28 @@
 			append_allow("/sbin", 0);
 			append_allow("/dev", 0);
 			append_allow(Tcl_GetVar(interp, "macports::prefix", TCL_GLOBAL_ONLY), 2);
-			append_allow("/Applications/MacPorts", 0);
 			/* If there is no SDK we will allow everything in /usr /System/Library etc, else add binaries to allow, and redirect root to SDK. */
 			if(sdk&&*sdk)
 			{
-				char buf[260]="/Developer/SDKs/";
-				strcat(buf, sdk);
+				char buf[260];
+				buf[0] = '\0';
+				strlcat(buf, Tcl_GetVar(interp, "macports::developer_dir", TCL_GLOBAL_ONLY), 260);
+				strlcat(buf, "/SDKs/", 260);
+				strlcat(buf, sdk, 260);
 			
 				append_allow("/usr/bin", 0);
 				append_allow("/usr/sbin", 0);
 				append_allow("/usr/libexec/gcc", 0);
 				append_allow("/System/Library/Perl", 0);
-				append_allow("/usr/X11R6/bin", 0);
 				append_allow("/", 1);
-				strcpy(t-1, buf);
+				strlcpy(t-1, buf, remaining);
 				t+=strlen(t)+1;
 			}else
 			{
 				append_allow("/usr", 0);
 				append_allow("/System/Library", 0);
 				append_allow("/Library", 0);
-				append_allow("/Developer", 0);
+				append_allow(Tcl_GetVar(interp, "macports::developer_dir", TCL_GLOBAL_ONLY), 0);
 			}
 		}else
 			append_allow("/", 0);
@@ -269,42 +291,40 @@
 {
 	char * port=0;
 	size_t len=1;
-	char resolution; 
+	char resolution='!';
+		
+	Tcl_SetVar(interp, "path", path, 0);
+	Tcl_Eval(interp, "registry::file_registered $path");
+	port=strdup(Tcl_GetStringResult(interp));
+	if (!port) {
+		ui_warn("dep_check: memory allocation failed");
+	    return;
+	}
+	Tcl_UnsetVar(interp, "path", 0);
 	
-	/* If there aren't deps then allow anything. (Useful for extract) */
-	if(!depends)
-		resolution='+';
-	else
+	if(*port!='0'||port[1])
 	{
-		resolution='!';
-		
-		Tcl_SetVar(interp, "path", path, 0);
-		Tcl_Eval(interp, "registry::file_registered $path");
-		port=strdup(Tcl_GetStringResult(interp));
-		Tcl_UnsetVar(interp, "path", 0);
+		char * t;
 	
-		if(*port!='0'||port[1])
+		t=depends;
+		for(;*t;t+=strlen(t)+1)
 		{
-			char * t;
-		
-			t=depends;
-			for(;*t;t+=strlen(t)+1)
+			if(!strcmp(t, port))
 			{
-				if(!strcmp(t, port))
-				{
-					resolution='+';
-					break;
-				}
+				resolution='+';
+				break;
 			}
-		}else if(*port=='0'&&!port[1])
-			strcpy(port, "*unknown*");
+		}
 	}
 	
-	if(resolution!='+')
-		ui_info("trace: access denied to %s (%s)", path, port);
+	if(resolution!='+') {
+	    if(*port=='0'&&!port[1])
+		    ui_info("trace: access denied to %s (*unknown*)", path);
+		else
+		    ui_info("trace: access denied to %s (%s)", path, port);
+    }
 
-	if(port)
-		free(port);
+	free(port);
 	
 	if(send(sock, &len, sizeof(len), 0)==-1)
 		ui_warn("tracelib send failed");
@@ -376,7 +396,7 @@
 
 	
 	sun.sun_family=AF_UNIX;
-	strcpy(sun.sun_path, name);
+	strlcpy(sun.sun_path, name, sizeof(sun.sun_path));
 	if(bind(sock, (struct sockaddr*)&sun, sizeof(sun))==-1)
 	{
 		Tcl_SetResult(interp, "Cannot bind socket", TCL_STATIC);
@@ -465,7 +485,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 +509,7 @@
 	enable_fence=0;
 	#undef safe_free
 	cleanuping=0;
+	Tcl_Eval(interp, "registry::close_file_map");
 	return TCL_OK;
 }
 
@@ -519,8 +540,12 @@
 	d=Tcl_GetString(objv[2]);
 	l=strlen(d);
 	depends=malloc(l+2);
+	if (!depends) {
+	    Tcl_SetResult(interp, "memory allocation failed", TCL_STATIC);
+	    return TCL_ERROR;
+	}
 	depends[l+1]=0;
-	strcpy(depends, d);
+	strlcpy(depends, d, l+2);
 	for(t=depends;*t;++t)
 		if(*t==' ')
 			*t++=0;

Modified: branches/new-help-system/base/src/pextlib1.0/tty.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/tty.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/tty.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -45,80 +45,84 @@
 
 #include <tcl.h>
 
-int IsattyCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+#include "tty.h"
+
+int
+IsattyCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
-        Tcl_Obj *tcl_result;
-        Tcl_Channel chan;
-        int dir;
-        int fd;
-        int rval;
+    Tcl_Obj *tcl_result;
+    Tcl_Channel chan;
+    int dir;
+    int fd;
+    int rval;
 
-        if (objc != 2) {
-            Tcl_WrongNumArgs(interp, 1, objv, "channel");
-            return TCL_ERROR;
-        }
+    if (objc != 2) {
+        Tcl_WrongNumArgs(interp, 1, objv, "channel");
+        return TCL_ERROR;
+    }
 
-        chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), &dir);
-        if (chan == NULL) {
-            Tcl_SetResult(interp, "no such channel", TCL_STATIC);
-            return TCL_ERROR;
-        }
+    chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), &dir);
+    if (chan == NULL) {
+        Tcl_SetResult(interp, "no such channel", TCL_STATIC);
+        return TCL_ERROR;
+    }
 
-        if (Tcl_GetChannelHandle(chan,
-                dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
-                (ClientData*) &fd) == TCL_ERROR) {
-            return TCL_ERROR;
-        }
+    if (Tcl_GetChannelHandle(chan,
+            dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
+            (ClientData*) &fd) == TCL_ERROR) {
+        return TCL_ERROR;
+    }
 
-        rval = isatty(fd);
+    rval = isatty(fd);
 
-        tcl_result = Tcl_NewIntObj(rval);
-        Tcl_SetObjResult(interp, tcl_result);
+    tcl_result = Tcl_NewIntObj(rval);
+    Tcl_SetObjResult(interp, tcl_result);
 
-        return TCL_OK;
+    return TCL_OK;
 }
 
-int TermGetSizeCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+int
+TermGetSizeCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
-        Tcl_Obj *tcl_result;
-        Tcl_Channel chan;
-        int dir;
-        int fd;
-        Tcl_Obj *robjv[2];
-        struct winsize ws = {0, 0, 0, 0};
+    Tcl_Obj *tcl_result;
+    Tcl_Channel chan;
+    int dir;
+    int fd;
+    Tcl_Obj *robjv[2];
+    struct winsize ws = {0, 0, 0, 0};
 
-        if (objc != 2) {
-                Tcl_WrongNumArgs(interp, 1, objv, "channel");
-                return TCL_ERROR;
-        }
+    if (objc != 2) {
+        Tcl_WrongNumArgs(interp, 1, objv, "channel");
+        return TCL_ERROR;
+    }
 
-        chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), &dir);
-        if (chan == NULL) {
-            Tcl_SetResult(interp, "no such channel", TCL_STATIC);
-            return TCL_ERROR;
-        }
+    chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), &dir);
+    if (chan == NULL) {
+        Tcl_SetResult(interp, "no such channel", TCL_STATIC);
+        return TCL_ERROR;
+    }
 
-        if (Tcl_GetChannelHandle(chan,
-                dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
-                (ClientData*) &fd) == TCL_ERROR) {
-            return TCL_ERROR;
-        }
+    if (Tcl_GetChannelHandle(chan,
+            dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
+            (ClientData*) &fd) == TCL_ERROR) {
+        return TCL_ERROR;
+    }
 
-        if (!isatty(fd)) {
-            Tcl_SetResult(interp, "channel is not connected to a tty", TCL_STATIC);
-            return TCL_ERROR;
-        }
+    if (!isatty(fd)) {
+        Tcl_SetResult(interp, "channel is not connected to a tty", TCL_STATIC);
+        return TCL_ERROR;
+    }
 
-        if (ioctl(fd, TIOCGWINSZ, &ws) == -1) {
-            Tcl_SetResult(interp, "ioctl failed", TCL_STATIC);
-            return TCL_ERROR;
-        }
+    if (ioctl(fd, TIOCGWINSZ, &ws) == -1) {
+        Tcl_SetResult(interp, "ioctl failed", TCL_STATIC);
+        return TCL_ERROR;
+    }
 
-        robjv[0] = Tcl_NewIntObj(ws.ws_row);
-        robjv[1] = Tcl_NewIntObj(ws.ws_col);
+    robjv[0] = Tcl_NewIntObj(ws.ws_row);
+    robjv[1] = Tcl_NewIntObj(ws.ws_col);
 
-        tcl_result = Tcl_NewListObj(2, robjv);
-        Tcl_SetObjResult(interp, tcl_result);
+    tcl_result = Tcl_NewListObj(2, robjv);
+    Tcl_SetObjResult(interp, tcl_result);
 
-        return TCL_OK;
+    return TCL_OK;
 }

Modified: branches/new-help-system/base/src/pextlib1.0/tty.h
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/tty.h	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/tty.h	2009-06-15 03:11:26 UTC (rev 52362)
@@ -36,8 +36,6 @@
 #ifndef _PEXTLIB_TTY_H
 #define _PEXTLIB_TTY_H
 
-#include <tcl.h>
-
 /**
  * A wrapper for isatty(3)
  */

Modified: branches/new-help-system/base/src/pextlib1.0/uid.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/uid.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/uid.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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
 	
@@ -276,7 +274,43 @@
 }
 
 /*
+	uname_to_gid
+	
+	synopsis: uname_to_gid name
+	this function takes a *user* name
+*/
+int uname_to_gidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+	struct passwd *pwent;
+	char* name = NULL;
+	
+	/* Check the arg count */
+	if (objc != 2) {
+		Tcl_WrongNumArgs(interp, 1, objv, "name");
+		return TCL_ERROR;
+	}
+	
+	/* Get the  name */
+	name = Tcl_GetString(objv[1]);
+	if (name == NULL || !*name)
+		return TCL_ERROR;
+	
+	/* Map the name --> user gid */
+	pwent = getpwnam(name);
+
+	if (pwent == NULL)
+		Tcl_SetObjResult(interp, Tcl_NewIntObj(-1));
+	else
+		Tcl_SetObjResult(interp, Tcl_NewIntObj(pwent->pw_gid)); 
+
+	return TCL_OK;
+}
+
+/*
     name_to_gid
+
+	synopsis: name_to_gid name
+    this function takes a *group* name
 */
 int name_to_gidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {

Modified: branches/new-help-system/base/src/pextlib1.0/uid.h
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/uid.h	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/uid.h	2009-06-15 03:11:26 UTC (rev 52362)
@@ -45,6 +45,7 @@
 int setegidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int name_to_uidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int uid_to_nameCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
+int uname_to_gidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int name_to_gidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int gid_to_nameCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 

Modified: branches/new-help-system/base/src/pextlib1.0/vercomp.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/vercomp.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/vercomp.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pextlib1.0/xinstall.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/xinstall.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pextlib1.0/xinstall.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -78,6 +78,8 @@
 #define _PATH_DEVNULL	"/dev/null"
 #endif
 
+#include "xinstall.h"
+
 #ifndef MAXBSIZE
 #define MAXBSIZE 65536
 #endif

Copied: branches/new-help-system/base/src/pkg_mkindex.sh.in (from rev 52361, trunk/base/src/pkg_mkindex.sh.in)
===================================================================
--- branches/new-help-system/base/src/pkg_mkindex.sh.in	                        (rev 0)
+++ branches/new-help-system/base/src/pkg_mkindex.sh.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/pkg_mkindex.tcl
===================================================================
--- branches/new-help-system/base/src/pkg_mkindex.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/pkg_mkindex.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/port/Makefile
===================================================================
--- branches/new-help-system/base/src/port/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/port/port-help.tcl
===================================================================
--- branches/new-help-system/base/src/port/port-help.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port/port-help.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -139,7 +139,7 @@
 to be included in the resulting report. Multiple fields may be specified, in
 which case all will be included.  If no fields are specified, a useful default
 set will be used.  The other options which do not correspond to fields are:
-   --depends   An abbreviation for all three depends_* fields
+   --depends   An abbreviation for all depends_* fields
    --index     Do not read the Portfile, instead rely solely on the index
                information. Note this option will prevent the information
                reported from reflecting the effects of any variants specified.

Modified: branches/new-help-system/base/src/port/port.tcl
===================================================================
--- branches/new-help-system/base/src/port/port.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port/port.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -94,9 +94,9 @@
 
 Additional pseudo-portnames start with...
 variants:, variant:, description:, depends:, depends_lib:, depends_run:,
-depends_build:, portdir:, homepage:, epoch:, platforms:, platform:, name:,
-long_description:, maintainers:, maintainer:, categories:, category:, version:,
-and revision:.
+depends_build:, depends_fetch:, depends_extract:, portdir:, homepage:, epoch:,
+platforms:, platform:, name:, long_description:, maintainers:, maintainer:,
+categories:, category:, version:, and revision:.
 These each select a set of ports based on a regex search of metadata
 about the ports. In all such cases, a standard regex pattern following
 the colon will be used to select the set of ports to which the
@@ -935,6 +935,8 @@
         ^depends_lib:       -
         ^depends_build:     -
         ^depends_run:       -
+        ^depends_extract:   -
+        ^depends_fetch:     -
         ^revision:          { # Handle special port selectors
             advance
 
@@ -948,7 +950,7 @@
             set el 1
         }
 
-        ^depends:           { # A port selector shorthand for depends_lib, depends_build or depends_run
+        ^depends:           { # A port selector shorthand for depends_{lib,build,run,fetch,extract}
             advance
 
             # Break up the token, because older Tcl switch doesn't support -matchvar
@@ -957,6 +959,8 @@
             add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_lib"]
             add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_build"]
             add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_run"]
+            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_extract"]
+            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_fetch"]
 
             set el 1
         }
@@ -1447,18 +1451,23 @@
         # allow us to, say, split off the prefix on libs)
         array set list_map "
             categories      1
+            depends_fetch   1
+            depends_extract 1
             depends_build   1
             depends_lib     1
             depends_run     1
             maintainers     1
             platforms       1
             variants        1
+            conflicts       1
         "
 
         # Label map for pretty printing
         array set pretty_label {
             heading     ""
             variants    Variants
+            depends_fetch "Fetch Dependencies"
+            depends_extract "Extract Dependencies"
             depends_build "Build Dependencies"
             depends_run "Runtime Dependencies"
             depends_lib "Library Dependencies"
@@ -1469,12 +1478,15 @@
             platforms   Platforms
             maintainers Maintainers
             license     License
+            conflicts   "Conflicts with"
         }
 
         # Wrap-length map for pretty printing
         array set pretty_wrap {
             heading 0
             variants 22
+            depends_fetch 22
+            depends_extract 22
             depends_build 22
             depends_run 22
             depends_lib 22
@@ -1483,12 +1495,15 @@
             homepage 22
             platforms 22
             license 22
+            conflicts 22
             maintainers 22
         }
 
         # Interpret a convenient field abbreviation
         if {[info exists options(ports_info_depends)] && $options(ports_info_depends) == "yes"} {
             array unset options ports_info_depends
+            set options(ports_info_depends_fetch) yes
+            set options(ports_info_depends_extract) yes
             set options(ports_info_depends_build) yes
             set options(ports_info_depends_lib) yes
             set options(ports_info_depends_run) yes
@@ -1535,8 +1550,10 @@
             set opts_todo {ports_info_heading ports_info_variants 
                 ports_info_skip_line
                 ports_info_long_description ports_info_homepage 
-                ports_info_skip_line ports_info_depends_build
+                ports_info_skip_line ports_info_depends_fetch
+                ports_info_depends_extract ports_info_depends_build
                 ports_info_depends_lib ports_info_depends_run
+                ports_info_conflicts
                 ports_info_platforms ports_info_license
                 ports_info_maintainers
             }
@@ -1804,6 +1821,7 @@
             puts "$file does not exist."
         }
     }
+    registry::close_file_map
     
     return 0
 }
@@ -1815,10 +1833,14 @@
         return 1
     }
     foreachport $portlist {
-        if { [catch {portimage::activate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
-            global errorInfo
-            ui_debug "$errorInfo"
-            break_softcontinue "port activate failed: $result" 1 status
+        if {![macports::global_option_isset ports_dryrun]} {
+            if { [catch {portimage::activate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
+                global errorInfo
+                ui_debug "$errorInfo"
+                break_softcontinue "port activate failed: $result" 1 status
+            }
+        } else {
+            ui_msg "Skipping activate $portname (dry run)"
         }
     }
     
@@ -1832,10 +1854,14 @@
         return 1
     }
     foreachport $portlist {
-        if { [catch {portimage::deactivate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
-            global errorInfo
-            ui_debug "$errorInfo"
-            break_softcontinue "port deactivate failed: $result" 1 status
+        if {![macports::global_option_isset ports_dryrun]} {
+            if { [catch {portimage::deactivate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
+                global errorInfo
+                ui_debug "$errorInfo"
+                break_softcontinue "port deactivate failed: $result" 1 status
+            }
+        } else {
+            ui_msg "Skipping deactivate $portname (dry run)"
         }
     }
     
@@ -2085,16 +2111,6 @@
         if { [catch {portuninstall::uninstall $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
             global errorInfo
             ui_debug "$errorInfo"
-
-            # start gsoc08-privileges
-            if { [string first "permission denied" $result] != -1 } {
-                set result "port requires root privileges for this action and needs you to execute 'sudo port uninstall $portname' to continue."
-                #ui_msg [exec sudo port uninstall $portname]
-                # The above line is what should be here to let the user simply enter his/her password to uninstall as root.
-                # However, for some as yet unknown reason, executing it here will not work.
-            }
-            # end gsoc08-privileges
-
             break_softcontinue "port uninstall failed: $result" 1 status
         }
     }
@@ -2316,6 +2332,7 @@
             }
         }
     }
+    registry::close_file_map
 
     return $status
 }
@@ -2451,6 +2468,8 @@
 
     if {[info exists options(ports_search_depends)] && $options(ports_search_depends) == "yes"} {
         array unset options ports_search_depends
+        set options(ports_search_depends_fetch) yes
+        set options(ports_search_depends_extract) yes
         set options(ports_search_depends_build) yes
         set options(ports_search_depends_lib) yes
         set options(ports_search_depends_run) yes
@@ -2864,25 +2883,6 @@
 
         mportclose $workername
         
-        # start gsoc08-privileges
-        if { [geteuid] != 0 && $result == 2} {
-            # mportexec will return an error result code 2 if eval_targets fails due to insufficient privileges.
-
-            set portbinary "${macports::prefix}/bin/port"
-
-            ui_info "Attempting port action with 'sudo port': 'sudo $portbinary $target $portname'."
-            set result 0
-            if {[catch {set sudomsgs [exec sudo $portbinary $target $portname]} sudomsgs]} {
-                global errorInfo
-                ui_debug "$errorInfo"
-                break_softcontinue "Unable to execute port: $errorInfo" 1 status
-            }
-
-            ui_msg $sudomsgs
-            ui_debug "'sudo $portbinary $target $portname' has completed."
-        }
-        # end gsoc08-privileges
-        
         # Process any error that wasn't thrown and handled already
         if {$result} {
             break_softcontinue "Status $result encountered during processing." 1 status
@@ -3076,12 +3076,14 @@
 array set cmd_opts_array {
     edit        {{editor 1}}
     ed          {{editor 1}}
-    info        {category categories depends_build depends_lib depends_run
+    info        {category categories depends_fetch depends_extract
+                 depends_build depends_lib depends_run
                  depends description epoch fullname heading homepage index license
                  line long_description
                  maintainer maintainers name platform platforms portdir pretty
                  revision variant variants version}
-    search      {case-sensitive category categories depends_build depends_lib depends_run
+    search      {case-sensitive category categories depends_fetch
+                 depends_extract depends_build depends_lib depends_run
                  depends description epoch exact glob homepage line
                  long_description maintainer maintainers name platform
                  platforms portdir regex revision variant variants version}

Modified: branches/new-help-system/base/src/port/portindex.tcl
===================================================================
--- branches/new-help-system/base/src/port/portindex.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port/portindex.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -60,13 +60,15 @@
             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
             }
         }
 
-        set keepkeys {categories depends_build depends_lib depends_run description epoch homepage long_description maintainers name platforms revision variants version portdir}
+        set keepkeys {categories depends_fetch depends_extract depends_build depends_lib depends_run description epoch homepage long_description maintainers name platforms revision variants version portdir}
         foreach availkey [array names portinfo] {
             if {[lsearch -exact ${keepkeys} $availkey] == -1} {
                 unset portinfo($availkey)


Property changes on: branches/new-help-system/base/src/port1.0
___________________________________________________________________
Modified: svn:ignore
   - port_autoconf.tcl

   + port_autoconf.tcl
pkgIndex.tcl


Modified: branches/new-help-system/base/src/port1.0/Makefile
===================================================================
--- branches/new-help-system/base/src/port1.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -31,15 +31,38 @@
 package provide port 1.0
 
 namespace eval portutil::autoconf {
+	variable bzip2_path "@BZIP2@"
+	variable cp_path "@CP@"
+	variable cpio_path "@CPIO@"
+	variable diff_path "@DIFF@"
+	variable ditto_path "@DITTO@"
+	variable dscl_path "@DSCL@"
+	variable file_path "@FILE@"
 	variable cvs_path "@CVS@"
 	variable svn_path "@SVN@"
 	variable git_path "@GIT@"
+	variable hg_path "@HG@"
+	variable gzip_path "@GZIP@"
+	variable lipo_path "@LIPO@"
+	variable nice_path "@NICE@"
+	variable patch_path "@PATCH@"
+	variable rmdir_path "@RMDIR@"
 	variable rsync_path "@RSYNC@"
+	variable unzip_path "@UNZIP@"
+	variable zip_path "@ZIP@"
+	variable lsbom_path "@LSBOM@"
+	variable make_path "@MAKE@"
+	variable gnumake_path "@GNUMAKE@"
+	variable bsdmake_path "@BSDMAKE@"
+	variable mkbom_path "@MKBOM@"
 	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/new-help-system/base/src/port1.0/portactivate.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portactivate.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portactivate.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -52,8 +52,8 @@
 set_ui_prefix
 
 proc portactivate::activate_main {args} {
-    global env portname portversion portrevision portvariants user_options portnotes
-    registry_activate $portname ${portversion}_${portrevision}${portvariants} [array get user_options]
+    global env name version revision portvariants user_options portnotes
+    registry_activate $name ${version}_${revision}${portvariants} [array get user_options]
 
     # Display notes at the end of the activation phase.
     if {[info exists portnotes] && $portnotes ne {}} {

Modified: branches/new-help-system/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portbuild.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portbuild.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -62,38 +62,35 @@
 
 proc portbuild::build_getmaketype {args} {
     if {![exists build.type]} {
-        return make
+        return [findBinary make $portutil::autoconf::make_path]
     }
     switch -exact -- [option build.type] {
         bsd {
             if {[option os.platform] == "darwin"} {
-                return bsdmake
+                return [findBinary bsdmake $portutil::autoconf::bsdmake_path]
             } elseif {[option os.platform] == "freebsd"} {
-                return make
+                return [binaryInPath make]
             } else {
-                return pmake
+                return [binaryInPath pmake]
             }
         }
         gnu {
             if {[option os.platform] == "darwin"} {
-                return gnumake
+                return [findBinary gnumake $portutil::autoconf::gnumake_path]
             } elseif {[option os.platform] == "linux"} {
-                return make
+                return [binaryInPath make]
             } else {
-                return gmake
+                return [binaryInPath gmake]
             }
         }
         pbx {
-            set pbxbuild "pbxbuild"
-            set xcodebuild "xcodebuild"
-
             if {[option os.platform] != "darwin"} {
                 return -code error "[format [msgcat::mc "This port requires 'pbxbuild/xcodebuild', which is not available on %s."] [option os.platform]]"
             }
 
-            if {[catch {set xcodebuild [binaryInPath $xcodebuild]}] == 0} {
+            if {[catch {set xcodebuild [binaryInPath xcodebuild]}] == 0} {
                 return $xcodebuild
-            } elseif {[catch {set pbxbuild [binaryInPath $pbxbuild]}] == 0} {
+            } elseif {[catch {set pbxbuild [binaryInPath pbxbuild]}] == 0} {
                 return $pbxbuild
             } else {
                 return -code error "Neither pbxbuild nor xcodebuild were found on this system!"
@@ -101,7 +98,7 @@
         }
         default {
             ui_warn "[format [msgcat::mc "Unknown build.type %s, using 'gnumake'"] [option build.type]]"
-            return gnumake
+            return [findBinary gnumake $portutil::autoconf::gnumake_path]
         }
     }
 }
@@ -114,7 +111,7 @@
     if {![string is integer -strict $nice] || $nice <= 0} {
         return ""
     }
-    return "nice -n $nice "
+    return "[findBinary nice $portutil::autoconf::nice_path] -n $nice "
 }
 
 proc portbuild::build_getmakejobs {args} {
@@ -131,7 +128,11 @@
     set jobs [option build.jobs]
     # if set to '0', use the number of cores for the number of jobs
     if {$jobs == 0} {
-        set jobs [exec "/usr/sbin/sysctl" "-n" "hw.ncpu"]
+        if {[catch {set jobs [exec "/usr/sbin/sysctl" "-n" "hw.availcpu"]}]} {
+            set jobs 2
+            ui_warn "failed to determine the number of available CPUs (probably not supported on this platform)"
+            ui_warn "defaulting to $jobs jobs, consider setting buildmakejobs to a nonzero value in macports.conf"
+        }
     }
     if {![string is integer -strict $jobs] || $jobs <= 1} {
         return ""
@@ -140,17 +141,9 @@
 }
 
 proc portbuild::build_start {args} {
-    global UI_PREFIX build.asroot
+    global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option portname]]"
-
-    # start gsoc08-privileges
-    if { [tbool build.asroot] } {
-    # if port is marked as needing root
-        elevateToRoot "build"
-    }
-    # end gsoc08-privileges
-
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option name]]"
 }
 
 proc portbuild::build_main {args} {

Modified: branches/new-help-system/base/src/port1.0/portchecksum.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portchecksum.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portchecksum.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -179,7 +179,7 @@
 proc portchecksum::checksum_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying checksum(s) for %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying checksum(s) for %s"] [option name]]"
 }
 
 # checksum_main

Modified: branches/new-help-system/base/src/port1.0/portclean.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portclean.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portclean.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -52,7 +52,7 @@
 proc portclean::clean_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option name]]"
 }
 
 proc portclean::clean_main {args} {
@@ -62,25 +62,24 @@
 
     if {[info exists ports_clean_all] && $ports_clean_all == "yes" || \
         [info exists ports_clean_dist] && $ports_clean_dist == "yes"} {
-        ui_info "$UI_PREFIX [format [msgcat::mc "Removing distfiles for %s"] [option portname]]"
+        ui_info "$UI_PREFIX [format [msgcat::mc "Removing distfiles for %s"] [option name]]"
         clean_dist
     }
     if {[info exists ports_clean_all] && $ports_clean_all == "yes" || \
         [info exists ports_clean_archive] && $ports_clean_archive == "yes"} {
-        ui_info "$UI_PREFIX [format [msgcat::mc "Removing archives for %s"] [option portname]]"
+        ui_info "$UI_PREFIX [format [msgcat::mc "Removing archives for %s"] [option name]]"
         clean_archive
     }
     if {[info exists ports_clean_all] && $ports_clean_all == "yes" || \
         [info exists ports_clean_work] && $ports_clean_work == "yes" || \
-        (!([info exists ports_clean_dist] && $ports_clean_dist == "yes") && \
-         !([info exists ports_clean_archive] && $ports_clean_archive == "yes"))} {
-         ui_info "$UI_PREFIX [format [msgcat::mc "Removing build directory for %s"] [option portname]]"
+        (!([info exists ports_clean_archive] && $ports_clean_archive == "yes"))} {
+         ui_info "$UI_PREFIX [format [msgcat::mc "Removing build directory for %s"] [option name]]"
          clean_work
     }
 
     # start gsoc-08 privileges
     if {[info exists usealtworkpath] && $usealtworkpath == "yes"} {
-        ui_info "$UI_PREFIX [format [msgcat::mc "Removing alt source directory for %s"] [option portname]]"
+        ui_info "$UI_PREFIX [format [msgcat::mc "Removing alt source directory for %s"] [option name]]"
         clean_altsource
     }
     # end gsoc-08 privileges
@@ -111,7 +110,7 @@
 # This is crude, but works.
 #
 proc portclean::clean_dist {args} {
-    global ports_force portname distpath dist_subdir distfiles
+    global ports_force name distpath dist_subdir distfiles
 
     # remove known distfiles for sure (if they exist)
     set count 0
@@ -139,7 +138,7 @@
     # next remove dist_subdir if only needed for this port,
     # or if user forces us to
     set dirlist [list]
-    if {($dist_subdir != $portname)} {
+    if {($dist_subdir != $name)} {
         if {[info exists dist_subdir]} {
             set distfullpath [file join $distpath $dist_subdir]
             if {!([info exists ports_force] && $ports_force == "yes")
@@ -148,13 +147,13 @@
                 ui_warn [format [msgcat::mc "Distfiles directory '%s' may contain distfiles needed for other ports, use the -f flag to force removal" ] [file join $distpath $dist_subdir]]
             } else {
                 lappend dirlist $dist_subdir
-                lappend dirlist $portname
+                lappend dirlist $name
             }
         } else {
-            lappend dirlist $portname
+            lappend dirlist $name
         }
     } else {
-        lappend dirlist $portname
+        lappend dirlist $name
     }
     # loop through directories
     set count 0
@@ -200,7 +199,7 @@
 }
 
 proc portclean::clean_archive {args} {
-    global workpath portarchivepath portname portversion ports_version_glob
+    global workpath portarchivepath name version ports_version_glob
 
     # Define archive destination directory and target filename
     if {$portarchivepath ne $workpath && $portarchivepath ne ""} {
@@ -210,7 +209,7 @@
     if {[info exists ports_version_glob]} {
         # Match all possible archive variatns that match the version
         # glob specified by the user for this OS.
-        set fileglob "$portname-[option ports_version_glob]*.[option os.arch].*"
+        set fileglob "$name-[option ports_version_glob]*.[option os.arch].*"
     } else {
         # Match all possible archive variants for the current version on
         # this OS. If you want to delete previous versions, use the
@@ -219,7 +218,7 @@
         # We do this because if we don't, then ports that match the
         # first part of the name (e.g. trying to remove foo-*, it will
         # pick up anything foo-bar-* as well, which is undesirable).
-        set fileglob "$portname-$portversion*.[option os.arch].*"
+        set fileglob "$name-$version*.[option os.arch].*"
     }
 
     # Remove the archive files
@@ -229,7 +228,7 @@
             set file [file tail $path]
             # Make sure file is truly a port archive file, and not
             # and accidental match with some other file that might exist.
-            if {[regexp "^$portname-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\][option os.arch]\[\.\]\[a-z\]+\$" $file]} {
+            if {[regexp "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\][option os.arch]\[\.\]\[a-z\]+\$" $file]} {
                 if {[file isfile $path]} {
                     ui_debug "Removing archive: $path"
                     if {[catch {delete $path} result]} {

Modified: branches/new-help-system/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portconfigure.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portconfigure.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -46,7 +46,7 @@
 commands configure autoreconf automake autoconf xmkmf
 # defaults
 default configure.env       ""
-default configure.pre_args  {--prefix=${prefix}}
+default configure.pre_args  {[portconfigure::configure_get_pre_args]}
 default configure.cmd       ./configure
 default configure.dir       {${worksrcpath}}
 default autoreconf.dir      {${worksrcpath}}
@@ -65,18 +65,12 @@
 proc portconfigure::set_configure_type {option action args} {
     if {[string equal ${action} "set"] && [tbool args]} {
         switch $option {
-            use_autoreconf {
-                depends_build-append bin:autoreconf:autoconf
-            }
-            use_automake {
-                depends_build-append bin:automake:automake
-            }
-            use_autoconf {
-                depends_build-append bin:autoconf:autoconf
-            }
             use_xmkmf {
-                depends_build-append path:bin/xmkmf:imake
+                depends_build-append port:imake
             }
+            default {
+                depends_build-append port:autoconf port:automake port:libtool
+            }
         }
     }
 }
@@ -94,10 +88,10 @@
 default configure.optflags  {-O2}
 # compiler flags section
 default configure.cflags    {[portconfigure::configure_get_cflags]}
-default configure.cppflags  {"-I${prefix}/include"}
+default configure.cppflags  {[portconfigure::configure_get_cppflags]}
 default configure.cxxflags  {[portconfigure::configure_get_cflags]}
 default configure.objcflags {[portconfigure::configure_get_cflags]}
-default configure.ldflags   {"-L${prefix}/lib"}
+default configure.ldflags   {[portconfigure::configure_get_ldflags]}
 default configure.libs      {}
 default configure.fflags    {[portconfigure::configure_get_cflags]}
 default configure.f90flags  {[portconfigure::configure_get_cflags]}
@@ -108,6 +102,7 @@
 proc portconfigure::configure_get_cflags {args} {
     global configure.optflags
     global configure.m32 configure.m64 configure.march configure.mtune
+    global configure.universal_cflags
     set flags "${configure.optflags}"
     if {[tbool configure.m64]} {
         set flags "-m64 ${flags}"
@@ -120,9 +115,30 @@
     if {[info exists configure.mtune] && ${configure.mtune} != {}} {
         set flags "${flags} -mtune=${configure.mtune}"
     }
+    if {[variant_isset universal] && ${configure.universal_cflags} != ""} {
+        set flags "${flags} ${configure.universal_cflags}"
+    }
     return $flags
 }
 
+proc portconfigure::configure_get_cppflags {args} {
+    global prefix configure.universal_cppflags
+    set flags "-I${prefix}/include"
+    if {[variant_isset universal] && ${configure.universal_cppflags} != ""} {
+        set flags "${flags} ${configure.universal_cppflags}"
+    }
+    return $flags
+}
+
+proc portconfigure::configure_get_ldflags {args} {
+    global prefix configure.universal_ldflags
+    set flags "-L${prefix}/lib"
+    if {[variant_isset universal] && ${configure.universal_ldflags} != ""} {
+        set flags "${flags} ${configure.universal_ldflags}"
+    }
+    return $flags
+}
+
 # tools section
 options configure.perl configure.python configure.ruby configure.install configure.awk configure.bison configure.pkg_config configure.pkg_config_path
 default configure.perl              {}
@@ -134,18 +150,9 @@
 default configure.pkg_config        {}
 default configure.pkg_config_path   {}
 
-# backwards compatibility for hardcoded ports
-if {[file exists /Developer/SDKs/MacOSX10.5.sdk]} {
-    set sysroot "/Developer/SDKs/MacOSX10.5.sdk"
-} else {
-    set sysroot "/Developer/SDKs/MacOSX10.4u.sdk"
-}
-
-options configure.universal_target configure.universal_sysroot configure.universal_archs configure.universal_args configure.universal_cflags configure.universal_cppflags configure.universal_cxxflags configure.universal_ldflags
-default configure.universal_target      {${universal_target}}
-default configure.universal_sysroot     {${universal_sysroot}}
+options configure.universal_archs configure.universal_args configure.universal_cflags configure.universal_cppflags configure.universal_cxxflags configure.universal_ldflags
 default configure.universal_archs       {${universal_archs}}
-default configure.universal_args        {[portconfigure::configure_get_universal_args]}
+default configure.universal_args        {--disable-dependency-tracking}
 default configure.universal_cflags      {[portconfigure::configure_get_universal_cflags]}
 default configure.universal_cppflags    {[portconfigure::configure_get_universal_cppflags]}
 default configure.universal_cxxflags    {[portconfigure::configure_get_universal_cflags]}
@@ -172,7 +179,7 @@
     global UI_PREFIX
     global configure.compiler
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option name]]"
 
     set name ""
     switch -exact ${configure.compiler} {
@@ -195,90 +202,60 @@
         default { return -code error "Invalid value for configure.compiler" }
     }
     ui_debug "Using compiler '$name'"
-    
-    # start gsoc08-privileges
-    if { [tbool configure.asroot] } {
-        # if port is marked as needing root
-        elevateToRoot "configure"
-    }
-    # end gsoc08-privileges
 }
 
-# internal function to determine canonical system name for configure
-proc portconfigure::configure_get_universal_system_name {args} {
-    global configure.universal_target configure.universal_archs
-    set arch "unknown"
-    switch -- ${configure.universal_archs} {
-        "ppc"  { set arch "powerpc" }
-        "i386"  { set arch "i686" }
-        "ppc64"  { set arch "powerpc" }
-        "x86_64"  { set arch "i686" }
+proc portconfigure::configure_get_pre_args {args} {
+    global prefix configure.universal_args
+    set result "--prefix=${prefix}"
+    if {[variant_isset universal] && ${configure.universal_args} != ""} {
+        set result "$result ${configure.universal_args}"
     }
-    switch -- ${configure.universal_target} {
-        "10.1"  { return "powerpc-apple-darwin5" }
-                # /Developer/SDKs/MacOSX10.1.5.sdk
-        "10.2"  { return "powerpc-apple-darwin6" }
-                # /Developer/SDKs/MacOSX10.2.8.sdk
-        "10.3"  { return "powerpc-apple-darwin7" }
-                # /Developer/SDKs/MacOSX10.3.9.sdk
-        "10.4"  { return "${arch}-apple-darwin8" }
-        "10.5"  { return "${arch}-apple-darwin9" }
-    }
-    return ""
+    return $result
 }
 
-# internal function to determine the universal args for configure.cmd
-proc portconfigure::configure_get_universal_args {args} {
-    global configure.universal_archs
-    set system [configure_get_universal_system_name]
-    set params "--disable-dependency-tracking"
-    if {[llength ${configure.universal_archs}] == 1 &&
-        [info exists system] && $system != ""} {
-        set params "$params --host=${system} --target=${system}"
-    }
-    return $params
-}
-
 # internal function to determine the "-arch xy" flags for the compiler
 proc portconfigure::configure_get_universal_archflags {args} {
     global configure.universal_archs
     set flags ""
     foreach arch ${configure.universal_archs} {
-        set flags "$flags -arch $arch"
+        if {$flags == ""} {
+            set flags "-arch $arch"
+        } else {
+            set flags "$flags -arch $arch"
+        }
     }
     return $flags
 }
 
 # internal function to determine the CPPFLAGS for the compiler
 proc portconfigure::configure_get_universal_cppflags {args} {
-    global configure.universal_sysroot
+    global os.arch os.major developer_dir
     set flags ""
     # include sysroot in CPPFLAGS too (twice), for the benefit of autoconf
-    if {[info exists configure.universal_sysroot]} {
-        set flags "-isysroot ${configure.universal_sysroot}"
+    if {${os.arch} == "powerpc" && ${os.major} == "8"} {
+        set flags "-isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk"
     }
     return $flags
 }
 
 # internal function to determine the CFLAGS for the compiler
 proc portconfigure::configure_get_universal_cflags {args} {
-    global configure.universal_sysroot configure.universal_target
+    global os.arch os.major developer_dir
     set flags [configure_get_universal_archflags]
     # these flags should be valid for C/C++ and similar compiler frontends
-    if {[info exists configure.universal_sysroot]} {
-        set flags "-isysroot ${configure.universal_sysroot} ${flags}"
+    if {${os.arch} == "powerpc" && ${os.major} == "8"} {
+        set flags "-isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk ${flags}"
     }
     return $flags
 }
 
 # internal function to determine the LDFLAGS for the compiler
 proc portconfigure::configure_get_universal_ldflags {args} {
-    global configure.universal_sysroot configure.universal_target
-    global os.arch
+    global os.arch os.major developer_dir
     set flags [configure_get_universal_archflags]
     # works around linking without using the CFLAGS, outside of automake
-    if {${os.arch} == "powerpc"} {
-        set flags "-Wl,-syslibroot,${configure.universal_sysroot} ${flags}"
+    if {${os.arch} == "powerpc" && ${os.major} == "8"} {
+        set flags "-Wl,-syslibroot,${developer_dir}/SDKs/MacOSX10.4u.sdk ${flags}"
     }
     return $flags
 }
@@ -299,7 +276,7 @@
 
 # internal function to find correct compilers
 proc portconfigure::configure_get_compiler {type} {
-    global configure.compiler prefix
+    global configure.compiler prefix developer_dir
     set ret ""
     switch -exact ${configure.compiler} {
         gcc {
@@ -331,21 +308,19 @@
                 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 {
             switch -exact ${type} {
-                cc   { set ret /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 }
-                objc { set ret /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 }
-                cxx  { set ret /Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2 }
-                cpp  { set ret /Developer/usr/llvm-gcc-4.2/bin/llvm-cpp-4.2 }
+                cc   { set ret ${developer_dir}/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 }
+                objc { set ret ${developer_dir}/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 }
+                cxx  { set ret ${developer_dir}/usr/llvm-gcc-4.2/bin/llvm-g++-4.2 }
             }
         }
         clang {
             switch -exact ${type} {
-                cc   { set ret /usr/bin/clang }
-                objc { set ret /usr/bin/clang }
+                cc   { set ret ${developer_dir}/usr/bin/clang }
+                objc { set ret ${developer_dir}/usr/bin/clang }
             }
         }
         apple-gcc-3.3 {

Modified: branches/new-help-system/base/src/port1.0/portdepends.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portdepends.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portdepends.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -37,10 +37,12 @@
 }
 
 # define options
-options depends_build depends_run depends_lib depends
+options depends_fetch depends_extract depends_build depends_run depends_lib depends
 # Export options via PortInfo
-options_export depends_build depends_lib depends_run
+options_export depends_fetch depends_extract depends_build depends_lib depends_run
 
+option_proc depends_fetch portdepends::validate_depends_options
+option_proc depends_extract portdepends::validate_depends_options
 option_proc depends_build portdepends::validate_depends_options
 option_proc depends_run portdepends::validate_depends_options
 option_proc depends_lib portdepends::validate_depends_options

Modified: branches/new-help-system/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portdestroot.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portdestroot.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -68,7 +68,7 @@
 default destroot.keepdirs ""
 default destroot.violate_mtree no
 
-default startupitem.name        {${portname}}
+default startupitem.name        {${name}}
 default startupitem.uniquename  {org.macports.${startupitem.name}}
 default startupitem.plist       {${startupitem.uniquename}.plist}
 default startupitem.location    LaunchDaemons
@@ -87,12 +87,12 @@
 set_ui_prefix
 
 proc portdestroot::destroot_start {args} {
-    global UI_PREFIX prefix portname porturl destroot os.platform destroot.clean portsharepath
+    global UI_PREFIX prefix name porturl destroot os.platform destroot.clean portsharepath
     global destroot.umask destroot.asroot macportsuser euid egid usealtworkpath altprefix
     global applications_dir frameworks_dir
     variable oldmask
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${portname}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${name}]"
 
     # start gsoc08-privileges
     if { [getuid] == 0 && [geteuid] == [name_to_uid "$macportsuser"] } {
@@ -106,9 +106,7 @@
     }
 
     if { [tbool destroot.asroot] && [getuid] != 0 } {
-        global errorisprivileges
-        set errorisprivileges yes
-        return -code error "You can not run this port without elevated privileges. You need to re-run with 'sudo port'.";
+        return -code error "You cannot run this port without root privileges. You need to re-run with 'sudo port'.";
     }
 
     if {[info exists usealtworkpath] && $usealtworkpath == "yes"} {
@@ -122,7 +120,7 @@
     # end gsoc08-privileges
 
     set oldmask [umask ${destroot.umask}]
-    set mtree ${portutil::autoconf::mtree_path}
+    set mtree [findBinary mtree ${portutil::autoconf::mtree_path}]
 
     if { ${destroot.clean} == "yes" } {
         delete "${destroot}"
@@ -144,7 +142,8 @@
 }
 
 proc portdestroot::destroot_finish {args} {
-    global UI_PREFIX destroot prefix portname startupitem.create destroot.violate_mtree
+    global UI_PREFIX destroot prefix name startupitem.create destroot.violate_mtree
+    global applications_dir frameworks_dir developer_dir destroot.keepdirs
     global os.platform os.version
     variable oldmask
 
@@ -162,111 +161,107 @@
     }
 
     # Prune empty directories in ${destroot}
-    set exclude_dirs [list]
-    set exclude_phrase ""
-    foreach path [option destroot.keepdirs] {
+    foreach path ${destroot.keepdirs} {
         if {![file isdirectory ${path}]} {
             xinstall -m 0755 -d ${path}
         }
-        if {![file exists ${path}/.turd_${portname}]} {
-            xinstall -c -m 0644 /dev/null ${path}/.turd_${portname}
+        if {![file exists ${path}/.turd_${name}]} {
+            xinstall -c -m 0644 /dev/null ${path}/.turd_${name}
         }
-        lappend exclude_dirs "-path \"${path}\""
     }
-    if { [llength ${exclude_dirs}] > 0 } {
-        set exclude_phrase "! \\( [join ${exclude_dirs} " -or "] \\)"
+    fs-traverse -depth dir ${destroot} {
+        if {[file isdirectory $dir]} {
+            catch {file delete $dir}
+        }
     }
-    catch {system "find \"${destroot}\" -depth -type d ${exclude_phrase} -exec rmdir -- \{\} \\; 2>/dev/null"}
 
     # Compress all manpages with gzip (instead)
-    # but NOT on Jaguar (Darwin 6.x)
-    if {![regexp {darwin6} "${os.platform}${os.version}"]} {
-        set manpath "${destroot}${prefix}/share/man"
-        if {[file isdirectory ${manpath}] && [file type ${manpath}] == "directory"} {
-            ui_info "$UI_PREFIX [format [msgcat::mc "Compressing man pages for %s"] ${portname}]"
-            set found 0
-            set manlinks [list]
-            foreach mandir [readdir "${manpath}"] {
-                if {![regexp {^(cat|man)(.)$} ${mandir} match ignore manindex]} { continue }
-                set mandirpath [file join ${manpath} ${mandir}]
-                if {[file isdirectory ${mandirpath}] && [file type ${mandirpath}] == "directory"} {
-                    ui_debug "Scanning ${mandir}"
-                    foreach manfile [readdir ${mandirpath}] {
-                        set manfilepath [file join ${mandirpath} ${manfile}]
-                        if {[file isfile ${manfilepath}] && [file type ${manfilepath}] == "file"} {
-                            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}]"
-                            } 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}]"
-                            } elseif {[regexp "\[.\]${manindex}\[a-z\]*\$" ${manfile}]} {
-                                set found 1
-                                system "cd ${manpath} && \
-                                gzip -9vf [file join ${mandir} ${manfile}]"
+    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"] ${name}]"
+        set found 0
+        set manlinks [list]
+        foreach mandir [readdir "${manpath}"] {
+            if {![regexp {^(cat|man)(.)$} ${mandir} match ignore manindex]} { continue }
+            set mandirpath [file join ${manpath} ${mandir}]
+            if {[file isdirectory ${mandirpath}] && [file type ${mandirpath}] == "directory"} {
+                ui_debug "Scanning ${mandir}"
+                foreach manfile [readdir ${mandirpath}] {
+                    set manfilepath [file join ${mandirpath} ${manfile}]
+                    if {[file isfile ${manfilepath}] && [file type ${manfilepath}] == "file"} {
+                        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}]"
+                        } 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}]"
+                        } elseif {[regexp "\[.\]${manindex}\[a-z\]*\$" ${manfile}]} {
+                            set found 1
+                            system "cd ${manpath} && \
+                            $gzip -9vf [file join ${mandir} ${manfile}]"
+                        }
+                        set gzmanfile ${manfile}.gz
+                        set gzmanfilepath [file join ${mandirpath} ${gzmanfile}]
+                        if {[file exists ${gzmanfilepath}]} {
+                            set desired 00444
+                            set current [file attributes ${gzmanfilepath} -permissions]
+                            if {$current != $desired} {
+                                ui_info "[file join ${mandir} ${gzmanfile}]: changing permissions from $current to $desired"
+                                file attributes ${gzmanfilepath} -permissions $desired
                             }
-                            set gzmanfile ${manfile}.gz
-                            set gzmanfilepath [file join ${mandirpath} ${gzmanfile}]
-                            if {[file exists ${gzmanfilepath}]} {
-                                set desired 00444
-                                set current [file attributes ${gzmanfilepath} -permissions]
-                                if {$current != $desired} {
-                                    ui_info "[file join ${mandir} ${gzmanfile}]: changing permissions from $current to $desired"
-                                    file attributes ${gzmanfilepath} -permissions $desired
-                                }
-                            }
-                        } elseif {[file type ${manfilepath}] == "link"} {
-                            lappend manlinks [file join ${mandir} ${manfile}]
                         }
+                    } elseif {[file type ${manfilepath}] == "link"} {
+                        lappend manlinks [file join ${mandir} ${manfile}]
                     }
                 }
             }
-            if {$found == 1} {
-                # check man page links and rename/repoint them if necessary
-                foreach manlink $manlinks {
-                    set manlinkpath [file join $manpath $manlink]
-                    # if link destination is not gzipped, check it
-                    set manlinksrc [file readlink $manlinkpath]
-                    # if link destination is an absolute path, convert it to a
-                    # relative path
-                    if {[file pathtype $manlinksrc] eq "absolute"} {
-                        set manlinksrc [file tail $manlinksrc]
+        }
+        if {$found == 1} {
+            # check man page links and rename/repoint them if necessary
+            foreach manlink $manlinks {
+                set manlinkpath [file join $manpath $manlink]
+                # if link destination is not gzipped, check it
+                set manlinksrc [file readlink $manlinkpath]
+                # if link destination is an absolute path, convert it to a
+                # relative path
+                if {[file pathtype $manlinksrc] eq "absolute"} {
+                    set manlinksrc [file tail $manlinksrc]
+                }
+                if {![regexp "\[.\]gz\$" ${manlinksrc}]} {
+                    set mandir [file dirname $manlink]
+                    set mandirpath [file join $manpath $mandir]
+                    set pwd [pwd]
+                    if {[catch {_cd $mandirpath} err]} {
+                        puts $err
+                        return
                     }
-                    if {![regexp "\[.\]gz\$" ${manlinksrc}]} {
-                        set mandir [file dirname $manlink]
-                        set mandirpath [file join $manpath $mandir]
-                        set pwd [pwd]
-                        if {[catch {_cd $mandirpath} err]} {
-                            puts $err
-                            return
+                    # if gzipped destination exists, fix link
+                    if {[file isfile ${manlinksrc}.gz]} {
+                        # if actual link name does not end with gz, rename it
+                        if {![regexp "\[.\]gz\$" ${manlink}]} {
+                            ui_debug "renaming link: $manlink to ${manlink}.gz"
+                            file rename $manlinkpath ${manlinkpath}.gz
+                            set manlink ${manlink}.gz
+                            set manlinkpath [file join $manpath $manlink]
                         }
-                        # if gzipped destination exists, fix link
-                        if {[file isfile ${manlinksrc}.gz]} {
-                            # if actual link name does not end with gz, rename it
-                            if {![regexp "\[.\]gz\$" ${manlink}]} {
-                                ui_debug "renaming link: $manlink to ${manlink}.gz"
-                                file rename $manlinkpath ${manlinkpath}.gz
-                                set manlink ${manlink}.gz
-                                set manlinkpath [file join $manpath $manlink]
-                            }
-                            # repoint the link
-                            ui_debug "repointing link: $manlink from $manlinksrc to ${manlinksrc}.gz"
-                            file delete $manlinkpath
-                            ln -s "${manlinksrc}.gz" "${manlinkpath}"
-                        }
-                        _cd $pwd
+                        # repoint the link
+                        ui_debug "repointing link: $manlink from $manlinksrc to ${manlinksrc}.gz"
+                        file delete $manlinkpath
+                        ln -s "${manlinksrc}.gz" "${manlinkpath}"
                     }
+                    _cd $pwd
                 }
-            } else {
-                ui_debug "No man pages found to compress."
             }
+        } else {
+            ui_debug "No man pages found to compress."
         }
-    } else {
-        ui_debug "No man page compression on ${os.platform}${os.version}."
     }
 
     # test for violations of mtree
@@ -304,36 +299,46 @@
                     # we've found a subpath of our prefix
                     lpush pathsToCheck $dfile
                 } else {
-                    # these files are outside of the prefix
-                    switch $dfile {
-                        /Applications -
-                        /Developer -
-                        /Library { ui_debug "port installs files in $dfile" }
-                        default {
-                            ui_warn "violation by $dfile"
-                            set mtree_violation "yes"
+                    set dir_allowed no
+                    # these files are (at least potentially) outside of the prefix
+                    foreach dir "$applications_dir $frameworks_dir /Library/LaunchAgents /Library/LaunchDaemons /Library/StartupItems" {
+                        if {[string equal -length [expr [string length $dfile] + 1] $dfile/ $dir]} {
+                            # it's a prefix of one of the allowed paths
+                            set dir_allowed yes
+                            break
                         }
                     }
+                    if {$dir_allowed} {
+                        lpush pathsToCheck $dfile
+                    } else {
+                        # not a prefix of an allowed path, so it's either the path itself or a violation
+                        switch $dfile \
+                            $applications_dir - \
+                            $frameworks_dir - \
+                            /Library/LaunchAgents - \
+                            /Library/LaunchDaemons - \
+                            /Library/StartupItems { ui_debug "port installs files in $dfile" } \
+                            default {
+                                ui_warn "violation by $dfile"
+                                set mtree_violation "yes"
+                            }
+                    }
                 }
             }
         }
 
         # abort here only so all violations can be observed
         if { ${mtree_violation} != "no" } {
-            ui_warn "[format [msgcat::mc "%s violates the layout of the ports-filesystems!"] [option portname]]"
+            ui_warn "[format [msgcat::mc "%s violates the layout of the ports-filesystems!"] [option name]]"
             ui_warn "Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!"
             # error "mtree violation!"
         }
     } else {
-        ui_warn "[format [msgcat::mc "%s requests to install files outside the common directory structure!"] [option portname]]"
+        ui_msg "[format [msgcat::mc "Note: %s installs files outside the common directory structure."] [option name]]"
     }
 
     # Restore umask
     umask $oldmask
 
-    # start gsoc08-privileges
-    chownAsRoot $destroot
-    # end gsoc08-privileges
-
     return 0
 }

Modified: branches/new-help-system/base/src/port1.0/portdistcheck.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portdistcheck.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portdistcheck.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -54,7 +54,7 @@
 proc portdistcheck::distcheck_main {args} {
     global distcheck.check
     global fetch.type
-    global portname portpath
+    global name portpath
 
     set port_moddate [file mtime ${portpath}/Portfile]
 
@@ -82,16 +82,16 @@
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
                     if {[catch {set urlnewer [curl isnewer $file_url $port_moddate]} error]} {
-                        ui_warn "couldn't fetch $file_url for $portname ($error)"
+                        ui_warn "couldn't fetch $file_url for $name ($error)"
                     } else {
                         if {$urlnewer} {
-                            ui_warn "port $portname: $file_url is newer than portfile"
+                            ui_warn "port $name: $file_url is newer than portfile"
                         }
                         incr count
                     }
                 }
                 if {$count == 0} {
-                    ui_error "no mirror had $distfile for $portname"
+                    ui_error "no mirror had $distfile for $name"
                 }
             } elseif {${distcheck.check} == "filesize"} {
                 set count 0
@@ -99,18 +99,18 @@
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
                     if {[catch {set urlsize [curl getsize $file_url]} error]} {
-                        ui_warn "couldn't fetch $file_url for $portname ($error)"
+                        ui_warn "couldn't fetch $file_url for $name ($error)"
                     } else {
                         incr count
                         if {$urlsize > 0} {
-                            ui_info "port $portname: $distfile $urlsize bytes"
+                            ui_info "port $name: $distfile $urlsize bytes"
                             incr totalsize $urlsize
                             break
                         }
                     }
                 }
                 if {$count == 0} {
-                    ui_error "no mirror had $distfile for $portname"
+                    ui_error "no mirror had $distfile for $name"
                 }
             } else {
                 ui_error "unknown distcheck.check ${distcheck.check}"
@@ -132,7 +132,7 @@
                 set size [expr $totalsize / (1024.0*1024.0*1024.0)]
                 set humansize [format "%.1fG" $size]
             }
-            ui_msg "$portname: $humansize"
+            ui_msg "$name: $humansize"
         }
     }
 }

Modified: branches/new-help-system/base/src/port1.0/portdistfiles.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portdistfiles.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portdistfiles.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -48,8 +48,8 @@
 set_ui_prefix
 
 proc portdistfiles::distfiles_start {args} {
-    global UI_PREFIX portname
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${portname}]"
+    global UI_PREFIX name
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${name}]"
 }
 
 proc portdistfiles::distfiles_main {args} {

Modified: branches/new-help-system/base/src/port1.0/portextract.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portextract.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portextract.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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]} {
@@ -98,19 +98,19 @@
         option extract.post_args ""
     } elseif {[tbool use_dmg]} {
         global worksrcdir
-        set dmg_tmp_dir [exec mktemp -d -q "/tmp/mports.XXXXXXXX"]
+        set dmg_tmp_dir [mkdtemp "/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}"
     }
 }
 
 proc portextract::extract_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option name]]"
 }
 
 proc portextract::extract_main {args} {

Modified: branches/new-help-system/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portfetch.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portfetch.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -55,11 +55,11 @@
 # define options: distname master_sites
 options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 use_lzma use_7z use_dmg dist_subdir \
     fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \
-    master_sites.mirror_subdir patch_sites.mirror_subdir portname \
+    master_sites.mirror_subdir patch_sites.mirror_subdir \
     cvs.module cvs.root cvs.password cvs.date cvs.tag cvs.method \
-    svn.url svn.tag svn.revision svn.method \
-    git.url git.branch \
-    hg.url hg.tag
+    svn.url svn.revision svn.method \
+    git.cmd git.url git.branch \
+    hg.cmd hg.url hg.tag
 
 # XXX we use the command framework to buy us some useful features,
 # but this is not a user-modifiable command
@@ -70,7 +70,7 @@
 default extract.suffix .tar.gz
 default fetch.type standard
 
-default cvs.cmd {$portutil::autoconf::cvs_path}
+default cvs.cmd {[findBinary cvs $portutil::autoconf::cvs_path]}
 default cvs.password ""
 default cvs.dir {${workpath}}
 default cvs.method {export}
@@ -82,25 +82,26 @@
 default cvs.args ""
 default cvs.post_args {"${cvs.module}"}
 
-default svn.cmd {$portutil::autoconf::svn_path}
+default svn.cmd {[findBinary svn $portutil::autoconf::svn_path]}
 default svn.dir {${workpath}}
 default svn.method {export}
-default svn.tag ""
 default svn.revision ""
 default svn.env {}
 default svn.pre_args {"--non-interactive"}
 default svn.args ""
 default svn.post_args {"${svn.url}"}
 
+default git.cmd {[findBinary git $portutil::autoconf::git_path]}
 default git.dir {${workpath}}
 default git.branch {}
 
+default hg.cmd {[findBinary hg $portutil::autoconf::hg_path]}
 default hg.dir {${workpath}}
 default hg.tag {tip}
 
 # Set distfiles
 default distfiles {[portfetch::suffix $distname]}
-default dist_subdir {${portname}}
+default dist_subdir {${name}}
 
 # user name & password
 default fetch.user ""
@@ -129,7 +130,6 @@
 
 option_proc fetch.type portfetch::set_fetch_type
 
-# We should probably add something like a depends_fetch; see #15161
 proc portfetch::set_extract_type {option action args} {
     global extract.suffix
     if {[string equal ${action} "set"] && [tbool args]} {
@@ -139,15 +139,15 @@
             }
             use_lzma {
                 set extract.suffix .tar.lzma
-                depends_build-append bin:lzma:lzmautils
+                depends_extract-append bin:lzma:lzmautils
             }
             use_zip {
                 set extract.suffix .zip
-                depends_build-append bin:unzip:unzip
+                depends_extract-append bin:unzip:unzip
             }
             use_7z {
                 set extract.suffix .7z
-                depends_build-append bin:7za:p7zip
+                depends_extract-append bin:7za:p7zip
             }
             use_dmg {
                 set extract.suffix .dmg
@@ -160,16 +160,16 @@
     if {[string equal ${action} "set"]} {
         switch $args {
             cvs {
-                depends_build-append bin:cvs:cvs
+                depends_fetch-append bin:cvs:cvs
             }
             svn {
-                depends_build-append bin:svn:subversion
+                depends_fetch-append bin:svn:subversion
             }
             git {
-                depends_build-append bin:git:git-core
+                depends_fetch-append bin:git:git-core
             }
             hg {
-                depends_build-append bin:hg:mercurial
+                depends_fetch-append bin:hg:mercurial
             }
         }
     }
@@ -207,7 +207,7 @@
 # For a given mirror site type, e.g. "gnu" or "x11", check to see if there's a
 # pre-registered set of sites, and if so, return them.
 proc portfetch::mirror_sites {mirrors tag subdir} {
-    global UI_PREFIX portname porturl mirror_sites.listfile mirror_sites.listpath dist_subdir
+    global UI_PREFIX name porturl mirror_sites.listfile mirror_sites.listpath dist_subdir
     global global_mirror_site fallback_mirror_site
 
     set mirrorfile [getportresourcepath $porturl [file join ${mirror_sites.listpath} ${mirror_sites.listfile}]]
@@ -242,7 +242,7 @@
     if {$mirror_tag == "mirror"} {
         set thesubdir ${dist_subdir}
     } elseif {$subdir == "" && $mirror_tag != "nosubdir"} {
-        set thesubdir ${portname}
+        set thesubdir ${name}
     } else {
         set thesubdir ${subdir}
     }
@@ -485,7 +485,7 @@
         set savecmd ${cvs.cmd}
         set saveargs ${cvs.args}
         set savepost_args ${cvs.post_args}
-        set cvs.cmd "echo ${cvs.password} | $portutil::autoconf::cvs_path"
+        set cvs.cmd "echo ${cvs.password} | ${cvs.cmd}"
         set cvs.args login
         set cvs.post_args ""
         if {[catch {command_exec cvs -notty "" "2>&1"} result]} {
@@ -510,24 +510,8 @@
 
 # Perform an svn fetch
 proc portfetch::svnfetch {args} {
-    global workpath prefix_frozen
-    global svn.env svn.cmd svn.args svn.post_args svn.revision svn.url svn.method
+    global svn.args svn.revision svn.method
 
-    # Look for the svn command, either in the path or in the prefix
-    set goodcmd 0
-    foreach svncmd "${svn.cmd} ${prefix_frozen}/bin/svn svn" {
-        if { [file executable ${svncmd}] } {
-            set svn.cmd $svncmd
-            set goodcmd 1
-            break;
-        }
-    }
-    if { !$goodcmd } {
-        ui_error "The subversion tool (svn) is required to fetch ${svn.url}."
-        ui_error "Please install the subversion port before proceeding."
-        return -code error [msgcat::mc "Subversion check out failed"]
-    }
-
     set svn.args "${svn.method} ${svn.args}"
     if {[string length ${svn.revision}]} {
         set svn.args "${svn.args} -r ${svn.revision}"
@@ -546,23 +530,9 @@
 
 # Perform a git fetch
 proc portfetch::gitfetch {args} {
-    global worksrcpath prefix_frozen
-    global git.url git.branch git.sha1
+    global worksrcpath
+    global git.url git.branch git.sha1 git.cmd
 
-    # Look for the git command
-    set git.cmd {}
-    foreach gitcmd "$portutil::autoconf::git_path $prefix_frozen/bin/git git" {
-        if {[file executable $gitcmd]} {
-            set git.cmd $gitcmd
-            break
-        }
-    }
-    if {${git.cmd} == {}} {
-        ui_error "git is required to fetch ${git.url}"
-        ui_error "Please install the git-core port before proceeding."
-        return -code error [msgcat::mc "Git command not found"]
-    }
-
     set options "-q"
     if {[string length ${git.branch}] == 0} {
         # if we're just using HEAD, we can make a shallow repo
@@ -593,22 +563,8 @@
 # Perform a mercurial fetch.
 proc portfetch::hgfetch {args} {
     global worksrcpath prefix_frozen
-    global hg.url hg.tag
+    global hg.url hg.tag hg.cmd
 
-    # Look for the hg command.
-    set hg.cmd {}
-    foreach hgcmd "$prefix_frozen/bin/hg hg" {
-        if {[file executable $hgcmd]} {
-            set hg.cmd $hgcmd
-            break
-        }
-    }
-    if {${hg.cmd} == {}} {
-        ui_error "hg is required to fetch ${hg.url}"
-        ui_error "Please install the mercurial port before proceeding."
-        return -code error [msgcat::mc "Mercurial command not found"]
-    }
-
     set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${worksrcpath} 2>&1"
     ui_debug "Executing: $cmdstring"
     if {[catch {system $cmdstring} result]} {
@@ -633,9 +589,17 @@
 
     if {![file isdirectory $distpath]} {
         if {[catch {file mkdir $distpath} result]} {
-            return -code error [format [msgcat::mc "Unable to create distribution files path: %s"] $result]
+            elevateToRoot "fetch"
+            set elevated yes
+            if {[catch {file mkdir $distpath} result]} {
+                return -code error [format [msgcat::mc "Unable to create distribution files path: %s"] $result]
+            }
         }
     }
+    chownAsRoot $distpath
+    if {[info exists elevated] && $elevated == yes} {
+        dropPrivileges
+    }
 
     set fetch_options {}
     if {[string length ${fetch.user}] || [string length ${fetch.password}]} {
@@ -756,9 +720,9 @@
 }
 
 proc portfetch::fetch_start {args} {
-    global UI_PREFIX portname
+    global UI_PREFIX name
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $portname]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $name]"
 }
 
 # Main fetch routine

Modified: branches/new-help-system/base/src/port1.0/portinstall.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portinstall.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portinstall.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -55,15 +55,12 @@
 set_ui_prefix
 
 proc portinstall::install_start {args} {
-    global UI_PREFIX portname portversion portrevision variations portvariants
-    global install.asroot prefix
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $portname $portversion $portrevision $portvariants]"
+    global UI_PREFIX name version revision variations portvariants
+    global prefix
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $name $version $revision $portvariants]"
     
     # start gsoc08-privileges
-    if { [tbool install.asroot] } {
-        # if port is marked as needing root
-        elevateToRoot "install"
-    } elseif { ![file writable $prefix] } {
+    if { ![file writable $prefix] } {
         # if install location is not writable, need root privileges to install
         elevateToRoot "install"
     }
@@ -79,18 +76,10 @@
     }
     
     # if the file is a symlink, do not try to set file attributes
-    # if the destination file is an existing directory,
-    # do not overwrite its file attributes
-    if {[file type $src_element] != "link" || [file isdirectory $dst_element]} {
-        set attributes [file attributes $src_element]
-        for {set i 0} {$i < [llength $attributes]} {incr i} {
-            set opt [lindex $attributes $i]
-            incr i
-            set arg [lindex $attributes $i]
-            file attributes $dst_element $opt $arg
-            # set mtime on installed element
-            exec touch -r $src_element $dst_element
-        }
+    if {[file type $src_element] != "link"} {
+        eval file attributes {$dst_element} [file attributes $src_element]
+        # set mtime on installed element
+        file mtime $dst_element [file mtime $src_element]
     }
 }
 
@@ -139,10 +128,10 @@
 }
 
 proc portinstall::install_main {args} {
-    global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir pregrefix UI_PREFIX destroot portrevision maintainers ports_force portvariants targets depends_lib PortInfo epoch
+    global name version portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir pregrefix UI_PREFIX destroot revision maintainers ports_force portvariants targets depends_lib PortInfo epoch license
     
     # Begin the registry entry
-    set regref [registry_new $portname $portversion $portrevision $portvariants $epoch]
+    set regref [registry_new $name $version $revision $portvariants $epoch]
     
     # Install the files
     directory_dig ${destroot} ${destroot} ${regref}
@@ -166,16 +155,16 @@
     }
     if {[info exists depends_run]} {
         registry_prop_store $regref depends_run $depends_run
-        registry_register_deps $depends_run $portname
+        registry_register_deps $depends_run $name
     }
     if {[info exists depends_lib]} {
         registry_prop_store $regref depends_lib $depends_lib
-        registry_register_deps $depends_lib $portname
+        registry_register_deps $depends_lib $name
     }
     if {[info exists installPlist]} {
         registry_prop_store $regref contents [registry_fileinfo_for_index $installPlist]
         if { [registry_prop_retr $regref installtype] != "image" } {
-            registry_bulk_register_files [registry_fileinfo_for_index $installPlist] $portname
+            registry_bulk_register_files [registry_fileinfo_for_index $installPlist] $name
         }
     }
     if {[info exists package-install]} {

Modified: branches/new-help-system/base/src/port1.0/portlint.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portlint.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portlint.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -89,12 +89,12 @@
 
 
 proc portlint::lint_start {args} {
-    global UI_PREFIX portname
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying Portfile for %s"] ${portname}]"
+    global UI_PREFIX name
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying Portfile for %s"] ${name}]"
 }
 
 proc portlint::lint_main {args} {
-    global UI_PREFIX portname portpath porturl ports_lint_nitpick
+    global UI_PREFIX name portpath porturl ports_lint_nitpick
     set portfile ${portpath}/Portfile
     set portdirs [split ${portpath} /]
     set last [llength $portdirs]
@@ -261,12 +261,12 @@
     ###################################################################
 
     global os.platform os.arch os.version
-    global portversion portrevision portepoch
+    global version revision epoch
     # hoping for "noarch" :
     set portarch ${os.arch}
     global description long_description platforms categories all_variants
     global maintainers homepage master_sites checksums patchfiles
-    global depends_lib depends_build depends_run distfiles fetch.type
+    global depends_fetch depends_extract depends_lib depends_build depends_run distfiles fetch.type
     
     global lint_portsystem lint_platforms
     global lint_required lint_optional
@@ -294,26 +294,19 @@
     }
 
     foreach req_var $lint_required {
-        if {$req_var == "name"} {
-            set var "portname"
-        } elseif {$req_var == "version"} {
-            set var "portversion"
-        } else {
-            set var $req_var
-        }
 
-        if {$var == "master_sites"} {
+        if {$req_var == "master_sites"} {
             if {${fetch.type} != "standard"} {
-                ui_info "OK: $var not required for fetch.type ${fetch.type}"
+                ui_info "OK: $req_var not required for fetch.type ${fetch.type}"
                 continue
             }
             if {[llength ${distfiles}] == 0} {
-                ui_info "OK: $var not required when there are no distfiles"
+                ui_info "OK: $req_var not required when there are no distfiles"
                 continue
             }
         }
 
-        if {![info exists $var]} {
+        if {![info exists $req_var]} {
             ui_error "Missing required variable: $req_var"
             incr errors
         } else {
@@ -322,14 +315,7 @@
     }
 
     foreach opt_var $lint_optional {
-        if {$opt_var == "epoch"} {
-            set var "portepoch"
-        } elseif {$opt_var == "revision"} {
-            set var "portrevision"
-        } else {
-            set var $opt_var
-        }
-        if {[info exists $var]} {
+        if {[info exists $opt_var]} {
             # TODO: check whether it was seen (or default)
             ui_info "OK: Found optional variable: $opt_var"
         }
@@ -356,12 +342,12 @@
         }
     }
 
-    if {![string is integer -strict $portepoch]} {
-        ui_error "Port epoch is not numeric:  $portepoch"
+    if {![string is integer -strict $epoch]} {
+        ui_error "Port epoch is not numeric:  $epoch"
         incr errors
     }
-    if {![string is integer -strict $portrevision]} {
-        ui_error "Port revision is not numeric: $portrevision"
+    if {![string is integer -strict $revision]} {
+        ui_error "Port revision is not numeric: $revision"
         incr errors
     }
 
@@ -426,6 +412,8 @@
     }
 
     set all_depends {}
+    if {[info exists depends_fetch]} { eval "lappend all_depends $depends_fetch" }
+    if {[info exists depends_extract]} { eval "lappend all_depends $depends_extract" }
     if {[info exists depends_lib]} { eval "lappend all_depends $depends_lib" }
     if {[info exists depends_build]} { eval "lappend all_depends $depends_build" }
     if {[info exists depends_run]} { eval "lappend all_depends $depends_run" }
@@ -472,8 +460,8 @@
     } else {
         ui_info "OK: Portfile parent directory matches primary category"
     }
-    if {$portdir != $portname} {
-        ui_error "Portfile directory $portdir does not match port name $portname"
+    if {$portdir != $name} {
+        ui_error "Portfile directory $portdir does not match port name $name"
         incr errors
     } else {
         ui_info "OK: Portfile directory matches port name"
@@ -488,12 +476,29 @@
         }
     }
 
+    # Check for use of deprecated options
+    set deprecated_options_name [get_deprecated_options]
+    global $deprecated_options_name
+    foreach option [array names $deprecated_options_name] {
+        set newoption [lindex [set ${deprecated_options_name}($option)] 0]
+        set refcount  [lindex [set ${deprecated_options_name}($option)] 1]
+
+        if {$refcount > 0} {
+            if {$newoption != ""} {
+                ui_warn "Using deprecated option '$option', superseded by '$newoption'"
+            } else {
+                ui_warn "Using deprecated option '$option'"
+            }
+            incr warnings
+        }
+    }
+
     ### TODO: more checks to Tcl variables/sections
 
-    ui_debug "Name: $portname"
-    ui_debug "Epoch: $portepoch"
-    ui_debug "Version: $portversion"
-    ui_debug "Revision: $portrevision"
+    ui_debug "Name: $name"
+    ui_debug "Epoch: $epoch"
+    ui_debug "Version: $version"
+    ui_debug "Revision: $revision"
     ui_debug "Arch: $portarch"
     ###################################################################
 

Modified: branches/new-help-system/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portlivecheck.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portlivecheck.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -46,21 +46,25 @@
 }
 
 # define options
-options livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
+options livecheck.url livecheck.type livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
 
 # defaults
 default livecheck.url {$homepage}
 default livecheck.check default
+default livecheck.type default
 default livecheck.md5 ""
 default livecheck.regex ""
-default livecheck.name default
-default livecheck.distname default
+default livecheck.name {$name}
+default livecheck.distname {${livecheck.name}}
 default livecheck.version {$version}
 
+# Deprecation
+option_deprecate livecheck.check livecheck.type
+
 proc portlivecheck::livecheck_main {args} {
-    global livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
+    global livecheck.url livecheck.type livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
     global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert
-    global homepage portname portpath workpath
+    global homepage portpath workpath
     global master_sites name distfiles
 
     set updated 0
@@ -74,41 +78,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,65 +91,56 @@
         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.type} 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.type ${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.
+        if {${livecheck.type} eq "default"} {
+            set livecheck.type "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 {[lsearch -exact [split $available_types "|"] ${livecheck.type}] != -1} {
+        # Load the defaults from _resources/port1.0/livecheck/${livecheck.type}.tcl.
+        set defaults_file "$types_dir/${livecheck.type}.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'."
         }
-        "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"
-        }
     }
 
     # de-escape livecheck.url
     set livecheck.url [join ${livecheck.url}]
 
-    switch ${livecheck.check} {
+    switch ${livecheck.type} {
         "regex" -
         "regexm" {
             # single and multiline regex
             ui_debug "Fetching ${livecheck.url}"
             if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} {
-                ui_error "cannot check if $portname was updated ($error)"
+                ui_error "cannot check if $name was updated ($error)"
                 set updated -1
             } else {
                 # let's extract the version from the file.
@@ -188,7 +148,7 @@
                 set updated -1
                 set the_re [join ${livecheck.regex}]
                 ui_debug "The regex is \"$the_re\""
-                if {${livecheck.check} == "regexm"} {
+                if {${livecheck.type} == "regexm"} {
                     set data [read $chan]
                     if {[regexp $the_re $data matched updated_version]} {
                         if {$updated_version != ${livecheck.version}} {
@@ -222,14 +182,14 @@
                 }
                 close $chan
                 if {$updated < 0} {
-                    ui_error "cannot check if $portname was updated (regex didn't match)"
+                    ui_error "cannot check if $name was updated (regex didn't match)"
                 }
             }
         }
         "md5" {
             ui_debug "Fetching ${livecheck.url}"
             if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} {
-                ui_error "cannot check if $portname was updated ($error)"
+                ui_error "cannot check if $name was updated ($error)"
                 set updated -1
             } else {
                 # let's compute the md5 sum.
@@ -243,7 +203,7 @@
         "moddate" {
             set port_moddate [file mtime ${portpath}/Portfile]
             if {[catch {set updated [curl isnewer ${livecheck.url} $port_moddate]} error]} {
-                ui_error "cannot check if $portname was updated ($error)"
+                ui_error "cannot check if $name was updated ($error)"
                 set updated -1
             } else {
                 if {!$updated} {
@@ -254,17 +214,17 @@
         "none" {
         }
         default {
-            ui_error "unknown livecheck.check ${livecheck.check}"
+            ui_error "unknown livecheck.type ${livecheck.type}"
         }
     }
 
     file delete -force $tempfile
 
-    if {${livecheck.check} != "none"} {
+    if {${livecheck.type} != "none"} {
         if {$updated > 0} {
-            ui_msg "$portname seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
+            ui_msg "$name seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
         } elseif {$updated == 0} {
-            ui_info "$portname seems to be up to date"
+            ui_info "$name seems to be up to date"
         }
     }
 }

Modified: branches/new-help-system/base/src/port1.0/portmain.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portmain.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portmain.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -45,12 +45,12 @@
 
 # define options
 options prefix macportsuser name version revision epoch categories maintainers
-options long_description description homepage license
+options long_description description homepage license provides conflicts
 options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
 options universal_variant os.universal_supported
 
 # Export options via PortInfo
-options_export name version revision epoch categories maintainers platforms description long_description homepage license
+options_export name version revision epoch categories maintainers platforms description long_description homepage license provides conflicts
 
 # Assign option procedure to default_variants
 option_proc default_variants handle_default_variants
@@ -61,6 +61,7 @@
 default prefix /opt/local
 default applications_dir /Applications/MacPorts
 default frameworks_dir {${prefix}/Library/Frameworks}
+default developer_dir {/Developer}
 default destdir destroot
 default destpath {${workpath}/${destdir}}
 # destroot is provided as a clearer name for the "destpath" variable
@@ -69,7 +70,7 @@
 default revision 0
 default epoch 0
 default license unknown
-default distname {${portname}-${portversion}}
+default distname {${name}-${version}}
 default worksrcdir {$distname}
 default filespath {[file join $portpath $filesdir]}
 default worksrcpath {[file join $workpath $worksrcdir]}
@@ -79,12 +80,6 @@
 default install.user {${portutil::autoconf::install_user}}
 default install.group {${portutil::autoconf::install_group}}
 
-# Compatibility namespace
-default portname {$name}
-default portversion {$version}
-default portrevision {$revision}
-default portepoch {$epoch}
-
 # Platform Settings
 set os_arch $tcl_platform(machine)
 if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
@@ -127,13 +122,12 @@
     # the universal variant itself is now created in
     # add_default_universal_variant, which is called from mportopen
     option os.universal_supported yes
-
-    if {[info exists variations(universal)] && $variations(universal) == "+"} {
-        # cannot go into the variant, due to the amount of ports overriding it
-        eval macosx_deployment_target ${universal_target}
-    }
 }
 
+# Record initial euid/egid
+set euid [geteuid]
+set egid [getegid]
+
 proc portmain::main {args} {
     return 0
 }

Modified: branches/new-help-system/base/src/port1.0/portmirror.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portmirror.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portmirror.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -52,7 +52,7 @@
 # It also records the path in a database.
 
 proc portmirror::mirror_main {args} {
-    global fetch.type portname mirror_filemap ports_mirror_new portdbpath
+    global fetch.type name mirror_filemap ports_mirror_new portdbpath
 
     set mirror_filemap_path [file join $portdbpath distfiles_mirror.db]
     if {![info exists mirror_filemap]

Modified: branches/new-help-system/base/src/port1.0/portpatch.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portpatch.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portpatch.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -49,7 +49,7 @@
 # Set up defaults
 default patch.asroot no
 default patch.dir {${worksrcpath}}
-default patch.cmd patch
+default patch.cmd {[findBinary patch $portutil::autoconf::patch_path]}
 default patch.pre_args -p0
 
 proc portpatch::patch_main {args} {
@@ -57,45 +57,35 @@
 
     # First make sure that patchfiles exists and isn't stubbed out.
     if {![exists patchfiles]} {
-    return 0
+        return 0
     }
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Applying patches to %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Applying patches to %s"] [option name]]"
 
-    # start gsoc08-privileges
-    if { [tbool patch.asroot] } {
-    # if port is marked as needing root
-        elevateToRoot "patch"
-    }
-    # end gsoc08-privileges
-
     foreach patch [option patchfiles] {
-    set patch_file [getdistname $patch]
-    if {[file exists [option filespath]/$patch_file]} {
-        lappend patchlist [option filespath]/$patch_file
-    } elseif {[file exists [option distpath]/$patch_file]} {
-        lappend patchlist [option distpath]/$patch_file
-    } else {
-        return -code error [format [msgcat::mc "Patch file %s is missing"] $patch]
+        set patch_file [getdistname $patch]
+        if {[file exists [option filespath]/$patch_file]} {
+            lappend patchlist [option filespath]/$patch_file
+        } elseif {[file exists [option distpath]/$patch_file]} {
+            lappend patchlist [option distpath]/$patch_file
+        } else {
+            return -code error [format [msgcat::mc "Patch file %s is missing"] $patch]
+        }
     }
-    }
     if {![info exists patchlist]} {
-    return -code error [msgcat::mc "Patch files missing"]
+        return -code error [msgcat::mc "Patch files missing"]
     }
     _cd [option worksrcpath]
+    set gzcat "[findBinary gzip $portutil::autoconf::gzip_path] -dc"
+    set bzcat "[findBinary bzip2 $portutil::autoconf::bzip2_path] -dc"
     foreach patch $patchlist {
-    ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $patch]"
-    if {[option os.platform] == "linux"} {
-        set gzcat "zcat"
-    } else {
-        set gzcat "gzcat"
+        ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $patch]"
+        switch -- [file extension $patch] {
+            .Z -
+            .gz {command_exec patch "$gzcat \"$patch\" | (" ")"}
+            .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"}
+            default {command_exec patch "" "< '$patch'"}
+        }
     }
-    switch -glob -- [file tail $patch] {
-        *.Z -
-        *.gz {command_exec patch "$gzcat \"$patch\" | (" ")"}
-        *.bz2 {command_exec patch "bzcat \"$patch\" | (" ")"}
-        default {command_exec patch "" "< '$patch'"}
-    }
-    }
     return 0
 }

Modified: branches/new-help-system/base/src/port1.0/portstartupitem.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portstartupitem.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portstartupitem.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -74,7 +74,7 @@
 set_ui_prefix
 
 proc portstartupitem::startupitem_create_rcng {args} {
-    global prefix destroot portname os.platform
+    global prefix destroot name os.platform
     global startupitem.name startupitem.requires
     global startupitem.start startupitem.stop startupitem.restart
     global startupitem.type
@@ -120,7 +120,7 @@
 }
 
 proc portstartupitem::startupitem_create_darwin_systemstarter {args} {
-    global UI_PREFIX prefix destroot destroot.keepdirs  portname os.platform
+    global UI_PREFIX prefix destroot destroot.keepdirs name os.platform
     global startupitem.name startupitem.requires startupitem.init
     global startupitem.start startupitem.stop startupitem.restart startupitem.executable
     global startupitem.pidfile startupitem.logfile startupitem.logevents
@@ -177,10 +177,10 @@
         # An executable is specified, and there is no init, start, stop, or restart
     } else {
         if { ![llength ${startupitem.start} ] } {
-            set startupitem.start [list "sh ${scriptdir}/${portname}.sh start"]
+            set startupitem.start [list "sh ${scriptdir}/${name}.sh start"]
         }
         if { ![llength ${startupitem.stop} ] } {
-            set startupitem.stop [list "sh ${scriptdir}/${portname}.sh stop"]
+            set startupitem.stop [list "sh ${scriptdir}/${name}.sh stop"]
         }
     }
     if { ![llength ${startupitem.requires} ] } {
@@ -377,7 +377,7 @@
     # Emit some information for the user
     ui_msg "###########################################################"
     ui_msg "# A startup item has been generated that will aid in"
-    ui_msg "# starting ${portname} with SystemStarter. It is disabled"
+    ui_msg "# starting ${name} with SystemStarter. It is disabled"
     ui_msg "# by default. Add the following line to /etc/hostconfig"
     ui_msg "# or ${prefix}/etc/rc.conf to start it at startup:"
     ui_msg "#"
@@ -386,7 +386,7 @@
 }
 
 proc portstartupitem::startupitem_create_darwin_launchd {args} {
-    global UI_PREFIX prefix destroot destroot.keepdirs portname os.platform
+    global UI_PREFIX prefix destroot destroot.keepdirs name os.platform
     global startupitem.name startupitem.uniquename startupitem.plist startupitem.location
     global startupitem.init startupitem.start startupitem.stop startupitem.restart startupitem.executable
     global startupitem.pidfile startupitem.logfile startupitem.logevents startupitem.netchange
@@ -425,10 +425,10 @@
         set wrapper         "${itemdir}/${wrappername}"
 
         if { ![llength ${startupitem.start}] } {
-            set startupitem.start [list "sh ${scriptdir}/${portname}.sh start"]
+            set startupitem.start [list "sh ${scriptdir}/${name}.sh start"]
         }
         if { ![llength ${startupitem.stop}] } {
-            set startupitem.stop [list "sh ${scriptdir}/${portname}.sh stop"]
+            set startupitem.stop [list "sh ${scriptdir}/${name}.sh stop"]
         }
         if { ![llength ${startupitem.restart}] } {
             set startupitem.restart [list Stop Start]
@@ -603,7 +603,7 @@
     # Emit some information for the user
     ui_msg "###########################################################"
     ui_msg "# A startup item has been generated that will aid in"
-    ui_msg "# starting ${portname} with launchd. It is disabled"
+    ui_msg "# starting ${name} with launchd. It is disabled"
     ui_msg "# by default. Execute the following command to start it,"
     ui_msg "# and to cause it to launch at startup:"
     ui_msg "#"

Modified: branches/new-help-system/base/src/port1.0/portsubmit.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portsubmit.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portsubmit.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -55,7 +55,7 @@
 
 
 proc portsubmit::submit_main {args} {
-    global mp_remote_submit_url portname portversion portverbose prefix UI_PREFIX workpath portpath
+    global mp_remote_submit_url name version portverbose prefix UI_PREFIX workpath portpath
 
     set submiturl $mp_remote_submit_url
 
@@ -68,7 +68,7 @@
     file mkdir ${workpath}
 
     # Create portpkg.xar in the work directory
-    set pkgpath "${workpath}/${portname}.portpkg"
+    set pkgpath "${workpath}/${name}.portpkg"
 
     # TODO: If a private key was provided, create a signed digest of the submission
 
@@ -83,13 +83,13 @@
     set cmd [join $args]
 
     if {[tbool portverbose]} {
-        ui_msg "Submitting portpkg $pkgpath for $portname to $submiturl"
+        ui_msg "Submitting portpkg $pkgpath for $name to $submiturl"
     }
 
     # Invoke curl to do the submit
     ui_debug $cmd
     if {[system $cmd] != ""} {
-        return -code error [format [msgcat::mc "Failure during submit of port %s"] $portname]
+        return -code error [format [msgcat::mc "Failure during submit of port %s"] $name]
     }
 
     # Parse the result
@@ -108,7 +108,7 @@
     }
     if {[info exists result(STATUS)]} {
         if { $result(STATUS) == 0 } {
-            ui_msg "Submitted portpkg for $portname"
+            ui_msg "Submitted portpkg for $name"
             if {[info exists result(DOWNLOAD_URL)]} {
                 ui_msg "    download URL => $result(DOWNLOAD_URL)"
             }
@@ -116,10 +116,10 @@
                 ui_msg "    human readable URL => $result(HUMAN_URL)"
             }
         } else {
-            return -code error [format [msgcat::mc "Status %d reported during submit of port %s"] $result(STATUS) $portname]
+            return -code error [format [msgcat::mc "Status %d reported during submit of port %s"] $result(STATUS) $name]
         }
     } else {
-        return -code error [format [msgcat::mc "Status not received during submit of port %s"] $portname]
+        return -code error [format [msgcat::mc "Status not received during submit of port %s"] $name]
     }
 
     return
@@ -136,7 +136,7 @@
     }
 
     if {[system $cmd] != ""} {
-    return -code error [format [msgcat::mc "Failed to archive port : %s"] $portname]
+    return -code error [format [msgcat::mc "Failed to archive port : %s"] $name]
     }
 
     set portsource ""
@@ -152,13 +152,13 @@
         close $fd
     }
     if {$portsource == ""} {
-        ui_msg "$UI_PREFIX Submitting $portname-$portversion"
+        ui_msg "$UI_PREFIX Submitting $name-$version"
         puts -nonewline "URL: "
         flush stdout
         gets stdin portsource
     }
 
-    ui_msg "$UI_PREFIX Submitting $portname-$portversion to $portsource"
+    ui_msg "$UI_PREFIX Submitting $name-$version to $portsource"
 
     puts -nonewline "Username: "
     flush stdout
@@ -170,7 +170,7 @@
     puts ""
     exec stty echo
 
-    set vars {portname portversion maintainers categories description \
+    set vars {name version maintainers categories description \
         long_description master_sites}
     eval "global $vars"
     foreach var $vars {
@@ -181,8 +181,8 @@
     append cmd "--silent "
     append cmd "--url [regsub -- {^mports} $portsource {http}]/cgi-bin/portsubmit.cgi "
     append cmd "--output ${workpath}/.portsubmit.out "
-    append cmd "-F name=${portname} "
-    append cmd "-F version=${portversion} "
+    append cmd "-F name=${name} "
+    append cmd "-F version=${version} "
     append cmd "-F base_rev=${base_rev} "
     append cmd "-F md5=[md5 file ${workpath}/Portfile.tar.gz] "
     append cmd "-F attachment=@${workpath}/Portfile.tar.gz "
@@ -196,7 +196,7 @@
 
     ui_debug $cmd
     if {[system $cmd] != ""} {
-    return -code error [format [msgcat::mc "Failed to submit port : %s"] $portname]
+    return -code error [format [msgcat::mc "Failed to submit port : %s"] $name]
     }
 
     #
@@ -217,12 +217,12 @@
     if {[info exists result(OK)]} {
         set fd [open ".mports_source" w]
         puts $fd "source: $portsource"
-        puts $fd "port: $portname"
-        puts $fd "version: $portversion"
+        puts $fd "port: $name"
+        puts $fd "version: $version"
         puts $fd "revision: $result(revision)"
         close $fd
 
-        ui_msg "$portname-$portversion submitted successfully."
+        ui_msg "$name-$version submitted successfully."
         ui_msg "New revision: $result(revision)"
     } elseif {[info exists result(ERROR)]} {
         return -code error $result(ERROR)
@@ -232,14 +232,14 @@
         set tmpdir [mktemp "/tmp/mports.XXXXXXXX"]
         file mkdir $tmpdir/new
         file mkdir $tmpdir/old
-        set worker [mport_open $portsource/files/$portname/$portversion/$result(revision)/Portfile.tar.gz [list portdir $tmpdir/new]]
+        set worker [mport_open $portsource/files/$name/$version/$result(revision)/Portfile.tar.gz [list portdir $tmpdir/new]]
         if {$base_rev != ""} {
-            set worker2 [mport_open $portsource/files/$portname/$portversion/$base_rev/Portfile.tar.gz [list portdir $tmpdir/old]]
-            catch {system "diff3 -m -E -- $portpath/Portfile $tmpdir/old/$portname-$portversion/Portfile $tmpdir/new/$portname-$portversion/Portfile > $tmpdir/Portfile"}
+            set worker2 [mport_open $portsource/files/$name/$version/$base_rev/Portfile.tar.gz [list portdir $tmpdir/old]]
+            catch {system "diff3 -m -E -- $portpath/Portfile $tmpdir/old/$name-$version/Portfile $tmpdir/new/$name-$version/Portfile > $tmpdir/Portfile"}
             file rename -force "${tmpdir}/Portfile" "${portpath}/Portfile"
             mport_close $worker2
         } else {
-            catch {system "diff3 -m -E -- $portpath/Portfile $portpath/Portfile $tmpdir/new/$portname-$portversion/Portfile > $tmpdir/Portfile"}
+            catch {system "diff3 -m -E -- $portpath/Portfile $portpath/Portfile $tmpdir/new/$name-$version/Portfile > $tmpdir/Portfile"}
             file rename -force "${tmpdir}/Portfile" "${portpath}/Portfile"
         }
         mport_close $worker
@@ -247,13 +247,13 @@
 
         set fd [open [file join "$portpath" ".mports_source"] w]
         puts $fd "source: $portsource"
-        puts $fd "port: $portname"
-        puts $fd "version: $portversion"
+        puts $fd "port: $name"
+        puts $fd "version: $version"
         puts $fd "revision: $result(revision)"
         close $fd
 
         ui_error "A newer revision of this port has already been submitted."
-        ui_error "Portfile: $portname-$portversion"
+        ui_error "Portfile: $name-$version"
         ui_error "Base revision: $base_rev"
         ui_error "Current revision: $result(revision)"
         ui_error "Please edit the Portfile to resolve any conflicts and resubmit."

Modified: branches/new-help-system/base/src/port1.0/porttest.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/porttest.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/porttest.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -26,16 +26,16 @@
 set_ui_prefix
 
 proc porttest::test_start {args} {
-    global UI_PREFIX portname
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Testing %s"] ${portname}]"
+    global UI_PREFIX name
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Testing %s"] ${name}]"
 }
 
 proc porttest::test_main {args} {
-    global portname test.run
+    global name test.run
     if {[tbool test.run]} {
         command_exec test
     } else {
-    return -code error [format [msgcat::mc "%s has no tests turned on. see 'test.run' in portfile(7)"] $portname]
+    return -code error [format [msgcat::mc "%s has no tests turned on. see 'test.run' in portfile(7)"] $name]
     }
     return 0
 }

Modified: branches/new-help-system/base/src/port1.0/porttrace.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/porttrace.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/porttrace.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -44,7 +44,7 @@
         if {[catch {package require Thread} error]} {
             ui_warn "trace requires Tcl Thread package ($error)"
         } else {
-            global env trace_fifo trace_sandboxbounds portpath
+            global env trace_fifo trace_sandboxbounds portpath distpath
             # Create a fifo.
             # path in unix socket limited to 109 chars
             # # set trace_fifo "$workpath/trace_fifo"
@@ -78,7 +78,7 @@
             # /Library/Caches/com.apple.Xcode
             # $CCACHE_DIR
             # $HOMEDIR/.ccache
-            set trace_sandboxbounds "/tmp:/private/tmp:/var/tmp:/private/var/tmp:/dev/:/etc/passwd:/etc/groups:/etc/localtime:/Library/Caches/com.apple.Xcode:$env(HOME)/.ccache:${workpath}:$portpath"
+            set trace_sandboxbounds "/tmp:/private/tmp:/var/tmp:/private/var/tmp:/dev/:/etc/passwd:/etc/groups:/etc/localtime:/Library/Caches/com.apple.Xcode:$env(HOME)/.ccache:${workpath}:${portpath}:${distpath}"
             if {[info exists env(TMPDIR)]} {
                 set trace_sandboxbounds "${trace_sandboxbounds}:$env(TMPDIR)"
             }
@@ -104,6 +104,7 @@
     global env
     if [info exists env(DARWINTRACE_SANDBOX_BOUNDS)] {
         unset env(DARWINTRACE_SANDBOX_BOUNDS)
+        unsetenv DARWINTRACE_SANDBOX_BOUNDS
     }
 }
 
@@ -147,11 +148,9 @@
     global os.platform
     if {${os.platform} == "darwin"} {
         global env trace_fifo
-        unset env(DYLD_INSERT_LIBRARIES)
-        unset env(DYLD_FORCE_FLAT_NAMESPACE)
-        unset env(DARWINTRACE_LOG)
-        if [info exists env(DARWINTRACE_SANDBOX_BOUNDS)] {
-            unset env(DARWINTRACE_SANDBOX_BOUNDS)
+        foreach var {DYLD_INSERT_LIBRARIES DYLD_FORCE_FLAT_NAMESPACE DARWINTRACE_LOG DARWINTRACE_SANDBOX_BOUNDS} {
+            array unset env $var
+            unsetenv $var
         }
 
         #kill socket
@@ -213,7 +212,7 @@
 
 # Private.
 # Slave method to read a line from the trace.
-proc porttrace::lave_read_line {chan} {
+proc porttrace::slave_read_line {chan} {
     global ports_list trace_filemap sandbox_violation_list workpath
     global env
 

Modified: branches/new-help-system/base/src/port1.0/portutil.tcl
===================================================================
--- branches/new-help-system/base/src/port1.0/portutil.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/port1.0/portutil.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -54,32 +54,33 @@
 # option
 # This is an accessor for Portfile options.  Targets may use
 # this in the same style as the standard Tcl "set" procedure.
-#   name  - the name of the option to read or write
+#   option  - the name of the option to read or write
+#       not called 'name' because this would fail if its value was 'name'...
 #   value - an optional value to assign to the option
 
-proc option {name args} {
+proc option {option args} {
     # XXX: right now we just transparently use globals
     # eventually this will need to bridge the options between
     # the Portfile's interpreter and the target's interpreters.
-    global $name
+    global $option
     if {[llength $args] > 0} {
-        ui_debug "setting option $name to $args"
-        set $name [lindex $args 0]
+        ui_debug "setting option $option to $args"
+        set $option [lindex $args 0]
     }
-    return [set $name]
+    return [set $option]
 }
 
 # exists
 # This is an accessor for Portfile options.  Targets may use
 # this procedure to test for the existence of a Portfile option.
-#   name - the name of the option to test for existence
+#   option - the name of the option to test for existence
 
-proc exists {name} {
+proc exists {option} {
     # XXX: right now we just transparently use globals
     # eventually this will need to bridge the options between
     # the Portfile's interpreter and the target's interpreters.
-    global $name
-    return [info exists $name]
+    global $option
+    return [info exists $option]
 }
 
 ##
@@ -196,17 +197,20 @@
 # @param option deprecated option
 # @param action read/set
 # @param value ignored
-proc warn_deprecated_option {option action {value ""}} {
-    global portname $option deprecated_options
-    set newoption $deprecated_options($option)
+proc handle_deprecated_option {option action {value ""}} {
+    global name $option deprecated_options
+    set newoption [lindex $deprecated_options($option) 0]
+    set refcount  [lindex $deprecated_options($option) 1]
     global $newoption
 
     if {$newoption == ""} {
-        ui_warn "Port $portname using deprecated option \"$option\"."
+        ui_warn "Port $name using deprecated option \"$option\"."
         return
     }
 
-    ui_warn "Port $portname using deprecated option \"$option\", superseded by \"$newoption\"."
+    # Increment reference counter
+    lset deprecated_options($option) 1 [expr $refcount + 1]
+
     if {$action != "read"} {
         $newoption [set $option]
     } else {
@@ -215,16 +219,26 @@
 }
 
 ##
-# Causes a warning to be printed when an option is set or accessed
+# Get the name of the array containing the deprecated options
+# Thin layer avoiding to share global variables without notice
+proc get_deprecated_options {} {
+    return "deprecated_options"
+}
+
+##
+# Mark an option as deprecate
+# If it is set or accessed, it will be mapped it to the new option
 #
 # @param option name of the option
 # @param newoption name of a superseding option
 proc option_deprecate {option {newoption ""} } {
     global deprecated_options
     # If a new option is specified, default the option to $newoption
-    set deprecated_options($option) $newoption
-    # Register a proc for printing a warning
-    option_proc $option warn_deprecated_option
+    set deprecated_options($option) [list $newoption 0]
+    # Create a normal option for compatibility
+    options $option
+    # Register a proc for handling the deprecation
+    option_proc $option handle_deprecated_option
 }
 
 ##
@@ -815,7 +829,6 @@
 # reinplace
 # Provides "sed in place" functionality
 proc reinplace {args}  {
-    global euid macportsuser
 
     set extended 0
     while 1 {
@@ -1159,7 +1172,7 @@
         foreach arch $universal_archlist {
             append lipoSources "-arch ${arch} ${workpath}/${arch}/${file} "
         }
-        system "lipo ${lipoSources}-create -output ${file}"
+        system "[findBinary lipo $portutil::autoconf::lipo_path] ${lipoSources}-create -output ${file}"
     }
 }
 
@@ -1194,7 +1207,8 @@
 set ports_dry_last_skipped ""
 
 proc target_run {ditem} {
-    global target_state_fd portname workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped errorisprivileges
+    global target_state_fd workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped
+    set portname [option name]
     set result 0
     set skipped 0
     set procedure [ditem_key $ditem procedure]
@@ -1204,18 +1218,21 @@
     }
 
     if {$procedure != ""} {
-        set name [ditem_key $ditem name]
+        set targetname [ditem_key $ditem name]
+        if { [tbool ${targetname}.asroot] } {
+            elevateToRoot $targetname
+        }
 
         if {[ditem_contains $ditem init]} {
-            set result [catch {[ditem_key $ditem init] $name} errstr]
+            set result [catch {[ditem_key $ditem init] $targetname} errstr]
         }
 
         if {$result == 0} {
             # Skip the step if required and explain why through ui_debug.
             # check if the step was already done (as mentioned in the state file)
             if {[ditem_key $ditem state] != "no"
-                    && [check_statefile target $name $target_state_fd]} {
-                ui_debug "Skipping completed $name ($portname)"
+                    && [check_statefile target $targetname $target_state_fd]} {
+                ui_debug "Skipping completed $targetname ($portname)"
                 set skipped 1
             }
 
@@ -1223,10 +1240,10 @@
             if {[info exists ports_dryrun] && $ports_dryrun == "yes"} {
                 # only one message per portname
                 if {$portname != $ports_dry_last_skipped} {
-                    ui_msg "For $portname: skipping $name (dry run)"
+                    ui_msg "For $portname: skipping $targetname (dry run)"
                     set ports_dry_last_skipped $portname
                 } else {
-                    ui_info "    .. and skipping $name"
+                    ui_info "    .. and skipping $targetname"
                 }
                 set skipped 1
             }
@@ -1237,7 +1254,7 @@
 
                 # Execute pre-run procedure
                 if {[ditem_contains $ditem prerun]} {
-                    set result [catch {[ditem_key $ditem prerun] $name} errstr]
+                    set result [catch {[ditem_key $ditem prerun] $targetname} errstr]
                 }
 
                 #start tracelib
@@ -1251,87 +1268,80 @@
                     # outside the sandbox.
                     if {$target != "activate"
                       && $target != "archive"
-                      && $target != "fetch"
                       && $target != "install"} {
                         porttrace::trace_enable_fence
                     }
 
                     # collect deps
+                    set depends {}
+                    set deptypes {}
 
-                    # Don't check dependencies for extract (they're not honored
-                    # anyway). This avoids warnings about bzip2.
-                    if {$target != "extract"} {
-                        set depends {}
-                        set deptypes {}
+                    # Determine deptypes to look for based on target
+                    switch $target {
+                        fetch       -
+                        checksum    { set deptypes "depends_fetch" }
+                        extract     -
+                        patch       { set deptypes "depends_fetch depends_extract" }
+                        configure   -
+                        build       { set deptypes "depends_fetch depends_extract depends_lib depends_build" }
 
-                        # Determine deptypes to look for based on target
-                        switch $target {
-                            configure   -
-                            build       { set deptypes "depends_lib depends_build" }
+                        test        -
+                        destroot    -
+                        install     -
+                        archive     -
+                        dmg         -
+                        pkg         -
+                        portpkg     -
+                        mpkg        -
+                        rpm         -
+                        srpm        -
+                        dpkg        -
+                        mdmg        -
+                        activate    -
+                        ""          { set deptypes "depends_fetch depends_extract depends_lib depends_build depends_run" }
+                    }
 
-                            test        -
-                            destroot    -
-                            install     -
-                            archive     -
-                            dmg         -
-                            pkg         -
-                            portpkg     -
-                            mpkg        -
-                            rpm         -
-                            srpm        -
-                            dpkg        -
-                            mdmg        -
-                            activate    -
-                            ""          { 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.
+                        if {[info exists PortInfo($deptype)] && $PortInfo($deptype) != ""} {
+                            set depends [concat $depends $PortInfo($deptype)]
                         }
+                    }
 
-                        # Gather the dependencies for deptypes
-                        foreach deptype $deptypes {
-                            # Add to the list of dependencies if the option exists and isn't empty.
-                            if {[info exists PortInfo($deptype)] && $PortInfo($deptype) != ""} {
-                                set depends [concat $depends $PortInfo($deptype)]
-                            }
-                        }
+                    # Dependencies are in the form verb:[param:]port
+                    set depsPorts {}
+                    foreach depspec $depends {
+                        # grab the portname portion of the depspec
+                        set dep_portname [lindex [split $depspec :] end]
+                        lappend depsPorts $dep_portname
+                    }
 
-                        # Dependencies are in the form verb:[param:]port
-                        set depsPorts {}
-                        foreach depspec $depends {
-                            # grab the portname portion of the depspec
-                            set dep_portname [lindex [split $depspec :] end]
-                            lappend depsPorts $dep_portname
-                        }
-
-                        # always allow gzip in destroot as it is used to compress man pages
-                        if {$target == "destroot"} {
-                            lappend depsPorts "gzip"
-                        }
-
-                        set portlist $depsPorts
-                        foreach depName $depsPorts {
-                            set portlist [recursive_collect_deps $depName $deptypes $portlist]
-                        }
-
-                        if {[llength $deptypes] > 0} {tracelib setdeps $portlist}
+                    set portlist $depsPorts
+                    foreach depName $depsPorts {
+                        set portlist [recursive_collect_deps $depName $deptypes $portlist]
                     }
+
+                    if {[llength $deptypes] > 0} {tracelib setdeps $portlist}
                 }
 
                 if {$result == 0} {
                     foreach pre [ditem_key $ditem pre] {
                         ui_debug "Executing $pre"
-                        set result [catch {$pre $name} errstr]
+                        set result [catch {$pre $targetname} errstr]
                         if {$result != 0} { break }
                     }
                 }
 
                 if {$result == 0} {
-                ui_debug "Executing $name ($portname)"
-                set result [catch {$procedure $name} errstr]
+                ui_debug "Executing $targetname ($portname)"
+                set result [catch {$procedure $targetname} errstr]
                 }
 
                 if {$result == 0} {
                     foreach post [ditem_key $ditem post] {
                         ui_debug "Executing $post"
-                        set result [catch {$post $name} errstr]
+                        set result [catch {$post $targetname} errstr]
                         if {$result != 0} { break }
                     }
                 }
@@ -1339,7 +1349,7 @@
                 if {[ditem_contains $ditem postrun] && $result == 0} {
                     set postrun [ditem_key $ditem postrun]
                     ui_debug "Executing $postrun"
-                    set result [catch {$postrun $name} errstr]
+                    set result [catch {$postrun $targetname} errstr]
                 }
 
                 # Check dependencies & file creations outside workpath.
@@ -1364,21 +1374,17 @@
             if {$skipped == 0
           && [ditem_key $ditem runtype] != "always"
           && [ditem_key $ditem state] != "no"} {
-            write_statefile target $name $target_state_fd
+            write_statefile target $targetname $target_state_fd
             }
         } else {
-            if {$errorisprivileges != "yes"} {
-                global errorInfo
-                ui_error "Target $name returned: $errstr"
-                ui_debug "Backtrace: $errorInfo"
-            } else {
-                ui_msg "Target $name returned: $errstr"
-            }
+            global errorInfo
+            ui_error "Target $targetname returned: $errstr"
+            ui_debug "Backtrace: $errorInfo"
             set result 1
         }
 
     } else {
-        ui_info "Warning: $name does not have a registered procedure"
+        ui_info "Warning: $targetname does not have a registered procedure"
         set result 1
     }
 
@@ -1423,27 +1429,26 @@
 
 
 proc eval_targets {target} {
-    global targets target_state_fd portname portversion portrevision portvariants ports_dryrun user_options errorisprivileges
+    global targets target_state_fd name version revision portvariants ports_dryrun user_options
     set dlist $targets
-    set errorisprivileges "no"
 
     # the statefile will likely be autocleaned away after install,
     # so special-case ignore already-completed install and activate
-    if {[registry_exists $portname $portversion $portrevision $portvariants]} {
+    if {[registry_exists $name $version $revision $portvariants]} {
         if {$target == "install"} {
-            ui_debug "Skipping $target ($portname) since this port is already installed"
+            ui_debug "Skipping $target ($name) since this port is already installed"
             return 0
         } elseif {$target == "activate"} {
-            set regref [registry_open $portname $portversion $portrevision $portvariants]
+            set regref [registry_open $name $version $revision $portvariants]
             if {[registry_prop_retr $regref active] != 0} {
                 # Something to close the registry entry may be called here, if it existed.
-                ui_debug "Skipping $target ($portname @${portversion}_${portrevision}${portvariants}) since this port is already active"
+                ui_debug "Skipping $target ($name @${version}_${revision}${portvariants}) since this port is already active"
             } else {
                 # do the activate here since target_run doesn't know how to selectively ignore the preceding steps
                 if {[info exists ports_dryrun] && $ports_dryrun == "yes"} {
-                    ui_msg "For $portname: skipping $target (dry run)"
+                    ui_msg "For $name: skipping $target (dry run)"
                 } else {
-                    registry_activate $portname ${portversion}_${portrevision}${portvariants} [array get user_options]
+                    registry_activate $name ${version}_${revision}${portvariants} [array get user_options]
                 }
             }
             return 0
@@ -1467,7 +1472,7 @@
 
     if {[llength $dlist] > 0} {
         # somebody broke!
-        set errstring "Warning: the following items did not execute (for $portname):"
+        set errstring "Warning: the following items did not execute (for $name):"
         foreach ditem $dlist {
             append errstring " [ditem_key $ditem name]"
         }
@@ -1477,26 +1482,16 @@
         set result 0
     }
 
-    # start gsoc08-privileges
-    if { $result == 1 && $errorisprivileges == "yes" } {
-        set result 2
-    }
-    # end gsoc08-privileges
-
     return $result
 }
 
 # open_statefile
 # open file to store name of completed targets
 proc open_statefile {args} {
-    global workpath worksymlink place_worksymlink portname portpath ports_ignore_older
+    global workpath worksymlink place_worksymlink name portpath ports_ignore_older
     global altprefix usealtworkpath env applications_dir portbuildpath distpath
 
     # start gsoc08-privileges
-
-    # de-escalate privileges - only run if MacPorts was started with sudo
-    dropPrivileges
-
     if { ![file exists $workpath] } {
         if {[catch {set result [file mkdir $workpath]} result]} {
             global errorInfo
@@ -1513,7 +1508,7 @@
 
         if { $userid !=0 } {
             ui_msg "MacPorts running without privileges.\
-                    You may be prompted for your sudo password in order to complete certain actions (eg install)."
+                    You may be unable to complete certain actions (eg install)."
         }
 
         # set global variable indicating to other functions to use ~/.macports as well
@@ -1570,8 +1565,9 @@
     if {![file isdirectory $workpath]} {
         file mkdir $workpath
     }
+
     # flock Portfile
-    set statefile [file join $workpath .macports.${portname}.state]
+    set statefile [file join $workpath .macports.${name}.state]
     if {[file exists $statefile]} {
         if {![file writable $statefile]} {
             return -code error "$statefile is not writable - check permission on port directory"
@@ -1583,20 +1579,23 @@
             file mkdir [file join $workpath]
         }
     }
+    chownAsRoot $workpath
 
     # Create a symlink to the workpath for port authors
     if {[tbool place_worksymlink] && ![file isdirectory $worksymlink]} {
         ui_debug "Attempting ln -sf $workpath $worksymlink"
         ln -sf $workpath $worksymlink
     }
+    # de-escalate privileges - only run if MacPorts was started with sudo
+    dropPrivileges
 
     set fd [open $statefile a+]
     if {[catch {flock $fd -exclusive -noblock} result]} {
         if {"$result" == "EAGAIN"} {
             ui_msg "Waiting for lock on $statefile"
-    } elseif {"$result" == "EOPNOTSUPP"} {
-        # Locking not supported, just return
-        return $fd
+        } elseif {"$result" == "EOPNOTSUPP"} {
+            # Locking not supported, just return
+            return $fd
         } else {
             return -code error "$result obtaining lock on $statefile"
         }
@@ -1868,7 +1867,7 @@
     } elseif {[exists use_xmkmf] && [option use_xmkmf]} {
         ui_debug "using xmkmf, so not adding the default universal variant"
         return no
-    } elseif {[exists use_configure] && ![option use_configure] && ![exists xcode.universal.settings]} {
+    } elseif {[exists use_configure] && ![option use_configure] && ![exists xcode.project]} {
         # Allow +universal if port uses xcode portgroup.
         ui_debug "not using configure, so not adding the default universal variant"
         return no
@@ -1882,20 +1881,8 @@
 }
 
 proc add_default_universal_variant {args} {
-    # Declare default universal variant if universal SDK is installed
-    variant universal {
-        pre-fetch {
-            if {![file exists ${configure.universal_sysroot}]} {
-                return -code error "Universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail"
-            }
-        }
-
-        eval configure.args-append ${configure.universal_args}
-        eval configure.cflags-append ${configure.universal_cflags}
-        eval configure.cppflags-append ${configure.universal_cppflags}
-        eval configure.cxxflags-append ${configure.universal_cxxflags}
-        eval configure.ldflags-append ${configure.universal_ldflags}
-    }
+    # Declare default universal variant (all the magic happens in portconfigure now)
+    variant universal {}
 }
 
 # Target class definition.
@@ -2048,52 +2035,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 {*}
@@ -2114,12 +2055,13 @@
     }
 
     if {${os.platform} eq "darwin"} {
-        exec dscl . -create /Users/${name} Password ${passwd}
-        exec dscl . -create /Users/${name} UniqueID ${uid}
-        exec dscl . -create /Users/${name} PrimaryGroupID ${gid}
-        exec dscl . -create /Users/${name} RealName ${realname}
-        exec dscl . -create /Users/${name} NFSHomeDirectory ${home}
-        exec dscl . -create /Users/${name} UserShell ${shell}
+        set dscl [findBinary dscl $portutil::autoconf::dscl_path]
+        exec $dscl . -create /Users/${name} Password ${passwd}
+        exec $dscl . -create /Users/${name} UniqueID ${uid}
+        exec $dscl . -create /Users/${name} PrimaryGroupID ${gid}
+        exec $dscl . -create /Users/${name} RealName ${realname}
+        exec $dscl . -create /Users/${name} NFSHomeDirectory ${home}
+        exec $dscl . -create /Users/${name} UserShell ${shell}
     } else {
         # XXX adduser is only available for darwin, add more support here
         ui_warn "WARNING: adduser is not implemented on ${os.platform}."
@@ -2145,11 +2087,12 @@
     }
 
     if {${os.platform} eq "darwin"} {
-        exec dscl . -create /Groups/${name} Password ${passwd}
-        exec dscl . -create /Groups/${name} RealName ${realname}
-        exec dscl . -create /Groups/${name} PrimaryGroupID ${gid}
+        set dscl [findBinary dscl $portutil::autoconf::dscl_path]
+        exec $dscl . -create /Groups/${name} Password ${passwd}
+        exec $dscl . -create /Groups/${name} RealName ${realname}
+        exec $dscl . -create /Groups/${name} PrimaryGroupID ${gid}
         if {${users} ne ""} {
-            exec dscl . -create /Groups/${name} GroupMembership ${users}
+            exec $dscl . -create /Groups/${name} GroupMembership ${users}
         }
     } else {
         # XXX addgroup is only available for darwin, add more support here
@@ -2176,7 +2119,7 @@
 }
 
 # check for a binary in the path
-# returns an error code if it can not be found
+# returns an error code if it cannot be found
 proc binaryInPath {binary} {
     global env
     foreach dir [split $env(PATH) :] {
@@ -2188,6 +2131,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
@@ -2220,10 +2177,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 {
@@ -2231,18 +2188,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 {
@@ -2252,15 +2216,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
                 }
             }
@@ -2286,7 +2250,7 @@
         set exec-lipo [concat ${exec-lipo} [list "-arch" "${arch}" "${base}/${arch}${file}"]]
     }
     set exec-lipo [concat ${exec-lipo}]
-    system "/usr/bin/lipo ${exec-lipo} -create -output ${target}${file}"
+    system "[findBinary lipo $portutil::autoconf::lipo_path] ${exec-lipo} -create -output ${target}${file}"
 }
 
 # private function
@@ -2310,7 +2274,7 @@
     ui_debug "ba: '${basearch}' ('${archs}')"
     foreach arch [lrange ${archs} 1 end] {
         # checking for differences; TODO: error more gracefully on non-equal files
-        exec "/usr/bin/diff" "-q" "${base}/${basearch}${file}" "${base}/${arch}${file}"
+        exec [findBinary diff $portutil::autoconf::diff_path] "-q" "${base}/${basearch}${file}" "${base}/${arch}${file}"
     }
     ui_debug "ba: '${basearch}'"
     file copy "${base}/${basearch}${file}" "${target}${file}"
@@ -2339,7 +2303,7 @@
         set fpath [string range "${file}" [string length "${basepath}"] [string length "${file}"]]
         if {${fpath} != ""} {
             # determine the type (dir/file/link)
-            set filetype [exec "/usr/bin/file" "-b" "${basepath}${fpath}"]
+            set filetype [exec [findBinary file $portutil::autoconf::file_path] "-b" "${basepath}${fpath}"]
             switch -regexp ${filetype} {
                 directory {
                     # just create directories
@@ -2421,7 +2385,7 @@
 #
 # @param action the action for which privileges are being elevated
 proc elevateToRoot {action} {
-    global euid egid macportsuser errorisprivileges
+    global euid egid macportsuser
 
     if { [getuid] == 0 && [geteuid] == [name_to_uid "$macportsuser"] } {
     # if started with sudo but have dropped the privileges
@@ -2432,8 +2396,7 @@
     }
 
     if { [getuid] != 0 } {
-        set errorisprivileges yes
-        return -code error "port requires root privileges for this action and needs you to type your password for sudo.";
+        return -code error "MacPorts requires root privileges for this action";
     }
 }
 
@@ -2444,21 +2407,15 @@
     global euid egid macportsuser workpath
     if { [geteuid] == 0 } {
         if { [catch {
-                set euid [geteuid]
-                set egid [getegid]
                 ui_debug "changing euid/egid - current euid: $euid - current egid: $egid"
 
                 #seteuid [name_to_uid [file attributes $workpath -owner]]
                 #setegid [name_to_gid [file attributes $workpath -group]]
 
-                setegid [name_to_gid "$macportsuser"]
+                setegid [uname_to_gid "$macportsuser"]
                 seteuid [name_to_uid "$macportsuser"]
                 ui_debug "egid changed to: [getegid]"
                 ui_debug "euid changed to: [geteuid]"
-
-                if {![file writable $workpath]} {
-                    ui_debug "Privileges successfully de-escalated. Unable to write to default workpath."
-                }
             }]
         } {
             ui_debug "$::errorInfo"

Modified: branches/new-help-system/base/src/programs/Makefile.in
===================================================================
--- branches/new-help-system/base/src/programs/Makefile.in	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/programs/Makefile.in	2009-06-15 03:11:26 UTC (rev 52362)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBDIR=	@REPLACEMENT_PROGS@ @EXTRA_PROGS@
+SUBDIR=	@EXTRA_PROGS@
 
 include ../../Mk/macports.subdir.mk
 


Property changes on: branches/new-help-system/base/src/registry1.0
___________________________________________________________________
Modified: svn:ignore
   - registry_autoconf.tcl

   + registry_autoconf.tcl
pkgIndex.tcl


Modified: branches/new-help-system/base/src/registry1.0/Makefile
===================================================================
--- branches/new-help-system/base/src/registry1.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry1.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/registry1.0/portimage.tcl
===================================================================
--- branches/new-help-system/base/src/registry1.0/portimage.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry1.0/portimage.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -124,17 +124,18 @@
 	
 	set imagefiles [_check_contents $name $contents $imagedir]
 	
+	registry::open_file_map
 	_activate_contents $name $imagefiles $imagedir
 
 	registry::property_store $ref active 1
 
 	registry::write_entry $ref
 
-	registry::open_file_map
 	foreach file $imagefiles {
 		registry::register_file $file $name
 	}
 	registry::write_file_map
+	registry::close_file_map
 }
 
 proc deactivate {name v optionslist} {
@@ -185,15 +186,16 @@
 
 	set imagedir [registry::property_retrieve $ref imagedir]
 
+	registry::open_file_map
 	set imagefiles [registry::port_registered $name]
 
 	_deactivate_contents $name $imagefiles
 
-	registry::open_file_map
 	foreach file $imagefiles {
 		registry::unregister_file $file
 	}
 	registry::write_file_map
+	registry::close_file_map
 	
 	registry::property_store $ref active 0
 
@@ -278,18 +280,10 @@
 		# Don't do anything if the directory already exists.
 		if { ![file isdirectory $dstfile] } {
 			file mkdir $dstfile
-	
 			# fix attributes on the directory.
-			set attributes [file attributes $srcfile]
-			for {set i 0} {$i < [llength $attributes]} {incr i} {
-				set opt [lindex $attributes $i]
-				incr i
-				set arg [lindex $attributes $i]
-				file attributes $dstfile $opt $arg
-			}
-	
+			eval file attributes {$dstfile} [file attributes $srcfile]
 			# set mtime on installed element
-			exec touch -r $srcfile $dstfile
+			file mtime $dstfile [file mtime $srcfile]
 		}
 	} elseif { [file type $srcfile] == "link" } {
 		file copy -force $srcfile $dstfile
@@ -328,7 +322,6 @@
 	# Last, if the file exists, and belongs to another port, and force is set
 	#  we remove the file from the file_map, take ownership of it, and 
 	#  clobber it
-	registry::open_file_map
 	foreach file $imagefiles {
 		set srcfile ${imagedir}${file}
 

Modified: branches/new-help-system/base/src/registry1.0/portuninstall.tcl
===================================================================
--- branches/new-help-system/base/src/registry1.0/portuninstall.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry1.0/portuninstall.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -124,10 +124,18 @@
 
 	set installtype [registry::property_retrieve $ref installtype]
 	if { $installtype == "image" && [registry::property_retrieve $ref active] == 1} {
-		#return -code error [msgcat::mc "Registry Error: ${portname} ${version}_${revision}${variants} is active."]
-		portimage::deactivate $portname ${version}_${revision}${variants} $optionslist
+		if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
+			ui_msg "For $portname @${version}_${revision}${variants}: skipping deactivate (dry run)"
+		} else {
+			portimage::deactivate $portname ${version}_${revision}${variants} $optionslist
+		}
 	}
 
+	if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
+		ui_msg "For $portname @${version}_${revision}${variants}: skipping uninstall (dry run)"
+		return 0
+	}
+	
 	ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s @%s_%s%s"] $portname $version $revision $variants]"
 
 	# Look to see if the port has registered an uninstall procedure

Modified: branches/new-help-system/base/src/registry1.0/receipt_flat.tcl
===================================================================
--- branches/new-help-system/base/src/registry1.0/receipt_flat.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry1.0/receipt_flat.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -296,6 +296,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
@@ -483,6 +484,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]
@@ -723,6 +727,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/new-help-system/base/src/registry1.0/registry.tcl
===================================================================
--- branches/new-help-system/base/src/registry1.0/registry.tcl	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry1.0/registry.tcl	2009-06-15 03:11:26 UTC (rev 52362)
@@ -261,6 +261,7 @@
 	open_file_map
         set r [${macports::registry.format}::register_bulk_files $files $port]
 	write_file_map
+	close_file_map
 	return $r
 }
 
@@ -274,6 +275,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/new-help-system/base/src/registry2.0
___________________________________________________________________
Modified: svn:ignore
   - registry.dylib

   + registry.dylib
pkgIndex.tcl


Modified: branches/new-help-system/base/src/registry2.0/Makefile
===================================================================
--- branches/new-help-system/base/src/registry2.0/Makefile	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry2.0/Makefile	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/registry2.0/registry.c
===================================================================
--- branches/new-help-system/base/src/registry2.0/registry.c	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/registry2.0/registry.c	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/new-help-system/base/src/tclobjc1.0/tclobjc.m
===================================================================
--- branches/new-help-system/base/src/tclobjc1.0/tclobjc.m	2009-06-15 02:53:52 UTC (rev 52361)
+++ branches/new-help-system/base/src/tclobjc1.0/tclobjc.m	2009-06-15 03:11:26 UTC (rev 52362)
@@ -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/20090614/31764909/attachment-0001.html>


More information about the macports-changes mailing list