summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2010-06-13 11:58:21 +0000
committerJonathan Kew <jfkthame@googlemail.com>2010-06-13 11:58:21 +0000
commit7ef66445c67a38eae29a96876837a3bbbb6897cc (patch)
treeb19ade390c1552db84c0144327b1c3d36244de64 /Build
parent92eecf464fadcf5935e6a001b2bc549564451a50 (diff)
mac-only compatibility/portability fixes
git-svn-id: svn://tug.org/texlive/trunk@18933 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/Build12
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c1
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_mac.c11
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.h2
-rw-r--r--Build/source/texk/xdv2pdf/Makefile.am2
-rw-r--r--Build/source/texk/xdv2pdf/Makefile.in2
6 files changed, 22 insertions, 8 deletions
diff --git a/Build/source/Build b/Build/source/Build
index 71580f43aa0..aebdfed97df 100755
--- a/Build/source/Build
+++ b/Build/source/Build
@@ -47,10 +47,14 @@ fi
# For MacOSX PowerPC, we want to keep working on 10.3.
# For MacOSX Intel, though, the earliest system is 10.4.
-if sh build-aux/config.guess | grep powerpc.*darwin >/dev/null \
- && test -z "$MACOSX_DEPLOYMENT_TARGET"; then
- MACOSX_DEPLOYMENT_TARGET=10.3
- export MACOSX_DEPLOYMENT_TARGET
+if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
+ if sh build-aux/config.guess | grep powerpc.*darwin >/dev/null; then
+ MACOSX_DEPLOYMENT_TARGET=10.3
+ export MACOSX_DEPLOYMENT_TARGET
+ else
+ MACOSX_DEPLOYMENT_TARGET=10.4
+ export MACOSX_DEPLOYMENT_TARGET
+ fi
fi
: ${TL_BUILD_ENV=}
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index c4f82e8fd72..dd9934c41b9 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -59,6 +59,7 @@ authorization from the copyright holders.
#ifdef XETEX_MAC
#undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */
+#undef output
#include <Carbon/Carbon.h>
#endif
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c
index 30a891b83f1..20b3a6dcbfc 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c
@@ -35,9 +35,9 @@ authorization from the copyright holders.
*/
#ifdef __POWERPC__
-#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_2
+#define MAC_OS_X_VERSION_MIN_REQUIRED 1030
#else
-#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_MIN_REQUIRED 1040
#endif
#define EXTERN extern
@@ -492,6 +492,7 @@ ats_failed:
int GetGlyphIDFromCGFont(ATSFontRef atsFontRef, const char* glyphName)
{
+#if defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (&CGFontGetGlyphWithGlyphName == NULL)
return 0;
@@ -512,6 +513,9 @@ int GetGlyphIDFromCGFont(ATSFontRef atsFontRef, const char* glyphName)
}
}
return rval;
+#else
+ return 0;
+#endif
}
char*
@@ -562,6 +566,7 @@ GetGlyphNameFromCGFont(ATSFontRef atsFontRef, UInt16 gid, int* len)
static char buffer[256];
buffer[0] = 0;
+#if defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (&CGFontCopyGlyphNameForGlyph == NULL)
return &buffer[0];
@@ -581,6 +586,8 @@ GetGlyphNameFromCGFont(ATSFontRef atsFontRef, UInt16 gid, int* len)
CGFontRelease(cgfont);
}
}
+#endif
+
return &buffer[0];
}
diff --git a/Build/source/texk/web2c/xetexdir/xetex.h b/Build/source/texk/web2c/xetexdir/xetex.h
index ce149b221f0..c88942d222f 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.h
+++ b/Build/source/texk/web2c/xetexdir/xetex.h
@@ -99,6 +99,8 @@ void* getotassemblyptr(int f, int g, int horiz); /* function in XeTeXOTMath.cpp
#define Xchr(x) (x)
#ifdef XETEX_MAC
+#undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */
+#undef output
#include <Carbon/Carbon.h> /* for Mac OS X, it's handy to have the Carbon APIs available */
#endif
diff --git a/Build/source/texk/xdv2pdf/Makefile.am b/Build/source/texk/xdv2pdf/Makefile.am
index e3f7bcaaeb8..8c2520a930a 100644
--- a/Build/source/texk/xdv2pdf/Makefile.am
+++ b/Build/source/texk/xdv2pdf/Makefile.am
@@ -10,7 +10,7 @@ AM_CPPFLAGS =
AM_CFLAGS = $(WARNING_CFLAGS)
## Not yet for C++ (too many warnings)
AM_CXXFLAGS = ## $(WARNING_CXXFLAGS)
-AM_OBJCFLAGS = $(WARNING_OBJCFLAGS)
+AM_OBJCFLAGS = $(WARNING_OBJCFLAGS) -fobjc-exceptions
if build
bin_PROGRAMS = T1Wrap xdv2pdf
diff --git a/Build/source/texk/xdv2pdf/Makefile.in b/Build/source/texk/xdv2pdf/Makefile.in
index 6b5eb574cac..86ff6bc627b 100644
--- a/Build/source/texk/xdv2pdf/Makefile.in
+++ b/Build/source/texk/xdv2pdf/Makefile.in
@@ -266,7 +266,7 @@ INCLUDES = $(KPATHSEA_INCLUDES)
AM_CPPFLAGS =
AM_CFLAGS = $(WARNING_CFLAGS)
AM_CXXFLAGS = ## $(WARNING_CXXFLAGS)
-AM_OBJCFLAGS = $(WARNING_OBJCFLAGS)
+AM_OBJCFLAGS = $(WARNING_OBJCFLAGS) -fobjc-exceptions
T1Wrap_SOURCES = \
SimplePSInterpreter.h \
SimplePSInterpreter.m \