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

blb at macports.org blb at macports.org
Wed Oct 14 19:52:29 PDT 2009


Revision: 59433
          http://trac.macports.org/changeset/59433
Author:   blb at macports.org
Date:     2009-10-14 19:52:27 -0700 (Wed, 14 Oct 2009)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/images-and-archives/base/ChangeLog
    branches/images-and-archives/base/Makefile.in
    branches/images-and-archives/base/aclocal.m4
    branches/images-and-archives/base/config/RELEASE_URL
    branches/images-and-archives/base/config.guess
    branches/images-and-archives/base/config.sub
    branches/images-and-archives/base/configure
    branches/images-and-archives/base/configure.ac
    branches/images-and-archives/base/doc/macports.conf.in
    branches/images-and-archives/base/doc/portfile.7
    branches/images-and-archives/base/doc/portstyle.7
    branches/images-and-archives/base/portmgr/ReleaseProcess
    branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings
    branches/images-and-archives/base/portmgr/freebsd/Makefile.in
    branches/images-and-archives/base/portmgr/freebsd/pkg-plist
    branches/images-and-archives/base/src/config.h.in
    branches/images-and-archives/base/src/macports1.0/macports.tcl
    branches/images-and-archives/base/src/pextlib1.0/Makefile
    branches/images-and-archives/base/src/pextlib1.0/Pextlib.c
    branches/images-and-archives/base/src/pextlib1.0/curl.c
    branches/images-and-archives/base/src/pextlib1.0/curl.h
    branches/images-and-archives/base/src/pextlib1.0/md5cmd.c
    branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c
    branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c
    branches/images-and-archives/base/src/pextlib1.0/tests/checksums.tcl
    branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in
    branches/images-and-archives/base/src/port1.0/portbuild.tcl
    branches/images-and-archives/base/src/port1.0/portextract.tcl
    branches/images-and-archives/base/src/port1.0/portfetch.tcl
    branches/images-and-archives/base/src/port1.0/portmain.tcl
    branches/images-and-archives/base/src/port1.0/portpatch.tcl
    branches/images-and-archives/base/src/port1.0/portutil.tcl
    branches/images-and-archives/base/src/registry1.0/registry.tcl

Added Paths:
-----------
    branches/images-and-archives/base/portmgr/fedora/macports.spec
    branches/images-and-archives/base/src/pextlib1.0/mktemp.c
    branches/images-and-archives/base/src/pextlib1.0/mktemp.h
    branches/images-and-archives/base/src/pextlib1.0/sha256cmd.c
    branches/images-and-archives/base/src/pextlib1.0/sha256cmd.h

Removed Paths:
-------------
    branches/images-and-archives/base/portmgr/fedora/macports.spec.in

Property Changed:
----------------
    branches/images-and-archives/base/


Property changes on: branches/images-and-archives/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /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:50249-57822
/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:50249-59431
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/images-and-archives/base/ChangeLog
===================================================================
--- branches/images-and-archives/base/ChangeLog	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/ChangeLog	2009-10-15 02:52:27 UTC (rev 59433)
@@ -3,7 +3,51 @@
 # $Id$
 ###
 
+Release 1.9.0 (unreleased):
 
+    - Use CommonCrypto/CommonDigest instead of OpenSSL libcrypto. (toby)
+
+    - Add SHA256 checksums in addition to MD5, SHA1 and RIPEMD160. (afb)
+
+    - New "patch.type gnu" for GNU patch, similar to "build.type gnu"
+      for GNU make. Only makes a difference for BSD patch and BSD make.
+
+    - Update the FreeBSD package, drop the old Fedora/Ubuntu packages.
+      (MacPorts now requires BSD, but objc/Foundation is now optional)
+
+    - Don't use "make -j1" for build.jobs=1, but prefer "make" instead.
+      (afb in r57998)
+
+    - Add new "use_xz yes" port option to allow distfiles in xz format.
+      (afb in r57827)
+
+    - Archivemode now uses build_arch to create and extract archives.
+      This is a step in the direction of enabling binary distribution.
+      (snc in r58977)
+
+Release 1.8.1 (2009-09-28 by jmr):
+
+    - Installer error messages now display properly even from the Snow Leopard
+      MacPorts dmg. (jmr in r56448)
+
+    - 'fetch.type svn' no longer requires the installation of the subversion
+      port as of Snow Leopard. (toby in r56160; raimue in r56162)
+
+    - Updated manpages and 'port help' output (ryandesign in r56472, r56473,
+      r56474; blb in r56666, r57048, r57131)
+
+    - Fixed syncing using the daily tarball. (#21034, toby in r56889)
+
+    - Fixed 'port load' (#21128, raimue in r57055)
+
+    - Improved error message when an expression on the command line does not
+      match any ports (jmr in r57026)
+
+    - Stopped recording the completion of the install phase in the
+      statefile, which led to errors if the port was uninstalled but the work
+      dir was not cleaned, and the port was then installed again.
+      (jmr/raimue in r57801, 57820)
+
 Release 1.8.0 (2009-08-28 by jmr):
     - There is now a 'build_arch' variable, available in portfiles and
       configurable in macports.conf, which sets the CPU architecture that

Modified: branches/images-and-archives/base/Makefile.in
===================================================================
--- branches/images-and-archives/base/Makefile.in	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/Makefile.in	2009-10-15 02:52:27 UTC (rev 59433)
@@ -57,7 +57,7 @@
 distclean::
 	rm -f config.log config.status configure.lineno
 	rm -rf autom4te.cache ${DISTDIR}
-	rm -f Makefile Mk/macports.autoconf.mk portmgr/fedora/macports.spec portmgr/freebsd/Makefile
+	rm -f Makefile Mk/macports.autoconf.mk portmgr/freebsd/Makefile
 	rm -f Doxyfile
 	rm -f setupenv.bash
 

Modified: branches/images-and-archives/base/aclocal.m4
===================================================================
--- branches/images-and-archives/base/aclocal.m4	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/aclocal.m4	2009-10-15 02:52:27 UTC (rev 59433)
@@ -542,28 +542,8 @@
 		AC_DEFINE([HAVE_LIBMD], ,[Define if you have the `md' library (-lmd).])
 		MD5_LIBS="-lmd"]
 	)
-	if test "x$MD5_LIBS" = "x" ; then
-		# If libmd is not found, check for libcrypto from OpenSSL
-		AC_CHECK_LIB([crypto], [MD5_Update],[
-			AC_CHECK_HEADERS([openssl/md5.h],,[
-				case $host_os in
-					darwin*)	
-					AC_MSG_NOTICE([Please install the BSD SDK package from the Xcode Developer Tools CD.])
-						;;
-					*)	
-					AC_MSG_NOTICE([Please install the libmd developer headers for your platform.])
-						;;
-				esac
-				AC_MSG_ERROR([libcrypt was found, but header file openssl/md5.h is missing.])
-			])
-			AC_DEFINE([HAVE_LIBCRYPTO],,[Define if you have the `crypto' library (-lcrypto).])
-			MD5_LIBS="-lcrypto"
-		], [
-			AC_MSG_ERROR([Neither OpenSSL or libmd were found. A working md5 implementation is required.])
-		])
-	fi
 	if test "x$MD5_LIBS" = "x"; then
-		AC_MSG_ERROR([Neither OpenSSL or libmd were found. A working md5 implementation is required.])
+		AC_MSG_ERROR([Neither CommonCrypto nor libmd were found. A working md5 implementation is required.])
 	fi
 	AC_SUBST([MD5_LIBS])
 ])
@@ -780,9 +760,15 @@
 	fi
 
 	CFLAGS_LIBCURL=$($CURL_CONFIG --cflags)
-	# Due to a bug in dist, --arch flags are improperly supplied by curl-config.
-	# Get rid of them.
-	LDFLAGS_LIBCURL=$($CURL_CONFIG --libs | [sed 's/-arch [A-Za-z0-9_]* //g'])
+	if test "x$curlprefix" = "x"; then
+		# System curl-config emits absurd output for --libs
+		# See rdar://7244457
+		LDFLAGS_LIBCURL="-lcurl"
+	else
+		# Due to a bug in dist, --arch flags are improperly supplied by curl-config.
+		# Get rid of them.
+		LDFLAGS_LIBCURL=$($CURL_CONFIG --libs | [sed 's/-arch [A-Za-z0-9_]* //g'])
+	fi
 
 	AC_SUBST(CFLAGS_LIBCURL)
 	AC_SUBST(LDFLAGS_LIBCURL)
@@ -877,6 +863,22 @@
 	fi
 ])
 
+dnl This macro tests for GNU patch
+AC_DEFUN([MP_PATCH_GNU_VERSION],[
+	AC_PATH_PROG(PATCH, [patch])
+	AC_PATH_PROG(GNUPATCH, [gpatch])
+	
+	AC_MSG_CHECKING([for GNU (FSF) patch])
+	AS_IF([test -n "$GNUPATCH"], [PATCH_CMD=$GNUPATCH], [PATCH_CMD=$PATCH])
+	[fsf_version=`$PATCH_CMD --version 2>&1 | grep "Free Software Foundation"`]
+	if test -z "$fsf_version" ; then
+		AC_MSG_RESULT([none])
+	else
+		AC_MSG_RESULT([$PATCH_CMD])
+		GNUPATCH="$PATCH_CMD"
+	fi
+])
+
 #------------------------------------------------------------------------
 # MP_CHECK_READLINK_IS_P1003_1A --
 #

Modified: branches/images-and-archives/base/config/RELEASE_URL
===================================================================
--- branches/images-and-archives/base/config/RELEASE_URL	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/config/RELEASE_URL	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1 +1 @@
-http://svn.macports.org/repository/macports/tags/release_1_8_0/base
+http://svn.macports.org/repository/macports/tags/release_1_8_1/base

Modified: branches/images-and-archives/base/config.guess
===================================================================
--- branches/images-and-archives/base/config.guess	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/config.guess	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2009-09-18'
 
 # 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
@@ -27,16 +27,16 @@
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -170,7 +170,7 @@
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
+			| grep -q __ELF__
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -656,7 +656,7 @@
 	    # => hppa64-hp-hpux11.23
 
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
+		grep -q __LP64__
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -822,6 +822,9 @@
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
 	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +854,20 @@
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +890,9 @@
     frv:Linux:*:*)
     	echo frv-unknown-linux-gnu
 	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-gnu
+	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
@@ -882,17 +902,17 @@
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    mips:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#undef CPU
-	#undef mips
-	#undef mipsel
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
+	CPU=${UNAME_MACHINE}el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
+	CPU=${UNAME_MACHINE}
 	#else
 	CPU=
 	#endif
@@ -905,55 +925,15 @@
 	    }'`"
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
     or32:Linux:*:*)
 	echo or32-unknown-linux-gnu
 	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
     padre:Linux:*:*)
 	echo sparc-unknown-linux-gnu
 	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,9 +942,12 @@
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
 	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
 	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
@@ -986,66 +969,6 @@
     xtensa*:Linux:*:*)
     	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
@@ -1074,7 +997,7 @@
     i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
 	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
     i*86:*DOS:*:*)
@@ -1182,7 +1105,7 @@
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1198,16 @@
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}

Modified: branches/images-and-archives/base/config.sub
===================================================================
--- branches/images-and-archives/base/config.sub	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/config.sub	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2009-09-25'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@
 
 
 # Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -149,10 +152,13 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
+	-apple | -axis | -knuth | -cray | -microblaze)
 		os=
 		basic_machine=$1
 		;;
+        -bluegene*)
+	        os=-cnk
+		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
@@ -281,6 +287,7 @@
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
+	| rx \
 	| score \
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
@@ -294,7 +301,7 @@
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
+	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
 		os=-none
@@ -337,7 +344,7 @@
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -365,7 +372,7 @@
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
+	| romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -467,6 +474,10 @@
 		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
@@ -719,6 +730,9 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+        microblaze)
+		basic_machine=microblaze-xilinx
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -1260,7 +1274,7 @@
 	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
 	      | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
@@ -1613,7 +1627,7 @@
 			-sunos*)
 				vendor=sun
 				;;
-			-aix*)
+			-cnk*|-aix*)
 				vendor=ibm
 				;;
 			-beos*)

Modified: branches/images-and-archives/base/configure
===================================================================
--- branches/images-and-archives/base/configure	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/configure	2009-10-15 02:52:27 UTC (rev 59433)
@@ -669,6 +669,7 @@
 MKBOM
 LSBOM
 BZIP2
+GNUPATCH
 GNUMAKE
 GNUTAR
 XCODEBUILD
@@ -5315,6 +5316,52 @@
   test -n "$GNUMAKE" && break
 done
 
+for ac_prog in gnupatch gpatch
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GNUPATCH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GNUPATCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GNUPATCH="$GNUPATCH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/local/bin"
+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_GNUPATCH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GNUPATCH=$ac_cv_path_GNUPATCH
+if test -n "$GNUPATCH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUPATCH" >&5
+$as_echo "$GNUPATCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$GNUPATCH" && break
+done
+
 # Extract the first word of "bzip2", so it can be a program name with args.
 set dummy bzip2; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5747,6 +5794,105 @@
 	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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $PATCH" >&5
+$as_echo "$PATCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	# Extract the first word of "gpatch", so it can be a program name with args.
+set dummy gpatch; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GNUPATCH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GNUPATCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GNUPATCH="$GNUPATCH" # 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_GNUPATCH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GNUPATCH=$ac_cv_path_GNUPATCH
+if test -n "$GNUPATCH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUPATCH" >&5
+$as_echo "$GNUPATCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU (FSF) patch" >&5
+$as_echo_n "checking for GNU (FSF) patch... " >&6; }
+	if test -n "$GNUPATCH"; then :
+  PATCH_CMD=$GNUPATCH
+else
+  PATCH_CMD=$PATCH
+fi
+	fsf_version=`$PATCH_CMD --version 2>&1 | grep "Free Software Foundation"`
+	if test -z "$fsf_version" ; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH_CMD" >&5
+$as_echo "$PATCH_CMD" >&6; }
+		GNUPATCH="$PATCH_CMD"
+	fi
+
+
 # Quiche eaters options.
 if test x$GCC = xyes; then
 	CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
@@ -8182,8 +8328,14 @@
 
 
 # Check for md5 implementation
+ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonDigest.h" "ac_cv_header_CommonCrypto_CommonDigest_h" "$ac_includes_default"
+if test "x$ac_cv_header_CommonCrypto_CommonDigest_h" = x""yes; then :
 
+$as_echo "#define HAVE_COMMONCRYPTO_COMMONDIGEST_H 1" >>confdefs.h
 
+else
+
+
 	# Check for libmd, which is prefered
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5Update in -lmd" >&5
 $as_echo_n "checking for MD5Update in -lmd... " >&6; }
@@ -8256,90 +8408,15 @@
 
 fi
 
-	if test "x$MD5_LIBS" = "x" ; then
-		# If libmd is not found, check for libcrypto from OpenSSL
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Update in -lcrypto" >&5
-$as_echo_n "checking for MD5_Update in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_MD5_Update+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+	if test "x$MD5_LIBS" = "x"; then
+		as_fn_error "Neither CommonCrypto nor libmd were found. A working md5 implementation is required." "$LINENO" 5
+	fi
 
-/* 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 MD5_Update ();
-int
-main ()
-{
-return MD5_Update ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_crypto_MD5_Update=yes
-else
-  ac_cv_lib_crypto_MD5_Update=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Update" >&5
-$as_echo "$ac_cv_lib_crypto_MD5_Update" >&6; }
-if test "x$ac_cv_lib_crypto_MD5_Update" = x""yes; then :
 
-			for ac_header in openssl/md5.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_md5_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_MD5_H 1
-_ACEOF
-
-else
-
-				case $host_os in
-					darwin*)
-					{ $as_echo "$as_me:${as_lineno-$LINENO}: Please install the BSD SDK package from the Xcode Developer Tools CD." >&5
-$as_echo "$as_me: Please install the BSD SDK package from the Xcode Developer Tools CD." >&6;}
-						;;
-					*)
-					{ $as_echo "$as_me:${as_lineno-$LINENO}: Please install the libmd developer headers for your platform." >&5
-$as_echo "$as_me: Please install the libmd developer headers for your platform." >&6;}
-						;;
-				esac
-				as_fn_error "libcrypt was found, but header file openssl/md5.h is missing." "$LINENO" 5
-
 fi
 
-done
 
 
-$as_echo "#define HAVE_LIBCRYPTO /**/" >>confdefs.h
-
-			MD5_LIBS="-lcrypto"
-
-else
-
-			as_fn_error "Neither OpenSSL or libmd were found. A working md5 implementation is required." "$LINENO" 5
-
-fi
-
-	fi
-	if test "x$MD5_LIBS" = "x"; then
-		as_fn_error "Neither OpenSSL or libmd were found. A working md5 implementation is required." "$LINENO" 5
-	fi
-
-
-
 # Check for readline
 # Check whether --enable-readline was given.
 if test "${enable_readline+set}" = set; then :
@@ -9006,9 +9083,15 @@
 	fi
 
 	CFLAGS_LIBCURL=$($CURL_CONFIG --cflags)
-	# Due to a bug in dist, --arch flags are improperly supplied by curl-config.
-	# Get rid of them.
-	LDFLAGS_LIBCURL=$($CURL_CONFIG --libs | sed 's/-arch [A-Za-z0-9_]* //g')
+	if test "x$curlprefix" = "x"; then
+		# System curl-config emits absurd output for --libs
+		# See rdar://7244457
+		LDFLAGS_LIBCURL="-lcurl"
+	else
+		# Due to a bug in dist, --arch flags are improperly supplied by curl-config.
+		# Get rid of them.
+		LDFLAGS_LIBCURL=$($CURL_CONFIG --libs | sed 's/-arch [A-Za-z0-9_]* //g')
+	fi
 
 
 
@@ -9261,7 +9344,7 @@
 
 
 # Output
-ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile portmgr/fedora/macports.spec src/Makefile src/macports1.0/macports_autoconf.tcl src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl src/programs/Makefile src/macports1.0/macports_fastload.tcl setupenv.bash"
+ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile 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"
@@ -9955,7 +10038,6 @@
     "doc/macosx.mtree") CONFIG_FILES="$CONFIG_FILES doc/macosx.mtree" ;;
     "doc/macports.conf") CONFIG_FILES="$CONFIG_FILES doc/macports.conf" ;;
     "portmgr/freebsd/Makefile") CONFIG_FILES="$CONFIG_FILES portmgr/freebsd/Makefile" ;;
-    "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/port1.0/port_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/port1.0/port_autoconf.tcl" ;;

Modified: branches/images-and-archives/base/configure.ac
===================================================================
--- branches/images-and-archives/base/configure.ac	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/configure.ac	2009-10-15 02:52:27 UTC (rev 59433)
@@ -116,6 +116,7 @@
 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_PROGS(GNUPATCH, [gnupatch gpatch], [], [$PATH:/usr/local/bin])
 AC_PATH_PROG(BZIP2, [bzip2], [])
 AC_PATH_PROG(LSBOM, [lsbom], [])
 AC_PATH_PROG(MKBOM, [mkbom], [])
@@ -140,6 +141,7 @@
 
 MP_SED_EXTENDED_REGEXP
 MP_TAR_NO_SAME_OWNER
+MP_PATCH_GNU_VERSION
 
 # Quiche eaters options.
 if test x$GCC = xyes; then
@@ -202,7 +204,7 @@
 MP_CHECK_READLINK_IS_P1003_1A
 
 # Check for md5 implementation
-MP_LIB_MD5
+AC_CHECK_HEADER([CommonCrypto/CommonDigest.h], [AC_DEFINE([HAVE_COMMONCRYPTO_COMMONDIGEST_H], [1], [Define if CommonCrypto is available.])], [MP_LIB_MD5])
 
 # Check for readline
 AC_ARG_ENABLE(readline, AS_HELP_STRING([--enable-readline],[Enable addition of readline support, if readline present.]),
@@ -393,7 +395,6 @@
 	doc/macosx.mtree
 	doc/macports.conf
 	portmgr/freebsd/Makefile
-	portmgr/fedora/macports.spec
 	src/Makefile
 	src/macports1.0/macports_autoconf.tcl
 	src/port1.0/port_autoconf.tcl

Modified: branches/images-and-archives/base/doc/macports.conf.in
===================================================================
--- branches/images-and-archives/base/doc/macports.conf.in	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/doc/macports.conf.in	2009-10-15 02:52:27 UTC (rev 59433)
@@ -38,6 +38,9 @@
 # the default is x86_64 if the CPU supports it, i386 otherwise.
 #build_arch			i386
 
+# CPU architectures to use for Universal Binaries (+universal variant)
+universal_archs		@UNIVERSAL_ARCHS@
+
 # Use ccache (C/C++ compiler cache) - see http://ccache.samba.org/
 configureccache		no
 
@@ -73,11 +76,6 @@
 # Rsync options
 rsync_options		-rtzv --delete-after
 
-# Options for Universal Binaries (+universal variant)
-
-# machine architectures
-universal_archs		@UNIVERSAL_ARCHS@
-
 # Options for generated startup items
 # startupitem_type may be "default", "systemstarter", "launchd", or "none";
 # if the option is empty or "default" then a startupitem type appropriate
@@ -101,7 +99,7 @@
 # Note that System Preferences doesn't have an rsync proxy definition.
 # Also note, on 10.5, sudo will clear many environment variables including
 # those for proxy support.
-# Equivalent envioronment variables: http_proxy, HTTPS_PROXY, FTP_PROXY,
+# Equivalent environment variables: http_proxy, HTTPS_PROXY, FTP_PROXY,
 # RSYNC_PROXY, NO_PROXY
 #
 #proxy_override_env    yes

Modified: branches/images-and-archives/base/doc/portfile.7
===================================================================
--- branches/images-and-archives/base/doc/portfile.7	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/doc/portfile.7	2009-10-15 02:52:27 UTC (rev 59433)
@@ -702,6 +702,18 @@
 .br
 .Sy Example:
 .Dl use_lzma yes
+.It Ic use_xz
+Use xz.
+.br
+Sets extract.suffix to: .xz
+.br
+Sets extract.cmd to: xz
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Example:
+.Dl use_xz yes
 .It Ic use_7z
 Use 7z (7zip).
 .br

Modified: branches/images-and-archives/base/doc/portstyle.7
===================================================================
--- branches/images-and-archives/base/doc/portstyle.7	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/doc/portstyle.7	2009-10-15 02:52:27 UTC (rev 59433)
@@ -27,7 +27,7 @@
 .Os
 .Sh NAME
 .Nm portstyle
-.Nd style guide for ports their associated files
+.Nd style guide for ports
 .Sh DESCRIPTION
 A port consists of a directory and its contents, within a category subdirectory
 of the root of the ports tree.

Modified: branches/images-and-archives/base/portmgr/ReleaseProcess
===================================================================
--- branches/images-and-archives/base/portmgr/ReleaseProcess	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/portmgr/ReleaseProcess	2009-10-15 02:52:27 UTC (rev 59433)
@@ -222,4 +222,5 @@
  * [http://www.versiontracker.com/dyn/moreinfo/macosx/26679 VersionTracker] (submitter: mij@)
  * [http://sourceforge.net/projects/macports/ sourceforge] (submitted: rhwood@)
  * [http://www.macupdate.com/info.php/id/21309/macports MacUpdate] (submitter: ???)
+ * [http://twitter.com/macports twitter] (submitter: raimue@)
  * (Where else?)

Modified: branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings
===================================================================
--- branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1,2 +1,2 @@
-"16" = "This package is meant to be installed on __XVERS__";
-"17" = "Your existing MacPorts or DarwinPorts install is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";
+"16" = "This package is meant to be installed on Mac OS X __XVERS__.";
+"17" = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";

Copied: branches/images-and-archives/base/portmgr/fedora/macports.spec (from rev 59348, trunk/base/portmgr/fedora/macports.spec)
===================================================================
--- branches/images-and-archives/base/portmgr/fedora/macports.spec	                        (rev 0)
+++ branches/images-and-archives/base/portmgr/fedora/macports.spec	2009-10-15 02:52:27 UTC (rev 59433)
@@ -0,0 +1,100 @@
+Summary: MacPorts allows installing software on Mac OS X (and other platforms)
+Name: macports
+Version: 1.6.0
+Release: 0%{?dist}
+License: BSD
+Group: System Environment/Base
+URL: http://www.macports.org
+Source: http://svn.macosforge.org/repository/macports/distfiles/MacPorts/MacPorts-%{version}.tar.bz2
+Prefix: /opt/local
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+Requires: curl tcl rsync coreutils make
+BuildRequires: curl-devel tcl-devel tcl-thread sqlite-devel gcc-objc gnustep-base
+BuildRequires: mtree fakeroot /usr/GNUstep/System/Library/Makefiles/GNUstep.sh 
+BuildRequires: openssl-devel
+
+%description
+MacPorts is a system for compiling, installing, and managing free and
+open source software. A MacPorts "port" is a set of specifications
+contained in a Portfile that defines an application, its characteristics,
+and any files or special instructions required to install it, so MacPorts
+may automatically fetch, patch, compile, and install ported software.
+
+MacPorts may also be used to pre-compile ported software into binaries
+that may be installed on remote computers. Binaries of ported software
+may be installed very quickly since the steps required to install ports
+from source code have all been performed in advance.
+
+%prep
+%setup -n MacPorts-%{version}
+# avoid the whole upgrade and information procedure
+perl -pe 's/^install::/interactive::/' -i Makefile.in
+
+%define _prefix         %{prefix}
+%define _bindir         %{prefix}/bin
+%define _sysconfdir     %{prefix}/etc
+%define _datadir        %{prefix}/share
+%define _mandir         %{prefix}/share/man
+%define _infodir        %{prefix}/share/info
+%define _localstatedir  %{prefix}/var
+
+%build
+source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
+%configure \
+	--without-included-tclthread --without-included-sqlite3 \
+	--with-objc-runtime=GNU --with-objc-foundation=GNUstep
+make
+
+%install
+source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
+rm -rf $RPM_BUILD_ROOT
+make install \
+	DESTDIR="$RPM_BUILD_ROOT" INSTALL="fakeroot install"
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-, root, root)
+%doc LICENSE ChangeLog
+%{_bindir}/port
+%{_bindir}/portf
+%{_bindir}/portindex
+%{_bindir}/portmirror
+%config(noreplace) %{_sysconfdir}/macports
+%doc %{_mandir}/man1/port.1*
+%doc %{_mandir}/man5/macports.conf.5*
+%doc %{_mandir}/man7/portfile.7*
+%doc %{_mandir}/man7/portgroup.7*
+%doc %{_mandir}/man7/porthier.7*
+%doc %{_mandir}/man7/portstyle.7*
+%{_datadir}/macports
+%{_localstatedir}/macports
+/usr/share/tcl8.4/macports1.0
+#### mtree
+%dir %{prefix}
+%dir %{prefix}/bin
+%dir %{prefix}/etc
+%dir %{prefix}/include
+%dir %{prefix}/lib
+%dir %{prefix}/libexec
+     %{prefix}/man
+%dir %{prefix}/sbin
+%dir %{prefix}/share
+%dir %{prefix}/share/info
+%dir %{prefix}/share/man
+%dir %{prefix}/share/man/cat?
+%dir %{prefix}/share/man/man?
+%dir %{prefix}/share/nls
+%dir %{prefix}/share/nls/*
+#dir %{prefix}/skel
+#dir %{prefix}/src
+%dir %{prefix}/var
+
+%changelog
+* Sun Aug 12 2007 Anders F Bjorklund <afb at macports.org> - 1.5.0
+- Updated to version 1.5.0
+
+* Sun Aug 12 2007 Anders F Bjorklund <afb at macports.org> - 1.4.0
+- Initial Fedora packaging

Deleted: branches/images-and-archives/base/portmgr/fedora/macports.spec.in
===================================================================
--- branches/images-and-archives/base/portmgr/fedora/macports.spec.in	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/portmgr/fedora/macports.spec.in	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1,100 +0,0 @@
-Summary: MacPorts allows installing software on Mac OS X (and other platforms)
-Name: macports
-Version: @MACPORTS_VERSION@
-Release: 0%{?dist}
-License: BSD
-Group: System Environment/Base
-URL: http://www.macports.org
-Source: http://svn.macosforge.org/repository/macports/distfiles/MacPorts/MacPorts-%{version}.tar.bz2
-Prefix: /opt/local
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-
-Requires: curl tcl rsync coreutils make
-BuildRequires: curl-devel tcl-devel tcl-thread sqlite-devel gcc-objc gnustep-base
-BuildRequires: mtree fakeroot /usr/GNUstep/System/Library/Makefiles/GNUstep.sh 
-BuildRequires: openssl-devel
-
-%description
-MacPorts is a system for compiling, installing, and managing free and
-open source software. A MacPorts "port" is a set of specifications
-contained in a Portfile that defines an application, its characteristics,
-and any files or special instructions required to install it, so MacPorts
-may automatically fetch, patch, compile, and install ported software.
-
-MacPorts may also be used to pre-compile ported software into binaries
-that may be installed on remote computers. Binaries of ported software
-may be installed very quickly since the steps required to install ports
-from source code have all been performed in advance.
-
-%prep
-%setup -n MacPorts-%{version}
-# avoid the whole upgrade and information procedure
-perl -pe 's/^install::/interactive::/' -i Makefile.in
-
-%define _prefix         %{prefix}
-%define _bindir         %{prefix}/bin
-%define _sysconfdir     %{prefix}/etc
-%define _datadir        %{prefix}/share
-%define _mandir         %{prefix}/share/man
-%define _infodir        %{prefix}/share/info
-%define _localstatedir  %{prefix}/var
-
-%build
-source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
-%configure \
-	--without-included-tclthread --without-included-sqlite3 \
-	--with-objc-runtime=GNU --with-objc-foundation=GNUstep
-make
-
-%install
-source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
-rm -rf $RPM_BUILD_ROOT
-make install \
-	DESTDIR="$RPM_BUILD_ROOT" INSTALL="fakeroot install"
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-, root, root)
-%doc LICENSE ChangeLog
-%{_bindir}/port
-%{_bindir}/portf
-%{_bindir}/portindex
-%{_bindir}/portmirror
-%config(noreplace) %{_sysconfdir}/macports
-%doc %{_mandir}/man1/port.1*
-%doc %{_mandir}/man5/macports.conf.5*
-%doc %{_mandir}/man7/portfile.7*
-%doc %{_mandir}/man7/portgroup.7*
-%doc %{_mandir}/man7/porthier.7*
-%doc %{_mandir}/man7/portstyle.7*
-%{_datadir}/macports
-%{_localstatedir}/macports
-/usr/share/tcl8.4/macports1.0
-#### mtree
-%dir %{prefix}
-%dir %{prefix}/bin
-%dir %{prefix}/etc
-%dir %{prefix}/include
-%dir %{prefix}/lib
-%dir %{prefix}/libexec
-     %{prefix}/man
-%dir %{prefix}/sbin
-%dir %{prefix}/share
-%dir %{prefix}/share/info
-%dir %{prefix}/share/man
-%dir %{prefix}/share/man/cat?
-%dir %{prefix}/share/man/man?
-%dir %{prefix}/share/nls
-%dir %{prefix}/share/nls/*
-#dir %{prefix}/skel
-#dir %{prefix}/src
-%dir %{prefix}/var
-
-%changelog
-* Sun Aug 12 2007 Anders F Bjorklund <afb at macports.org> - 1.5.0
-- Updated to version 1.5.0
-
-* Sun Aug 12 2007 Anders F Bjorklund <afb at macports.org> - 1.4.0
-- Initial Fedora packaging

Modified: branches/images-and-archives/base/portmgr/freebsd/Makefile.in
===================================================================
--- branches/images-and-archives/base/portmgr/freebsd/Makefile.in	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/portmgr/freebsd/Makefile.in	2009-10-15 02:52:27 UTC (rev 59433)
@@ -8,7 +8,7 @@
 PORTNAME=	macports
 PORTVERSION=	@MACPORTS_VERSION@
 CATEGORIES=	sysutils
-MASTER_SITES=	http://svn.macosforge.org/repository/macports/distfiles/MacPorts/
+MASTER_SITES=	http://distfiles.macports.org/MacPorts/
 DISTNAME=	MacPorts-${PORTVERSION}
 
 MAINTAINER=	afb at macports.org
@@ -18,7 +18,7 @@
 		ginstall:${PORTSDIR}/sysutils/coreutils \
 		gtar:${PORTSDIR}/archivers/gtar \
 		gmake:${PORTSDIR}/devel/gmake
-LIB_DEPENDS=	tcl84:${PORTSDIR}/lang/tcl84-thread \
+LIB_DEPENDS=	tcl85:${PORTSDIR}/lang/tcl85-thread \
 		curl:${PORTSDIR}/ftp/curl \
 		sqlite3:${PORTSDIR}/databases/sqlite3
 BUILD_DEPENDS=	${LOCALBASE}/lib/thread2.6.5:${PORTSDIR}/devel/tclthread \
@@ -40,12 +40,13 @@
 MTREE_FILE=	${WRKSRC}/doc/prefix.mtree
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=--with-tcl=${LOCALBASE}/lib/tcl8.4 \
-		--with-tclinclude=${LOCALBASE}/include/tcl8.4 \
+CFLAGS+=	-DPIC -fPIC
+CONFIGURE_ARGS+=--with-tcl=${LOCALBASE}/lib/tcl8.5 \
+		--with-tclinclude=${LOCALBASE}/include/tcl8.5 \
 		--without-included-tclthread --without-included-sqlite3 \
 		--with-objc-runtime=GNU --with-objc-foundation=GNUstep
 CONFIGURE_ENV=	RSYNC=${LOCALBASE}/bin/rsync \
-		TCLSH=${LOCALBASE}/bin/tclsh8.4-threads \
+		TCLSH=${LOCALBASE}/bin/tclsh8.5-threads \
 		GNUTAR=${LOCALBASE}/bin/gtar \
 		GNUMAKE=${LOCALBASE}/bin/gmake \
 		OBJC="${CC}" OBJCFLAGS="${CFLAGS}"
@@ -53,6 +54,8 @@
 pre-configure:
 	@# foundation.m4 is somewhat bashist (MacPorts Bug #12252)
 	@${REINPLACE_CMD} -e 's|#! /bin/sh|#!/usr/bin/env bash|' ${WRKSRC}/configure
+	@# should really have been #!/bin/sh
+	@${REINPLACE_CMD} -e 's|#!/bin/bash|#!/usr/bin/env bash|' ${WRKSRC}/src/pkg_mkindex.sh.in
 post-configure:
 	@# Makefile only works with GNU make (MacPorts Bug #12247)
 	@${LN} -s Makefile ${WRKSRC}/GNUmakefile
@@ -61,18 +64,19 @@
 	@# move tcl from /usr/local, to /opt/local (for packaging)
 	${RM} -rf ${PREFIX}/share/macports/Tcl/macports1.0
 	${MKDIR} ${PREFIX}/share/macports/Tcl
-	test -L ${LOCALBASE}/lib/tcl8.4/macports1.0 || \
-	${MV} ${LOCALBASE}/lib/tcl8.4/macports1.0 \
+	test -L ${LOCALBASE}/lib/tcl8.5/macports1.0 || \
+	${MV} ${LOCALBASE}/lib/tcl8.5/macports1.0 \
 	      ${PREFIX}/share/macports/Tcl/macports1.0
-	test -L ${LOCALBASE}/lib/tcl8.4/macports1.0 || \
+	test -L ${LOCALBASE}/lib/tcl8.5/macports1.0 || \
 	${LN} -s ${PREFIX}/share/macports/Tcl/macports1.0 \
-	         ${LOCALBASE}/lib/tcl8.4/macports1.0
+	         ${LOCALBASE}/lib/tcl8.5/macports1.0
 
 test: build
 	${GMAKE} -C ${WRKSRC} test
 
 # MacPorts mtree demands ${prefix}/share/man
 MANPREFIX=	${PREFIX}/share
+MANCOMPRESSED=	yes
 
 MAN1=		port.1
 MAN5=		macports.conf.5

Modified: branches/images-and-archives/base/portmgr/freebsd/pkg-plist
===================================================================
--- branches/images-and-archives/base/portmgr/freebsd/pkg-plist	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/portmgr/freebsd/pkg-plist	2009-10-15 02:52:27 UTC (rev 59433)
@@ -6,7 +6,6 @@
 etc/macports/sources.conf
 etc/macports/variants.conf
 share/macports/Tcl/darwintrace1.0/darwintrace.so
-share/macports/Tcl/darwintrace1.0/pkgIndex.tcl
 share/macports/Tcl/macports1.0/MacPorts.so
 share/macports/Tcl/macports1.0/macports.tcl
 share/macports/Tcl/macports1.0/macports_autoconf.tcl
@@ -57,20 +56,6 @@
 share/macports/Tcl/registry1.0/receipt_sqlite.tcl
 share/macports/Tcl/registry1.0/registry.tcl
 share/macports/Tcl/registry1.0/registry_autoconf.tcl
-share/macports/Tcl/tclobjc1.0/tclobjc.so
-share/macports/Tcl/tclobjc1.0/pkgIndex.tcl
-share/macports/resources/port1.0/fetch/mirror_sites.tcl
-share/macports/resources/port1.0/group/gnustep-1.0.tcl
-share/macports/resources/port1.0/group/perl5-1.0.tcl
-share/macports/resources/port1.0/group/python-1.0.tcl
-share/macports/resources/port1.0/group/python24-1.0.tcl
-share/macports/resources/port1.0/group/python25-1.0.tcl
-share/macports/resources/port1.0/group/ruby-1.0.tcl
-share/macports/resources/port1.0/group/xcode-1.0.tcl
-share/macports/resources/port1.0/group/zope-1.0.tcl
-share/macports/resources/port1.0/install/macosx.mtree
-share/macports/resources/port1.0/install/prefix.mtree
-share/macports/resources/port1.0/package/background.tiff
 var/macports/.tclpackage
 @unexec /bin/rm -f %D/var/macports/.mprename
 @dirrm var/macports/receipts
@@ -92,4 +77,4 @@
 @dirrm share/macports
 @dirrm share/macports/Tcl
 @dirrm etc/macports
- at unexec test -L %%LOCALBASE%%/lib/tcl8.4/macports1.0 && /bin/rm %%LOCALBASE%%/lib/tcl8.4/macports1.0
+ at unexec test -L %%LOCALBASE%%/lib/tcl8.5/macports1.0 && /bin/rm %%LOCALBASE%%/lib/tcl8.5/macports1.0

Modified: branches/images-and-archives/base/src/config.h.in
===================================================================
--- branches/images-and-archives/base/src/config.h.in	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/config.h.in	2009-10-15 02:52:27 UTC (rev 59433)
@@ -18,6 +18,9 @@
 /* Define to 1 if you have the `clearenv' function. */
 #undef HAVE_CLEARENV
 
+/* Define if CommonCrypto is available. */
+#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+
 /* Define to 1 if you have the `copyfile' function. */
 #undef HAVE_COPYFILE
 
@@ -80,9 +83,6 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define if you have the `crypto' library (-lcrypto). */
-#undef HAVE_LIBCRYPTO
-
 /* Define if you have the `md' library (-lmd). */
 #undef HAVE_LIBMD
 
@@ -110,9 +110,6 @@
 /* Define to 1 if you have the <objc/objc.h> header file. */
 #undef HAVE_OBJC_OBJC_H
 
-/* Define to 1 if you have the <openssl/md5.h> header file. */
-#undef HAVE_OPENSSL_MD5_H
-
 /* Define to 1 if you have the <paths.h> header file. */
 #undef HAVE_PATHS_H
 

Modified: branches/images-and-archives/base/src/macports1.0/macports.tcl
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1537,8 +1537,8 @@
 }
 
 proc macports::getportimagename_from_port_info {portname portepoch portversion portrevision portvariants} {
-    global macports::os_platform macports::os_arch
-    return "${portname}-${portepoch}-${portversion}_${portrevision}${portvariants}.${os_platform}.${os_arch}.macport"
+    global macports::os_platform macports::os_arch macports::build_arch
+    return "${portname}-${portepoch}-${portversion}_${portrevision}${portvariants}.${os_platform}.${build_arch}.macport"
 }
 
 proc macports::getindex {source} {
@@ -1771,7 +1771,7 @@
                         }
                     }
                 } catch {*} {
-                    ui_warn "It looks like your PortIndex file may be corrupt."
+                    ui_warn "It looks like your PortIndex file for $source may be corrupt."
                     throw
                 } finally {
                     close $fd
@@ -1853,7 +1853,7 @@
                     close $fd
                     set fd -1
                 } catch {*} {
-                    ui_warn "It looks like your PortIndex file may be corrupt."
+                    ui_warn "It looks like your PortIndex file for $source may be corrupt."
                 } finally {
                     if {$fd != -1} {
                         close $fd
@@ -1937,7 +1937,7 @@
             }
             puts -nonewline $quickfd $quicklist
         } catch {*} {
-            ui_warn "It looks like your PortIndex file may be corrupt."
+            ui_warn "It looks like your PortIndex file $index may be corrupt."
             throw
         } finally {
             close $indexfd

Modified: branches/images-and-archives/base/src/pextlib1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/Makefile	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/Makefile	2009-10-15 02:52:27 UTC (rev 59433)
@@ -1,9 +1,9 @@
 OBJS= \
 	Pextlib.o strsed.o fgetln.o md5cmd.o setmode.o xinstall.o \
 	fs-traverse.o strcasecmp.o vercomp.o filemap.o \
-	sha1cmd.o curl.o rmd160cmd.o readline.o uid.o \
+	sha1cmd.o curl.o rmd160cmd.o sha256cmd.o readline.o uid.o \
 	tracelib.o tty.o readdir.o pipe.o flock.o \
-	system.o
+	system.o mktemp.o
 SHLIB_NAME= Pextlib${SHLIB_SUFFIX}
 INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/pextlib1.0
 

Modified: branches/images-and-archives/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/Pextlib.c	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/Pextlib.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -85,6 +85,7 @@
 #include "md5cmd.h"
 #include "sha1cmd.h"
 #include "rmd160cmd.h"
+#include "sha256cmd.h"
 #include "fs-traverse.h"
 #include "filemap.h"
 #include "curl.h"
@@ -99,6 +100,7 @@
 #include "pipe.h"
 #include "flock.h"
 #include "system.h"
+#include "mktemp.h"
 
 #if HAVE_CRT_EXTERNS_H
 #include <crt_externs.h>
@@ -208,87 +210,6 @@
 	return TCL_OK;
 }
 
-int MkdtempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-	char *template, *sp;
-	Tcl_Obj *tcl_result;
-
-	if (objc != 2) {
-		Tcl_WrongNumArgs(interp, 1, objv, "template");
-		return TCL_ERROR;
-	}
-
-	template = strdup(Tcl_GetString(objv[1]));
-	if (template == NULL)
-		return TCL_ERROR;
-
-	if ((sp = mkdtemp(template)) == NULL) {
-		Tcl_AppendResult(interp, "mkdtemp failed: ", strerror(errno), NULL);
-		free(template);
-		return TCL_ERROR;
-	}
-
-	tcl_result = Tcl_NewStringObj(sp, -1);
-	Tcl_SetObjResult(interp, tcl_result);
-	free(template);
-	return TCL_OK;
-}
-
-int MktempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-	char *template, *sp;
-	Tcl_Obj *tcl_result;
-
-	if (objc != 2) {
-		Tcl_WrongNumArgs(interp, 1, objv, "template");
-		return TCL_ERROR;
-	}
-
-	template = strdup(Tcl_GetString(objv[1]));
-	if (template == NULL)
-		return TCL_ERROR;
-
-	if ((sp = mktemp(template)) == NULL) {
-		Tcl_AppendResult(interp, "mktemp failed: ", strerror(errno), NULL);
-		free(template);
-		return TCL_ERROR;
-	}
-
-	tcl_result = Tcl_NewStringObj(sp, -1);
-	Tcl_SetObjResult(interp, tcl_result);
-	free(template);
-	return TCL_OK;
-}
-
-int MkstempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-	Tcl_Channel channel;
-	char *template, *channelname;
-	int fd;
-
-	if (objc != 2) {
-		Tcl_WrongNumArgs(interp, 1, objv, "template");
-		return TCL_ERROR;
-	}
-
-	template = strdup(Tcl_GetString(objv[1]));
-	if (template == NULL)
-		return TCL_ERROR;
-
-	if ((fd = mkstemp(template)) < 0) {
-		Tcl_AppendResult(interp, "mkstemp failed: ", strerror(errno), NULL);
-		free(template);
-		return TCL_ERROR;
-	}
-
-	channel = Tcl_MakeFileChannel((ClientData)(intptr_t)fd, TCL_READABLE|TCL_WRITABLE);
-	Tcl_RegisterChannel(interp, channel);
-	channelname = (char *)Tcl_GetChannelName(channel);
-	Tcl_AppendResult(interp, channelname, " ", template, NULL);
-	free(template);
-	return TCL_OK;
-}
-
 int ExistsuserCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 	Tcl_Obj *tcl_result;
@@ -343,9 +264,9 @@
 	return TCL_OK;
 }
 
-/* Find the first unused UID > 100
-   previously this would find the highest used UID and add 1
-   but UIDs > 500 are visible on the login screen of OS X */
+/* Find the first unused UID > 500
+   UIDs > 500 are visible on the login screen of OS X,
+   but UIDs < 500 are reserved by Apple */
 int NextuidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED)
 {
 	Tcl_Obj *tcl_result;
@@ -362,9 +283,7 @@
 	return TCL_OK;
 }
 
-/* Just as with NextuidCmd, return the first unused gid > 100
-   groups aren't visible on the login screen, but I see no reason
-   to create group 502 when I can create group 100 */
+/* Just as with NextuidCmd, return the first unused gid > 500 */
 int NextgidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED)
 {
 	Tcl_Obj *tcl_result;
@@ -591,6 +510,7 @@
 	Tcl_CreateObjCommand(interp, "filemap", FilemapCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "rpm-vercomp", RPMVercompCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "rmd160", RMD160Cmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "sha256", SHA256Cmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "sha1", SHA1Cmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "umask", UmaskCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "pipe", PipeCmd, NULL, NULL);
@@ -623,8 +543,5 @@
 	if (Tcl_PkgProvide(interp, "Pextlib", "1.0") != TCL_OK)
 		return TCL_ERROR;
 
-	/* init libcurl */
-	CurlInit(interp);
-
 	return TCL_OK;
 }

Modified: branches/images-and-archives/base/src/pextlib1.0/curl.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/curl.c	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/curl.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -36,13 +36,11 @@
 
 #include <ctype.h>
 #include <errno.h>
+#include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-
-#ifdef HAVE_UTIME_H
 #include <utime.h>
-#endif
 
 #include <curl/curl.h>
 
@@ -71,6 +69,8 @@
 int CurlIsNewerCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 int CurlGetSizeCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
 
+void CurlInit(void);
+
 /* ========================================================================= **
  * Entry points
  * ========================================================================= */
@@ -86,30 +86,18 @@
  * @return TCL_OK if inErrorCode is 0, TCL_ERROR otherwise.
  */
 int
-SetResultFromCurlErrorCode(Tcl_Interp* interp, CURLcode inErrorCode)
+SetResultFromCurlErrorCode(Tcl_Interp *interp, CURLcode inErrorCode)
 {
-	int theResult;
+	int result = TCL_ERROR;
 
-	switch(inErrorCode)
-	{
-		case CURLE_OK:
-			Tcl_SetResult(interp, "", TCL_STATIC);
-			theResult = TCL_OK;
-			break;
-		
-		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);
-#endif
-			theResult = TCL_ERROR;
-		}
+	if (inErrorCode == CURLE_OK) {
+		Tcl_SetResult(interp, "", TCL_STATIC);
+		result = TCL_OK;
+	} else {
+		Tcl_SetResult(interp, (char *)curl_easy_strerror(inErrorCode), TCL_VOLATILE);
 	}
-	
-	return theResult;
+
+	return result;
 }
 
 /**
@@ -393,7 +381,6 @@
 		}
 #endif
 
-#ifdef HAVE_UTIME_H
 		if (remotetime) {
 			theCurlCode = curl_easy_getinfo(theHandle, CURLINFO_FILETIME, &theFileTime);
 			if (theFileTime > 0) {
@@ -403,7 +390,6 @@
 				utime(theFilePath, &times); /* set the time we got */
 			}
 		}
-#endif /*HAVE_UTIME_H*/
 		
 		/* free header memory */
 		curl_slist_free_all(headers);
@@ -821,7 +807,11 @@
 	};
 	int theResult = TCL_OK;
     EOption theOptionIndex;
+	static pthread_once_t once = PTHREAD_ONCE_INIT;
 
+	/* TODO: use dispatch_once when we drop Leopard support */
+	pthread_once(&once, CurlInit);
+
 	if (objc < 3) {
 		Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
 		return TCL_ERROR;
@@ -835,33 +825,28 @@
 				0,
 				(int*) &theOptionIndex);
 	if (theResult == TCL_OK) {
-		switch (theOptionIndex)
-		{
-			case kCurlFetch:
-				theResult = CurlFetchCmd(interp, objc, objv);
-				break;
-
-			case kCurlIsNewer:
-				theResult = CurlIsNewerCmd(interp, objc, objv);
-				break;
-
-			case kCurlGetSize:
-				theResult = CurlGetSizeCmd(interp, objc, objv);
-				break;
+		switch (theOptionIndex) {
+		case kCurlFetch:
+			theResult = CurlFetchCmd(interp, objc, objv);
+			break;
+		case kCurlIsNewer:
+			theResult = CurlIsNewerCmd(interp, objc, objv);
+			break;
+		case kCurlGetSize:
+			theResult = CurlGetSizeCmd(interp, objc, objv);
+			break;
 		}
 	}
-	
+
 	return theResult;
 }
 
 /**
  * curl init entry point.
- *
- * @param interp		current interpreter
+ * libcurl will never be cleaned (where should I plug the hook?)
  */
-int
-CurlInit(Tcl_Interp* interp)
+void
+CurlInit()
 {
-	CURLcode theCurlCode = curl_global_init(CURL_GLOBAL_ALL);
-	return SetResultFromCurlErrorCode(interp, theCurlCode);
+	curl_global_init(CURL_GLOBAL_ALL);
 }

Modified: branches/images-and-archives/base/src/pextlib1.0/curl.h
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/curl.h	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/curl.h	2009-10-15 02:52:27 UTC (rev 59433)
@@ -36,12 +36,6 @@
 #include <tcl.h>
 
 /**
- * Init libcurl.
- * libcurl will never be cleaned (where should I plug the hook?)
- */
-int CurlInit(Tcl_Interp* interp);
-
-/**
  * A native command to use libcurl.
  *
  * The syntax is:

Modified: branches/images-and-archives/base/src/pextlib1.0/md5cmd.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/md5cmd.c	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/md5cmd.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -34,43 +34,35 @@
 #include <config.h>
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <tcl.h>
 
 #include "md5cmd.h"
 
-#if defined(HAVE_LIBCRYPTO) && !defined(HAVE_LIBMD)
+#if HAVE_COMMONCRYPTO_COMMONDIGEST_H
 
-/* Minimal wrapper around OpenSSL's libcrypto, as a compatibility
- * layer for FreeBSD's libmd library.
- * Originally written by: Rob Braun (bbraun) 1/18/2002
- */
+#define COMMON_DIGEST_FOR_OPENSSL
+#include <CommonCrypto/CommonDigest.h>
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <openssl/md5.h>
-
-/* This is a magic number taken from the FreeBSD libmd Makefile */
-#define LENGTH 16
-
+/* md5 functions are named differently */
 #define MD5Init(x) MD5_Init(x)
 #define MD5Update(x,y,z) MD5_Update(x,y,z)
 #define MD5Final(x,y) MD5_Final(x,y)
 
 #include "md_wrappers.h"
-CHECKSUMEnd(MD5, MD5_CTX, LENGTH)
+CHECKSUMEnd(MD5, MD5_CTX, MD5_DIGEST_LENGTH)
 CHECKSUMFile(MD5, MD5_CTX)
 
 #elif defined(HAVE_LIBMD)
 #include <sys/types.h>
 #include <md5.h>
 #else
-#error libcrypto or libmd are required
+#error CommonCrypto or libmd required
 #endif
 
 int MD5Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])

Copied: branches/images-and-archives/base/src/pextlib1.0/mktemp.c (from rev 59348, trunk/base/src/pextlib1.0/mktemp.c)
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/mktemp.c	                        (rev 0)
+++ branches/images-and-archives/base/src/pextlib1.0/mktemp.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -0,0 +1,125 @@
+/*
+ * mktemp.c
+ * $Id$
+ *
+ * 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 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.
+ * 
+ * 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 HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <tcl.h>
+
+#include "mktemp.h"
+
+int MkdtempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+	char *template, *sp;
+	Tcl_Obj *tcl_result;
+
+	if (objc != 2) {
+		Tcl_WrongNumArgs(interp, 1, objv, "template");
+		return TCL_ERROR;
+	}
+
+	template = strdup(Tcl_GetString(objv[1]));
+	if (template == NULL)
+		return TCL_ERROR;
+
+	if ((sp = mkdtemp(template)) == NULL) {
+		Tcl_AppendResult(interp, "mkdtemp failed: ", strerror(errno), NULL);
+		free(template);
+		return TCL_ERROR;
+	}
+
+	tcl_result = Tcl_NewStringObj(sp, -1);
+	Tcl_SetObjResult(interp, tcl_result);
+	free(template);
+	return TCL_OK;
+}
+
+int MktempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+	char *template, *sp;
+	Tcl_Obj *tcl_result;
+
+	if (objc != 2) {
+		Tcl_WrongNumArgs(interp, 1, objv, "template");
+		return TCL_ERROR;
+	}
+
+	template = strdup(Tcl_GetString(objv[1]));
+	if (template == NULL)
+		return TCL_ERROR;
+
+	if ((sp = mktemp(template)) == NULL) {
+		Tcl_AppendResult(interp, "mktemp failed: ", strerror(errno), NULL);
+		free(template);
+		return TCL_ERROR;
+	}
+
+	tcl_result = Tcl_NewStringObj(sp, -1);
+	Tcl_SetObjResult(interp, tcl_result);
+	free(template);
+	return TCL_OK;
+}
+
+int MkstempCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+	Tcl_Channel channel;
+	char *template, *channelname;
+	int fd;
+
+	if (objc != 2) {
+		Tcl_WrongNumArgs(interp, 1, objv, "template");
+		return TCL_ERROR;
+	}
+
+	template = strdup(Tcl_GetString(objv[1]));
+	if (template == NULL)
+		return TCL_ERROR;
+
+	if ((fd = mkstemp(template)) < 0) {
+		Tcl_AppendResult(interp, "mkstemp failed: ", strerror(errno), NULL);
+		free(template);
+		return TCL_ERROR;
+	}
+
+	channel = Tcl_MakeFileChannel((ClientData)(intptr_t)fd, TCL_READABLE|TCL_WRITABLE);
+	Tcl_RegisterChannel(interp, channel);
+	channelname = (char *)Tcl_GetChannelName(channel);
+	Tcl_AppendResult(interp, channelname, " ", template, NULL);
+	free(template);
+	return TCL_OK;
+}

Copied: branches/images-and-archives/base/src/pextlib1.0/mktemp.h (from rev 59348, trunk/base/src/pextlib1.0/mktemp.h)
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/mktemp.h	                        (rev 0)
+++ branches/images-and-archives/base/src/pextlib1.0/mktemp.h	2009-10-15 02:52:27 UTC (rev 59433)
@@ -0,0 +1,35 @@
+/*
+ * mktemp.h
+ * $Id$
+ *
+ * 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 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.
+ * 
+ * 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.
+ */
+
+int MkdtempCmd(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
+int MktempCmd(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
+int MkstempCmd(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);

Modified: branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/rmd160cmd.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -40,7 +40,7 @@
 
 #include "rmd160cmd.h"
 
-#if !defined(HAVE_LIBMD)
+#if HAVE_COMMONCRYPTO_COMMONDIGEST_H
 
 /* We do not have libmd.
  * let's use our own version of rmd160* libraries.
@@ -65,7 +65,7 @@
 #include <ripemd.h>
 #define RMD160File(x, y) RIPEMD160_File(x, y)
 #else
-#error libcrypto or libmd are required
+#error CommonCrypto or libmd required
 #endif
 
 int RMD160Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])

Modified: branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/sha1cmd.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -35,41 +35,30 @@
 #include <config.h>
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <tcl.h>
 
 #include "sha1cmd.h"
 
-#if defined(HAVE_LIBCRYPTO) && !defined(HAVE_LIBMD)
+#if HAVE_COMMONCRYPTO_COMMONDIGEST_H
 
-/* Minimal wrapper around OpenSSL's libcrypto, as a compatibility
- * layer for FreeBSD's libmd library.
- * Originally written by: Rob Braun (bbraun) 1/18/2002
- */
+#define COMMON_DIGEST_FOR_OPENSSL
+#include <CommonCrypto/CommonDigest.h>
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <openssl/sha.h>
-
-#define SHA1Init(x) SHA1_Init(x)
-#define SHA1Update(x,y,z) SHA1_Update(x,y,z)
-#define SHA1Final(x,y) SHA1_Final(x,y)
-
 #include "md_wrappers.h"
-CHECKSUMEnd(SHA1, SHA_CTX, SHA_DIGEST_LENGTH)
-CHECKSUMFile(SHA1, SHA_CTX)
+CHECKSUMEnd(SHA1_, SHA_CTX, SHA_DIGEST_LENGTH)
+CHECKSUMFile(SHA1_, SHA_CTX)
 
 #elif defined(HAVE_LIBMD)
 #include <sys/types.h>
 #include <sha.h>
-#define SHA1File(x, y) SHA1_File(x, y)
 #else
-#error libcrypto or libmd are required
+#error CommonCrypto or libmd required
 #endif
 
 int SHA1Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
@@ -96,7 +85,7 @@
 	}
 	file = Tcl_GetString(objv[2]);
 
-	if (!SHA1File(file, buf)) {
+	if (!SHA1_File(file, buf)) {
 		tcl_result = Tcl_NewStringObj(error_message, sizeof(error_message) - 1);
 		Tcl_AppendObjToObj(tcl_result, Tcl_NewStringObj(file, -1));
 		Tcl_SetObjResult(interp, tcl_result);

Copied: branches/images-and-archives/base/src/pextlib1.0/sha256cmd.c (from rev 59348, trunk/base/src/pextlib1.0/sha256cmd.c)
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/sha256cmd.c	                        (rev 0)
+++ branches/images-and-archives/base/src/pextlib1.0/sha256cmd.c	2009-10-15 02:52:27 UTC (rev 59433)
@@ -0,0 +1,97 @@
+/*
+ * sha256cmd.c
+ * $Id$
+ *
+ * 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.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <tcl.h>
+
+#include "sha256cmd.h"
+
+#if HAVE_COMMONCRYPTO_COMMONDIGEST_H
+
+#define COMMON_DIGEST_FOR_OPENSSL
+#include <CommonCrypto/CommonDigest.h>
+
+#include "md_wrappers.h"
+CHECKSUMEnd(SHA256_, SHA256_CTX, SHA256_DIGEST_LENGTH)
+CHECKSUMFile(SHA256_, SHA256_CTX)
+
+#elif defined(HAVE_LIBMD)
+#include <sys/types.h>
+#include <sha256.h>
+#define SHA256_DIGEST_LENGTH 32
+#else
+#error CommonCrypto or libmd required
+#endif
+
+int SHA256Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+	char *file, *action;
+	char buf[2*SHA256_DIGEST_LENGTH + 1];
+	const char usage_message[] = "Usage: sha256 file";
+	const char error_message[] = "Could not open file: ";
+	Tcl_Obj *tcl_result;
+
+	if (objc != 3) {
+		Tcl_WrongNumArgs(interp, 1, objv, "action ?file?");
+		return TCL_ERROR;
+	}
+
+	/*
+	 * Only the 'file' action is currently supported
+	 */
+	action = Tcl_GetString(objv[1]);
+	if (strcmp(action, "file") != 0) {
+		tcl_result = Tcl_NewStringObj(usage_message, sizeof(usage_message) - 1);
+		Tcl_SetObjResult(interp, tcl_result);
+		return TCL_ERROR;
+	}
+	file = Tcl_GetString(objv[2]);
+
+	if (!SHA256_File(file, buf)) {
+		tcl_result = Tcl_NewStringObj(error_message, sizeof(error_message) - 1);
+		Tcl_AppendObjToObj(tcl_result, Tcl_NewStringObj(file, -1));
+		Tcl_SetObjResult(interp, tcl_result);
+		return TCL_ERROR;
+	}
+	tcl_result = Tcl_NewStringObj(buf, sizeof(buf) - 1);
+	Tcl_SetObjResult(interp, tcl_result);
+	return TCL_OK;
+}

Copied: branches/images-and-archives/base/src/pextlib1.0/sha256cmd.h (from rev 59348, trunk/base/src/pextlib1.0/sha256cmd.h)
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/sha256cmd.h	                        (rev 0)
+++ branches/images-and-archives/base/src/pextlib1.0/sha256cmd.h	2009-10-15 02:52:27 UTC (rev 59433)
@@ -0,0 +1,44 @@
+/*
+ * sha256cmd.h
+ * $Id$
+ *
+ * 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.
+ */
+
+#ifndef _SHA256CMD_H
+#define _SHA256CMD_H
+
+#include <tcl.h>
+
+/**
+ * A native command for sha256 checksums.
+ */
+int SHA256Cmd(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
+
+#endif
+	/* _SHA256CMD_H */

Modified: branches/images-and-archives/base/src/pextlib1.0/tests/checksums.tcl
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tests/checksums.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/pextlib1.0/tests/checksums.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -45,6 +45,10 @@
 		puts {[rmd160 file $testfile] != "b654ecbdced69aba8a4ea8d6824dd1ac103b3116"}
 		exit 1
 	}
+	if {[sha256 file $testfile] != "424359e1002a1d117f12f95346a81987037b3fde60a564a7aacb48c65a518fe5"} {
+		puts {[sha256 file $testfile] != "424359e1002a1d117f12f95346a81987037b3fde60a564a7aacb48c65a518fe5"}
+		exit 1
+	}
 
 	# delete the file.
 	file delete -force $testfile

Modified: branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in	2009-10-15 02:52:27 UTC (rev 59433)
@@ -46,6 +46,7 @@
 	variable lipo_path "@LIPO@"
 	variable nice_path "@NICE@"
 	variable patch_path "@PATCH@"
+	variable gnupatch_path "@GNUPATCH@"
 	variable rmdir_path "@RMDIR@"
 	variable rsync_path "@RSYNC@"
 	variable unzip_path "@UNZIP@"

Modified: branches/images-and-archives/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portbuild.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/portbuild.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -145,7 +145,11 @@
     if {![exists build.jobs] || !([string match "*make*" [option build.cmd]] || [string match "*scons*" [option build.cmd]])} {
         return ""
     }
-    return " -j[option build.jobs]"
+    set jobs [option build.jobs]
+    if {![string is integer -strict $jobs] || $jobs <= 1} {
+        return ""
+    }
+    return " -j$jobs"
 }
 
 proc portbuild::build_start {args} {

Modified: branches/images-and-archives/base/src/port1.0/portextract.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portextract.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/portextract.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -74,7 +74,7 @@
 }
 
 proc portextract::extract_init {args} {
-    global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_lzma use_zip use_7z use_dmg workpath
+    global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_lzma use_xz use_zip use_7z use_dmg workpath
 
     # should the distfiles be extracted to worksrcpath instead?
     if {[tbool extract.mkdir]} {
@@ -88,6 +88,8 @@
         option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
     } elseif {[tbool use_lzma]} {
         option extract.cmd [binaryInPath "lzma"]
+    } elseif {[tbool use_xz]} {
+        option extract.cmd [binaryInPath "xz"]
     } elseif {[tbool use_zip]} {
         option extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}]
         option extract.pre_args -q

Modified: branches/images-and-archives/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portfetch.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/portfetch.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -55,7 +55,7 @@
 }
 
 # 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 \
+options master_sites patch_sites extract.suffix distfiles patchfiles use_bzip2 use_lzma use_xz use_zip 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 \
     cvs.module cvs.root cvs.password cvs.date cvs.tag cvs.method \
@@ -127,6 +127,7 @@
 # Option-executed procedures
 option_proc use_bzip2 portfetch::set_extract_type
 option_proc use_lzma  portfetch::set_extract_type
+option_proc use_xz    portfetch::set_extract_type
 option_proc use_zip   portfetch::set_extract_type
 option_proc use_7z    portfetch::set_extract_type
 option_proc use_dmg   portfetch::set_extract_type
@@ -144,6 +145,10 @@
                 set extract.suffix .tar.lzma
                 depends_extract-append bin:lzma:lzmautils
             }
+            use_xz {
+                set extract.suffix .tar.xz
+                depends_extract-append bin:xz:xz-devel
+            }
             use_zip {
                 set extract.suffix .zip
                 depends_extract-append bin:unzip:unzip

Modified: branches/images-and-archives/base/src/port1.0/portmain.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portmain.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/portmain.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -88,18 +88,14 @@
 default os.universal_supported no
 
 set macosx_version {}
+set macosx_version_text {}
 if {[info exists os.platform] && ${os.platform} == "darwin"} {
     # This will probably break when Apple changes versioning
     set macosx_version [expr 10.0 + ($os_major - 4) / 10.0]
+    set macosx_version_text "(Mac OS X ${macosx_version}) "
 }
+ui_debug "OS [option os.platform]/[option os.version] ${macosx_version_text}arch [option os.arch]"
 
-ui_debug "OS Platform: [option os.platform]"
-ui_debug "OS Version: [option os.version]"
-if {$macosx_version != ""} {
-    ui_debug "Mac OS X Version: ${macosx_version}"
-}
-ui_debug "System Arch: [option os.arch]"
-
 default macosx_deployment_target {$macosx_version}
 
 default universal_variant yes

Modified: branches/images-and-archives/base/src/port1.0/portpatch.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portpatch.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/portpatch.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -49,9 +49,24 @@
 # Set up defaults
 default patch.asroot no
 default patch.dir {${worksrcpath}}
-default patch.cmd {[findBinary patch $portutil::autoconf::patch_path]}
+default patch.cmd {[portpatch::build_getpatchtype]}
 default patch.pre_args -p0
 
+proc portpatch::build_getpatchtype {args} {
+    if {![exists patch.type]} {
+        return [findBinary patch $portutil::autoconf::patch_path]
+    }
+    switch -exact -- [option patch.type] {
+        gnu {
+            return [findBinary gpatch $portutil::autoconf::gnupatch_path]
+        }
+        default {
+            ui_warn "[format [msgcat::mc "Unknown patch.type %s, using 'patch'"] [option patch.type]]"
+            return [findBinary patch $portutil::autoconf::patch_path]
+        }
+    }
+}
+
 proc portpatch::patch_main {args} {
     global UI_PREFIX
 

Modified: branches/images-and-archives/base/src/port1.0/portutil.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -2104,12 +2104,11 @@
 # e.g. 'merge_lipo ${workpath}/pre-dest ${destroot} ${prefix}/bin/pstree i386 ppc
 # will merge binary files with lipo which have to be in the same (relative) path
 proc merge_lipo {base target file archs} {
-    set exec-lipo ""
+    set exec-lipo [list [findBinary lipo $portutil::autoconf::lipo_path]]
     foreach arch ${archs} {
-        set exec-lipo [concat ${exec-lipo} [list "-arch" "${arch}" "${base}/${arch}${file}"]]
+        lappend exec-lipo -arch ${arch} ${base}/${arch}${file}
     }
-    set exec-lipo [concat ${exec-lipo}]
-    system "[findBinary lipo $portutil::autoconf::lipo_path] ${exec-lipo} -create -output ${target}${file}"
+    eval exec ${exec-lipo} [list -create -output ${target}${file}]
 }
 
 # private function
@@ -2154,6 +2153,9 @@
             set base_arch ${arch}
         }
     }
+    if {"" == ${base_arch}} {
+        return -code error [format [msgcat::mc "Cannot merge because directory '%s' contains no architecture directories."] ${base}]
+    }
     ui_debug "merging architectures ${archs}, base_arch is ${base_arch}"
 
     # traverse the base-architecture directory
@@ -2162,30 +2164,34 @@
         set fpath [string range "${file}" [string length "${basepath}"] [string length "${file}"]]
         if {${fpath} != ""} {
             # determine the type (dir/file/link)
-            set filetype [exec [findBinary file $portutil::autoconf::file_path] "-b" "${basepath}${fpath}"]
-            switch -regexp ${filetype} {
+            switch [file type ${basepath}${fpath}] {
                 directory {
                     # just create directories
                     ui_debug "mrg: directory ${fpath}"
                     file mkdir "${destroot}${fpath}"
                 }
-                symbolic\ link.* {
+                link {
                     # copy symlinks, TODO: check if targets match!
                     ui_debug "mrg: symlink ${fpath}"
                     file copy "${basepath}${fpath}" "${destroot}${fpath}"
                 }
-                Mach-O.* {
-                    merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
-                }
-                current\ ar\ archive {
-                    merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
-                }
-                ASCII\ C\ program\ text {
-                    merge_cpp "${base}" "${destroot}" "${fpath}" "${archs}"
-                }
                 default {
-                    ui_debug "unknown file type: ${filetype}"
-                    merge_file "${base}" "${destroot}" "${fpath}" "${archs}"
+                    set filetype [exec [findBinary file $portutil::autoconf::file_path] "-b" "${basepath}${fpath}"]
+                    switch -regexp ${filetype} {
+                        Mach-O.* {
+                            merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
+                        }
+                        current\ ar\ archive {
+                            merge_lipo "${base}" "${destroot}" "${fpath}" "${archs}"
+                        }
+                        ASCII\ C\ program\ text {
+                            merge_cpp "${base}" "${destroot}" "${fpath}" "${archs}"
+                        }
+                        default {
+                            ui_debug "unknown file type: ${filetype}"
+                            merge_file "${base}" "${destroot}" "${fpath}" "${archs}"
+                        }
+                    }
                 }
             }
         }

Modified: branches/images-and-archives/base/src/registry1.0/registry.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/registry.tcl	2009-10-15 02:38:37 UTC (rev 59432)
+++ branches/images-and-archives/base/src/registry1.0/registry.tcl	2009-10-15 02:52:27 UTC (rev 59433)
@@ -718,12 +718,9 @@
 }
 
 proc _deactivate_contents {name imagefiles} {
-	variable force
-
 	set files [list]
 	
 	foreach file $imagefiles {
-		set port [registry::file_registered $file]
 		if { [file exists $file] || (![catch {file type $file}] && [file type $file] == "link") } {
 			# Normalize the file path to avoid removing the intermediate
 			# symlinks (remove the empty directories instead)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091014/cfa77768/attachment-0001.html>


More information about the macports-changes mailing list