[Libreoffice-commits] .: cairo/cairo cairo/cairo-1.8.0.patch

Tor Lillqvist tml at kemper.freedesktop.org
Thu Jun 30 16:25:57 PDT 2011


 cairo/cairo-1.8.0.patch |   72 ++++++++++++++++++++++++++++++++++++++++++++++++
 cairo/cairo/makefile.mk |   12 ++++----
 2 files changed, 78 insertions(+), 6 deletions(-)

New commits:
commit 7d5767feae111097837aaa029a1333320585c568
Author: Tor Lillqvist <tml at iki.fi>
Date:   Fri Jul 1 02:23:55 2011 +0300

    Enable building the "quartz" font backend without the "quartz" surface, for iOS
    
    The quartz surface code won't build for iOS, but the font code
    will. So let's try to use it. Maybe later make the surface build, too,
    it might be trivial.

diff --git a/cairo/cairo-1.8.0.patch b/cairo/cairo-1.8.0.patch
index f2ce5b6..70b3c2f 100644
--- a/cairo/cairo-1.8.0.patch
+++ b/cairo/cairo-1.8.0.patch
@@ -197,6 +197,14 @@ diff -ur misc/build/cairo-1.8.0.org/configure misc/build/cairo-1.8.0/configure
  
  
  { echo "$as_me:$LINENO: checking for X" >&5
+@@ -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"
 @@ -31723,7 +31723,7 @@
  
    if test "x$png_REQUIRES" = x; then
@@ -283,3 +291,67 @@ diff -ur misc/build/cairo-1.8.0.org/src/cairo-ps-surface.c misc/build/cairo-1.8.
      decimal_point_len = strlen (decimal_point);
  
      assert (decimal_point_len != 0);
+--- 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
+ 
+ /*
+  * Quartz font support
+  */
+ 
++#include <CoreGraphics/CoreGraphics.h>
++
+ cairo_public cairo_font_face_t *
+ cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
+ 
++#if !TARGET_OS_IPHONE
++
+ cairo_public cairo_font_face_t *
+ cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id);
++
++#endif /* !TARGET_OS_IPHONE */
+ 
+ #endif /* CAIRO_HAS_QUARTZ_FONT */
+ 
+ CAIRO_END_DECLS
+ 
+-#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>
+ 
+ #include "cairo-quartz.h"
++#if !TARGET_OS_IPHONE
+ #include "cairo-quartz-private.h"
++#endif
+ 
+ /* CreateWithFontName exists in 10.5, but not in 10.4; CreateWithName isn't public in 10.4 */
+ static CGFontRef (*CGFontCreateWithFontNamePtr) (CFStringRef) = NULL;
+@@ -766,6 +766,8 @@
+ }
+ 
+ 
++#if !TARGET_OS_IPHONE
++
+ /*
+  * compat with old ATSUI backend
+  */
+@@ -808,3 +808,5 @@
+ {
+     return cairo_quartz_font_face_create_for_atsu_font_id (font_id);
+ }
++
++#endif /* !TARGET_OS_IPHONE */
diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk
index 5cae5f0..70dfdb0 100644
--- a/cairo/cairo/makefile.mk
+++ b/cairo/cairo/makefile.mk
@@ -143,21 +143,21 @@ cairo_CFLAGS+=-march=i486
 
 CONFIGURE_DIR=
 
-.IF "$(OS)"=="ANDROID"
-# No pkg-config in the Android NDK
+.IF "$(OS)"=="IOS" || "$(OS)"=="ANDROID"
+# No pkg-config on MacOSX (for iOS) or in the Android NDK
 CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure
 .ELSE
 CONFIGURE_ACTION=.$/configure
 .ENDIF
 
 .IF "$(OS)"=="IOS"
-CONFIGURE_FLAGS=--disable-shared
+CONFIGURE_FLAGS=--disable-shared --disable-xlib --disable-quartz --enable-quartz-font=yes
 .ELSE
 CONFIGURE_FLAGS=--disable-static --enable-xlib
 .ENDIF
 
-.IF "$(OS)"=="ANDROID"
-CONFIGURE_FLAGS+=--disable-ft
+.IF "$(OS)"=="IOS" || "$(OS)"=="ANDROID"
+CONFIGURE_FLAGS+=--disable-ft PKG_CONFIG=./dummy_pkg_config
 .ELSE
 CONFIGURE_FLAGS+=--enable-ft
 .ENDIF
@@ -222,7 +222,7 @@ OUT2LIB+=src$/release$/*.lib
 OUT2BIN+=src$/release$/*.dll
 .ENDIF
 .ELIF "$(OS)"=="IOS" || "$(OS)"=="ANDROID"
-OUT2LIB+=src$/.libs$/libcairo-1.a
+OUT2LIB+=src$/.libs$/libcairo*.a
 .ELSE
 OUT2LIB+=src$/.libs$/libcairo.so*
 .ENDIF


More information about the Libreoffice-commits mailing list