summaryrefslogtreecommitdiff
path: root/cairo
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-07-05 23:11:57 +0300
committerTor Lillqvist <tml@iki.fi>2011-07-05 23:11:57 +0300
commit16d420b1ccb27bb254d75d77dd2bcc82b6dc84a2 (patch)
treedca37aa50ff5e6ad0220d0185f18240b73486217 /cairo
parent3c4b37d77cbfdb941434e08c9a0955b7e752ee64 (diff)
Do build the cairo "quartz" surface for iOS, too
No ATSUI font stuff on iOS. But otherwise there isn't really anything MacOSX specific there. The code builds against the iOS SDK, too.
Diffstat (limited to 'cairo')
-rw-r--r--cairo/cairo-1.8.0.ios.patch70
-rw-r--r--cairo/cairo/makefile.mk2
2 files changed, 32 insertions, 40 deletions
diff --git a/cairo/cairo-1.8.0.ios.patch b/cairo/cairo-1.8.0.ios.patch
index 1f260d3a5ee7..a5cc8e975e2d 100644
--- a/cairo/cairo-1.8.0.ios.patch
+++ b/cairo/cairo-1.8.0.ios.patch
@@ -1,29 +1,15 @@
---- misc/build/cairo-1.8.0.org/configure
-+++ misc/build/cairo-1.8.0/configure
-@@ -29865,7 +29865,6 @@
- quartz_font_NONPKGCONFIG_LIBS="$ac_env_quartz_font_NONPKGCONFIG_LIBS_value"
-
-
-- use_quartz_font=$use_quartz
-
- cairo_cv_quartz_font_use=$use_quartz_font
- cairo_cv_quartz_font_cache_vars=" BASE REQUIRES CFLAGS NONPKGCONFIG_CFLAGS LIBS NONPKGCONFIG_LIBS"
--- misc/build/cairo-1.8.0.org/src/cairo-quartz.h
+++ misc/build/cairo-1.8.0/src/cairo-quartz.h
-@@ -57,26 +57,28 @@
- cairo_public CGContextRef
- cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
-
-+#endif /* CAIRO_HAS_QUARTZ_SURFACE */
-+
- #if CAIRO_HAS_QUARTZ_FONT
+@@ -40,7 +40,7 @@
- /*
- * Quartz font support
- */
+ #if CAIRO_HAS_QUARTZ_SURFACE
+-#include <ApplicationServices/ApplicationServices.h>
+#include <CoreGraphics/CoreGraphics.h>
-+
+
+ CAIRO_BEGIN_DECLS
+
+@@ -66,8 +66,12 @@
cairo_public cairo_font_face_t *
cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
@@ -36,27 +22,33 @@
#endif /* CAIRO_HAS_QUARTZ_FONT */
- CAIRO_END_DECLS
+--- misc/build/cairo-1.8.0.org/src/cairo-quartz-surface.c
++++ misc/build/cairo-1.8.0/src/cairo-quartz-surface.c
+@@ -152,10 +152,6 @@
+ CGContextGetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextGetAllowsFontSmoothing");
+ CGContextSetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextSetAllowsFontSmoothing");
--#else
--
--# error Cairo was not compiled with support for the quartz backend
--
--#endif /* CAIRO_HAS_QUARTZ_SURFACE */
--
- #endif /* CAIRO_QUARTZ_H */
---- misc/build/cairo-1.8.0.org/src/cairo-quartz-font.c
-+++ misc/build/cairo-1.8.0/src/cairo-quartz-font.c
-@@ -39,7 +39,9 @@
- #include <dlfcn.h>
+- if (Gestalt(gestaltSystemVersion, &_cairo_quartz_osx_version) != noErr) {
+- // assume 10.4
+- _cairo_quartz_osx_version = 0x1040;
+- }
- #include "cairo-quartz.h"
-+#if 0
- #include "cairo-quartz-private.h"
-+#endif
+ _cairo_quartz_symbol_lookup_done = TRUE;
+ }
+@@ -2093,7 +2093,10 @@
+ yprev = yf;
+ }
- /* CreateWithFontName exists in 10.5, but not in 10.4; CreateWithName isn't public in 10.4 */
- static CGFontRef (*CGFontCreateWithFontNamePtr) (CFStringRef) = NULL;
+- if (_cairo_quartz_osx_version >= 0x1050 && isClipping) {
++ if (0) {
++ /* Assume the bug mentioned below is not present in iOS,
++ * until proven otherwise.
++ */
+ /* If we're clipping, OSX 10.5 (at least as of 10.5.2) has a
+ * bug (apple bug ID #5834794) where the glyph
+ * advances/positions are not transformed by the text matrix
+--- misc/build/cairo-1.8.0.org/src/cairo-quartz-font.c
++++ misc/build/cairo-1.8.0/src/cairo-quartz-font.c
@@ -766,6 +766,8 @@
}
diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk
index f62c44971ada..9af005b47f32 100644
--- a/cairo/cairo/makefile.mk
+++ b/cairo/cairo/makefile.mk
@@ -155,7 +155,7 @@ CONFIGURE_ACTION=.$/configure
.ENDIF
.IF "$(OS)"=="IOS"
-CONFIGURE_FLAGS=--disable-shared --disable-xlib --disable-quartz --enable-quartz-font=yes
+CONFIGURE_FLAGS=--disable-shared --disable-xlib --enable-quartz --enable-quartz-font
.ELSE
CONFIGURE_FLAGS=--disable-static --enable-xlib
.ENDIF