6975036 Update freetype to 2.4.1
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 06 Aug 2010 14:38:17 -0700
changeset 993 76fc606af704
parent 992 9738f5ac74f1
child 994 ebd9341332ef
6975036 Update freetype to 2.4.1 6974339 CVE-2010-1797 stack overflow in freetype 2.4.1 or older releases.
open-src/lib/freetype/Makefile
open-src/lib/freetype/configure.11.patch
open-src/lib/freetype/configure.12.patch
open-src/lib/freetype/fedora_aliasing_patch90.patch
open-src/lib/freetype/freetype-2.3.9-CVE-2009-0946.patch
open-src/lib/freetype/freetype-CVE-2010-1797.patch
open-src/lib/freetype/freetype-GS-conflict.patch
open-src/lib/freetype/freetype-config.patch
open-src/lib/freetype/freetype2.in.10.patch
open-src/lib/freetype/ftconfig.h.1.patch
open-src/lib/freetype/ftconfig.in.8.patch
open-src/lib/freetype/ftoption.h.0.patch
open-src/lib/freetype/ttgload.c.7.patch
open-src/lib/freetype/ttinterp.c.6.patch
open-src/lib/freetype/ttinterp.h.5.patch
open-src/lib/freetype/ttobjs.c.4.patch
open-src/lib/freetype/ttobjs.h.3.patch
open-src/lib/freetype/unix-cc.in.9.patch
pkg/manifests/system-library-freetype-2.mf
--- a/open-src/lib/freetype/Makefile	Tue Aug 03 20:42:27 2010 -0700
+++ b/open-src/lib/freetype/Makefile	Fri Aug 06 14:38:17 2010 -0700
@@ -63,11 +63,11 @@
 LIBNAME=freetype
 
 # Version number (used in path names)
-MODULE_VERSION=2.3.9
+MODULE_VERSION=2.4.1
 
 # Checksums for upstream tarball
-TARBALL_MD5  = d76233108aca9c9606cdbd341562ad9a
-TARBALL_SHA1 = db08969cb5053879ff9e973fe6dd2c52c7ea2d4e
+TARBALL_MD5  = 567a27e5189ed581396f69fb51faf2d8
+TARBALL_SHA1 = 1870cc142be52a721031fcf16c4f8110dfb84fdb
 
 # Download site for source
 SOURCE_URL=http://download.savannah.gnu.org/releases/freetype/$(SOURCE_TARBALL_NAME)
@@ -75,21 +75,10 @@
 
 # Patches to apply to source after unpacking, in order
 SOURCE_PATCHES= \
-	freetype-2.3.9-CVE-2009-0946.patch,-p1 \
-	fedora_aliasing_patch90.patch,-p1 \
+	freetype-CVE-2010-1797.patch,-p1 \
 	freetype-config.patch,-p1 \
-	ftoption.h.0.patch,-p1 \
-	ftconfig.h.1.patch,-p1 \
-	ttobjs.h.3.patch,-p1 \
-	ttobjs.c.4.patch,-p1 \
-	ttinterp.h.5.patch,-p1 \
-	ttinterp.c.6.patch,-p1 \
-	ttgload.c.7.patch,-p1 \
-	ftconfig.in.8.patch,-p1 \
-	unix-cc.in.9.patch,-p1 \
-	freetype2.in.10.patch,-p1 \
-	configure.11.patch,-p1 \
-	configure.12.patch,-p1
+	freetype-GS-conflict.patch,-p1 \
+	unix-cc.in.9.patch,-p1
 
 # Where to install freetype files
 MODULE_PREFIX=/usr
@@ -97,6 +86,8 @@
 
 # Additional command line options to GNU autoconf configure script
 MODULE_CONFIG_OPTS= \
+	CONFIG_SHELL="/bin/bash" \
+	--enable-biarch-config \
 	--libdir='$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)' \
 	--with-zlib \
 	--with-pic
@@ -128,6 +119,11 @@
     MAKEFLAGS= \
     MAKE=$(GNUMAKE) GNUMAKE=$(GNUMAKE) CFG="$(CONFIG_OPTS)"
 
+# Don't use -I paths to proto area, since freetype doesn't depend on
+# anything there, but can break if it finds old freetype headers during
+# an incremental rebuild.
+USE_DEFAULT_CONFIG_CPPFLAGS=no
+
 MODULE_CONFIG_ENV = $(MODULE_ENV)
 MODULE_BUILD_ENV = $(CONFIG_ENV)
 
@@ -153,13 +149,6 @@
 # clash with the one in freetype's Makefiles
 install_freetype: $(BUILD_TARGETS)
 	mkdir -p $(PROTODIR)$(FT_bindir)
-	( cd $(SOURCE_DIR)/builds/unix ; \
-	    ./config.status --file ftconfig ; \
-	    rm -f ftconfig.h ; \
-	    mv ftconfig ftconfig.h ; \
-	    touch -acm ftconfig.h )
-	( cd $(SOURCE_DIR) ; \
-	    cp -fp ./builds/unix/ftconfig.h ./include/freetype/config/ftconfig.h )
 	( cd $(SOURCE_DIR) ; \
 	  $(GNUMAKE) DESTDIR=$(PROTODIR) prefix=$(MODULE_PREFIX) libdir=$(FT_libdir) bindir=$(FT_bindir) install )
 
--- a/open-src/lib/freetype/configure.11.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/configure	2008-07-05 02:11:13.000000000 -0400
-+++ freetype-2.3.9/configure	2009-08-27 12:40:06.860343000 -0400
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright 2002, 2003, 2004, 2005, 2006, 2008 by
- # David Turner, Robert Wilhelm, and Werner Lemberg.
--- a/open-src/lib/freetype/configure.12.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/builds/unix/configure	2009-03-12 05:57:46.000000000 -0400
-+++ freetype-2.3.9/builds/unix/configure	2009-08-27 12:40:28.473447000 -0400
-@@ -1,4 +1,4 @@
--#! /bin/sh
-+#! /bin/bash
- # Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.63 for FreeType 2.3.9.
- #
-@@ -575,7 +575,7 @@
- 
- 
- # Check that we are running under the correct shell.
--SHELL=${CONFIG_SHELL-/bin/sh}
-+SHELL=${CONFIG_SHELL-/bin/bash}
- 
- case X$lt_ECHO in
- X*--fallback-echo)
-@@ -659,7 +659,7 @@
-       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- 	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-         # If we have ksh, try running configure again with it.
--        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/bash}
-         export ORIGINAL_CONFIG_SHELL
-         CONFIG_SHELL=/bin/ksh
-         export CONFIG_SHELL
-@@ -701,7 +701,7 @@
- 	  if test "$prev" != 'sed 50q "$0"'; then
- 	    echo_test_string=`eval $prev`
- 	    export echo_test_string
--	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/bash}} "$0" ${1+"$@"}
- 	  else
- 	    # Oops.  We lost completely, so just stick with echo.
- 	    ECHO=echo
-@@ -740,7 +740,7 @@
- subdirs=
- MFLAGS=
- MAKEFLAGS=
--SHELL=${CONFIG_SHELL-/bin/sh}
-+SHELL=${CONFIG_SHELL-/bin/bash}
- 
- # Identity of this package.
- PACKAGE_NAME='FreeType'
-@@ -7453,7 +7453,7 @@
-       for i in 1 2 3 4 5 6 7 8 ; do
-         teststring=$teststring$teststring
-       done
--      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-+      SHELL=${SHELL-${CONFIG_SHELL-/bin/bash}}
-       # If test is not a shell built-in, we'll probably end up computing a
-       # maximum length that is only half of the actual maximum length, but
-       # we can't tell.
--- a/open-src/lib/freetype/fedora_aliasing_patch90.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-# http://www.mail-archive.com/[email protected]/msg08561.html
---- freetype-2.3.9/src/cache/ftccache.h	2007-05-16 17:37:05.000000000 
-+0200
-+++ freetype-2.3.9/src/cache/ftccache.h	2009-07-02 14:54:10.000000000 +0200
-@@ -246,8 +246,7 @@
-     error = FTC_Cache_NewNode( _cache, _hash, query, &_node );           \
-                                                                          \
-   _Ok:                                                                   \
--    _pnode = (FTC_Node*)(void*)&(node);                                  \
--    *_pnode = _node;                                                     \
-+    node = _node;                                                       \
-   FT_END_STMNT
- 
- #else /* !FTC_INLINE */
-
--- a/open-src/lib/freetype/freetype-2.3.9-CVE-2009-0946.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0946
-https://bugzilla.redhat.com/show_bug.cgi?id=491384
-https://bugs.gentoo.org/show_bug.cgi?id=263032
-
---- freetype-2.3.9-orig/src/cff/cffload.c
-+++ freetype-2.3.9/src/cff/cffload.c
-@@ -842,7 +842,20 @@
-             goto Exit;
- 
-           for ( j = 1; j < num_glyphs; j++ )
--            charset->sids[j] = FT_GET_USHORT();
-+          {
-+            FT_UShort sid = FT_GET_USHORT();
-+
-+
-+            /* this constant is given in the CFF specification */
-+            if ( sid < 65000 )
-+              charset->sids[j] = sid;
-+            else
-+            {
-+              FT_ERROR(( "cff_charset_load:"
-+                         " invalid SID value %d set to zero\n", sid ));
-+              charset->sids[j] = 0;
-+            }
-+          }
- 
-           FT_FRAME_EXIT();
-         }
-@@ -875,6 +888,20 @@
-                 goto Exit;
-             }
- 
-+            /* check whether the range contains at least one valid glyph; */
-+            /* the constant is given in the CFF specification             */
-+            if ( glyph_sid >= 65000 ) {
-+              FT_ERROR(( "cff_charset_load: invalid SID range\n" ));
-+              error = CFF_Err_Invalid_File_Format;
-+              goto Exit;
-+            }
-+
-+            /* try to rescue some of the SIDs if `nleft' is too large */
-+            if ( nleft > 65000 - 1 || glyph_sid >= 65000 - nleft ) {
-+              FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" ));
-+              nleft = 65000 - 1 - glyph_sid;
-+            }
-+
-             /* Fill in the range of sids -- `nleft + 1' glyphs. */
-             for ( i = 0; j < num_glyphs && i <= nleft; i++, j++, glyph_sid++ )
-               charset->sids[j] = glyph_sid;
---- freetype-2.3.9-orig/src/lzw/ftzopen.c
-+++ freetype-2.3.9/src/lzw/ftzopen.c
-@@ -332,6 +332,9 @@
- 
-           while ( code >= 256U )
-           {
-+            if ( !state->prefix )
-+              goto Eof;
-+
-             FTLZW_STACK_PUSH( state->suffix[code - 256] );
-             code = state->prefix[code - 256];
-           }
---- freetype-2.3.9-orig/src/sfnt/ttcmap.c
-+++ freetype-2.3.9/src/sfnt/ttcmap.c
-@@ -1635,7 +1635,7 @@
-       FT_INVALID_TOO_SHORT;
- 
-     length = TT_NEXT_ULONG( p );
--    if ( table + length > valid->limit || length < 8208 )
-+    if ( length > (FT_UInt32)( valid->limit - table ) || length < 8192 + 16 )
-       FT_INVALID_TOO_SHORT;
- 
-     is32       = table + 12;
-@@ -1863,7 +1863,8 @@
-     p      = table + 16;
-     count  = TT_NEXT_ULONG( p );
- 
--    if ( table + length > valid->limit || length < 20 + count * 2 )
-+    if ( length > (FT_ULong)( valid->limit - table ) ||
-+         length < 20 + count * 2                     )
-       FT_INVALID_TOO_SHORT;
- 
-     /* check glyph indices */
-@@ -2048,7 +2049,8 @@
-     p          = table + 12;
-     num_groups = TT_NEXT_ULONG( p );
- 
--    if ( table + length > valid->limit || length < 16 + 12 * num_groups )
-+    if ( length > (FT_ULong)( valid->limit - table ) ||
-+         length < 16 + 12 * num_groups               )
-       FT_INVALID_TOO_SHORT;
- 
-     /* check groups, they must be in increasing order */
-@@ -2429,7 +2431,8 @@
-     FT_ULong  num_selectors = TT_NEXT_ULONG( p );
- 
- 
--    if ( table + length > valid->limit || length < 10 + 11 * num_selectors )
-+    if ( length > (FT_ULong)( valid->limit - table ) ||
-+         length < 10 + 11 * num_selectors            )
-       FT_INVALID_TOO_SHORT;
- 
-     /* check selectors, they must be in increasing order */
-@@ -2491,7 +2494,7 @@
-           FT_ULong  i, lastUni = 0;
- 
- 
--          if ( ndp + numMappings * 4 > valid->limit )
-+          if ( numMappings * 4 > (FT_ULong)( valid->limit - ndp ) )
-             FT_INVALID_TOO_SHORT;
- 
-           for ( i = 0; i < numMappings; ++i )
---- freetype-2.3.9-orig/src/smooth/ftsmooth.c
-+++ freetype-2.3.9/src/smooth/ftsmooth.c
-@@ -153,7 +153,7 @@
-       slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
-     }
- 
--    /* allocate new one, depends on pixel format */
-+    /* allocate new one */
-     pitch = width;
-     if ( hmul )
-     {
-@@ -194,6 +194,13 @@
- 
- #endif
- 
-+    if ( pitch > 0xFFFF || height > 0xFFFF )
-+    {
-+      FT_ERROR(( "ft_smooth_render_generic: glyph too large: %d x %d\n",
-+                 width, height ));
-+      return Smooth_Err_Raster_Overflow;
-+    }
-+
-     bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
-     bitmap->num_grays  = 256;
-     bitmap->width      = width;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/freetype/freetype-CVE-2010-1797.patch	Fri Aug 06 14:38:17 2010 -0700
@@ -0,0 +1,32 @@
+diff -u -r freetype-2.4.1/src/cff/cffgload.c freetype-2.4.1_patched/src/cff/cffgload.c
+--- freetype-2.4.1/src/cff/cffgload.c	2010-07-15 09:26:45.000000000 -0700
++++ freetype-2.4.1_patched/src/cff/cffgload.c	2010-08-03 12:18:02.000000000 -0700
+@@ -204,7 +204,7 @@
+     2, /* hsbw */
+     0,
+     0,
+-    0,
++    1,
+     5, /* seac */
+     4, /* sbw */
+     2  /* setcurrentpoint */
+@@ -2041,6 +2041,9 @@
+             if ( Rand >= 0x8000L )
+               Rand++;
+ 
++            if ( args - stack >= CFF_MAX_OPERANDS )
++                goto Stack_Overflow;
++			  
+             args[0] = Rand;
+             seed    = FT_MulFix( seed, 0x10000L - seed );
+             if ( seed == 0 )
+@@ -2166,6 +2169,9 @@
+         case cff_op_dup:
+           FT_TRACE4(( " dup\n" ));
+ 
++          if ( args + 1 - stack >= CFF_MAX_OPERANDS )
++            goto Stack_Overflow;
++                
+           args[1] = args[0];
+           args += 2;
+           break;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/freetype/freetype-GS-conflict.patch	Fri Aug 06 14:38:17 2010 -0700
@@ -0,0 +1,24 @@
+diff -urp freetype-2.4.1/src/truetype/ttinterp.h freetype-2.4.1/src/truetype/ttinterp.h
+--- freetype-2.4.1/src/truetype/ttinterp.h	2010-05-20 05:04:47.000000000 -0700
++++ freetype-2.4.1/src/truetype/ttinterp.h	2010-08-05 17:23:58.073273648 -0700
+@@ -138,6 +138,8 @@ FT_BEGIN_HEADER
+     FT_Size_Metrics    metrics;
+     TT_Size_Metrics    tt_metrics; /* size metrics */
+ 
++#undef GS /* avoid conflict with <sys/regset.h> on Solaris x86 systems */
++#define GS FT_GS
+     TT_GraphicsState   GS;         /* current graphics state */
+ 
+     FT_Int             curRange;  /* current code range number   */
+diff -urp freetype-2.4.1/src/truetype/ttobjs.h freetype-2.4.1/src/truetype/ttobjs.h
+--- freetype-2.4.1/src/truetype/ttobjs.h	2009-07-03 06:28:24.000000000 -0700
++++ freetype-2.4.1/src/truetype/ttobjs.h	2010-08-05 17:24:05.630291335 -0700
+@@ -311,6 +311,8 @@ FT_BEGIN_HEADER
+ 
+     TT_CodeRangeTable  codeRangeTable;
+ 
++#undef GS /* avoid conflict with <sys/regset.h> on Solaris x86 systems */
++#define GS FT_GS
+     TT_GraphicsState   GS;
+ 
+     FT_ULong           cvt_size;      /* the scaled control value table */
--- a/open-src/lib/freetype/freetype-config.patch	Tue Aug 03 20:42:27 2010 -0700
+++ b/open-src/lib/freetype/freetype-config.patch	Fri Aug 06 14:38:17 2010 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -18,14 +18,18 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/builds/unix/freetype-config.in	2009-02-03 18:09:49.000000000 -0500
-+++ freetype-2.3.9/builds/unix/freetype-config.in	2009-08-27 13:53:14.803454000 -0400
+
+Remove -lz from the flags listed by freetype-config --libs since ELF
+library dependencies take care of that for us instead.
+
+--- freetype-2.4.1/builds/unix/freetype-config.in	2009-12-21 15:23:42.000000000 -0800
++++ freetype-2.4.1/builds/unix/freetype-config.in	2010-08-05 16:04:18.244153366 -0700
 @@ -144,7 +144,7 @@
    if test "$enable_shared" = "yes" ; then
      eval "rpath=\"$hardcode_libdir_flag_spec\""
    fi
 -  libs="-lfreetype @LIBZ@ @FT2_EXTRA_LIBS@"
 +  libs="-lfreetype @FT2_EXTRA_LIBS@"
-   if test "$libdir" != "/usr/lib" && test "$libdir" != "/usr/lib64"; then
-     echo -L$libdir $rpath $libs
+   if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then
+     echo -L${SYSROOT}$libdir $libs
    else
--- a/open-src/lib/freetype/freetype2.in.10.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/builds/unix/freetype2.in	2009-03-12 04:10:23.000000000 -0400
-+++ freetype-2.3.9/builds/unix/freetype2.in	2009-08-27 12:37:32.356629000 -0400
-@@ -7,6 +7,6 @@
- Description: A free, high-quality, and portable font engine.
- Version: @ft_version@
- Requires:
--Libs: -L${libdir} -lfreetype
-+Libs: -L${libdir} -lfreetype -R${libdir}
- Libs.private: @LIBZ@ @FT2_EXTRA_LIBS@
- Cflags: -I${includedir}/freetype2 -I${includedir}
--- a/open-src/lib/freetype/ftconfig.h.1.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/include/freetype/config/ftconfig.h	2009-01-19 02:50:21.000000000 -0500
-+++ freetype-2.3.9/include/freetype/config/ftconfig.h	2009-08-27 12:36:23.986037000 -0400
-@@ -67,6 +67,12 @@
-   /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a      */
-   /* `char' type.                                                        */
- 
-+#undef HAVE_UNISTD_H
-+#undef HAVE_FCNTL_H
-+
-+#define HAVE_UNISTD_H 1
-+#define HAVE_FCNTL_H 1
-+
- #ifndef FT_CHAR_BIT
- #define FT_CHAR_BIT  CHAR_BIT
- #endif
--- a/open-src/lib/freetype/ftconfig.in.8.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/builds/unix/ftconfig.in	2009-02-15 02:51:47.000000000 -0500
-+++ freetype-2.3.9/builds/unix/ftconfig.in	2009-08-27 12:34:49.508239000 -0400
-@@ -61,6 +61,9 @@
- #undef HAVE_FCNTL_H
- #undef HAVE_STDINT_H
- 
-+#define HAVE_UNISTD_H 1
-+#define HAVE_FCNTL_H 1
-+
- 
-   /* There are systems (like the Texas Instruments 'C54x) where a `char' */
-   /* has 16 bits.  ANSI C says that sizeof(char) is always 1.  Since an  */
-@@ -80,6 +83,15 @@
- 
- #undef SIZEOF_INT
- #undef SIZEOF_LONG
-+
-+#define SIZEOF_INT 4
-+
-+#if defined(__sparcv9) || defined(__amd64) || defined(_LP64)
-+#define SIZEOF_LONG 8
-+#else
-+#define SIZEOF_LONG 4
-+#endif
-+
- #define FT_SIZEOF_INT  SIZEOF_INT
- #define FT_SIZEOF_LONG SIZEOF_LONG
- 
-@@ -269,8 +281,8 @@
-   /* Since `#undef' doesn't survive in configuration header files */
-   /* we use the postprocessing facility of AC_CONFIG_HEADERS to   */
-   /* replace the leading `/' with `#'.                            */
--/undef FT_LONG64
--/undef FT_INT64
-+#undef FT_LONG64
-+#undef FT_INT64
- 
- #endif /* __STDC__ */
- 
--- a/open-src/lib/freetype/ftoption.h.0.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/include/freetype/config/ftoption.h	2008-11-05 04:25:14.000000000 -0500
-+++ freetype-2.3.9/include/freetype/config/ftoption.h	2009-10-25 19:39:56.527806000 -0400
-@@ -480,8 +480,7 @@
-   /*   Do not #undef this macro here, since the build system might         */
-   /*   define it for certain configurations only.                          */
-   /*                                                                       */
--/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
--
-+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- 
-   /*************************************************************************/
-   /*                                                                       */
--- a/open-src/lib/freetype/ttgload.c.7.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/src/truetype/ttgload.c	2008-12-08 15:56:55.000000000 -0800
-+++ freetype-2.3.9/src/truetype/ttgload.c	2009-10-25 20:56:57.442263760 -0700
-@@ -647,7 +647,7 @@
-       FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points );
- 
-     /* Reset graphics state. */
--    loader->exec->GS = ((TT_Size)loader->size)->GS;
-+    loader->exec->FT_GS = ((TT_Size)loader->size)->FT_GS;
- 
-     /* XXX: UNDOCUMENTED! Hinting instructions of a composite glyph */
-     /*      completely refer to the (already) hinted subglyphs.     */
-@@ -693,6 +693,7 @@
-                        ((TT_Size)loader->size)->debug             );
- 
-       error = TT_Run_Context( loader->exec, debug );
-+
-       if ( error && loader->exec->pedantic_hinting )
-         return error;
-     }
-@@ -1817,12 +1818,12 @@
-       }
- 
-       /* see whether the cvt program has disabled hinting */
--      if ( exec->GS.instruct_control & 1 )
-+      if ( exec->FT_GS.instruct_control & 1 )
-         load_flags |= FT_LOAD_NO_HINTING;
- 
-       /* load default graphics state -- if needed */
--      if ( exec->GS.instruct_control & 2 )
--        exec->GS = tt_default_graphics_state;
-+      if ( exec->FT_GS.instruct_control & 2 )
-+        exec->FT_GS = tt_default_graphics_state;
- 
-       exec->pedantic_hinting = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
-       loader->exec = exec;
-@@ -1974,10 +1975,10 @@
- 
-       if ( IS_HINTED( load_flags ) )
-       {
--        if ( loader.exec->GS.scan_control )
-+        if ( loader.exec->FT_GS.scan_control )
-         {
-           /* convert scan conversion mode to FT_OUTLINE_XXX flags */
--          switch ( loader.exec->GS.scan_type )
-+          switch ( loader.exec->FT_GS.scan_type )
-           {
-           case 0: /* simple drop-outs including stubs */
-             glyph->outline.flags |= FT_OUTLINE_INCLUDE_STUBS;
--- a/open-src/lib/freetype/ttinterp.c.6.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1310 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/src/truetype/ttinterp.c	2009-01-25 10:00:11.000000000 -0500
-+++ freetype-2.3.9/src/truetype/ttinterp.c	2009-08-27 12:51:02.963900000 -0400
-@@ -237,8 +237,8 @@
- #define GUESS_VECTOR( V )                                         \
-   if ( CUR.face->unpatented_hinting )                             \
-   {                                                               \
--    CUR.GS.V.x = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0x4000 : 0 ); \
--    CUR.GS.V.y = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0 : 0x4000 ); \
-+    CUR.FT_GS.V.x = (FT_F2Dot14)( CUR.FT_GS.both_x_axis ? 0x4000 : 0 ); \
-+    CUR.FT_GS.V.y = (FT_F2Dot14)( CUR.FT_GS.both_x_axis ? 0 : 0x4000 ); \
-   }
- #else
- #define GUESS_VECTOR( V )
-@@ -585,7 +585,7 @@
-         exec->codeRangeTable[i] = size->codeRangeTable[i];
- 
-       /* set graphics state */
--      exec->GS = size->GS;
-+      exec->FT_GS = size->FT_GS;
- 
-       exec->cvtSize = size->cvt_size;
-       exec->cvt     = size->cvt;
-@@ -713,22 +713,22 @@
-     exec->zp1 = exec->pts;
-     exec->zp2 = exec->pts;
- 
--    exec->GS.gep0 = 1;
--    exec->GS.gep1 = 1;
--    exec->GS.gep2 = 1;
-+    exec->FT_GS.gep0 = 1;
-+    exec->FT_GS.gep1 = 1;
-+    exec->FT_GS.gep2 = 1;
- 
--    exec->GS.projVector.x = 0x4000;
--    exec->GS.projVector.y = 0x0000;
-+    exec->FT_GS.projVector.x = 0x4000;
-+    exec->FT_GS.projVector.y = 0x0000;
- 
--    exec->GS.freeVector = exec->GS.projVector;
--    exec->GS.dualVector = exec->GS.projVector;
-+    exec->FT_GS.freeVector = exec->FT_GS.projVector;
-+    exec->FT_GS.dualVector = exec->FT_GS.projVector;
- 
- #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
--    exec->GS.both_x_axis = TRUE;
-+    exec->FT_GS.both_x_axis = TRUE;
- #endif
- 
--    exec->GS.round_state = 1;
--    exec->GS.loop        = 1;
-+    exec->FT_GS.round_state = 1;
-+    exec->FT_GS.loop        = 1;
- 
-     /* some glyphs leave something on the stack. so we clean it */
-     /* before a new execution.                                  */
-@@ -1357,7 +1357,7 @@
- #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-       if ( CUR.face->unpatented_hinting )
-       {
--        if ( CUR.GS.both_x_axis )
-+        if ( CUR.FT_GS.both_x_axis )
-           CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;
-         else
-           CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;
-@@ -1365,10 +1365,10 @@
-       else
- #endif
-       {
--        if ( CUR.GS.projVector.y == 0 )
-+        if ( CUR.FT_GS.projVector.y == 0 )
-           CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;
- 
--        else if ( CUR.GS.projVector.x == 0 )
-+        else if ( CUR.FT_GS.projVector.x == 0 )
-           CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;
- 
-         else
-@@ -1376,9 +1376,9 @@
-           FT_Long  x, y;
- 
- 
--          x = TT_MULDIV( CUR.GS.projVector.x,
-+          x = TT_MULDIV( CUR.FT_GS.projVector.x,
-                          CUR.tt_metrics.x_ratio, 0x4000 );
--          y = TT_MULDIV( CUR.GS.projVector.y,
-+          y = TT_MULDIV( CUR.FT_GS.projVector.y,
-                          CUR.tt_metrics.y_ratio, 0x4000 );
-           CUR.tt_metrics.ratio = TT_VecLen( x, y );
-         }
-@@ -1558,7 +1558,7 @@
-     FT_ASSERT( !CUR.face->unpatented_hinting );
- #endif
- 
--    v = CUR.GS.freeVector.x;
-+    v = CUR.FT_GS.freeVector.x;
- 
-     if ( v != 0 )
-     {
-@@ -1569,7 +1569,7 @@
-       zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
-     }
- 
--    v = CUR.GS.freeVector.y;
-+    v = CUR.FT_GS.freeVector.y;
- 
-     if ( v != 0 )
-     {
-@@ -1611,14 +1611,14 @@
-     FT_ASSERT( !CUR.face->unpatented_hinting );
- #endif
- 
--    v = CUR.GS.freeVector.x;
-+    v = CUR.FT_GS.freeVector.x;
- 
-     if ( v != 0 )
-       zone->org[point].x += TT_MULDIV( distance,
-                                        v * 0x10000L,
-                                        CUR.F_dot_P );
- 
--    v = CUR.GS.freeVector.y;
-+    v = CUR.FT_GS.freeVector.y;
- 
-     if ( v != 0 )
-       zone->org[point].y += TT_MULDIV( distance,
-@@ -2198,8 +2198,8 @@
- #endif
- 
-     return TT_DotFix14( dx, dy,
--                        CUR.GS.projVector.x,
--                        CUR.GS.projVector.y );
-+                        CUR.FT_GS.projVector.x,
-+                        CUR.FT_GS.projVector.y );
-   }
- 
- 
-@@ -2224,8 +2224,8 @@
-                          FT_Pos  dy )
-   {
-     return TT_DotFix14( dx, dy,
--                        CUR.GS.dualVector.x,
--                        CUR.GS.dualVector.y );
-+                        CUR.FT_GS.dualVector.x,
-+                        CUR.FT_GS.dualVector.y );
-   }
- 
- 
-@@ -2302,18 +2302,18 @@
-       /* `both-x-axis' true, otherwise set it false.  The x values only     */
-       /* need be tested because the vector has been normalised to a unit    */
-       /* vector of length 0x4000 = unity.                                   */
--      CUR.GS.both_x_axis = (FT_Bool)( CUR.GS.projVector.x == 0x4000 &&
--                                      CUR.GS.freeVector.x == 0x4000 );
-+      CUR.FT_GS.both_x_axis = (FT_Bool)( CUR.FT_GS.projVector.x == 0x4000 &&
-+                                      CUR.FT_GS.freeVector.x == 0x4000 );
- 
-       /* Throw away projection and freedom vector information */
-       /* because the patents don't allow them to be stored.   */
-       /* The relevant US Patents are 5155805 and 5325479.     */
--      CUR.GS.projVector.x = 0;
--      CUR.GS.projVector.y = 0;
--      CUR.GS.freeVector.x = 0;
--      CUR.GS.freeVector.y = 0;
-+      CUR.FT_GS.projVector.x = 0;
-+      CUR.FT_GS.projVector.y = 0;
-+      CUR.FT_GS.freeVector.x = 0;
-+      CUR.FT_GS.freeVector.y = 0;
- 
--      if ( CUR.GS.both_x_axis )
-+      if ( CUR.FT_GS.both_x_axis )
-       {
-         CUR.func_project   = Project_x;
-         CUR.func_move      = Direct_Move_X;
-@@ -2326,11 +2326,11 @@
-         CUR.func_move_orig = Direct_Move_Orig_Y;
-       }
- 
--      if ( CUR.GS.dualVector.x == 0x4000 )
-+      if ( CUR.FT_GS.dualVector.x == 0x4000 )
-         CUR.func_dualproj = Project_x;
-       else
-       {
--        if ( CUR.GS.dualVector.y == 0x4000 )
-+        if ( CUR.FT_GS.dualVector.y == 0x4000 )
-           CUR.func_dualproj = Project_y;
-         else
-           CUR.func_dualproj = Dual_Project;
-@@ -2343,32 +2343,32 @@
-     }
- #endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */
- 
--    if ( CUR.GS.freeVector.x == 0x4000 )
--      CUR.F_dot_P       = CUR.GS.projVector.x * 0x10000L;
-+    if ( CUR.FT_GS.freeVector.x == 0x4000 )
-+      CUR.F_dot_P       = CUR.FT_GS.projVector.x * 0x10000L;
-     else
-     {
--      if ( CUR.GS.freeVector.y == 0x4000 )
--        CUR.F_dot_P       = CUR.GS.projVector.y * 0x10000L;
-+      if ( CUR.FT_GS.freeVector.y == 0x4000 )
-+        CUR.F_dot_P       = CUR.FT_GS.projVector.y * 0x10000L;
-       else
--        CUR.F_dot_P = (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x * 4 +
--                      (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y * 4;
-+        CUR.F_dot_P = (FT_Long)CUR.FT_GS.projVector.x * CUR.FT_GS.freeVector.x * 4 +
-+                      (FT_Long)CUR.FT_GS.projVector.y * CUR.FT_GS.freeVector.y * 4;
-     }
- 
--    if ( CUR.GS.projVector.x == 0x4000 )
-+    if ( CUR.FT_GS.projVector.x == 0x4000 )
-       CUR.func_project = (TT_Project_Func)Project_x;
-     else
-     {
--      if ( CUR.GS.projVector.y == 0x4000 )
-+      if ( CUR.FT_GS.projVector.y == 0x4000 )
-         CUR.func_project = (TT_Project_Func)Project_y;
-       else
-         CUR.func_project = (TT_Project_Func)Project;
-     }
- 
--    if ( CUR.GS.dualVector.x == 0x4000 )
-+    if ( CUR.FT_GS.dualVector.x == 0x4000 )
-       CUR.func_dualproj = (TT_Project_Func)Project_x;
-     else
-     {
--      if ( CUR.GS.dualVector.y == 0x4000 )
-+      if ( CUR.FT_GS.dualVector.y == 0x4000 )
-         CUR.func_dualproj = (TT_Project_Func)Project_y;
-       else
-         CUR.func_dualproj = (TT_Project_Func)Dual_Project;
-@@ -2379,14 +2379,14 @@
- 
-     if ( CUR.F_dot_P == 0x40000000L )
-     {
--      if ( CUR.GS.freeVector.x == 0x4000 )
-+      if ( CUR.FT_GS.freeVector.x == 0x4000 )
-       {
-         CUR.func_move      = (TT_Move_Func)Direct_Move_X;
-         CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_X;
-       }
-       else
-       {
--        if ( CUR.GS.freeVector.y == 0x4000 )
-+        if ( CUR.FT_GS.freeVector.y == 0x4000 )
-         {
-           CUR.func_move      = (TT_Move_Func)Direct_Move_Y;
-           CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y;
-@@ -2583,13 +2583,13 @@
-     A = (FT_Short)( CUR.opcode & 1 ) << 14; \
-     B = A ^ (FT_Short)0x4000;               \
-                                             \
--    CUR.GS.freeVector.x = A;                \
--    CUR.GS.projVector.x = A;                \
--    CUR.GS.dualVector.x = A;                \
-+    CUR.FT_GS.freeVector.x = A;                \
-+    CUR.FT_GS.projVector.x = A;                \
-+    CUR.FT_GS.dualVector.x = A;                \
-                                             \
--    CUR.GS.freeVector.y = B;                \
--    CUR.GS.projVector.y = B;                \
--    CUR.GS.dualVector.y = B;                \
-+    CUR.FT_GS.freeVector.y = B;                \
-+    CUR.FT_GS.projVector.y = B;                \
-+    CUR.FT_GS.dualVector.y = B;                \
-                                             \
-     COMPUTE_Funcs();                        \
-   }
-@@ -2603,11 +2603,11 @@
-     A = (FT_Short)( CUR.opcode & 1 ) << 14; \
-     B = A ^ (FT_Short)0x4000;               \
-                                             \
--    CUR.GS.projVector.x = A;                \
--    CUR.GS.dualVector.x = A;                \
-+    CUR.FT_GS.projVector.x = A;                \
-+    CUR.FT_GS.dualVector.x = A;                \
-                                             \
--    CUR.GS.projVector.y = B;                \
--    CUR.GS.dualVector.y = B;                \
-+    CUR.FT_GS.projVector.y = B;                \
-+    CUR.FT_GS.dualVector.y = B;                \
-                                             \
-     GUESS_VECTOR( freeVector );             \
-                                             \
-@@ -2623,8 +2623,8 @@
-     A = (FT_Short)( CUR.opcode & 1 ) << 14; \
-     B = A ^ (FT_Short)0x4000;               \
-                                             \
--    CUR.GS.freeVector.x = A;                \
--    CUR.GS.freeVector.y = B;                \
-+    CUR.FT_GS.freeVector.x = A;                \
-+    CUR.FT_GS.freeVector.y = B;                \
-                                             \
-     GUESS_VECTOR( projVector );             \
-                                             \
-@@ -2636,9 +2636,9 @@
-     if ( INS_SxVTL( (FT_UShort)args[1],               \
-                     (FT_UShort)args[0],               \
-                     CUR.opcode,                       \
--                    &CUR.GS.projVector ) == SUCCESS ) \
-+                    &CUR.FT_GS.projVector ) == SUCCESS ) \
-     {                                                 \
--      CUR.GS.dualVector = CUR.GS.projVector;          \
-+      CUR.FT_GS.dualVector = CUR.FT_GS.projVector;          \
-       GUESS_VECTOR( freeVector );                     \
-       COMPUTE_Funcs();                                \
-     }
-@@ -2648,7 +2648,7 @@
-     if ( INS_SxVTL( (FT_UShort)args[1],               \
-                     (FT_UShort)args[0],               \
-                     CUR.opcode,                       \
--                    &CUR.GS.freeVector ) == SUCCESS ) \
-+                    &CUR.FT_GS.freeVector ) == SUCCESS ) \
-     {                                                 \
-       GUESS_VECTOR( projVector );                     \
-       COMPUTE_Funcs();                                \
-@@ -2657,7 +2657,7 @@
- 
- #define DO_SFVTPV                          \
-     GUESS_VECTOR( projVector );            \
--    CUR.GS.freeVector = CUR.GS.projVector; \
-+    CUR.FT_GS.freeVector = CUR.FT_GS.projVector; \
-     COMPUTE_Funcs();
- 
- 
-@@ -2673,9 +2673,9 @@
-     S = (FT_Short)args[0];                      \
-     X = (FT_Long)S;                             \
-                                                 \
--    NORMalize( X, Y, &CUR.GS.projVector );      \
-+    NORMalize( X, Y, &CUR.FT_GS.projVector );      \
-                                                 \
--    CUR.GS.dualVector = CUR.GS.projVector;      \
-+    CUR.FT_GS.dualVector = CUR.FT_GS.projVector;      \
-     GUESS_VECTOR( freeVector );                 \
-     COMPUTE_Funcs();                            \
-   }
-@@ -2693,7 +2693,7 @@
-     S = (FT_Short)args[0];                      \
-     X = S;                                      \
-                                                 \
--    NORMalize( X, Y, &CUR.GS.freeVector );      \
-+    NORMalize( X, Y, &CUR.FT_GS.freeVector );      \
-     GUESS_VECTOR( projVector );                 \
-     COMPUTE_Funcs();                            \
-   }
-@@ -2703,18 +2703,18 @@
- #define DO_GPV                                   \
-     if ( CUR.face->unpatented_hinting )          \
-     {                                            \
--      args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \
--      args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \
-+      args[0] = CUR.FT_GS.both_x_axis ? 0x4000 : 0; \
-+      args[1] = CUR.FT_GS.both_x_axis ? 0 : 0x4000; \
-     }                                            \
-     else                                         \
-     {                                            \
--      args[0] = CUR.GS.projVector.x;             \
--      args[1] = CUR.GS.projVector.y;             \
-+      args[0] = CUR.FT_GS.projVector.x;             \
-+      args[1] = CUR.FT_GS.projVector.y;             \
-     }
- #else
- #define DO_GPV                                   \
--    args[0] = CUR.GS.projVector.x;               \
--    args[1] = CUR.GS.projVector.y;
-+    args[0] = CUR.FT_GS.projVector.x;               \
-+    args[1] = CUR.FT_GS.projVector.y;
- #endif
- 
- 
-@@ -2722,72 +2722,72 @@
- #define DO_GFV                                   \
-     if ( CUR.face->unpatented_hinting )          \
-     {                                            \
--      args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \
--      args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \
-+      args[0] = CUR.FT_GS.both_x_axis ? 0x4000 : 0; \
-+      args[1] = CUR.FT_GS.both_x_axis ? 0 : 0x4000; \
-     }                                            \
-     else                                         \
-     {                                            \
--      args[0] = CUR.GS.freeVector.x;             \
--      args[1] = CUR.GS.freeVector.y;             \
-+      args[0] = CUR.FT_GS.freeVector.x;             \
-+      args[1] = CUR.FT_GS.freeVector.y;             \
-     }
- #else
- #define DO_GFV                                   \
--    args[0] = CUR.GS.freeVector.x;               \
--    args[1] = CUR.GS.freeVector.y;
-+    args[0] = CUR.FT_GS.freeVector.x;               \
-+    args[1] = CUR.FT_GS.freeVector.y;
- #endif
- 
- 
- #define DO_SRP0                      \
--    CUR.GS.rp0 = (FT_UShort)args[0];
-+    CUR.FT_GS.rp0 = (FT_UShort)args[0];
- 
- 
- #define DO_SRP1                      \
--    CUR.GS.rp1 = (FT_UShort)args[0];
-+    CUR.FT_GS.rp1 = (FT_UShort)args[0];
- 
- 
- #define DO_SRP2                      \
--    CUR.GS.rp2 = (FT_UShort)args[0];
-+    CUR.FT_GS.rp2 = (FT_UShort)args[0];
- 
- 
- #define DO_RTHG                                         \
--    CUR.GS.round_state = TT_Round_To_Half_Grid;         \
-+    CUR.FT_GS.round_state = TT_Round_To_Half_Grid;         \
-     CUR.func_round = (TT_Round_Func)Round_To_Half_Grid;
- 
- 
- #define DO_RTG                                     \
--    CUR.GS.round_state = TT_Round_To_Grid;         \
-+    CUR.FT_GS.round_state = TT_Round_To_Grid;         \
-     CUR.func_round = (TT_Round_Func)Round_To_Grid;
- 
- 
- #define DO_RTDG                                           \
--    CUR.GS.round_state = TT_Round_To_Double_Grid;         \
-+    CUR.FT_GS.round_state = TT_Round_To_Double_Grid;         \
-     CUR.func_round = (TT_Round_Func)Round_To_Double_Grid;
- 
- 
- #define DO_RUTG                                       \
--    CUR.GS.round_state = TT_Round_Up_To_Grid;         \
-+    CUR.FT_GS.round_state = TT_Round_Up_To_Grid;         \
-     CUR.func_round = (TT_Round_Func)Round_Up_To_Grid;
- 
- 
- #define DO_RDTG                                         \
--    CUR.GS.round_state = TT_Round_Down_To_Grid;         \
-+    CUR.FT_GS.round_state = TT_Round_Down_To_Grid;         \
-     CUR.func_round = (TT_Round_Func)Round_Down_To_Grid;
- 
- 
- #define DO_ROFF                                 \
--    CUR.GS.round_state = TT_Round_Off;          \
-+    CUR.FT_GS.round_state = TT_Round_Off;          \
-     CUR.func_round = (TT_Round_Func)Round_None;
- 
- 
- #define DO_SROUND                                \
-     SET_SuperRound( 0x4000, args[0] );           \
--    CUR.GS.round_state = TT_Round_Super;         \
-+    CUR.FT_GS.round_state = TT_Round_Super;         \
-     CUR.func_round = (TT_Round_Func)Round_Super;
- 
- 
- #define DO_S45ROUND                                 \
-     SET_SuperRound( 0x2D41, args[0] );              \
--    CUR.GS.round_state = TT_Round_Super_45;         \
-+    CUR.FT_GS.round_state = TT_Round_Super_45;         \
-     CUR.func_round = (TT_Round_Func)Round_Super_45;
- 
- 
-@@ -2795,19 +2795,19 @@
-     if ( args[0] < 0 )                 \
-       CUR.error = TT_Err_Bad_Argument; \
-     else                               \
--      CUR.GS.loop = args[0];
-+      CUR.FT_GS.loop = args[0];
- 
- 
- #define DO_SMD                         \
--    CUR.GS.minimum_distance = args[0];
-+    CUR.FT_GS.minimum_distance = args[0];
- 
- 
- #define DO_SCVTCI                                     \
--    CUR.GS.control_value_cutin = (FT_F26Dot6)args[0];
-+    CUR.FT_GS.control_value_cutin = (FT_F26Dot6)args[0];
- 
- 
- #define DO_SSWCI                                     \
--    CUR.GS.single_width_cutin = (FT_F26Dot6)args[0];
-+    CUR.FT_GS.single_width_cutin = (FT_F26Dot6)args[0];
- 
- 
-     /* XXX: UNDOCUMENTED! or bug in the Windows engine?   */
-@@ -2817,23 +2817,23 @@
-     /*      units.                                        */
-     /*                                                    */
- #define DO_SSW                                                 \
--    CUR.GS.single_width_value = (FT_F26Dot6)( args[0] >> 10 );
-+    CUR.FT_GS.single_width_value = (FT_F26Dot6)( args[0] >> 10 );
- 
- 
- #define DO_FLIPON            \
--    CUR.GS.auto_flip = TRUE;
-+    CUR.FT_GS.auto_flip = TRUE;
- 
- 
- #define DO_FLIPOFF            \
--    CUR.GS.auto_flip = FALSE;
-+    CUR.FT_GS.auto_flip = FALSE;
- 
- 
- #define DO_SDB                             \
--    CUR.GS.delta_base = (FT_Short)args[0];
-+    CUR.FT_GS.delta_base = (FT_Short)args[0];
- 
- 
- #define DO_SDS                              \
--    CUR.GS.delta_shift = (FT_Short)args[0];
-+    CUR.FT_GS.delta_shift = (FT_Short)args[0];
- 
- 
- #define DO_MD  /* nothing */
-@@ -4783,7 +4783,7 @@
- 
-     /* not part of the specs, but here for safety */
- 
--    if ( CUR.GS.gep2 == 0 )
-+    if ( CUR.FT_GS.gep2 == 0 )
-       CUR.zp2.org[L] = CUR.zp2.cur[L];
-   }
- 
-@@ -4896,7 +4896,7 @@
-       A = -C;
-     }
- 
--    NORMalize( A, B, &CUR.GS.dualVector );
-+    NORMalize( A, B, &CUR.FT_GS.dualVector );
- 
-     {
-       FT_Vector*  v1 = CUR.zp1.cur + p2;
-@@ -4914,7 +4914,7 @@
-       A = -C;
-     }
- 
--    NORMalize( A, B, &CUR.GS.projVector );
-+    NORMalize( A, B, &CUR.FT_GS.projVector );
- 
-     GUESS_VECTOR( freeVector );
- 
-@@ -4947,7 +4947,7 @@
-       return;
-     }
- 
--    CUR.GS.gep0 = (FT_UShort)args[0];
-+    CUR.FT_GS.gep0 = (FT_UShort)args[0];
-   }
- 
- 
-@@ -4976,7 +4976,7 @@
-       return;
-     }
- 
--    CUR.GS.gep1 = (FT_UShort)args[0];
-+    CUR.FT_GS.gep1 = (FT_UShort)args[0];
-   }
- 
- 
-@@ -5005,7 +5005,7 @@
-       return;
-     }
- 
--    CUR.GS.gep2 = (FT_UShort)args[0];
-+    CUR.FT_GS.gep2 = (FT_UShort)args[0];
-   }
- 
- 
-@@ -5037,9 +5037,9 @@
-     CUR.zp1 = CUR.zp0;
-     CUR.zp2 = CUR.zp0;
- 
--    CUR.GS.gep0 = (FT_UShort)args[0];
--    CUR.GS.gep1 = (FT_UShort)args[0];
--    CUR.GS.gep2 = (FT_UShort)args[0];
-+    CUR.FT_GS.gep0 = (FT_UShort)args[0];
-+    CUR.FT_GS.gep1 = (FT_UShort)args[0];
-+    CUR.FT_GS.gep2 = (FT_UShort)args[0];
-   }
- 
- 
-@@ -5068,8 +5068,8 @@
-     if ( L != 0 )
-         L = K;
- 
--    CUR.GS.instruct_control = FT_BOOL(
--      ( (FT_Byte)CUR.GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L );
-+    CUR.FT_GS.instruct_control = FT_BOOL(
-+      ( (FT_Byte)CUR.FT_GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L );
-   }
- 
- 
-@@ -5090,32 +5090,32 @@
- 
-     if ( A == 0xFF )
-     {
--      CUR.GS.scan_control = TRUE;
-+      CUR.FT_GS.scan_control = TRUE;
-       return;
-     }
-     else if ( A == 0 )
-     {
--      CUR.GS.scan_control = FALSE;
-+      CUR.FT_GS.scan_control = FALSE;
-       return;
-     }
- 
-     if ( ( args[0] & 0x100 ) != 0 && CUR.tt_metrics.ppem <= A )
--      CUR.GS.scan_control = TRUE;
-+      CUR.FT_GS.scan_control = TRUE;
- 
-     if ( ( args[0] & 0x200 ) != 0 && CUR.tt_metrics.rotated )
--      CUR.GS.scan_control = TRUE;
-+      CUR.FT_GS.scan_control = TRUE;
- 
-     if ( ( args[0] & 0x400 ) != 0 && CUR.tt_metrics.stretched )
--      CUR.GS.scan_control = TRUE;
-+      CUR.FT_GS.scan_control = TRUE;
- 
-     if ( ( args[0] & 0x800 ) != 0 && CUR.tt_metrics.ppem > A )
--      CUR.GS.scan_control = FALSE;
-+      CUR.FT_GS.scan_control = FALSE;
- 
-     if ( ( args[0] & 0x1000 ) != 0 && CUR.tt_metrics.rotated )
--      CUR.GS.scan_control = FALSE;
-+      CUR.FT_GS.scan_control = FALSE;
- 
-     if ( ( args[0] & 0x2000 ) != 0 && CUR.tt_metrics.stretched )
--      CUR.GS.scan_control = FALSE;
-+      CUR.FT_GS.scan_control = FALSE;
-   }
- 
- 
-@@ -5129,7 +5129,7 @@
-   Ins_SCANTYPE( INS_ARG )
-   {
-     if ( args[0] >= 0 )
--      CUR.GS.scan_type = (FT_Int)args[0];
-+      CUR.FT_GS.scan_type = (FT_Int)args[0];
-   }
- 
- 
-@@ -5156,13 +5156,13 @@
-     FT_UNUSED_ARG;
- 
- 
--    if ( CUR.top < CUR.GS.loop )
-+    if ( CUR.top < CUR.FT_GS.loop )
-     {
-       CUR.error = TT_Err_Too_Few_Arguments;
-       return;
-     }
- 
--    while ( CUR.GS.loop > 0 )
-+    while ( CUR.FT_GS.loop > 0 )
-     {
-       CUR.args--;
- 
-@@ -5179,10 +5179,10 @@
-       else
-         CUR.pts.tags[point] ^= FT_CURVE_TAG_ON;
- 
--      CUR.GS.loop--;
-+      CUR.FT_GS.loop--;
-     }
- 
--    CUR.GS.loop = 1;
-+    CUR.FT_GS.loop = 1;
-     CUR.new_top = CUR.args;
-   }
- 
-@@ -5257,12 +5257,12 @@
-     if ( CUR.opcode & 1 )
-     {
-       zp = CUR.zp0;
--      p  = CUR.GS.rp1;
-+      p  = CUR.FT_GS.rp1;
-     }
-     else
-     {
-       zp = CUR.zp1;
--      p  = CUR.GS.rp2;
-+      p  = CUR.FT_GS.rp2;
-     }
- 
-     if ( BOUNDS( p, zp.n_points ) )
-@@ -5281,7 +5281,7 @@
- #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-     if ( CUR.face->unpatented_hinting )
-     {
--      if ( CUR.GS.both_x_axis )
-+      if ( CUR.FT_GS.both_x_axis )
-       {
-         *x = d;
-         *y = 0;
-@@ -5296,10 +5296,10 @@
- #endif
-     {
-       *x = TT_MULDIV( d,
--                      (FT_Long)CUR.GS.freeVector.x * 0x10000L,
-+                      (FT_Long)CUR.FT_GS.freeVector.x * 0x10000L,
-                       CUR.F_dot_P );
-       *y = TT_MULDIV( d,
--                      (FT_Long)CUR.GS.freeVector.y * 0x10000L,
-+                      (FT_Long)CUR.FT_GS.freeVector.y * 0x10000L,
-                       CUR.F_dot_P );
-     }
- 
-@@ -5316,7 +5316,7 @@
- #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-     if ( CUR.face->unpatented_hinting )
-     {
--      if ( CUR.GS.both_x_axis )
-+      if ( CUR.FT_GS.both_x_axis )
-       {
-         CUR.zp2.cur[point].x += dx;
-         if ( touch )
-@@ -5332,14 +5332,14 @@
-     }
- #endif
- 
--    if ( CUR.GS.freeVector.x != 0 )
-+    if ( CUR.FT_GS.freeVector.x != 0 )
-     {
-       CUR.zp2.cur[point].x += dx;
-       if ( touch )
-         CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
-     }
- 
--    if ( CUR.GS.freeVector.y != 0 )
-+    if ( CUR.FT_GS.freeVector.y != 0 )
-     {
-       CUR.zp2.cur[point].y += dy;
-       if ( touch )
-@@ -5367,7 +5367,7 @@
-     FT_UNUSED_ARG;
- 
- 
--    if ( CUR.top < CUR.GS.loop )
-+    if ( CUR.top < CUR.FT_GS.loop )
-     {
-       CUR.error = TT_Err_Invalid_Reference;
-       return;
-@@ -5376,7 +5376,7 @@
-     if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )
-       return;
- 
--    while ( CUR.GS.loop > 0 )
-+    while ( CUR.FT_GS.loop > 0 )
-     {
-       CUR.args--;
-       point = (FT_UShort)CUR.stack[CUR.args];
-@@ -5393,10 +5393,10 @@
-         /* XXX: UNDOCUMENTED! SHP touches the points */
-         MOVE_Zp2_Point( point, dx, dy, TRUE );
- 
--      CUR.GS.loop--;
-+      CUR.FT_GS.loop--;
-     }
- 
--    CUR.GS.loop = 1;
-+    CUR.FT_GS.loop = 1;
-     CUR.new_top = CUR.args;
-   }
- 
-@@ -5490,9 +5490,9 @@
-     /*      Twilight zone has no contours, so use `n_points'.   */
-     /*      Normal zone's `n_points' includes phantoms, so must */
-     /*      use end of last contour.                            */
--    if ( CUR.GS.gep2 == 0 && CUR.zp2.n_points > 0 )
-+    if ( CUR.FT_GS.gep2 == 0 && CUR.zp2.n_points > 0 )
-       last_point = (FT_UShort)( CUR.zp2.n_points - 1 );
--    else if ( CUR.GS.gep2 == 1 && CUR.zp2.n_contours > 0 )
-+    else if ( CUR.FT_GS.gep2 == 1 && CUR.zp2.n_contours > 0 )
-       last_point = (FT_UShort)( CUR.zp2.contours[CUR.zp2.n_contours - 1] );
-     else
-       last_point = 0;
-@@ -5519,7 +5519,7 @@
-     FT_UShort   point;
- 
- 
--    if ( CUR.top < CUR.GS.loop + 1 )
-+    if ( CUR.top < CUR.FT_GS.loop + 1 )
-     {
-       CUR.error = TT_Err_Invalid_Reference;
-       return;
-@@ -5528,7 +5528,7 @@
- #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-     if ( CUR.face->unpatented_hinting )
-     {
--      if ( CUR.GS.both_x_axis )
-+      if ( CUR.FT_GS.both_x_axis )
-       {
-         dx = TT_MulFix14( args[0], 0x4000 );
-         dy = 0;
-@@ -5542,11 +5542,11 @@
-     else
- #endif
-     {
--      dx = TT_MulFix14( args[0], CUR.GS.freeVector.x );
--      dy = TT_MulFix14( args[0], CUR.GS.freeVector.y );
-+      dx = TT_MulFix14( args[0], CUR.FT_GS.freeVector.x );
-+      dy = TT_MulFix14( args[0], CUR.FT_GS.freeVector.y );
-     }
- 
--    while ( CUR.GS.loop > 0 )
-+    while ( CUR.FT_GS.loop > 0 )
-     {
-       CUR.args--;
- 
-@@ -5563,10 +5563,10 @@
-       else
-         MOVE_Zp2_Point( point, dx, dy, TRUE );
- 
--      CUR.GS.loop--;
-+      CUR.FT_GS.loop--;
-     }
- 
--    CUR.GS.loop = 1;
-+    CUR.FT_GS.loop = 1;
-     CUR.new_top = CUR.args;
-   }
- 
-@@ -5587,7 +5587,7 @@
-     point = (FT_UShort)args[0];
- 
-     if ( BOUNDS( point,      CUR.zp1.n_points ) ||
--         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
-+         BOUNDS( CUR.FT_GS.rp0, CUR.zp0.n_points ) )
-     {
-       if ( CUR.pedantic_hinting )
-         CUR.error = TT_Err_Invalid_Reference;
-@@ -5595,24 +5595,24 @@
-     }
- 
-     /* XXX: UNDOCUMENTED! behaviour */
--    if ( CUR.GS.gep1 == 0 )   /* if the point that is to be moved */
-+    if ( CUR.FT_GS.gep1 == 0 )   /* if the point that is to be moved */
-                               /* is in twilight zone              */
-     {
--      CUR.zp1.org[point] = CUR.zp0.org[CUR.GS.rp0];
-+      CUR.zp1.org[point] = CUR.zp0.org[CUR.FT_GS.rp0];
-       CUR_Func_move_orig( &CUR.zp1, point, args[1] );
-       CUR.zp1.cur[point] = CUR.zp1.org[point];
-     }
- 
-     distance = CUR_Func_project( CUR.zp1.cur + point,
--                                 CUR.zp0.cur + CUR.GS.rp0 );
-+                                 CUR.zp0.cur + CUR.FT_GS.rp0 );
- 
-     CUR_Func_move( &CUR.zp1, point, args[1] - distance );
- 
--    CUR.GS.rp1 = CUR.GS.rp0;
--    CUR.GS.rp2 = point;
-+    CUR.FT_GS.rp1 = CUR.FT_GS.rp0;
-+    CUR.FT_GS.rp2 = point;
- 
-     if ( ( CUR.opcode & 1 ) != 0 )
--      CUR.GS.rp0 = point;
-+      CUR.FT_GS.rp0 = point;
-   }
- 
- 
-@@ -5652,8 +5652,8 @@
- 
-     CUR_Func_move( &CUR.zp0, point, distance );
- 
--    CUR.GS.rp0 = point;
--    CUR.GS.rp1 = point;
-+    CUR.FT_GS.rp0 = point;
-+    CUR.FT_GS.rp1 = point;
-   }
- 
- 
-@@ -5707,10 +5707,10 @@
- 
-     distance = CUR_Func_read_cvt( cvtEntry );
- 
--    if ( CUR.GS.gep0 == 0 )   /* If in twilight zone */
-+    if ( CUR.FT_GS.gep0 == 0 )   /* If in twilight zone */
-     {
--      CUR.zp0.org[point].x = TT_MulFix14( distance, CUR.GS.freeVector.x );
--      CUR.zp0.org[point].y = TT_MulFix14( distance, CUR.GS.freeVector.y ),
-+      CUR.zp0.org[point].x = TT_MulFix14( distance, CUR.FT_GS.freeVector.x );
-+      CUR.zp0.org[point].y = TT_MulFix14( distance, CUR.FT_GS.freeVector.y ),
-       CUR.zp0.cur[point]   = CUR.zp0.org[point];
-     }
- 
-@@ -5718,7 +5718,7 @@
- 
-     if ( ( CUR.opcode & 1 ) != 0 )   /* rounding and control cutin flag */
-     {
--      if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
-+      if ( FT_ABS( distance - org_dist ) > CUR.FT_GS.control_value_cutin )
-         distance = org_dist;
- 
-       distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
-@@ -5726,8 +5726,8 @@
- 
-     CUR_Func_move( &CUR.zp0, point, distance - org_dist );
- 
--    CUR.GS.rp0 = point;
--    CUR.GS.rp1 = point;
-+    CUR.FT_GS.rp0 = point;
-+    CUR.FT_GS.rp1 = point;
-   }
- 
- 
-@@ -5747,7 +5747,7 @@
-     point = (FT_UShort)args[0];
- 
-     if ( BOUNDS( point,      CUR.zp1.n_points ) ||
--         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
-+         BOUNDS( CUR.FT_GS.rp0, CUR.zp0.n_points ) )
-     {
-       if ( CUR.pedantic_hinting )
-         CUR.error = TT_Err_Invalid_Reference;
-@@ -5759,10 +5759,10 @@
- 
-     /* XXX: UNDOCUMENTED: twilight zone special case */
- 
--    if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
-+    if ( CUR.FT_GS.gep0 == 0 || CUR.FT_GS.gep1 == 0 )
-     {
-       FT_Vector*  vec1 = &CUR.zp1.org[point];
--      FT_Vector*  vec2 = &CUR.zp0.org[CUR.GS.rp0];
-+      FT_Vector*  vec2 = &CUR.zp0.org[CUR.FT_GS.rp0];
- 
- 
-       org_dist = CUR_Func_dualproj( vec1, vec2 );
-@@ -5770,7 +5770,7 @@
-     else
-     {
-       FT_Vector*  vec1 = &CUR.zp1.orus[point];
--      FT_Vector*  vec2 = &CUR.zp0.orus[CUR.GS.rp0];
-+      FT_Vector*  vec2 = &CUR.zp0.orus[CUR.FT_GS.rp0];
- 
- 
-       if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
-@@ -5793,13 +5793,13 @@
- 
-     /* single width cut-in test */
- 
--    if ( FT_ABS( org_dist - CUR.GS.single_width_value ) <
--         CUR.GS.single_width_cutin )
-+    if ( FT_ABS( org_dist - CUR.FT_GS.single_width_value ) <
-+         CUR.FT_GS.single_width_cutin )
-     {
-       if ( org_dist >= 0 )
--        org_dist = CUR.GS.single_width_value;
-+        org_dist = CUR.FT_GS.single_width_value;
-       else
--        org_dist = -CUR.GS.single_width_value;
-+        org_dist = -CUR.FT_GS.single_width_value;
-     }
- 
-     /* round flag */
-@@ -5819,28 +5819,28 @@
-     {
-       if ( org_dist >= 0 )
-       {
--        if ( distance < CUR.GS.minimum_distance )
--          distance = CUR.GS.minimum_distance;
-+        if ( distance < CUR.FT_GS.minimum_distance )
-+          distance = CUR.FT_GS.minimum_distance;
-       }
-       else
-       {
--        if ( distance > -CUR.GS.minimum_distance )
--          distance = -CUR.GS.minimum_distance;
-+        if ( distance > -CUR.FT_GS.minimum_distance )
-+          distance = -CUR.FT_GS.minimum_distance;
-       }
-     }
- 
-     /* now move the point */
- 
-     org_dist = CUR_Func_project( CUR.zp1.cur + point,
--                                 CUR.zp0.cur + CUR.GS.rp0 );
-+                                 CUR.zp0.cur + CUR.FT_GS.rp0 );
- 
-     CUR_Func_move( &CUR.zp1, point, distance - org_dist );
- 
--    CUR.GS.rp1 = CUR.GS.rp0;
--    CUR.GS.rp2 = point;
-+    CUR.FT_GS.rp1 = CUR.FT_GS.rp0;
-+    CUR.FT_GS.rp2 = point;
- 
-     if ( ( CUR.opcode & 16 ) != 0 )
--      CUR.GS.rp0 = point;
-+      CUR.FT_GS.rp0 = point;
-   }
- 
- 
-@@ -5869,7 +5869,7 @@
- 
-     if ( BOUNDS( point,      CUR.zp1.n_points ) ||
-          BOUNDS( cvtEntry,   CUR.cvtSize + 1 )  ||
--         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
-+         BOUNDS( CUR.FT_GS.rp0, CUR.zp0.n_points ) )
-     {
-       if ( CUR.pedantic_hinting )
-         CUR.error = TT_Err_Invalid_Reference;
-@@ -5883,36 +5883,36 @@
- 
-     /* single width test */
- 
--    if ( FT_ABS( cvt_dist - CUR.GS.single_width_value ) <
--         CUR.GS.single_width_cutin )
-+    if ( FT_ABS( cvt_dist - CUR.FT_GS.single_width_value ) <
-+         CUR.FT_GS.single_width_cutin )
-     {
-       if ( cvt_dist >= 0 )
--        cvt_dist =  CUR.GS.single_width_value;
-+        cvt_dist =  CUR.FT_GS.single_width_value;
-       else
--        cvt_dist = -CUR.GS.single_width_value;
-+        cvt_dist = -CUR.FT_GS.single_width_value;
-     }
- 
-     /* XXX: UNDOCUMENTED! -- twilight zone */
- 
--    if ( CUR.GS.gep1 == 0 )
-+    if ( CUR.FT_GS.gep1 == 0 )
-     {
--      CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x +
--                             TT_MulFix14( cvt_dist, CUR.GS.freeVector.x );
-+      CUR.zp1.org[point].x = CUR.zp0.org[CUR.FT_GS.rp0].x +
-+                             TT_MulFix14( cvt_dist, CUR.FT_GS.freeVector.x );
- 
--      CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y +
--                             TT_MulFix14( cvt_dist, CUR.GS.freeVector.y );
-+      CUR.zp1.org[point].y = CUR.zp0.org[CUR.FT_GS.rp0].y +
-+                             TT_MulFix14( cvt_dist, CUR.FT_GS.freeVector.y );
- 
-       CUR.zp1.cur[point] = CUR.zp0.cur[point];
-     }
- 
-     org_dist = CUR_Func_dualproj( &CUR.zp1.org[point],
--                                  &CUR.zp0.org[CUR.GS.rp0] );
-+                                  &CUR.zp0.org[CUR.FT_GS.rp0] );
-     cur_dist = CUR_Func_project ( &CUR.zp1.cur[point],
--                                  &CUR.zp0.cur[CUR.GS.rp0] );
-+                                  &CUR.zp0.cur[CUR.FT_GS.rp0] );
- 
-     /* auto-flip test */
- 
--    if ( CUR.GS.auto_flip )
-+    if ( CUR.FT_GS.auto_flip )
-     {
-       if ( ( org_dist ^ cvt_dist ) < 0 )
-         cvt_dist = -cvt_dist;
-@@ -5925,8 +5925,8 @@
-       /* XXX: UNDOCUMENTED!  Only perform cut-in test when both points */
-       /*      refer to the same zone.                                  */
- 
--      if ( CUR.GS.gep0 == CUR.GS.gep1 )
--        if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
-+      if ( CUR.FT_GS.gep0 == CUR.FT_GS.gep1 )
-+        if ( FT_ABS( cvt_dist - org_dist ) >= CUR.FT_GS.control_value_cutin )
-           cvt_dist = org_dist;
- 
-       distance = CUR_Func_round(
-@@ -5944,25 +5944,25 @@
-     {
-       if ( org_dist >= 0 )
-       {
--        if ( distance < CUR.GS.minimum_distance )
--          distance = CUR.GS.minimum_distance;
-+        if ( distance < CUR.FT_GS.minimum_distance )
-+          distance = CUR.FT_GS.minimum_distance;
-       }
-       else
-       {
--        if ( distance > -CUR.GS.minimum_distance )
--          distance = -CUR.GS.minimum_distance;
-+        if ( distance > -CUR.FT_GS.minimum_distance )
-+          distance = -CUR.FT_GS.minimum_distance;
-       }
-     }
- 
-     CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
- 
--    CUR.GS.rp1 = CUR.GS.rp0;
-+    CUR.FT_GS.rp1 = CUR.FT_GS.rp0;
- 
-     if ( ( CUR.opcode & 16 ) != 0 )
--      CUR.GS.rp0 = point;
-+      CUR.FT_GS.rp0 = point;
- 
-     /* XXX: UNDOCUMENTED! */
--    CUR.GS.rp2 = point;
-+    CUR.FT_GS.rp2 = point;
-   }
- 
- 
-@@ -5981,15 +5981,15 @@
-     FT_UNUSED_ARG;
- 
- 
--    if ( CUR.top < CUR.GS.loop ||
--         BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
-+    if ( CUR.top < CUR.FT_GS.loop ||
-+         BOUNDS( CUR.FT_GS.rp0, CUR.zp0.n_points ) )
-     {
-       if ( CUR.pedantic_hinting )
-         CUR.error = TT_Err_Invalid_Reference;
-       return;
-     }
- 
--    while ( CUR.GS.loop > 0 )
-+    while ( CUR.FT_GS.loop > 0 )
-     {
-       CUR.args--;
- 
-@@ -6006,15 +6006,15 @@
-       else
-       {
-         distance = CUR_Func_project( CUR.zp1.cur + point,
--                                     CUR.zp0.cur + CUR.GS.rp0 );
-+                                     CUR.zp0.cur + CUR.FT_GS.rp0 );
- 
-         CUR_Func_move( &CUR.zp1, point, -distance );
-       }
- 
--      CUR.GS.loop--;
-+      CUR.FT_GS.loop--;
-     }
- 
--    CUR.GS.loop = 1;
-+    CUR.FT_GS.loop = 1;
-     CUR.new_top = CUR.args;
-   }
- 
-@@ -6153,7 +6153,7 @@
-     FT_UNUSED_ARG;
- 
- 
--    if ( CUR.top < CUR.GS.loop )
-+    if ( CUR.top < CUR.FT_GS.loop )
-     {
-       CUR.error = TT_Err_Invalid_Reference;
-       return;
-@@ -6164,9 +6164,9 @@
-      * Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0),
-      * for every n.
-      */
--    twilight = CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0;
-+    twilight = CUR.FT_GS.gep0 == 0 || CUR.FT_GS.gep1 == 0 || CUR.FT_GS.gep2 == 0;
- 
--    if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) )
-+    if ( BOUNDS( CUR.FT_GS.rp1, CUR.zp0.n_points ) )
-     {
-       if ( CUR.pedantic_hinting )
-         CUR.error = TT_Err_Invalid_Reference;
-@@ -6174,18 +6174,18 @@
-     }
- 
-     if ( twilight )
--      orus_base = &CUR.zp0.org[CUR.GS.rp1];
-+      orus_base = &CUR.zp0.org[CUR.FT_GS.rp1];
-     else
--      orus_base = &CUR.zp0.orus[CUR.GS.rp1];
-+      orus_base = &CUR.zp0.orus[CUR.FT_GS.rp1];
- 
--    cur_base = &CUR.zp0.cur[CUR.GS.rp1];
-+    cur_base = &CUR.zp0.cur[CUR.FT_GS.rp1];
- 
-     /* XXX: There are some glyphs in some braindead but popular */
-     /*      fonts out there (e.g. [aeu]grave in monotype.ttf)   */
-     /*      calling IP[] with bad values of rp[12].             */
-     /*      Do something sane when this odd thing happens.      */
--    if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) ||
--         BOUNDS( CUR.GS.rp2, CUR.zp1.n_points ) )
-+    if ( BOUNDS( CUR.FT_GS.rp1, CUR.zp0.n_points ) ||
-+         BOUNDS( CUR.FT_GS.rp2, CUR.zp1.n_points ) )
-     {
-       old_range = 0;
-       cur_range = 0;
-@@ -6193,16 +6193,16 @@
-     else
-     {
-       if ( twilight )
--        old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2],
-+        old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.FT_GS.rp2],
-                                        orus_base );
-       else
--        old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2],
-+        old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.FT_GS.rp2],
-                                        orus_base );
- 
--      cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );
-+      cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.FT_GS.rp2], cur_base );
-     }
- 
--    for ( ; CUR.GS.loop > 0; --CUR.GS.loop )
-+    for ( ; CUR.FT_GS.loop > 0; --CUR.FT_GS.loop )
-     {
-       FT_UInt     point = (FT_UInt)CUR.stack[--CUR.args];
-       FT_F26Dot6  org_dist, cur_dist, new_dist;
-@@ -6235,7 +6235,7 @@
- 
-       CUR_Func_move( &CUR.zp2, (FT_UShort)point, new_dist - cur_dist );
-     }
--    CUR.GS.loop = 1;
-+    CUR.FT_GS.loop = 1;
-     CUR.new_top = CUR.args;
-   }
- 
-@@ -6264,10 +6264,10 @@
- 
-     mask = 0xFF;
- 
--    if ( CUR.GS.freeVector.x != 0 )
-+    if ( CUR.FT_GS.freeVector.x != 0 )
-       mask &= ~FT_CURVE_TAG_TOUCH_X;
- 
--    if ( CUR.GS.freeVector.y != 0 )
-+    if ( CUR.FT_GS.freeVector.y != 0 )
-       mask &= ~FT_CURVE_TAG_TOUCH_Y;
- 
-     CUR.zp0.tags[point] &= mask;
-@@ -6578,14 +6578,14 @@
-           break;
-         }
- 
--        C += CUR.GS.delta_base;
-+        C += CUR.FT_GS.delta_base;
- 
-         if ( CURRENT_Ppem() == (FT_Long)C )
-         {
-           B = ( (FT_ULong)B & 0xF ) - 8;
-           if ( B >= 0 )
-             B++;
--          B = B * 64 / ( 1L << CUR.GS.delta_shift );
-+          B = B * 64 / ( 1L << CUR.FT_GS.delta_shift );
- 
-           CUR_Func_move( &CUR.zp0, A, B );
-         }
-@@ -6673,14 +6673,14 @@
-           break;
-         }
- 
--        C += CUR.GS.delta_base;
-+        C += CUR.FT_GS.delta_base;
- 
-         if ( CURRENT_Ppem() == (FT_Long)C )
-         {
-           B = ( (FT_ULong)B & 0xF ) - 8;
-           if ( B >= 0 )
-             B++;
--          B = B * 64 / ( 1L << CUR.GS.delta_shift );
-+          B = B * 64 / ( 1L << CUR.FT_GS.delta_shift );
- 
-           CUR_Func_move_cvt( A, B );
-         }
-@@ -7120,7 +7120,7 @@
-     }
- 
-     COMPUTE_Funcs();
--    COMPUTE_Round( (FT_Byte)exc->GS.round_state );
-+    COMPUTE_Round( (FT_Byte)exc->FT_GS.round_state );
- 
-     do
-     {
-@@ -7190,11 +7190,11 @@
- 
-             if ( opcode < 4 )
-             {
--              CUR.GS.projVector.x = AA;
--              CUR.GS.projVector.y = BB;
-+              CUR.FT_GS.projVector.x = AA;
-+              CUR.FT_GS.projVector.y = BB;
- 
--              CUR.GS.dualVector.x = AA;
--              CUR.GS.dualVector.y = BB;
-+              CUR.FT_GS.dualVector.x = AA;
-+              CUR.FT_GS.dualVector.y = BB;
-             }
-             else
-             {
-@@ -7203,8 +7203,8 @@
- 
-             if ( ( opcode & 2 ) == 0 )
-             {
--              CUR.GS.freeVector.x = AA;
--              CUR.GS.freeVector.y = BB;
-+              CUR.FT_GS.freeVector.x = AA;
-+              CUR.FT_GS.freeVector.y = BB;
-             }
-             else
-             {
--- a/open-src/lib/freetype/ttinterp.h.5.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/src/truetype/ttinterp.h	2007-02-12 17:00:16.000000000 -0500
-+++ freetype-2.3.9/src/truetype/ttinterp.h	2009-08-27 12:12:45.364015000 -0400
-@@ -138,7 +138,7 @@
-     FT_Size_Metrics    metrics;
-     TT_Size_Metrics    tt_metrics; /* size metrics */
- 
--    TT_GraphicsState   GS;         /* current graphics state */
-+    TT_GraphicsState   FT_GS;      /* current graphics state */
- 
-     FT_Int             curRange;  /* current code range number   */
-     FT_Byte*           code;      /* current code range          */
--- a/open-src/lib/freetype/ttobjs.c.4.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/src/truetype/ttobjs.c	2009-02-11 17:55:26.000000000 -0500
-+++ freetype-2.3.9/src/truetype/ttobjs.c	2009-08-27 12:12:00.191763000 -0400
-@@ -527,7 +527,7 @@
-       error = TT_Err_Ok;
- 
-     /* save as default graphics state */
--    size->GS = exec->GS;
-+    size->FT_GS = exec->FT_GS;
- 
-     TT_Save_Context( exec, size );
- 
-@@ -645,7 +645,7 @@
- 
-     size->twilight.n_points = n_twilight;
- 
--    size->GS = tt_default_graphics_state;
-+    size->FT_GS = tt_default_graphics_state;
- 
-     /* set `face->interpreter' according to the debug hook present */
-     {
-@@ -707,7 +707,7 @@
-       for ( i = 0; i < (FT_UInt)size->storage_size; i++ )
-         size->storage[i] = 0;
- 
--      size->GS = tt_default_graphics_state;
-+      size->FT_GS = tt_default_graphics_state;
- 
-       error = tt_size_run_prep( size );
-       if ( !error )
--- a/open-src/lib/freetype/ttobjs.h.3.patch	Tue Aug 03 20:42:27 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/src/truetype/ttobjs.h	2008-11-15 05:30:23.000000000 -0500
-+++ freetype-2.3.9/src/truetype/ttobjs.h	2009-08-27 12:10:29.092407000 -0400
-@@ -343,7 +343,7 @@
- 
-     TT_CodeRangeTable  codeRangeTable;
- 
--    TT_GraphicsState   GS;
-+    TT_GraphicsState   FT_GS;
- 
-     FT_ULong           cvt_size;      /* the scaled control value table */
-     FT_Long*           cvt;
--- a/open-src/lib/freetype/unix-cc.in.9.patch	Tue Aug 03 20:42:27 2010 -0700
+++ b/open-src/lib/freetype/unix-cc.in.9.patch	Fri Aug 06 14:38:17 2010 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -18,14 +18,54 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
---- freetype-2.3.9/builds/unix/unix-cc.in	2006-10-15 04:57:22.000000000 -0400
-+++ freetype-2.3.9/builds/unix/unix-cc.in	2009-08-27 12:09:50.107998000 -0400
-@@ -105,7 +105,7 @@
+
+Call compiler directly to build & link, avoiding libtool, so we can pass
+the compiler & linker flags we want.
+
+--- freetype-2.4.1/builds/unix/unix-cc.in	2009-03-14 06:45:26.000000000 -0700
++++ freetype-2.4.1/builds/unix/unix-cc.in	2010-08-05 19:38:02.381773781 -0700
+@@ -21,7 +21,7 @@ LIBTOOL ?= $(BUILD_DIR)/libtool
+ # The object file extension (for standard and static libraries).  This can be
+ # .o, .tco, .obj, etc., depending on the platform.
+ #
+-O  := lo
++O  := o
+ SO := o
+ 
+ 
+@@ -35,7 +35,7 @@ E := @EXEEXT@
+ # The library file extension (for standard and static libraries).  This can
+ # be .a, .lib, etc., depending on the platform.
+ #
+-A  := la
++A  := so.6
+ SA := a
+ 
+ 
+@@ -84,11 +84,11 @@ CFLAGS   := -c @XX_CFLAGS@ @CFLAGS@ -DFT
+ #
+ ANSIFLAGS := @XX_ANSIFLAGS@
+ 
+-# C compiler to use -- we use libtool!
++# C compiler to use -- we hate libtool!
+ #
+ #
+ CCraw := $(CC)
+-CC    := $(LIBTOOL) --mode=compile $(CCraw)
++CC    := $(CCraw) -Kpic
+ 
+ # Linker flags.
+ #
+@@ -105,9 +105,8 @@ CCexe        := $(CCraw_build)	# used to
  
  # Library linking
  #
 -LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
-+LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) $(CFLAGS) -o $@ $(OBJECTS_LIST) \
-                           -rpath $(libdir) -version-info $(version_info) \
-                           $(LDFLAGS) -no-undefined \
-                           # -export-symbols $(EXPORTS_LIST)
+-                          -rpath $(libdir) -version-info $(version_info) \
+-                          $(LDFLAGS) -no-undefined \
+-                          # -export-symbols $(EXPORTS_LIST)
++LINK_LIBRARY = $(CCraw) -G @CFLAGS@ -o $@ $(OBJECTS_LIST) \
++                          -R $(libdir) -h $(@F) -mc \
++                          $(LDFLAGS)
+ 
+ # EOF
--- a/pkg/manifests/system-library-freetype-2.mf	Tue Aug 03 20:42:27 2010 -0700
+++ b/pkg/manifests/system-library-freetype-2.mf	Fri Aug 06 14:38:17 2010 -0700
@@ -87,9 +87,9 @@
 file path=usr/include/freetype2/freetype/tttags.h
 file path=usr/include/freetype2/freetype/ttunpat.h
 file path=usr/include/ft2build.h
-file path=usr/lib/$(ARCH64)/libfreetype.so.6.3.20
+file path=usr/lib/$(ARCH64)/libfreetype.so.6
 file path=usr/lib/$(ARCH64)/pkgconfig/freetype2.pc
-file path=usr/lib/libfreetype.so.6.3.20
+file path=usr/lib/libfreetype.so.6
 file path=usr/lib/pkgconfig/freetype2.pc
 file path=usr/share/aclocal/freetype2.m4
 file path=usr/share/doc/freetype/VERSION.DLL
@@ -135,8 +135,6 @@
 legacy pkg=SUNWfreetype2 \
     desc="FreeType2 font handling library and rendering engine" \
     name="FreeType2 Font library"
-link path=usr/lib/$(ARCH64)/libfreetype.so target=libfreetype.so.6.3.20
-link path=usr/lib/$(ARCH64)/libfreetype.so.6 target=libfreetype.so.6.3.20
-link path=usr/lib/libfreetype.so target=libfreetype.so.6.3.20
-link path=usr/lib/libfreetype.so.6 target=libfreetype.so.6.3.20
+link path=usr/lib/$(ARCH64)/libfreetype.so target=libfreetype.so.6
+link path=usr/lib/libfreetype.so target=libfreetype.so.6
 link path=usr/share/doc/freetype/index.html target=ft2-toc.html