From 2800d3366c75fb5eb13dd1a5270bf9c5fa8684ec Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 17 Dec 2011 00:36:11 +0200 Subject: Do build cairo for Android, will likely be needed --- cairo/cairo-1.10.2.android.patch | 13 +++++++++++++ cairo/cairo-1.10.2.patch | 11 ++++++++++- cairo/cairo/makefile.mk | 30 +++++++++++++++++++++++++----- cairo/pixman-0.24.0.android.patch | 13 +++++++++++++ cairo/pixman-0.24.0.patch | 22 +++++++++++++++++++++- cairo/pixman/makefile.mk | 25 +++++++++++++++++++++++-- 6 files changed, 105 insertions(+), 9 deletions(-) create mode 100644 cairo/cairo-1.10.2.android.patch create mode 100644 cairo/pixman-0.24.0.android.patch (limited to 'cairo') diff --git a/cairo/cairo-1.10.2.android.patch b/cairo/cairo-1.10.2.android.patch new file mode 100644 index 000000000000..bd4438bfcc29 --- /dev/null +++ b/cairo/cairo-1.10.2.android.patch @@ -0,0 +1,13 @@ +--- misc/cairo-1.10.2/build/ltmain.sh ++++ misc/build/cairo-1.10.2/build/ltmain.sh +@@ -3228,6 +3228,10 @@ + fi + else + ++ # Force no versioning suffix for Android ++ ++ version_type=none ++ + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 diff --git a/cairo/cairo-1.10.2.patch b/cairo/cairo-1.10.2.patch index 533efdfda848..195af1691fce 100644 --- a/cairo/cairo-1.10.2.patch +++ b/cairo/cairo-1.10.2.patch @@ -70,12 +70,21 @@ @mkdir -p $(CFG) --- misc/cairo-1.10.2/build/config.sub 2009-08-14 23:33:32.000000000 +0200 +++ misc/build/cairo-1.10.2/build/config.sub 2009-08-14 23:33:32.000000000 +0200 +@@ -120,7 +120,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) @@ -1272,7 +1272,7 @@ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -+ | -udi* | -androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -udi* | -linux-androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk index ccad5b4090c1..0eaef2488c4b 100644 --- a/cairo/cairo/makefile.mk +++ b/cairo/cairo/makefile.mk @@ -35,7 +35,7 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE .INCLUDE : settings.mk -.IF "$(SYSTEM_CAIRO)" == "YES" || "$(GUIBASE)" == "android" +.IF "$(SYSTEM_CAIRO)" == "YES" all: @echo "Not building cairo." .ENDIF @@ -58,6 +58,10 @@ PATCH_FILES+=..$/$(TARFILE_NAME).no-atsui.patch PATCH_FILES+=..$/$(TARFILE_NAME).ios.patch .ENDIF +.IF "$(OS)" == "ANDROID" +PATCH_FILES+=..$/$(TARFILE_NAME).android.patch +.ENDIF + cairo_CFLAGS=$(SOLARINC) cairo_LDFLAGS=-L$(SOLARVER)$/$(INPATH)$/lib @@ -163,17 +167,33 @@ CONFIGURE_ACTION=.$/configure .ENDIF .IF "$(OS)"=="IOS" -CONFIGURE_FLAGS=--disable-valgrind --disable-shared --disable-xlib --enable-quartz --enable-quartz-font +CONFIGURE_FLAGS=--disable-shared .ELSE -CONFIGURE_FLAGS=--disable-valgrind --disable-static --enable-xlib +CONFIGURE_FLAGS=--disable-static .ENDIF .IF "$(OS)"=="IOS" || "$(OS)"=="ANDROID" -CONFIGURE_FLAGS+=--disable-ft PKG_CONFIG=./dummy_pkg_config +CONFIGURE_FLAGS+=--disable-xlib +.ELSE +CONFIGURE_FLAGS+=--enable-xlib +.ENDIF + +.IF "$(OS)"=="IOS" +CONFIGURE_FLAGS+=--enable-quartz --enable-quartz-font +.ENDIF + +CONFIGURE_FLAGS+=--disable-valgrind + +.IF "$(OS)"=="IOS" +CONFIGURE_FLAGS+=--disable-ft .ELSE CONFIGURE_FLAGS+=--enable-ft .ENDIF +.IF "$(OS)"=="IOS" || "$(OS)"=="ANDROID" +CONFIGURE_FLAGS+=PKG_CONFIG=./dummy_pkg_config +.ENDIF + CONFIGURE_FLAGS+=--disable-svg --enable-gtk-doc=no --enable-test-surfaces=no ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) .IF "$(CROSS_COMPILING)"=="YES" @@ -237,7 +257,7 @@ OUT2BIN+=src$/.libs$/*.dll OUT2LIB+=src$/release$/*.lib OUT2BIN+=src$/release$/*.dll .ENDIF -.ELIF "$(OS)"=="IOS" || "$(OS)"=="ANDROID" +.ELIF "$(OS)"=="IOS" OUT2LIB+=src$/.libs$/libcairo*.a .ELSE OUT2LIB+=src$/.libs$/libcairo.so* diff --git a/cairo/pixman-0.24.0.android.patch b/cairo/pixman-0.24.0.android.patch new file mode 100644 index 000000000000..f9a52f02c4d1 --- /dev/null +++ b/cairo/pixman-0.24.0.android.patch @@ -0,0 +1,13 @@ +--- misc/pixman-0.24.0/ltmain.sh ++++ misc/build/pixman-0.24.0/ltmain.sh +@@ -3228,6 +3228,10 @@ + fi + else + ++ # Force no versioning suffix for Android ++ ++ version_type=none ++ + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 diff --git a/cairo/pixman-0.24.0.patch b/cairo/pixman-0.24.0.patch index 0611962a96d5..61ef416ae890 100644 --- a/cairo/pixman-0.24.0.patch +++ b/cairo/pixman-0.24.0.patch @@ -69,12 +69,21 @@ GPGKEY = 6FF7C1A8 --- misc/pixman-0.24.0/config.sub 2008-08-30 00:27:25.000000000 +0200 +++ misc/build/pixman-0.24.0/config.sub 2011-12-16 09:05:14.595773609 +0100 +@@ -120,7 +120,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os @@ -1247,7 +1247,7 @@ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -+ | -udi* | -androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -udi* | -linux-androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ @@ -103,3 +112,14 @@ { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then +--- misc/pixman-0.24.0/pixman/pixman-utils.c ++++ misc/build/pixman-0.24.0/pixman/pixman-utils.c +@@ -27,6 +27,7 @@ + #endif + #include + #include ++#include + + #include "pixman-private.h" + + diff --git a/cairo/pixman/makefile.mk b/cairo/pixman/makefile.mk index df9c795c94eb..dcd489d40a52 100644 --- a/cairo/pixman/makefile.mk +++ b/cairo/pixman/makefile.mk @@ -35,7 +35,7 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE .INCLUDE : settings.mk -.IF "$(SYSTEM_CAIRO)" == "YES" || "$(GUIBASE)" == "android" +.IF "$(SYSTEM_CAIRO)" == "YES" all: @echo "Not building pixman." @@ -52,6 +52,10 @@ ADDITIONAL_FILES=Makefile.win32.common PATCH_FILES=..$/$(TARFILE_NAME).patch +.IF "$(OS)"=="ANDROID" +PATCH_FILES+=..$/$(TARFILE_NAME).android.patch +.ENDIF + # Note: we are building static pixman library to avoid linking problems. # However, for Unix dynamic library must be used (especially due to 64bit issues) @@ -121,15 +125,32 @@ pixman_CFLAGS+=-fPIC CONFIGURE_DIR= CONFIGURE_ACTION=.$/configure + .IF "$(OS)"=="IOS" CONFIGURE_FLAGS=--disable-shared .ELSE CONFIGURE_FLAGS=--disable-static .ENDIF + CONFIGURE_FLAGS+=CFLAGS="$(pixman_CFLAGS)" + +.IF "$(OS)"=="ANDROID" + +# The pixman-cpu.c code wants to read /proc//auxv, but +# the Android headers don't define Elf32_auxv_t. + +# Maybe we should instead just patch the arm_has_* booleans in +# pixman-cpu.c to be hardcoded as TRUE and patch out the run-time +# check? + +CONFIGURE_FLAGS+=--disable-arm-simd --disable-arm-neon --disable-arm-iwmmxt + +.ENDIF + .IF "$(CROSS_COMPILING)"=="YES" CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) .ENDIF + BUILD_ACTION=$(GNUMAKE) BUILD_FLAGS+= -j$(EXTMAXPROCESS) BUILD_DIR=$(CONFIGURE_DIR) @@ -150,7 +171,7 @@ OUT2LIB+=pixman$/.libs$/*.a .ELSE OUT2LIB+=pixman$/release$/*.lib .ENDIF -.ELIF "$(OS)"=="IOS" || "$(OS)"=="ANDROID" +.ELIF "$(OS)"=="IOS" OUT2LIB+=pixman$/.libs$/libpixman-1.a .ELSE OUT2LIB+=pixman$/.libs$/libpixman-1.so* -- cgit