[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] Mac OS X patch from XFree86

From: Torrey T. Lyons
Subject: [Devel] Mac OS X patch from XFree86
Date: Tue, 18 Feb 2003 17:36:40 -0800

We are using the following two patches to Freetype 2.1.1 in XFree86 4.3.0 to solve issues with building on Darwin/Mac OS X.


The first patch allows ftmac.c to build with Apple's standard Developer Tools, which use gcc. Apparently the author(s) of ftmac.c were using Metrowerks CodeWarrior. (To mimic the Metrowerks CodeWarrior build environment our Imakefile also uses -DTARGET_API_MAC_CARBON=TRUE on the gcc build line for ftmac.c.)

RCS file: /home/anoncvs/cvs/xc/extras/freetype2/src/base/ftmac.c,v
retrieving revision
retrieving revision 1.2
diff -u -p -r1.1.1.5 -r1.2
--- xc/extras/freetype2/src/base/ftmac.c        2002/06/20 08:16:13
+++ xc/extras/freetype2/src/base/ftmac.c        2003/01/01 22:08:40     1.2
@@ -65,11 +65,15 @@
 #include "truetype/ttobjs.h"
 #include "type1/t1objs.h"

+#ifdef __GNUC__
+#include <Carbon/Carbon.h>
 #include <Resources.h>
 #include <Fonts.h>
 #include <Errors.h>
 #include <Files.h>
 #include <TextUtils.h>

 #include FT_MAC_H


The next patch allows us to turn off using Mac OS X specific features if we are building on a pure Darwin system (using only open source software). Darwin does not include Carbon, so we can't use any of the Mac OS X specific features in ftmac.c. However on pure Darwin, __APPLE__ is defined so we need a way to specify Apple systems without Carbon.

RCS file: /home/anoncvs/cvs/xc/extras/freetype2/include/freetype/config/ftconfig.h,v
retrieving revision
retrieving revision 1.2
diff -u -p -r1.1.1.5 -r1.2
--- xc/extras/freetype2/include/freetype/config/ftconfig.h 2002/06/20 08:16:09 +++ xc/extras/freetype2/include/freetype/config/ftconfig.h 2002/07/07 06:47:00 1.2
@@ -108,7 +108,8 @@ FT_BEGIN_HEADER
   /*   This is the only necessary change, so it is defined here instead    */
   /*   providing a new configuration file.                                 */
   /*                                                                       */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
+#if ( defined( __APPLE__ ) && !defined ( DARWIN_NO_CARBON ) ) || \
+    ( defined( __MWERKS__ ) && defined( macintosh ) )
 #define FT_MACINTOSH 1

Please let me know if there are any questions or comments.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]