[Libreoffice-commits] .: cairo/cairo cairo/cairo-1.10.2.android.patch cairo/cairo-1.10.2.patch cairo/pixman cairo/pixman-0.24.0.android.patch cairo/pixman-0.24.0.patch configure.in

Tor Lillqvist tml at kemper.freedesktop.org
Fri Dec 16 14:43:28 PST 2011


 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 +++++++++++++++++++++++--
 configure.in                      |    6 +-----
 7 files changed, 106 insertions(+), 14 deletions(-)

New commits:
commit 2800d3366c75fb5eb13dd1a5270bf9c5fa8684ec
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Sat Dec 17 00:36:11 2011 +0200

    Do build cairo for Android, will likely be needed

diff --git a/cairo/cairo-1.10.2.android.patch b/cairo/cairo-1.10.2.android.patch
new file mode 100644
index 0000000..bd4438b
--- /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 533efdf..195af16 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 ccad5b4..0eaef24 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 0000000..f9a52f0
--- /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 0611962..61ef416 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 <stdio.h>
+ #include <stdlib.h>
++#include <limits.h>
+ 
+ #include "pixman-private.h"
+ 
+
diff --git a/cairo/pixman/makefile.mk b/cairo/pixman/makefile.mk
index df9c795..dcd489d 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/<pid>/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*
diff --git a/configure.in b/configure.in
index 44a5af3..433c523 100644
--- a/configure.in
+++ b/configure.in
@@ -8800,11 +8800,7 @@ if test "$with_system_cairo" = "yes"; then
 else
     AC_MSG_RESULT([no])
 
-    if test $_os = Android; then
-        dnl For Android cairo isn't
-        dnl buildable yet.
-        :
-    elif test $_os = WINNT; then
+    if test $_os = WINNT; then
         dnl We only need cairo for Windows if we
         dnl build librsvg or directx disabled
         if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then


More information about the Libreoffice-commits mailing list