[Android] Add a contrib patch for libxml and activate it in the build

Jean-Baptiste Kempf git at videolan.org
Mon May 28 18:10:20 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May 28 18:09:12 2012 +0200| [e1a09be945323f50b0117b3bd1800c612157bceb] | committer: Jean-Baptiste Kempf

Add a contrib patch for libxml and activate it in the build

Please test

We should find something a bit less big than libxml

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=e1a09be945323f50b0117b3bd1800c612157bceb
---

 configure.sh                                       |    2 +-
 ...bxml-pthread_join-is-not-necessarily-in-l.patch |   54 ++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/configure.sh b/configure.sh
index cd280a7..a1f2d0b 100755
--- a/configure.sh
+++ b/configure.sh
@@ -95,7 +95,7 @@ sh $VLC_SOURCEDIR/configure --host=arm-linux-androideabi --build=x86_64-unknown-
                 --disable-svg \
                 --disable-sqlite \
                 --disable-udev \
-                --disable-libxml2 \
+                --enable-libxml2 \
                 --disable-caca \
                 --disable-glx \
                 --disable-egl \
diff --git a/patches/0005-Contribs-libxml-pthread_join-is-not-necessarily-in-l.patch b/patches/0005-Contribs-libxml-pthread_join-is-not-necessarily-in-l.patch
new file mode 100644
index 0000000..8fa3833
--- /dev/null
+++ b/patches/0005-Contribs-libxml-pthread_join-is-not-necessarily-in-l.patch
@@ -0,0 +1,54 @@
+From 0abdb29d31b0cba5c5173b4fc2b019da2dec965e Mon Sep 17 00:00:00 2001
+From: Jean-Baptiste Kempf <jb at videolan.org>
+Date: Mon, 28 May 2012 18:08:05 +0200
+Subject: [PATCH 5/5] Contribs: libxml, pthread_join is not necessarily in
+ -lpthread
+
+---
+ contrib/src/libxml2/pthread.patch |   13 +++++++++++++
+ contrib/src/libxml2/rules.mak     |    5 ++++-
+ 2 files changed, 17 insertions(+), 1 deletion(-)
+ create mode 100644 contrib/src/libxml2/pthread.patch
+
+diff --git a/contrib/src/libxml2/pthread.patch b/contrib/src/libxml2/pthread.patch
+new file mode 100644
+index 0000000..6f1f3e2
+--- /dev/null
++++ b/contrib/src/libxml2/pthread.patch
+@@ -0,0 +1,13 @@
++--- libxml2/configure.in	2010-11-04 18:01:19.000000000 +0100
+++++ libxml2.new/configure.in	2012-05-28 18:04:08.674242358 +0200
++@@ -914,8 +914,8 @@
++     dnl Use pthread by default
++     if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
++         AC_CHECK_HEADER(pthread.h,
++-	    AC_CHECK_LIB(pthread, pthread_join,[
++-	       THREAD_LIBS="-lpthread"
+++	    AC_CHECK_FUNC( pthread_join,[
+++	       THREAD_LIBS=""
++ 	       AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
++ 	       AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
++ 	       WITH_THREADS="1"]))
+diff --git a/contrib/src/libxml2/rules.mak b/contrib/src/libxml2/rules.mak
+index cf81b62..eee251a 100644
+--- a/contrib/src/libxml2/rules.mak
++++ b/contrib/src/libxml2/rules.mak
+@@ -13,11 +13,14 @@ $(TARBALLS)/libxml2-$(LIBXML2_VERSION).tar.gz:
+ 
+ .sum-libxml2: libxml2-$(LIBXML2_VERSION).tar.gz
+ 
+-XMLCONF = --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp  --without-debug --without-docbook --without-regexps --without-python
++XMLCONF = --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp  --without-debug --without-docbook --without-regexps --without-python --with-threads
+ 
+ libxml2: libxml2-$(LIBXML2_VERSION).tar.gz .sum-libxml2
+ 	$(UNPACK)
+ 	$(APPLY) $(SRC)/libxml2/no-tests.patch
++ifdef HAVE_ANDROID
++	$(APPLY) $(SRC)/libxml2/pthread.patch
++endif
+ 	$(MOVE)
+ 
+ .libxml2: libxml2
+-- 
+1.7.10.2
+



More information about the Android mailing list