diff -Nur --exclude=*.orig xetex-0.995/texk/web2c/xetexdir/XeTeX_mac.c xetex-0.995-liulk/texk/web2c/xetexdir/XeTeX_mac.c --- xetex-0.995/texk/web2c/xetexdir/XeTeX_mac.c Tue Aug 22 15:41:00 2006 +++ xetex-0.995-liulk/texk/web2c/xetexdir/XeTeX_mac.c Sun Jan 14 23:48:37 2007 @@ -43,7 +43,7 @@ #undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */ #include -#include +#include #include "TECkit_Engine.h" #include "XeTeX_ext.h" diff -Nur --exclude=*.orig xetex-0.995/texk/xdv2pdf/xdv2pdf.cpp xetex-0.995-liulk/texk/xdv2pdf/xdv2pdf.cpp --- xetex-0.995/texk/xdv2pdf/xdv2pdf.cpp Tue Aug 22 15:41:00 2006 +++ xetex-0.995-liulk/texk/xdv2pdf/xdv2pdf.cpp Sun Jan 14 23:48:37 2007 @@ -46,7 +46,7 @@ #include "config.h" #include -#include +#include #include #include diff -Nurd -x'*~' xetex-0.995.orig/texk/web2c/xetexdir/xetex.mk xetex-0.995/texk/web2c/xetexdir/xetex.mk --- xetex-0.995.orig/texk/web2c/xetexdir/xetex.mk 2006-08-22 15:41:00.000000000 -0400 +++ xetex-0.995/texk/web2c/xetexdir/xetex.mk 2007-02-07 03:22:28.000000000 -0500 @@ -75,11 +75,13 @@ ZLIBCPPFLAGS = @ZLIBCPPFLAGS@ LDZLIB = @LDZLIB@ +ZLIBDEP = @ZLIBDEP@ ZLIBDIR = ../../libs/zlib ZLIBSRCDIR = $(srcdir)/$(ZLIBDIR) xetexlibs = $(LDICU) $(LDTECKIT) $(LDFREETYPE2) $(LDZLIB) +xetexdeps = $(ICUDEP) $(TECKITDEP) $(FREETYPE2DEP) $(ZLIBDEP) # Font-related headers XeTeXFontHdrs = \ @@ -189,7 +191,7 @@ $(compile) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@ # Making xetex. -xetex: $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) $(xetexlibs) $(EXTRADEPS) +xetex: $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) $(xetexdeps) $(EXTRADEPS) $(kpathsea_cxx_link) $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) \ $(socketlibs) $(LOADLIBES) \ $(xetexlibs) $(EXTRALIBS) diff -Nur xetex-0.995/texk/xdv2pdf/xdv2pdf.cpp xetex-0.995.liulk/texk/xdv2pdf/xdv2pdf.cpp --- xetex-0.995/texk/xdv2pdf/xdv2pdf.cpp Tue Aug 22 15:41:00 2006 +++ xetex-0.995.liulk/texk/xdv2pdf/xdv2pdf.cpp Wed Mar 14 10:31:44 2007 @@ -37,12 +37,6 @@ also permissible to omit xdvfile but specify pdffile; then input is from stdin */ -#ifdef __POWERPC__ -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_2 -#else -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 -#endif - #include "config.h" #include @@ -395,9 +389,12 @@ setColor(sNativeFonts[cur_cgFont].color); else setColor(gTextColor); + +#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED if (&CGContextShowGlyphsWithAdvances != NULL) CGContextShowGlyphsWithAdvances(gCtx, gGlyphs, gAdvances, gGlyphCount); else +#endif myShowGlyphsWithAdvances(gCtx, gGlyphs, gAdvances, gGlyphCount); gGlyphCount = 0; @@ -555,9 +552,11 @@ advances[glyphCount-1].width = 0.0; advances[glyphCount-1].height = 0.0; +#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED if (&CGContextShowGlyphsWithAdvances != NULL) CGContextShowGlyphsWithAdvances(gCtx, glyphs, advances, glyphCount); else +#endif myShowGlyphsWithAdvances(gCtx, glyphs, advances, glyphCount); if (gTrackingBoxes) { @@ -1724,6 +1723,7 @@ values[i] = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloat32Type, &f); } +#if MAC_OS_X_VERSION_10_4 <= MAC_OS_X_VERSION_MAX_ALLOWED if (&CGFontCreateCopyWithVariations != NULL) { CFDictionaryRef variations = CFDictionaryCreate(kCFAllocatorDefault, (const void**)axes, (const void**)values, n, @@ -1733,6 +1733,7 @@ CFRelease(variations); } else +#endif variationWarning(); for (int i = 0; i < n; ++i) { @@ -2047,7 +2048,6 @@ gPageStarted = false; } -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 /* From Apple Technical Q&A 1396, Listing 2 */ static CGColorSpaceRef CreateICCColorSpaceFromPathToProfile(const char* iccProfilePath) @@ -2109,25 +2109,26 @@ return NULL; } /* end of Apple Q&A code */ -#endif static void processAllPages(FILE* xdv) { // initialize some global variables that we use as CG "constants" -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 +#if MAC_OS_X_VERSION_10_4 <= MAC_OS_X_VERSION_MAX_ALLOWED if (&kCGColorSpaceGenericRGB == NULL) { +#endif gRGBColorSpace = CreateColorSpaceFromSystemICCProfileName(CFSTR("Generic RGB Profile.icc")); gCMYKColorSpace = CreateColorSpaceFromSystemICCProfileName(CFSTR("Generic CMYK Profile.icc")); gGrayColorSpace = CreateColorSpaceFromSystemICCProfileName(CFSTR("Generic Gray Profile.icc")); +#if MAC_OS_X_VERSION_10_4 <= MAC_OS_X_VERSION_MAX_ALLOWED } else -#endif { gRGBColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); gCMYKColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericCMYK); gGrayColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericGray); } +#endif if (gRGBColorSpace == NULL || gCMYKColorSpace == NULL || gGrayColorSpace == NULL) { fprintf(stderr, "\n*** unable to initialize color spaces.... something's badly broken\n"); diff -Nur xetex-0.995/texk/xdv2pdf/xdv2pdf_specials.cpp xetex-0.995.liulk/texk/xdv2pdf/xdv2pdf_specials.cpp --- xetex-0.995/texk/xdv2pdf/xdv2pdf_specials.cpp Tue Aug 22 15:41:00 2006 +++ xetex-0.995.liulk/texk/xdv2pdf/xdv2pdf_specials.cpp Wed Mar 14 09:48:28 2007 @@ -11,8 +11,6 @@ // \special{} support for xdv2pdf -#define MAC_OS_X_VERSION_MIN_REQUIRED 1020 - #include #include "xdv2pdf_globals.h" @@ -703,9 +701,11 @@ blur = readFloat(specialArg); // NB: API only available on 10.3 and later +#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED if (&CGContextSetShadow != NULL) CGContextSetShadow(gCtx, offset, blur); else +#endif shadowWarning(); } while (false); } @@ -734,10 +734,12 @@ color = readColorValueWithAlpha(specialArg); // NB: APIs only available on 10.3 and later +#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED if (&CGContextSetShadowWithColor != NULL) { CGContextSetShadowWithColor(gCtx, offset, blur, color); } else +#endif shadowWarning(); CGColorRelease(color); } while (false); @@ -767,4 +769,4 @@ } } } -} \ No newline at end of file +}