diff options
author | Justin Kim <justin.kim@collabora.com> | 2017-11-08 20:18:34 +0900 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-05-16 10:09:49 +0530 |
commit | 1a456a9f9c11d613aefcaeafb374bcac685536b1 (patch) | |
tree | e1270b6cd9091b52a1e994c774a2a3fb8db214b0 | |
parent | b205ed85e19e4d7e17af16249991b2f454579695 (diff) |
Use proxy-libintl for Android and iOS
base-system:
Remove gettext if Android or iOS
gettext:
Remove runtime_deps if Android or iOS
glib:
An option `--enable-proxy-libintl` is added to use
proxy-libintl instead of gettext.
libsoup:
Do not check intl version in configure.ac
https://bugzilla.gnome.org/show_bug.cgi?id=788273
-rw-r--r-- | packages/base-system-1.0.package | 4 | ||||
-rw-r--r-- | recipes/gettext.recipe | 3 | ||||
-rw-r--r-- | recipes/glib.recipe | 8 | ||||
-rw-r--r-- | recipes/glib/0001-configure.ac-add-enable-proxy-libintl.patch | 61 | ||||
-rw-r--r-- | recipes/libsoup.recipe | 3 | ||||
-rw-r--r-- | recipes/libsoup/0001-configure.ac-Don-t-check-intltool-version.patch | 39 |
6 files changed, 112 insertions, 6 deletions
diff --git a/packages/base-system-1.0.package b/packages/base-system-1.0.package index 89a3ce0d..71ad028e 100644 --- a/packages/base-system-1.0.package +++ b/packages/base-system-1.0.package @@ -23,9 +23,9 @@ class Package(custom.GStreamer, package.Package): 'mingw-runtime', 'bionic-fixup:libs'], Platform.DARWIN: ['gettext:libs:lang', 'bionic-fixup:libs'], Platform.LINUX: [], - Platform.ANDROID: ['gettext:libs:lang', 'libiconv:libs:lang', 'gnustl', + Platform.ANDROID: ['proxy-libintl:libs:lang', 'libiconv:libs:lang', 'gnustl', 'bionic-fixup:libs'], - Platform.IOS: ['gettext:libs:lang', 'bionic-fixup:libs'] + Platform.IOS: ['proxy-libint:libs:lang', 'bionic-fixup:libs'] } def prepare(self): diff --git a/recipes/gettext.recipe b/recipes/gettext.recipe index d7043b19..eedd8fdf 100644 --- a/recipes/gettext.recipe +++ b/recipes/gettext.recipe @@ -13,7 +13,6 @@ class Recipe(recipe.Recipe): 'gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch', 'gettext/0001-Fix-build-invalid-instruction-on-macOS-10.13.patch' ] platform_deps = { - Platform.ANDROID: ['libiconv'], Platform.WINDOWS: ['mingw-runtime'], } @@ -26,6 +25,6 @@ class Recipe(recipe.Recipe): self.make_install = 'cd %s && make PACKAGE=gettext-tools install' % intl_path if self.config.target_platform == Platform.WINDOWS: self.configure_options += ' --enable-threads=win32' - if self.config.target_platform != Platform.LINUX: + if self.config.target_platform not in [Platform.LINUX, Platform.ANDROID, Platform.IOS]: self.runtime_dep = True self.append_env['CFLAGS'] = '-Dlocale_charset=intl_locale_charset' diff --git a/recipes/glib.recipe b/recipes/glib.recipe index 13b92a30..6707f0e1 100644 --- a/recipes/glib.recipe +++ b/recipes/glib.recipe @@ -38,7 +38,8 @@ class Recipe(recipe.Recipe): 'glib/0009-Implementation-of-Cocoa-event-loop-integration-in-GM.patch', 'glib/0010-GSocket-Fix-race-conditions-on-Win32-if-multiple-thr.patch', 'glib/0013-gmain-Fix-erroneous-if-condition-when-dtrace-is-disa.patch', - 'glib/0001-gmodule-Use-RTLD_DEFAULT-if-defined-__BIONIC__.patch' + 'glib/0001-gmodule-Use-RTLD_DEFAULT-if-defined-__BIONIC__.patch', + 'glib/0001-configure.ac-add-enable-proxy-libintl.patch' ] files_libs = [ @@ -107,6 +108,8 @@ class Recipe(recipe.Recipe): # gives us compiler errors :) self.append_env['CFLAGS'] = ' -DNVALGRIND=1 ' if self.config.target_platform == Platform.ANDROID: + self.deps += ['proxy-libintl'] + self.configure_options += ' --enable-proxy-libintl' # Hack to fix building of the glib/tests/private test self.make = '%s private_LDFLAGS=""' % self.make v = DistroVersion.get_android_api_version(self.config.target_distro_version) @@ -131,6 +134,9 @@ class Recipe(recipe.Recipe): arch = 'arm' extra_flags = '' if self.config.target_platform == Platform.IOS: + self.deps += ['proxy-libintl'] + self.configure_options += ' --enable-proxy-libintl' + # Disable mac OS X specifics extra_flags = '-DGST_SDK_IOS=1' self.configure_options += ' --disable-carbon --disable-modular-tests --disable-cocoa' diff --git a/recipes/glib/0001-configure.ac-add-enable-proxy-libintl.patch b/recipes/glib/0001-configure.ac-add-enable-proxy-libintl.patch new file mode 100644 index 00000000..a502a795 --- /dev/null +++ b/recipes/glib/0001-configure.ac-add-enable-proxy-libintl.patch @@ -0,0 +1,61 @@ +From 941a8a5432ef70fdf257eae33cf3f2254447fe76 Mon Sep 17 00:00:00 2001 +From: Justin Kim <justin.kim@collabora.com> +Date: Wed, 8 Nov 2017 15:14:40 +0900 +Subject: [PATCH] configure.ac: add --enable-proxy-libintl + +--- + Makefile.am | 4 ++++ + configure.ac | 14 ++++++++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index b9accad..fdd4e34 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,7 +6,11 @@ include $(top_srcdir)/glib.mk + + ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} + ++if PROXY_LIBINTL ++SUBDIRS = . m4macros glib gmodule gthread gobject gio docs tests ++else + SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs tests ++endif + DIST_SUBDIRS = $(SUBDIRS) build win32 + + bin_SCRIPTS = glib-gettextize +diff --git a/configure.ac b/configure.ac +index 2cf402c..d73c254 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -478,6 +478,17 @@ dnl + dnl gettext support + dnl + ++AC_ARG_ENABLE(proxy-libintl, ++ [AS_HELP_STRING([--enable-proxy-libintl], ++ [build with proxy-libintl])],, ++ [enable_proxy_libintl=yes]) ++ ++AS_IF([ test "x$enable_proxy_libintl" = "xyes"], [ ++ AC_DEFINE(HAVE_GETTEXT,1, "") ++ AC_DEFINE(ENABLE_NLS,1, "") ++ INTLLIBS="-lintl" ++],[ ++ + ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`" + AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) + GLIB_GNU_GETTEXT +@@ -489,6 +500,9 @@ if test "$gt_cv_have_gettext" != "yes" ; then + ]) + fi + ++]) ++AM_CONDITIONAL(PROXY_LIBINTL, [test "$enable_proxy_libintl" = "yes"]) ++ + LIBS="$INTLLIBS $LIBS" + + GETTEXT_PACKAGE=glib20 +-- +2.14.3 (Apple Git-98) + diff --git a/recipes/libsoup.recipe b/recipes/libsoup.recipe index d9f9f393..70e08938 100644 --- a/recipes/libsoup.recipe +++ b/recipes/libsoup.recipe @@ -13,7 +13,8 @@ class Recipe(recipe.Recipe): --disable-always-build-tests --disable-glibtest --disable-installed-tests' deps = ['libxml2', 'glib', 'glib-networking'] patches = ['libsoup/0001-Rip-out-sqlite-based-cookie-storage.patch', - 'libsoup/0001-build-Fix-enumtypes-on-MinGW-inside-MSYS-Windows.patch'] + 'libsoup/0001-build-Fix-enumtypes-on-MinGW-inside-MSYS-Windows.patch', + 'libsoup/0001-configure.ac-Don-t-check-intltool-version.patch' ] files_libs = ['libsoup-2.4'] files_devel = ['include/libsoup-2.4', 'lib/pkgconfig/libsoup-2.4.pc'] diff --git a/recipes/libsoup/0001-configure.ac-Don-t-check-intltool-version.patch b/recipes/libsoup/0001-configure.ac-Don-t-check-intltool-version.patch new file mode 100644 index 00000000..7d16bb51 --- /dev/null +++ b/recipes/libsoup/0001-configure.ac-Don-t-check-intltool-version.patch @@ -0,0 +1,39 @@ +From 935d1879779b745750d8845c03d6bbebe2950eca Mon Sep 17 00:00:00 2001 +From: Justin Kim <justin.kim@collabora.com> +Date: Fri, 23 Feb 2018 23:00:11 +0900 +Subject: [PATCH] configure.ac: Don't check intltool version + +Signed-off-by: Justin Kim <justin.kim@collabora.com> +--- + Makefile.am | 2 +- + configure.ac | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 38d2872..2363d4c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +-SUBDIRS = libsoup po tests examples docs win32 ++SUBDIRS = libsoup tests examples docs win32 + + EXTRA_DIST = \ + data/effective_tld_names.dat \ +diff --git a/configure.ac b/configure.ac +index ace4add..20518e4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -121,7 +121,6 @@ AM_CONDITIONAL(OS_LINUX, [test $os_linux = yes]) + dnl ************************ + dnl *** gettext/intltool *** + dnl ************************ +-IT_PROG_INTLTOOL([0.35.0]) + GETTEXT_PACKAGE=libsoup + AC_SUBST([GETTEXT_PACKAGE]) + AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name]) +-- +2.16.2 + |