[Android] [PATCH 2/4] android: build libass and dependencies
Rafaël Carré
funman at videolan.org
Mon Mar 5 00:20:03 CET 2012
Le 2012-03-04 18:13, Rafaël Carré a écrit :
> From: tewilove <tewilove at gmail.com>
>
> Modified-by: funman (replace config.* patch by UPDATE_AUTOCONFIG)
> ---
> contrib/src/ass/rules.mak | 9 +++++++
> contrib/src/iconv/libiconv-android.patch | 38 ++++++++++++++++++++++++++++++
> contrib/src/iconv/rules.mak | 4 +++
> extras/package/android/configure.sh | 4 +-
> 4 files changed, 53 insertions(+), 2 deletions(-)
> create mode 100644 contrib/src/iconv/libiconv-android.patch
>
> diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
> index 8e6dae4..8583f8e 100644
> --- a/contrib/src/ass/rules.mak
> +++ b/contrib/src/ass/rules.mak
> @@ -16,10 +16,19 @@ libass: libass-$(ASS_VERSION).tar.gz .sum-ass
> $(UNPACK)
> $(MOVE)
>
> +ifndef HAVE_ANDROID
> DEPS_ass = freetype2 $(DEPS_freetype2) fontconfig $(DEPS_fontconfig) fribidi
> +else
> +DEPS_ass = freetype2 $(DEPS_freetype2) fribidi
> +endif
It could probably use a comment to say why fontconfig is disabled
because it was not obvious to me.
> .ass: libass
> #$(RECONF)
> +ifndef HAVE_ANDROID
> cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3" ./configure $(HOSTCONF) --disable-enca
> +else
> + $(RECONF)
Reconf should not be optional but run for all platforms or none.
Why do you need it? Perhaps UPDATE_AUTOCONFIG is enough.
> + cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3" ./configure $(HOSTCONF) --disable-enca --disable-fontconfig
> +endif
> cd $< && $(MAKE) install
> touch $@
> diff --git a/contrib/src/iconv/libiconv-android.patch b/contrib/src/iconv/libiconv-android.patch
> new file mode 100644
> index 0000000..7435cba
> --- /dev/null
> +++ b/contrib/src/iconv/libiconv-android.patch
> @@ -0,0 +1,38 @@
> +--- libiconv/Makefile.in 2009-06-21 19:17:33.000000000 +0800
> ++++ libiconv/Makefile.in 2011-10-13 22:51:46.000000000 +0800
> +@@ -32,11 +32,6 @@ SHELL = /bin/sh
> + all : lib/localcharset.h force
> + cd lib && $(MAKE) all
> + cd preload && $(MAKE) all
> +- cd srclib && $(MAKE) all
> +- cd src && $(MAKE) all
> +- cd po && $(MAKE) all
> +- cd man && $(MAKE) all
> +- if test -d tests; then cd tests && $(MAKE) all; fi
> +
> + lib/localcharset.h :
> + builddir="`pwd`"; cd libcharset && $(MAKE) all && $(MAKE) install-lib libdir="$$builddir/lib" includedir="$$builddir/lib"
> +@@ -52,23 +47,16 @@ install : lib/localcharset.h force
> + cd libcharset && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + cd preload && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> +- cd srclib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> +- cd src && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
> + $(INSTALL_DATA) include/iconv.h.inst $(DESTDIR)$(includedir)/iconv.h
> +- cd po && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
> +- cd man && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
> +
> + install-strip : lib/localcharset.h force
> + cd libcharset && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + cd lib && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + cd preload && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + cd srclib && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> +- cd src && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> + if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
> + $(INSTALL_DATA) include/iconv.h.inst $(DESTDIR)$(includedir)/iconv.h
> +- cd po && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
> +- cd man && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
> +
> + installdirs : force
> + cd libcharset && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
> diff --git a/contrib/src/iconv/rules.mak b/contrib/src/iconv/rules.mak
> index 5c6e2b9..f234590 100644
> --- a/contrib/src/iconv/rules.mak
> +++ b/contrib/src/iconv/rules.mak
> @@ -23,6 +23,10 @@ ifdef HAVE_WINCE
> $(APPLY) $(SRC)/iconv/libiconv-wince.patch
> $(APPLY) $(SRC)/iconv/libiconv-wince-hack.patch
> endif
> +ifdef HAVE_ANDROID
> + $(APPLY) $(SRC)/iconv/libiconv-android.patch
> +endif
> + $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && cp config.guess config.sub libcharset/build-aux && mv config.guess config.sub build-aux
> $(MOVE)
>
> .iconv: iconv
This should be committed separately.
I don't know how iconv source is split, why do you skip src/ and srclib/
directories?
By the way this should solve the bug with MMS access mentioned on the list.
> diff --git a/extras/package/android/configure.sh b/extras/package/android/configure.sh
> index 64acd0d..920598b 100755
> --- a/extras/package/android/configure.sh
> +++ b/extras/package/android/configure.sh
> @@ -89,8 +89,8 @@ sh $VLC_SOURCEDIR/configure --host=arm-linux-androideabi --build=x86_64-unknown-
> --disable-mtp \
> --enable-taglib \
> --disable-notify \
> - --disable-freetype \
> - --disable-libass \
> + --enable-freetype \
> + --enable-libass \
> --disable-svg \
> --disable-sqlite \
> --disable-udev \
OK of course.
BTW This script should move to vlc-android repo, so when we enable a new
lib we modify:
- configure.sh
- compile.sh
- Android.mk
all at the same time.
More information about the Android
mailing list