Index: files/patch-config.guess.diff
===================================================================
--- files/patch-config.guess.diff	(revision 0)
+++ files/patch-config.guess.diff	(revision 0)
@@ -0,0 +1,147 @@
+--- config.guess.old	2008-08-12 00:49:38.000000000 +0200
++++ config.guess	2009-03-06 23:55:14.000000000 +0100
+@@ -325,144 +325,6 @@
+   # (as noted below).  But the man page says the command is still "under
+   # development", so it doesn't seem wise to use it just yet, not while
+   # there's an alternative.
+-  #
+-  # Try to read the PVR.  mfpvr is a protected instruction, NetBSD, MacOS
+-  # and AIX don't allow it in user mode, but the Linux kernel does.
+-  #
+-  # Using explicit bytes for mfpvr avoids worrying about assembler syntax
+-  # and underscores.  "char"s are used instead of "int"s to avoid worrying
+-  # whether sizeof(int)==4 or if it's the right endianness.
+-  #
+-  # Note this is no good on AIX, since a C function there is the address of
+-  # a function descriptor, not actual code.  But this doesn't matter since
+-  # AIX doesn't allow mfpvr anyway.
+-  #
+-  cat >$dummy.c <<\EOF
+-#include <stdio.h>
+-struct {
+-  int   n;  /* force 4-byte alignment */
+-  char  a[8];
+-} getpvr = {
+-  0,
+-  {
+-    0x7c, 0x7f, 0x42, 0xa6,  /* mfpvr r3 */
+-    0x4e, 0x80, 0x00, 0x20,  /* blr      */
+-  }
+-};
+-int
+-main ()
+-{
+-  unsigned  (*fun)();
+-  unsigned  pvr;
+-
+-  /* a separate "fun" variable is necessary for gcc 2.95.2 on MacOS,
+-     it gets a compiler error on a combined cast and call */
+-  fun = (unsigned (*)()) getpvr.a;
+-  pvr = (*fun) ();
+-
+-  switch (pvr >> 16) {
+-  case 0x0001: puts ("powerpc601");  break;
+-  case 0x0003: puts ("powerpc603");  break;
+-  case 0x0004: puts ("powerpc604");  break;
+-  case 0x0006: puts ("powerpc603e"); break;
+-  case 0x0007: puts ("powerpc603e"); break;  /* 603ev */
+-  case 0x0008: puts ("powerpc750");  break;
+-  case 0x0009: puts ("powerpc604e"); break;
+-  case 0x000a: puts ("powerpc604e"); break;  /* 604ev5 */
+-  case 0x000c: puts ("powerpc7400"); break;
+-  case 0x0041: puts ("powerpc630");  break;
+-  case 0x0050: puts ("powerpc860");  break;
+-  case 0x8000: puts ("powerpc7450"); break;
+-  case 0x8001: puts ("powerpc7455"); break;
+-  case 0x8002: puts ("powerpc7457"); break;
+-  case 0x8003: puts ("powerpc7447"); break; /* really 7447A */
+-  case 0x800c: puts ("powerpc7410"); break;
+-  }
+-  return 0;
+-}
+-EOF
+-  if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
+-    # This style construct is needed on AIX 4.3 to suppress the SIGILL error
+-    # from (*fun)().  Using $SHELL -c ./$dummy 2>/dev/null doesn't work.
+-    { x=`./$dummy`; } 2>/dev/null
+-    if test -n "$x"; then
+-      exact_cpu=$x
+-    fi
+-  fi
+-  rm -f $dummy.c $dummy.o $dummy $dummy.core
+-
+-  # Grep the linux kernel /proc/cpuinfo pseudo-file.
+-  # Anything unrecognised is ignored, since of course we mustn't spit out
+-  # a cpu type config.sub doesn't know.
+-  if test -z "$exact_cpu" && test -f /proc/cpuinfo; then
+-    x=`grep "^cpu[ 	]" /proc/cpuinfo | head -n 1`
+-    x=`echo $x | sed -n 's/^cpu[ 	]*:[ 	]*\([A-Za-z0-9]*\).*/\1/p'`
+-    x=`echo $x | sed 's/PPC//'`
+-    case $x in
+-      601)     exact_cpu="power" ;;
+-      603ev)   exact_cpu="powerpc603e" ;;
+-      604ev5)  exact_cpu="powerpc604e" ;;
+-      603 | 603e | 604 | 604e | 750 | 821 | 860 | 970)
+-        exact_cpu="powerpc$x" ;;
+-      POWER[4-9])
+-        exact_cpu=`echo $x | sed "s;POWER;power;"` ;;
+-    esac
+-  fi
+-
+-  if test -z "$exact_cpu"; then
+-    # On AIX, try looking at _system_configuration.  This is present in
+-    # version 4 at least.
+-    cat >$dummy.c <<EOF
+-#include <stdio.h>
+-#include <sys/systemcfg.h>
+-int
+-main ()
+-{
+-  switch (_system_configuration.implementation) {
+-  /* Old versions of AIX don't have all these constants,
+-     use ifdef for safety. */
+-#ifdef POWER_RS2
+-  case POWER_RS2:    puts ("power2");     break;
+-#endif
+-#ifdef POWER_601
+-  case POWER_601:    puts ("power");      break;
+-#endif
+-#ifdef POWER_603
+-  case POWER_603:    puts ("powerpc603"); break;
+-#endif
+-#ifdef POWER_604
+-  case POWER_604:    puts ("powerpc604"); break;
+-#endif
+-#ifdef POWER_620
+-  case POWER_620:    puts ("powerpc620"); break;
+-#endif
+-#ifdef POWER_630
+-  case POWER_630:    puts ("powerpc630"); break;
+-#endif
+-  /* Dunno what this is, leave it out for now.
+-  case POWER_A35:    puts ("powerpca35"); break;
+-  */
+-  /* This is waiting for a bit more info.
+-  case POWER_RS64II: puts ("powerpcrs64ii"); break;
+-  */
+-  default:
+-    if (_system_configuration.architecture == POWER_RS)
+-      puts ("power");
+-    else if (_system_configuration.width == 64)
+-      puts ("powerpc64");
+-  }
+-  return 0;
+-}
+-EOF
+-    if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
+-      x=`./$dummy`
+-      if test -n "$x"; then
+-        exact_cpu=$x
+-      fi
+-    fi
+-    rm -f $dummy.c $dummy.o $dummy
+-  fi
+-
+   if test -z "$exact_cpu"; then
+     # On MacOS X (or any Mach-O presumably), NXGetLocalArchInfo cpusubtype
+     # can tell us the exact cpu.
Index: Portfile
===================================================================
--- Portfile	(revision 47804)
+++ Portfile	(working copy)
@@ -32,6 +32,8 @@
 use_bzip2       yes
 use_parallel_build yes
 
+patchfiles      patch-config.guess.diff
+
 configure.args  --infodir=${prefix}/share/info \
                 --enable-cxx
 
