[cairo] Cairo 1.10.0 iPhone

Pavel Kanzelsberger kanzels at gmail.com
Tue Sep 21 04:17:06 PDT 2010


Hello,

I'm working a lot with Cairo and Quartz surfaces on MacOSX and decided to port one of my projects to iPhone as well. Version compiled for iPhone Simulator works perfect, but I'm now fighting with cross-compilation of Cairo library to armv7 and using iPhoneOS3.2.sdk ... anybody tried this already? Or is there any simplified way to achieve libcairo.a for armv7?

See below a script that tries to build it:

I'm also passing following to configure script "--enable-fc=no --enable-ft=no --enable-xlib=no" since I'm using CoreText directlry to display my texts, I'm just using Cairo as a wrapper for Quartz 2D.

#!/bin/sh

# Select the desired iPhone SDK
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS3.2.sdk

# Set up relevant environment variables
export CPPFLAGS="-I$SDKROOT/usr/lib/gcc/arm-apple-darwin10/4.2.1/include/ -I$SDKROOT/usr/include/ -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/Frameworks/"
export CFLAGS="$CPPFLAGS -arch armv7 -pipe -no-cpp-precomp -isysroot $SDKROOT"
export CPP="$DEVROOT/usr/bin/cpp $CPPFLAGS"
export CXXFLAGS="$CFLAGS"

LIBNAME="cairo"

./configure CXX=$DEVROOT/usr/bin/arm-apple-darwin10-g++-4.0.1 CC=$DEVROOT/usr/bin/arm-apple-darwin10-gcc-4.0.1 LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin $1 $2 $3 $4 $5 $6

make




Configure will complain these:

checking ApplicationServices/ApplicationServices.h usability... no
checking ApplicationServices/ApplicationServices.h presence... no
checking for ApplicationServices/ApplicationServices.h... no
checking CoreGraphics/CoreGraphics.h usability... yes
checking CoreGraphics/CoreGraphics.h presence... no
configure: WARNING: CoreGraphics/CoreGraphics.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: CoreGraphics/CoreGraphics.h: proceeding with the compiler's result
checking for CoreGraphics/CoreGraphics.h... yes
checking whether cairo's Quartz surface backend feature could be enabled... no (requires ApplicationServices framework)
checking for cairo's Quartz font backend feature... 
checking whether cairo's Quartz font backend feature could be enabled... no (requires ApplicationServices framework)



Make will fail with following:

*** No native surface backends enabled for your platform. It is strongly
*** recommended that you enable the native surface backend feature for your
*** platform.

*** No native font backends enabled for your platform. It is strongly
*** recommended that you enable the native font backend feature for your
*** platform.

Then it fails with a lot of warnings and errors...

---
Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100921/626506ae/attachment.html>


More information about the cairo mailing list