ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/package/libs/gettext-full/patches/000-relocatable.patch b/package/libs/gettext-full/patches/000-relocatable.patch
new file mode 100644
index 0000000..a95c268
--- /dev/null
+++ b/package/libs/gettext-full/patches/000-relocatable.patch
@@ -0,0 +1,30 @@
+--- a/gettext-tools/misc/autopoint.in
++++ b/gettext-tools/misc/autopoint.in
+@@ -27,7 +27,11 @@ archive_version=@ARCHIVE_VERSION@
+
+ # Set variables
+ # - gettext_datadir directory where the data files are stored.
+-prefix="@prefix@"
++if [ -n "$STAGING_DIR_HOSTPKG" ]; then
++ prefix="$STAGING_DIR_HOSTPKG"
++else
++ prefix="@prefix@"
++fi
+ datarootdir="@datarootdir@"
+ : ${gettext_datadir="@datadir@/gettext"}
+ : ${AUTOM4TE=autom4te}
+--- a/gettext-tools/misc/gettextize.in
++++ b/gettext-tools/misc/gettextize.in
+@@ -27,7 +27,11 @@ archive_version=@ARCHIVE_VERSION@
+
+ # Set variables
+ # - gettext_datadir directory where the data files are stored.
+-prefix="@prefix@"
++if [ -n "$STAGING_DIR_HOSTPKG" ]; then
++ prefix="$STAGING_DIR_HOSTPKG"
++else
++ prefix="@prefix@"
++fi
+ datarootdir="@datarootdir@"
+ : ${gettext_datadir="@datadir@/gettext"}
+ : ${AUTOM4TE=autom4te}
diff --git a/package/libs/gettext-full/patches/001-autotools.patch b/package/libs/gettext-full/patches/001-autotools.patch
new file mode 100644
index 0000000..7e1f005
--- /dev/null
+++ b/package/libs/gettext-full/patches/001-autotools.patch
@@ -0,0 +1,24 @@
+--- a/gettext-runtime/man/Makefile.am
++++ b/gettext-runtime/man/Makefile.am
+@@ -176,8 +176,7 @@ textdomain.3.html: textdomain.3.in
+ bindtextdomain.3.html: bindtextdomain.3.in
+ bind_textdomain_codeset.3.html: bind_textdomain_codeset.3.in
+
+-install-html-local:
+- $(MKDIR_P) $(DESTDIR)$(htmldir)
++install-html: installdirs-html
+ for file in $(man_HTML); do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
+--- a/gettext-tools/man/Makefile.am
++++ b/gettext-tools/man/Makefile.am
+@@ -158,8 +158,7 @@ recode-sr-latin.1.html: recode-sr-latin.
+ gettextize.1.html: gettextize.1
+ autopoint.1.html: autopoint.1
+
+-install-html-local:
+- $(MKDIR_P) $(DESTDIR)$(htmldir)
++install-html: installdirs-html
+ for file in $(man_HTML); do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
diff --git a/package/libs/gettext-full/patches/100-libxml-no-force-included.patch b/package/libs/gettext-full/patches/100-libxml-no-force-included.patch
new file mode 100644
index 0000000..af5c0a4
--- /dev/null
+++ b/package/libs/gettext-full/patches/100-libxml-no-force-included.patch
@@ -0,0 +1,31 @@
+--- a/libtextstyle/gnulib-local/modules/libxml.diff
++++ /dev/null
+@@ -1,28 +0,0 @@
+-*** libxml.orig 2018-10-28 14:37:07.007164889 +0100
+---- libxml 2019-02-14 22:19:29.994771110 +0100
+-***************
+-*** 118,124 ****
+- fabs
+-
+- configure.ac:
+-! gl_LIBXML
+-
+- Makefile.am:
+- if INCLUDED_LIBXML
+---- 118,133 ----
+- fabs
+-
+- configure.ac:
+-! # In libtextstyle, we don't want to use an external libxml, because its
+-! # dependencies and their dynamic relocations have an impact on the startup
+-! # time of a program that is linked with it. As you can see by using
+-! # 'readelf -r ... | wc -l' and 'readelf -d ... | grep NEEDED':
+-! # - libxml2.so has more than 3300 relocations and depends on libicuuc.
+-! # - libicuuc.so has more than 4900 relocations and depends on libstdc++.
+-! # - libstdc++.so has more than 4600 relocations.
+-! # These are more than 12800 relocations, to perform at program startup.
+-! # So, force the use of the included libxml part.
+-! gl_LIBXML([yes])
+-
+- Makefile.am:
+- if INCLUDED_LIBXML
diff --git a/package/libs/gettext-full/patches/200-libunistring-missing-link.patch b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
new file mode 100644
index 0000000..19a1ae1
--- /dev/null
+++ b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
@@ -0,0 +1,21 @@
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -81,6 +81,7 @@ if ! $skip_gnulib; then
+ getopt-gnu
+ gettext-h
+ havelib
++ libunistring-optional
+ memmove
+ noreturn
+ progname
+--- a/gettext-runtime/src/Makefile.am
++++ b/gettext-runtime/src/Makefile.am
+@@ -43,7 +43,7 @@ envsubst_SOURCES = envsubst.c
+
+ # Link dependencies.
+ # Need @LTLIBICONV@ because striconv.c uses iconv().
+-LDADD = ../gnulib-lib/libgrt.a @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD)
++LDADD = ../gnulib-lib/libgrt.a $(LTLIBUNISTRING) @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD)
+
+ # Specify installation directory, for --enable-relocatable.
+ gettext_CFLAGS = -DINSTALLDIR=\"$(bindir)\"