[cairo] Quartz backend on iOS/iPhone

Guido Lorenz code at superquadratic.net
Thu Aug 18 07:42:26 PDT 2011


Hi,

I'd like to share a small patch that allowed me to build the Quartz backend for iOS/iPhone. [1]

One part of the patch fixes the configure script which did look for the correct framework (CoreGraphics on iOS, instead of ApplicationServices on Mac OS X), but did not set use_quartz back to "yes" (after the failed search for ApplicationServices set it to "no").

The other part conditionally includes the CoreGraphics header instead of ApplicationServices in cairo-quartz.h. It also disables cairo_quartz_font_face_create_for_atsu_font_id() -- I'm not sure if ATSUI is available on iOS (afaik it is at least deprecated), so using an "ifdef" was the easiest solution.

I have only tested it a little, but it seems to work for me.

Cheers,
Guido

---
[1] These are the environment variables and configure flags I used:

export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS4.3.sdk
export CFLAGS="-arch armv7 -pipe -no-cpp-precomp -isysroot $SDKROOT -miphoneos-version-min=3.2 -I$SDKROOT/usr/include/"
export CC="$DEVROOT/usr/bin/gcc-4.2"
export LD=$DEVROOT/usr/bin/ld
export AR=$DEVROOT/usr/bin/ar
export AS=$DEVROOT/usr/bin/as
export NM=$DEVROOT/usr/bin/nm
export RANLIB=$DEVROOT/usr/bin/ranlib
export LDFLAGS="-L$SDKROOT/usr/lib/"

./autogen.sh --host=arm-apple-darwin7 --enable-shared=no --enable-xlib=no --enable-xlib-xrender=no --enable-ft=no --enable-fc=no


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-building-the-Quartz-backend-for-iOS-iPhone.patch
Type: application/octet-stream
Size: 2972 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110818/a7b9de9d/attachment.obj>


More information about the cairo mailing list