Index: Portfile
===================================================================
--- Portfile	(revision 133259)
+++ Portfile	(working copy)
@@ -74,6 +74,10 @@
     configure.args-replace      --without-aquaterm --with-aquaterm
     configure.cflags-append     "-F${frameworks_dir}"
     configure.ldflags-append    "-F${frameworks_dir}"
+
+    # fix "Aquaterm" -> "AquaTerm" for case-sensitive file systems
+    patchfiles-append           patch-configure.diff \
+                                patch-term_aquaterm.trm.diff
 }
 
 variant x11 {
Index: files/patch-configure.diff
===================================================================
--- files/patch-configure.diff	(revision 0)
+++ files/patch-configure.diff	(working copy)
@@ -0,0 +1,71 @@
+--- configure.orig
++++ configure
+@@ -1531,7 +1531,7 @@ Optional Packages:
+   --with-x                use the X Window System
+   --with-x-app-defaultdir=DIR       location of X11 application defaults
+                           (default /etc/X11/app-defaults/)
+-  --with-aquaterm         include support for aquaterm on OSX
++  --with-aquaterm         include support for AquaTerm on OSX
+   --with-gihdir=DIR       location of .gih help text file
+                           (default PREFIX/share/PACKAGE/VERSION)
+   --with-linux-vga        use the Linux SVGA console driver
+@@ -8863,10 +8863,10 @@ $as_echo "yes" >&6; }
+ if test "${with_aquaterm+set}" = set; then :
+   withval=$with_aquaterm; if test "$withval" == yes; then
+ 
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Aquaterm framework presence" >&5
+-$as_echo_n "checking for Aquaterm framework presence... " >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AquaTerm framework presence" >&5
++$as_echo_n "checking for AquaTerm framework presence... " >&6; }
+   ac_gnuplot_save_LDFLAGS="$LDFLAGS"
+-  LDFLAGS="$LDFLAGS -framework Foundation -framework Aquaterm"
++  LDFLAGS="$LDFLAGS -framework Foundation -framework AquaTerm"
+   ac_ext=m
+ ac_cpp='$OBJCPP $CPPFLAGS'
+ ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -8875,7 +8875,7 @@ ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+ 
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#import <Aquaterm/AQTAdapter.h>
++#import <AquaTerm/AQTAdapter.h>
+ int
+ main ()
+ {
+@@ -8885,9 +8885,9 @@ main ()
+ }
+ _ACEOF
+ if ac_fn_objc_try_link "$LINENO"; then :
+-  eval "gnuplot_framework_Aquaterm=yes"
++  eval "gnuplot_framework_AquaTerm=yes"
+ else
+-  eval "gnuplot_framework_Aquaterm=no"
++  eval "gnuplot_framework_AquaTerm=no"
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+@@ -8898,13 +8898,13 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+   LDFLAGS="$ac_gnuplot_save_LDFLAGS"
+-  if test "$gnuplot_framework_Aquaterm" = yes; then
++  if test "$gnuplot_framework_AquaTerm" = yes; then
+ 
+ $as_echo "#define HAVE_FRAMEWORK_AQUATERM 1" >>confdefs.h
+ 
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+-    CFLAGS="$CFLAGS -ObjC"; LDFLAGS="$LDFLAGS -framework Foundation -framework Aquaterm"
++    CFLAGS="$CFLAGS -ObjC"; LDFLAGS="$LDFLAGS -framework Foundation -framework AquaTerm"
+   else
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+@@ -16366,7 +16366,7 @@ else
+ $as_echo "  caca terminal: no (requires libcaca >= 0.99.beta15)" >&6; }
+ fi
+ 
+-if test "$gnuplot_framework_Aquaterm" = yes; then
++if test "$gnuplot_framework_AquaTerm" = yes; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result:   aqua terminal (OSX): yes" >&5
+ $as_echo "  aqua terminal (OSX): yes" >&6; }
+ else
Index: files/patch-term_aquaterm.trm.diff
===================================================================
--- files/patch-term_aquaterm.trm.diff	(revision 0)
+++ files/patch-term_aquaterm.trm.diff	(working copy)
@@ -0,0 +1,11 @@
+--- term/aquaterm.trm.orig
++++ term/aquaterm.trm
+@@ -94,7 +94,7 @@ TERM_PUBLIC void ENHAQUA_writec __PROTO((int c));
+ #ifndef TERM_PROTO_ONLY
+ 
+ #ifdef TERM_BODY
+-#import <aquaterm/AQTAdapter.h>
++#import <AquaTerm/AQTAdapter.h>
+ 
+ #import <Foundation/NSAutoreleasePool.h>
+ #import <Foundation/NSArray.h>
