From c9f8b48ddae0c951fe4df99fda062526160c0a9f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 17 Dec 2019 17:00:09 +0100 Subject: gettext: update to 0.20.1 License-Update: URLs changed from http to https Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../gettext-0.19.8.1/add-with-bisonlocaledir.patch | 58 -- ...atement.c-timsort.h-fix-formatting-issues.patch | 87 --- .../gettext-0.19.8.1/fix-CVE-2018-18751.patch | 141 ---- .../gettext/gettext-0.19.8.1/parallel.patch | 23 - .../gettext/gettext-0.19.8.1/run-ptest | 6 - .../gettext-0.19.8.1/serial-tests-config.patch | 58 -- .../gettext/gettext-0.19.8.1/use-pkgconfig.patch | 321 ---------- .../gettext-0.20.1/add-with-bisonlocaledir.patch | 58 ++ ...atement.c-timsort.h-fix-formatting-issues.patch | 71 ++ .../gettext/gettext-0.20.1/parallel.patch | 32 + meta/recipes-core/gettext/gettext-0.20.1/run-ptest | 6 + .../gettext-0.20.1/serial-tests-config.patch | 56 ++ .../gettext/gettext-0.20.1/use-pkgconfig.patch | 713 +++++++++++++++++++++ meta/recipes-core/gettext/gettext_0.19.8.1.bb | 188 ------ meta/recipes-core/gettext/gettext_0.20.1.bb | 187 ++++++ 15 files changed, 1123 insertions(+), 882 deletions(-) delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/parallel.patch create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/run-ptest create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch delete mode 100644 meta/recipes-core/gettext/gettext_0.19.8.1.bb create mode 100644 meta/recipes-core/gettext/gettext_0.20.1.bb diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch deleted file mode 100644 index 35a131067a..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 04bd40fe2c48c6e01ab418a04d27c4aff644ad96 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Wed, 17 Feb 2016 23:54:02 -0500 -Subject: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign - BISON_LOCALEDIR - -The variable BISON_LOCALEDIR is assigned only by the output of -'bison --print-localedir', we add option --with-bisonlocaledir -to assign it explicitly. It is helpful for user to split the -native compile and cross compile. - -For backward compatibility, if option not used, it still -make use of the output of 'bison --print-localedir'. - -Upstream-Status: Submitted [bison-patches@gnu.org] - -Signed-off-by: Hongxu Jia ---- - gettext-tools/gnulib-m4/bison-i18n.m4 | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/gettext-tools/gnulib-m4/bison-i18n.m4 b/gettext-tools/gnulib-m4/bison-i18n.m4 -index f5cfd3a..fb6ac4d 100644 ---- a/gettext-tools/gnulib-m4/bison-i18n.m4 -+++ b/gettext-tools/gnulib-m4/bison-i18n.m4 -@@ -14,11 +14,16 @@ dnl sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files - dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all. - AC_DEFUN([BISON_I18N], - [ -+ dnl Default is not to set bisonlocaledir -+ AC_ARG_WITH([bisonlocaledir], -+ [ --with-bisonlocaledir sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files], -+ BISON_LOCALEDIR=$withval, -+ BISON_LOCALEDIR=) -+ - if test -z "$USE_NLS"; then - echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2 - exit 1 - fi -- BISON_LOCALEDIR= - BISON_USE_NLS=no - if test "$USE_NLS" = yes; then - dnl Determine bison's localedir. -@@ -26,9 +31,10 @@ AC_DEFUN([BISON_I18N], - dnl But even is YACC is called "yacc", it may be a script that invokes bison - dnl and accepts the --print-localedir option. - dnl YACC's default value is empty; BISON's default value is :. -- if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then -+ if test -z "$BISON_LOCALEDIR" -a ${YACC-${BISON-:}} --print-localedir >/dev/null 2>&1; then - BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir` - fi -+ AC_MSG_RESULT([$BISON_LOCALEDIR]) - AC_SUBST([BISON_LOCALEDIR]) - if test -n "$BISON_LOCALEDIR"; then - dnl There is no need to enable internationalization if the user doesn't --- -1.9.1 - diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch deleted file mode 100644 index 6af1604198..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Sun, 19 Feb 2017 23:32:46 -0800 -Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues - -Fixed when compile with "-Wformat -Wformat-security -Werror=format-security": -| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset': -| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security] -| fprintf (a_fp, str) ; - -And: -gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] - fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); - -Upstream-Status: Pending - -Signed-off-by: Robert Yang ---- - gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++----- - gettext-tools/gnulib-lib/libxml/timsort.h | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c -index 617520f..100104b 100644 ---- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c -+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c -@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent) - g_return_if_fail (a_fp && a_this); - str = cr_statement_ruleset_to_string (a_this, a_indent); - if (str) { -- fprintf (a_fp, str); -+ fprintf (a_fp, "%s", str); - g_free (str); - str = NULL; - } -@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent) - str = cr_statement_charset_to_string (a_this, - a_indent) ; - if (str) { -- fprintf (a_fp, str) ; -+ fprintf (a_fp, "%s", str) ; - g_free (str) ; - str = NULL ; - } -@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent) - - str = cr_statement_at_page_rule_to_string (a_this, a_indent) ; - if (str) { -- fprintf (a_fp, str); -+ fprintf (a_fp, "%s", str); - g_free (str) ; - str = NULL ; - } -@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this, - - str = cr_statement_media_rule_to_string (a_this, a_indent) ; - if (str) { -- fprintf (a_fp, str) ; -+ fprintf (a_fp, "%s", str) ; - g_free (str) ; - str = NULL ; - } -@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp, - - str = cr_statement_import_rule_to_string (a_this, a_indent) ; - if (str) { -- fprintf (a_fp, str) ; -+ fprintf (a_fp, "%s", str) ; - g_free (str) ; - str = NULL ; - } -diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h -index 795f272..443918a 100644 ---- a/gettext-tools/gnulib-lib/libxml/timsort.h -+++ b/gettext-tools/gnulib-lib/libxml/timsort.h -@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size) - SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE)); - if (tempstore == NULL) - { -- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); -+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size); - exit(1); - } - store->storage = tempstore; --- -2.10.2 - diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted file mode 100644 index 6dfe200d65..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch +++ /dev/null @@ -1,141 +0,0 @@ -Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=dce3a16] -CVE: CVE-2018-18751 - -Signed-off-by: Kai Kang - -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno -Date: Thu, 15 Sep 2016 13:57:24 +0200 -Subject: [PATCH] xgettext: Fix crash with *.po file input - -When xgettext was given two *.po files with the same msgid_plural, it -crashed with double-free. Problem reported by Davlet Panech in: -http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html -* gettext-tools/src/po-gram-gen.y: Don't free msgid_pluralform after -calling do_callback_message, assuming that it takes ownership. -* gettext-tools/src/read-catalog.c (default_add_message): Free -msgid_plural after calling message_alloc. -* gettext-tools/tests/xgettext-po-2: New file. -* gettext-tools/tests/Makefile.am (TESTS): Add new test. ---- - gettext-tools/src/po-gram-gen.y | 13 ++++----- - gettext-tools/src/read-catalog.c | 2 ++ - gettext-tools/tests/Makefile.am | 2 +- - gettext-tools/tests/xgettext-po-2 | 55 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 63 insertions(+), 9 deletions(-) - create mode 100755 gettext-tools/tests/xgettext-po-2 - -diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y -index becf5e6..4428e77 100644 ---- a/gettext-tools/src/po-gram-gen.y -+++ b/gettext-tools/src/po-gram-gen.y -@@ -221,14 +221,11 @@ message - check_obsolete ($1, $3); - check_obsolete ($1, $4); - if (!$1.obsolete || pass_obsolete_entries) -- { -- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -- $1.prev_ctxt, -- $1.prev_id, $1.prev_id_plural, -- $1.obsolete); -- free ($3.string); -- } -+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -+ $1.prev_ctxt, -+ $1.prev_id, $1.prev_id_plural, -+ $1.obsolete); - else - { - free_message_intro ($1); -diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c -index 571d18e..6af6d20 100644 ---- a/gettext-tools/src/read-catalog.c -+++ b/gettext-tools/src/read-catalog.c -@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, - appropriate. */ - mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, - msgstr_pos); -+ if (msgid_plural != NULL) -+ free (msgid_plural); - mp->prev_msgctxt = prev_msgctxt; - mp->prev_msgid = prev_msgid; - mp->prev_msgid_plural = prev_msgid_plural; -diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am -index 23b09b1..0dfb4d8 100644 ---- a/gettext-tools/tests/Makefile.am -+++ b/gettext-tools/tests/Makefile.am -@@ -95,7 +95,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \ - xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \ - xgettext-perl-5 xgettext-perl-6 xgettext-perl-7 xgettext-perl-8 \ - xgettext-php-1 xgettext-php-2 xgettext-php-3 xgettext-php-4 \ -- xgettext-po-1 \ -+ xgettext-po-1 xgettext-po-2 \ - xgettext-properties-1 \ - xgettext-python-1 xgettext-python-2 xgettext-python-3 \ - xgettext-python-4 \ -diff --git a/gettext-tools/tests/xgettext-po-2 b/gettext-tools/tests/xgettext-po-2 -new file mode 100755 -index 0000000..c4bd9d0 ---- /dev/null -+++ b/gettext-tools/tests/xgettext-po-2 -@@ -0,0 +1,55 @@ -+#! /bin/sh -+. "${srcdir=.}/init.sh"; path_prepend_ . ../src -+ -+# Test PO extractors with multiple input files. -+ -+cat < xg-po-2-1.po -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+cat < xg-po-2-2.po -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${XGETTEXT=xgettext} -+${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po || Exit 1 -+LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1 -+ -+cat < xg-po-2.ok -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${DIFF=diff} -+${DIFF} xg-po-2.ok xg-po-2.po -+result=$? -+ -+exit $result --- -1.9.1 - diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch deleted file mode 100644 index c8e2c94af0..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch +++ /dev/null @@ -1,23 +0,0 @@ -instal libgettextlib.a before removing it - -In a multiple job build, Makefile can simultaneously -be installing and removing libgettextlib.a. We serialize -the operations. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater - ---- a/gettext-tools/gnulib-lib/Makefile.am -+++ b/gettext-tools/gnulib-lib/Makefile.am -@@ -57,6 +57,10 @@ endif - # Rules generated and collected by gnulib-tool. - include Makefile.gnulib - -+# defined in Makefile.gnulib but missing this dependency -+# -+install-exec-clean: install-libLTLIBRARIES -+ - # Which classes to export from the shared library. - MOOPPFLAGS += --dllexport=styled_ostream - diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest b/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest deleted file mode 100644 index f17f3c87a7..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -#This script is used to run gettext test suites -cd tests - -make -k runtest-TESTS top_srcdir=.. srcdir=. abs_srcdir=$PWD top_builddir=$PWD/../ abs_top_srcdir=$PWD/../ | cat diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch deleted file mode 100644 index 31ff9138a9..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +++ /dev/null @@ -1,58 +0,0 @@ -From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001 -From: "Hongjun.Yang" -Date: Thu, 28 Jul 2016 12:36:15 +0800 -Subject: [PATCH] fix for ptest - -Add serial-tests support, ptest need it - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Changqing Li ---- - configure.ac | 2 +- - gettext-runtime/configure.ac | 2 +- - gettext-tools/configure.ac | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5e996fa..880581f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -23,7 +23,7 @@ AC_INIT([gettext], - [bug-gnu-gettext@gnu.org]) - AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) - AC_CONFIG_AUX_DIR([build-aux]) --AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip]) -+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip]) - - dnl Override automake's tar command used for creating distributions. - am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"' -diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac -index e9299b6..d4f5528 100644 ---- a/gettext-runtime/configure.ac -+++ b/gettext-runtime/configure.ac -@@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], - [bug-gnu-gettext@gnu.org]) - AC_CONFIG_SRCDIR([intl/dcigettext.c]) - AC_CONFIG_AUX_DIR([../build-aux]) --AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) -+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) - AC_CONFIG_HEADERS([config.h]) - - dnl Installation directories. -diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac -index 920eeb6..c507434 100644 ---- a/gettext-tools/configure.ac -+++ b/gettext-tools/configure.ac -@@ -22,7 +22,7 @@ AC_INIT([gettext-tools], - [bug-gnu-gettext@gnu.org]) - AC_CONFIG_SRCDIR([src/msgfmt.c]) - AC_CONFIG_AUX_DIR([../build-aux]) --AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) -+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) - AC_CONFIG_HEADERS([config.h]) - - dnl Installation directories. --- -2.1.4 - diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted file mode 100644 index 6156a153f7..0000000000 --- a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch +++ /dev/null @@ -1,321 +0,0 @@ -For reasons which I just can't fathom gnulib doesn't use the expected tools to -find libraries but badly reinvents the wheel. This will trivially lead to host -contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad -canonicalisation resulting in relative paths). - -Simply delete all the crazy, and replace with a single call to pkg-config. - -Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config) -Signed-off-by: Ross Burton - -diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4 -index f79ea82f1..1f67274db 100644 ---- a/gettext-tools/gnulib-m4/libcroco.m4 -+++ b/gettext-tools/gnulib-m4/libcroco.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBCROCO], - [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - dnl libcroco depends on libglib. - AC_REQUIRE([gl_LIBGLIB]) - -@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO], - LTLIBCROCO= - INCCROCO= - if test "$gl_cv_libcroco_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to -- dnl use the included one. -- AC_CACHE_VAL([gl_cv_libcroco], [ -- gl_cv_libcroco=no -- gl_cv_LIBCROCO= -- gl_cv_LTLIBCROCO= -- gl_cv_INCCROCO= -- gl_save_LIBS="$LIBS" -- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and -- dnl INCCROCO_0_6 accordingly. -- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when -- dnl cross-compiling or when the C compiler in use is different from the -- dnl one that built the library. -- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) -- LIBS="$gl_save_LIBS $LIBCROCO_0_6" -- AC_TRY_LINK([#include ], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- ]) -- if test "$gl_cv_libcroco" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" -- AC_TRY_LINK([#include ], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- gl_cv_INCCROCO="$INCCROCO_0_6" -- ]) -- if test "$gl_cv_libcroco" != yes; then -- dnl Often the include files are installed in -- dnl /usr/include/libcroco-0.6/libcroco. -- AC_TRY_LINK([#include ], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) -- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` -- if test -d "$libcroco_include_dir"; then -- gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- gl_cv_INCCROCO="-I$libcroco_include_dir" -- fi -- ]) -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for libcroco]) -- AC_MSG_RESULT([$gl_cv_libcroco]) -- if test $gl_cv_libcroco = yes; then -- LIBCROCO="$gl_cv_LIBCROCO" -- LTLIBCROCO="$gl_cv_LTLIBCROCO" -- INCCROCO="$gl_cv_INCCROCO" -- else -- gl_cv_libcroco_use_included=yes -- fi -+ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) -+ LIBCROCO=$CROCO_LIBS -+ LTLIBCROCO=$CROCO_LIBS -+ INCCROCO=$CROCO_CFLAGS - fi - AC_SUBST([LIBCROCO]) - AC_SUBST([LTLIBCROCO]) -diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4 -index 42e55e6fd..ab25a5b22 100644 ---- a/gettext-tools/gnulib-m4/libglib.m4 -+++ b/gettext-tools/gnulib-m4/libglib.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBGLIB], - [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_MSG_CHECKING([whether included glib is requested]) - AC_ARG_WITH([included-glib], - [ --with-included-glib use the glib2 included here], -@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB], - LTLIBGLIB= - INCGLIB= - if test "$gl_cv_libglib_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use -- dnl the included one. -- AC_CACHE_VAL([gl_cv_libglib], [ -- gl_cv_libglib=no -- gl_cv_LIBGLIB= -- gl_cv_LTLIBGLIB= -- gl_cv_INCGLIB= -- gl_save_LIBS="$LIBS" -- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and -- dnl INCGLIB_2_0 accordingly. -- dnl Don't use glib-config nor pkg-config, since it doesn't work when -- dnl cross-compiling or when the C compiler in use is different from the -- dnl one that built the library. -- AC_LIB_LINKFLAGS_BODY([glib-2.0]) -- LIBS="$gl_save_LIBS $LIBGLIB_2_0" -- AC_TRY_LINK([#include --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- ]) -- if test "$gl_cv_libglib" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" -- AC_TRY_LINK([#include --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- gl_cv_INCGLIB="$INCGLIB_2_0" -- ]) -- if test "$gl_cv_libglib" != yes; then -- dnl Often the include files are installed in /usr/include/glib-2.0 -- dnl and /usr/lib/glib-2.0/include. -- if test -n "$LIBGLIB_2_0_PREFIX"; then -- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" -- AC_TRY_LINK([#include --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" -- ]) -- fi -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for glib]) -- AC_MSG_RESULT([$gl_cv_libglib]) -- if test $gl_cv_libglib = yes; then -- LIBGLIB="$gl_cv_LIBGLIB" -- LTLIBGLIB="$gl_cv_LTLIBGLIB" -- INCGLIB="$gl_cv_INCGLIB" -- else -- gl_cv_libglib_use_included=yes -- fi -+ PKG_CHECK_MODULES([GLIB], [glib-2.0]) -+ LIBGLIB="$GLIB_LIBS" -+ LTLIBGLIB="$GLIB_LIBS" -+ INCGLIB="$GLIB_CFLAGS" - fi - AC_SUBST([LIBGLIB]) - AC_SUBST([LTLIBGLIB]) -diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4 -index 480c700d2..cb39309d5 100644 ---- a/gettext-tools/gnulib-m4/libxml.m4 -+++ b/gettext-tools/gnulib-m4/libxml.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBXML], - [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_REQUIRE([AM_ICONV_LINK]) - - AC_MSG_CHECKING([whether included libxml is requested]) -@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML], - LTLIBXML= - INCXML= - if test "$gl_cv_libxml_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libxml2, or have to use -- dnl the included one. -- AC_CACHE_VAL([gl_cv_libxml], [ -- gl_cv_libxml=no -- gl_cv_LIBXML= -- gl_cv_LTLIBXML= -- gl_cv_INCXML= -- gl_save_LIBS="$LIBS" -- LIBS="$LIBS $LIBICONV" -- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2 -- dnl accordingly. -- dnl Don't use xml2-config nor pkg-config, since it doesn't work when -- dnl cross-compiling or when the C compiler in use is different from the -- dnl one that built the library. -- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x, -- dnl libxml2 is built in such a way that uses of xmlFree work fine with -- dnl -Wl,--enable-auto-import but lead to a link error with -- dnl -Wl,--disable-auto-import. -- AC_LIB_LINKFLAGS_BODY([xml2]) -- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" -- AC_TRY_LINK([#include -- #include -- #include -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- ]) -- if test "$gl_cv_libxml" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCXML2" -- AC_TRY_LINK([#include -- #include -- #include -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- gl_cv_INCXML="$INCXML2" -- ]) -- if test "$gl_cv_libxml" != yes; then -- dnl Often the include files are installed in /usr/include/libxml2. -- dnl In libxml2-2.5, is self-contained. -- dnl In libxml2-2.6, it includes which is -- dnl self-contained. -- libxml2_include_dir= -- AC_TRY_CPP([#include ], -- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) -- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'` -- ]) -- if test -z "$libxml2_include_dir"; then -- AC_TRY_CPP([#include ], -- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) -- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` -- ]) -- fi -- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then -- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" -- AC_TRY_LINK([#include -- #include -- #include -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- gl_cv_INCXML="-I$libxml2_include_dir" -- ]) -- fi -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for libxml]) -- AC_MSG_RESULT([$gl_cv_libxml]) -- if test $gl_cv_libxml = yes; then -- LIBXML="$gl_cv_LIBXML" -- LTLIBXML="$gl_cv_LTLIBXML" -- INCXML="$gl_cv_INCXML" -- else -- gl_cv_libxml_use_included=yes -- fi -+ PKG_CHECK_MODULES([XML], [libxml-2.0]) -+ LIBXML=$XML_LIBS -+ LTLIBXML=$XML_LIBS -+ INCXML=$XML_CFLAGS - fi - AC_SUBST([LIBXML]) - AC_SUBST([LTLIBXML]) -diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c -index 81a407467..218565329 100644 ---- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c -+++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c -@@ -25,4 +25,4 @@ --#include --#include --#include --#include -+#include -+#include -+#include -+#include -@@ -31 +31 @@ --# include -+# include -@@ -33 +33 @@ --#include -+#include diff --git a/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch b/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch new file mode 100644 index 0000000000..35a131067a --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch @@ -0,0 +1,58 @@ +From 04bd40fe2c48c6e01ab418a04d27c4aff644ad96 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 17 Feb 2016 23:54:02 -0500 +Subject: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign + BISON_LOCALEDIR + +The variable BISON_LOCALEDIR is assigned only by the output of +'bison --print-localedir', we add option --with-bisonlocaledir +to assign it explicitly. It is helpful for user to split the +native compile and cross compile. + +For backward compatibility, if option not used, it still +make use of the output of 'bison --print-localedir'. + +Upstream-Status: Submitted [bison-patches@gnu.org] + +Signed-off-by: Hongxu Jia +--- + gettext-tools/gnulib-m4/bison-i18n.m4 | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/gettext-tools/gnulib-m4/bison-i18n.m4 b/gettext-tools/gnulib-m4/bison-i18n.m4 +index f5cfd3a..fb6ac4d 100644 +--- a/gettext-tools/gnulib-m4/bison-i18n.m4 ++++ b/gettext-tools/gnulib-m4/bison-i18n.m4 +@@ -14,11 +14,16 @@ dnl sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files + dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all. + AC_DEFUN([BISON_I18N], + [ ++ dnl Default is not to set bisonlocaledir ++ AC_ARG_WITH([bisonlocaledir], ++ [ --with-bisonlocaledir sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files], ++ BISON_LOCALEDIR=$withval, ++ BISON_LOCALEDIR=) ++ + if test -z "$USE_NLS"; then + echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2 + exit 1 + fi +- BISON_LOCALEDIR= + BISON_USE_NLS=no + if test "$USE_NLS" = yes; then + dnl Determine bison's localedir. +@@ -26,9 +31,10 @@ AC_DEFUN([BISON_I18N], + dnl But even is YACC is called "yacc", it may be a script that invokes bison + dnl and accepts the --print-localedir option. + dnl YACC's default value is empty; BISON's default value is :. +- if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then ++ if test -z "$BISON_LOCALEDIR" -a ${YACC-${BISON-:}} --print-localedir >/dev/null 2>&1; then + BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir` + fi ++ AC_MSG_RESULT([$BISON_LOCALEDIR]) + AC_SUBST([BISON_LOCALEDIR]) + if test -n "$BISON_LOCALEDIR"; then + dnl There is no need to enable internationalization if the user doesn't +-- +1.9.1 + diff --git a/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch new file mode 100644 index 0000000000..0561ed7d32 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch @@ -0,0 +1,71 @@ +From f6245ef5530fc37a6243e798df34162fbbeab6f0 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sun, 19 Feb 2017 23:32:46 -0800 +Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues + +Fixed when compile with "-Wformat -Wformat-security -Werror=format-security": +| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset': +| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security] +| fprintf (a_fp, str) ; + +And: +gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] + fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); + +Upstream-Status: Pending + +Signed-off-by: Robert Yang + +--- + libtextstyle/lib/libcroco/cr-statement.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libtextstyle/lib/libcroco/cr-statement.c b/libtextstyle/lib/libcroco/cr-statement.c +index 617520f..100104b 100644 +--- a/libtextstyle/lib/libcroco/cr-statement.c ++++ b/libtextstyle/lib/libcroco/cr-statement.c +@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent) + g_return_if_fail (a_fp && a_this); + str = cr_statement_ruleset_to_string (a_this, a_indent); + if (str) { +- fprintf (a_fp, str); ++ fprintf (a_fp, "%s", str); + g_free (str); + str = NULL; + } +@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent) + str = cr_statement_charset_to_string (a_this, + a_indent) ; + if (str) { +- fprintf (a_fp, str) ; ++ fprintf (a_fp, "%s", str) ; + g_free (str) ; + str = NULL ; + } +@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent) + + str = cr_statement_at_page_rule_to_string (a_this, a_indent) ; + if (str) { +- fprintf (a_fp, str); ++ fprintf (a_fp, "%s", str); + g_free (str) ; + str = NULL ; + } +@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this, + + str = cr_statement_media_rule_to_string (a_this, a_indent) ; + if (str) { +- fprintf (a_fp, str) ; ++ fprintf (a_fp, "%s", str) ; + g_free (str) ; + str = NULL ; + } +@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp, + + str = cr_statement_import_rule_to_string (a_this, a_indent) ; + if (str) { +- fprintf (a_fp, str) ; ++ fprintf (a_fp, "%s", str) ; + g_free (str) ; + str = NULL ; + } diff --git a/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch new file mode 100644 index 0000000000..d96a376b7d --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch @@ -0,0 +1,32 @@ +From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001 +From: Joe Slater +Date: Thu, 7 Jun 2012 16:37:01 -0700 +Subject: [PATCH] instal libgettextlib.a before removing it + +In a multiple job build, Makefile can simultaneously +be installing and removing libgettextlib.a. We serialize +the operations. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater + +--- + gettext-tools/gnulib-lib/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am +index 2126699..d2dd7e4 100644 +--- a/gettext-tools/gnulib-lib/Makefile.am ++++ b/gettext-tools/gnulib-lib/Makefile.am +@@ -58,6 +58,10 @@ endif + # Rules generated and collected by gnulib-tool. + include Makefile.gnulib + ++# defined in Makefile.gnulib but missing this dependency ++# ++install-exec-clean: install-libLTLIBRARIES ++ + # OS/2 does not support a DLL name longer than 8 characters. + if OS2 + libgettextlib_la_LDFLAGS += -os2dllname gtlib diff --git a/meta/recipes-core/gettext/gettext-0.20.1/run-ptest b/meta/recipes-core/gettext/gettext-0.20.1/run-ptest new file mode 100644 index 0000000000..f17f3c87a7 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh +# +#This script is used to run gettext test suites +cd tests + +make -k runtest-TESTS top_srcdir=.. srcdir=. abs_srcdir=$PWD top_builddir=$PWD/../ abs_top_srcdir=$PWD/../ | cat diff --git a/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch new file mode 100644 index 0000000000..93f7c03334 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch @@ -0,0 +1,56 @@ +From ed64a5724ef7d6eb4e9a876f817ea266a536e195 Mon Sep 17 00:00:00 2001 +From: "Hongjun.Yang" +Date: Thu, 28 Jul 2016 12:36:15 +0800 +Subject: [PATCH] fix for ptest + +Add serial-tests support, ptest need it + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Changqing Li + +--- + configure.ac | 2 +- + gettext-runtime/configure.ac | 2 +- + gettext-tools/configure.ac | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 38db6fd..f019ae0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_INIT([gettext], + [bug-gettext@gnu.org]) + AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) + AC_CONFIG_AUX_DIR([build-aux]) +-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar]) ++AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar]) + + dnl Override automake's tar command used for creating distributions. + am__tar='${AMTAR} chf - --format=ustar --owner=root --group=root "$$tardir"' +diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac +index de203e7..138a07f 100644 +--- a/gettext-runtime/configure.ac ++++ b/gettext-runtime/configure.ac +@@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], + [bug-gettext@gnu.org]) + AC_CONFIG_SRCDIR([intl/dcigettext.c]) + AC_CONFIG_AUX_DIR([../build-aux]) +-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) ++AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) + AC_CONFIG_HEADERS([config.h]) + + dnl Installation directories. +diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac +index cf1dd73..b544d6d 100644 +--- a/gettext-tools/configure.ac ++++ b/gettext-tools/configure.ac +@@ -22,7 +22,7 @@ AC_INIT([gettext-tools], + [bug-gettext@gnu.org]) + AC_CONFIG_SRCDIR([src/msgfmt.c]) + AC_CONFIG_AUX_DIR([../build-aux]) +-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) ++AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) + AC_CONFIG_HEADERS([config.h]) + + dnl Installation directories. diff --git a/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file mode 100644 index 0000000000..d3f3fe8e2f --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch @@ -0,0 +1,713 @@ +From ef414b06be80c6f605731abc9e674e396b80ec9e Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Tue, 23 Jan 2018 00:54:13 +0000 +Subject: [PATCH] gettext: beat library detection into shape + +For reasons which I just can't fathom gnulib doesn't use the expected tools to +find libraries but badly reinvents the wheel. This will trivially lead to host +contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad +canonicalisation resulting in relative paths). + +Simply delete all the crazy, and replace with a single call to pkg-config. + +Upstream-Status: Inappropriate [upstream still refuse to consider pkg-config] +Signed-off-by: Ross Burton + +--- + gettext-tools/gnulib-m4/libxml.m4 | 99 +---------------- + .../gnulib-local/lib/term-styled-ostream.oo.c | 12 +- + libtextstyle/gnulib-local/m4/libcroco.m4 | 99 +++-------------- + libtextstyle/gnulib-local/m4/libglib.m4 | 104 +++--------------- + libtextstyle/gnulib-m4/libcroco.m4 | 99 +++-------------- + libtextstyle/gnulib-m4/libglib.m4 | 104 +++--------------- + libtextstyle/lib/term-styled-ostream.c | 12 +- + libtextstyle/lib/term-styled-ostream.oo.c | 12 +- + 8 files changed, 87 insertions(+), 454 deletions(-) + +diff --git a/gettext-tools/gnulib-m4/libxml.m4 b/gettext-tools/gnulib-m4/libxml.m4 +index 05b9550..031ee65 100644 +--- a/gettext-tools/gnulib-m4/libxml.m4 ++++ b/gettext-tools/gnulib-m4/libxml.m4 +@@ -13,6 +13,7 @@ dnl gl_LIBXML(FORCE-INCLUDED) + dnl forces the use of the included or an external libxml. + AC_DEFUN([gl_LIBXML], + [ ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_REQUIRE([AM_ICONV_LINK]) + + ifelse([$1], , [ +@@ -30,100 +31,10 @@ AC_DEFUN([gl_LIBXML], + INCXML= + ifelse([$1], [yes], , [ + if test "$gl_cv_libxml_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libxml2, or have to use +- dnl the included one. +- AC_CACHE_VAL([gl_cv_libxml], [ +- gl_cv_libxml=no +- gl_cv_LIBXML= +- gl_cv_LTLIBXML= +- gl_cv_INCXML= +- gl_save_LIBS="$LIBS" +- LIBS="$LIBS $LIBICONV" +- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2 +- dnl accordingly. +- dnl Don't use xml2-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x, +- dnl libxml2 is built in such a way that uses of xmlFree work fine with +- dnl -Wl,--enable-auto-import but lead to a link error with +- dnl -Wl,--disable-auto-import. +- AC_LIB_LINKFLAGS_BODY([xml2]) +- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" +- AC_TRY_LINK([#include +- #include +- #include +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- ]) +- if test "$gl_cv_libxml" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCXML2" +- AC_TRY_LINK([#include +- #include +- #include +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- gl_cv_INCXML="$INCXML2" +- ]) +- if test "$gl_cv_libxml" != yes; then +- dnl Often the include files are installed in /usr/include/libxml2. +- dnl In libxml2-2.5, is self-contained. +- dnl In libxml2-2.6, it includes which is +- dnl self-contained. +- libxml2_include_dir= +- AC_TRY_CPP([#include ], +- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) +- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'` +- ]) +- if test -z "$libxml2_include_dir"; then +- AC_TRY_CPP([#include ], +- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) +- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` +- ]) +- fi +- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then +- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" +- AC_TRY_LINK([#include +- #include +- #include +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- gl_cv_INCXML="-I$libxml2_include_dir" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libxml]) +- AC_MSG_RESULT([$gl_cv_libxml]) +- if test $gl_cv_libxml = yes; then +- LIBXML="$gl_cv_LIBXML" +- LTLIBXML="$gl_cv_LTLIBXML" +- INCXML="$gl_cv_INCXML" +- else +- gl_cv_libxml_use_included=yes +- fi ++ PKG_CHECK_MODULES([XML], [libxml-2.0]) ++ LIBXML=$XML_LIBS ++ LTLIBXML=$XML_LIBS ++ INCXML=$XML_CFLAGS + fi + ]) + AC_SUBST([LIBXML]) +diff --git a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c +index 2cfd4a8..d42c8b4 100644 +--- a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c ++++ b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c +@@ -22,15 +22,15 @@ + + #include + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + /* has a broken double-inclusion guard in libcroco-0.6.1. */ + #ifndef __CR_FONTS_H__ +-# include ++# include + #endif +-#include ++#include + + #include "term-ostream.h" + #include "hash.h" +diff --git a/libtextstyle/gnulib-local/m4/libcroco.m4 b/libtextstyle/gnulib-local/m4/libcroco.m4 +index bc53cc6..10b2455 100644 +--- a/libtextstyle/gnulib-local/m4/libcroco.m4 ++++ b/libtextstyle/gnulib-local/m4/libcroco.m4 +@@ -1,99 +1,34 @@ +-# libcroco.m4 serial 3 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libcroco.m4 serial 2 (gettext-0.17) ++dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBCROCO +-dnl gives the user the option to decide whether to use the included or +-dnl an external libcroco. +-dnl gl_LIBCROCO(FORCE-INCLUDED) +-dnl forces the use of the included or an external libcroco. + AC_DEFUN([gl_LIBCROCO], + [ +- ifelse([$1], [yes], , [ +- dnl libcroco depends on libglib. +- AC_REQUIRE([gl_LIBGLIB]) +- ]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ dnl libcroco depends on libglib. ++ AC_REQUIRE([gl_LIBGLIB]) + +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included libcroco is requested]) +- AC_ARG_WITH([included-libcroco], +- [ --with-included-libcroco use the libcroco included here], +- [gl_cv_libcroco_force_included=$withval], +- [gl_cv_libcroco_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libcroco_force_included]) +- ], [gl_cv_libcroco_force_included=$1]) ++ AC_MSG_CHECKING([whether included libcroco is requested]) ++ AC_ARG_WITH([included-libcroco], ++ [ --with-included-libcroco use the libcroco included here], ++ [gl_cv_libcroco_force_included=$withval], ++ [gl_cv_libcroco_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libcroco_force_included]) + + gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" + LIBCROCO= + LTLIBCROCO= + INCCROCO= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libcroco_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to +- dnl use the included one. +- AC_CACHE_VAL([gl_cv_libcroco], [ +- gl_cv_libcroco=no +- gl_cv_LIBCROCO= +- gl_cv_LTLIBCROCO= +- gl_cv_INCCROCO= +- gl_save_LIBS="$LIBS" +- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and +- dnl INCCROCO_0_6 accordingly. +- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) +- LIBS="$gl_save_LIBS $LIBCROCO_0_6" +- AC_TRY_LINK([#include ], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" +- AC_TRY_LINK([#include ], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="$INCCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- dnl Often the include files are installed in +- dnl /usr/include/libcroco-0.6/libcroco. +- AC_TRY_LINK([#include ], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) +- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` +- if test -d "$libcroco_include_dir"; then +- gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="-I$libcroco_include_dir" +- fi +- ]) +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libcroco]) +- AC_MSG_RESULT([$gl_cv_libcroco]) +- if test $gl_cv_libcroco = yes; then +- LIBCROCO="$gl_cv_LIBCROCO" +- LTLIBCROCO="$gl_cv_LTLIBCROCO" +- INCCROCO="$gl_cv_INCCROCO" +- else +- gl_cv_libcroco_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libcroco_use_included" != yes; then ++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) ++ LIBCROCO=$CROCO_LIBS ++ LTLIBCROCO=$CROCO_LIBS ++ INCCROCO=$CROCO_CFLAGS ++ fi + AC_SUBST([LIBCROCO]) + AC_SUBST([LTLIBCROCO]) + AC_SUBST([INCCROCO]) +diff --git a/libtextstyle/gnulib-local/m4/libglib.m4 b/libtextstyle/gnulib-local/m4/libglib.m4 +index bef6fa3..8841755 100644 +--- a/libtextstyle/gnulib-local/m4/libglib.m4 ++++ b/libtextstyle/gnulib-local/m4/libglib.m4 +@@ -1,105 +1,31 @@ +-# libglib.m4 serial 4 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libglib.m4 serial 3 (gettext-0.17) ++dnl Copyright (C) 2006-2007, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBGLIB +-dnl gives the user the option to decide whether to use the included or +-dnl an external libglib. +-dnl gl_LIBGLIB(FORCE-INCLUDED) +-dnl forces the use of the included or an external libglib. + AC_DEFUN([gl_LIBGLIB], + [ +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included glib is requested]) +- AC_ARG_WITH([included-glib], +- [ --with-included-glib use the glib2 included here], +- [gl_cv_libglib_force_included=$withval], +- [gl_cv_libglib_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libglib_force_included]) +- ], [gl_cv_libglib_force_included=$1]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ AC_MSG_CHECKING([whether included glib is requested]) ++ AC_ARG_WITH([included-glib], ++ [ --with-included-glib use the glib2 included here], ++ [gl_cv_libglib_force_included=$withval], ++ [gl_cv_libglib_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libglib_force_included]) + + gl_cv_libglib_use_included="$gl_cv_libglib_force_included" + LIBGLIB= + LTLIBGLIB= + INCGLIB= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libglib_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use +- dnl the included one. +- AC_CACHE_VAL([gl_cv_libglib], [ +- gl_cv_libglib=no +- gl_cv_LIBGLIB= +- gl_cv_LTLIBGLIB= +- gl_cv_INCGLIB= +- gl_save_LIBS="$LIBS" +- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and +- dnl INCGLIB_2_0 accordingly. +- dnl Don't use glib-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([glib-2.0]) +- LIBS="$gl_save_LIBS $LIBGLIB_2_0" +- AC_TRY_LINK([#include +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" +- AC_TRY_LINK([#include +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="$INCGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- dnl Often the include files are installed in /usr/include/glib-2.0 +- dnl and /usr/lib/glib-2.0/include. +- if test -n "$LIBGLIB_2_0_PREFIX"; then +- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- AC_TRY_LINK([#include +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for glib]) +- AC_MSG_RESULT([$gl_cv_libglib]) +- if test $gl_cv_libglib = yes; then +- LIBGLIB="$gl_cv_LIBGLIB" +- LTLIBGLIB="$gl_cv_LTLIBGLIB" +- INCGLIB="$gl_cv_INCGLIB" +- else +- gl_cv_libglib_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libglib_use_included" != yes; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) ++ LIBGLIB="$GLIB_LIBS" ++ LTLIBGLIB="$GLIB_LIBS" ++ INCGLIB="$GLIB_CFLAGS" ++ fi + AC_SUBST([LIBGLIB]) + AC_SUBST([LTLIBGLIB]) + AC_SUBST([INCGLIB]) +diff --git a/libtextstyle/gnulib-m4/libcroco.m4 b/libtextstyle/gnulib-m4/libcroco.m4 +index bc53cc6..10b2455 100644 +--- a/libtextstyle/gnulib-m4/libcroco.m4 ++++ b/libtextstyle/gnulib-m4/libcroco.m4 +@@ -1,99 +1,34 @@ +-# libcroco.m4 serial 3 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libcroco.m4 serial 2 (gettext-0.17) ++dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBCROCO +-dnl gives the user the option to decide whether to use the included or +-dnl an external libcroco. +-dnl gl_LIBCROCO(FORCE-INCLUDED) +-dnl forces the use of the included or an external libcroco. + AC_DEFUN([gl_LIBCROCO], + [ +- ifelse([$1], [yes], , [ +- dnl libcroco depends on libglib. +- AC_REQUIRE([gl_LIBGLIB]) +- ]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ dnl libcroco depends on libglib. ++ AC_REQUIRE([gl_LIBGLIB]) + +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included libcroco is requested]) +- AC_ARG_WITH([included-libcroco], +- [ --with-included-libcroco use the libcroco included here], +- [gl_cv_libcroco_force_included=$withval], +- [gl_cv_libcroco_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libcroco_force_included]) +- ], [gl_cv_libcroco_force_included=$1]) ++ AC_MSG_CHECKING([whether included libcroco is requested]) ++ AC_ARG_WITH([included-libcroco], ++ [ --with-included-libcroco use the libcroco included here], ++ [gl_cv_libcroco_force_included=$withval], ++ [gl_cv_libcroco_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libcroco_force_included]) + + gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" + LIBCROCO= + LTLIBCROCO= + INCCROCO= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libcroco_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to +- dnl use the included one. +- AC_CACHE_VAL([gl_cv_libcroco], [ +- gl_cv_libcroco=no +- gl_cv_LIBCROCO= +- gl_cv_LTLIBCROCO= +- gl_cv_INCCROCO= +- gl_save_LIBS="$LIBS" +- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and +- dnl INCCROCO_0_6 accordingly. +- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) +- LIBS="$gl_save_LIBS $LIBCROCO_0_6" +- AC_TRY_LINK([#include ], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" +- AC_TRY_LINK([#include ], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="$INCCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- dnl Often the include files are installed in +- dnl /usr/include/libcroco-0.6/libcroco. +- AC_TRY_LINK([#include ], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) +- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` +- if test -d "$libcroco_include_dir"; then +- gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="-I$libcroco_include_dir" +- fi +- ]) +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libcroco]) +- AC_MSG_RESULT([$gl_cv_libcroco]) +- if test $gl_cv_libcroco = yes; then +- LIBCROCO="$gl_cv_LIBCROCO" +- LTLIBCROCO="$gl_cv_LTLIBCROCO" +- INCCROCO="$gl_cv_INCCROCO" +- else +- gl_cv_libcroco_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libcroco_use_included" != yes; then ++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) ++ LIBCROCO=$CROCO_LIBS ++ LTLIBCROCO=$CROCO_LIBS ++ INCCROCO=$CROCO_CFLAGS ++ fi + AC_SUBST([LIBCROCO]) + AC_SUBST([LTLIBCROCO]) + AC_SUBST([INCCROCO]) +diff --git a/libtextstyle/gnulib-m4/libglib.m4 b/libtextstyle/gnulib-m4/libglib.m4 +index bef6fa3..8841755 100644 +--- a/libtextstyle/gnulib-m4/libglib.m4 ++++ b/libtextstyle/gnulib-m4/libglib.m4 +@@ -1,105 +1,31 @@ +-# libglib.m4 serial 4 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libglib.m4 serial 3 (gettext-0.17) ++dnl Copyright (C) 2006-2007, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBGLIB +-dnl gives the user the option to decide whether to use the included or +-dnl an external libglib. +-dnl gl_LIBGLIB(FORCE-INCLUDED) +-dnl forces the use of the included or an external libglib. + AC_DEFUN([gl_LIBGLIB], + [ +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included glib is requested]) +- AC_ARG_WITH([included-glib], +- [ --with-included-glib use the glib2 included here], +- [gl_cv_libglib_force_included=$withval], +- [gl_cv_libglib_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libglib_force_included]) +- ], [gl_cv_libglib_force_included=$1]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ AC_MSG_CHECKING([whether included glib is requested]) ++ AC_ARG_WITH([included-glib], ++ [ --with-included-glib use the glib2 included here], ++ [gl_cv_libglib_force_included=$withval], ++ [gl_cv_libglib_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libglib_force_included]) + + gl_cv_libglib_use_included="$gl_cv_libglib_force_included" + LIBGLIB= + LTLIBGLIB= + INCGLIB= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libglib_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use +- dnl the included one. +- AC_CACHE_VAL([gl_cv_libglib], [ +- gl_cv_libglib=no +- gl_cv_LIBGLIB= +- gl_cv_LTLIBGLIB= +- gl_cv_INCGLIB= +- gl_save_LIBS="$LIBS" +- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and +- dnl INCGLIB_2_0 accordingly. +- dnl Don't use glib-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([glib-2.0]) +- LIBS="$gl_save_LIBS $LIBGLIB_2_0" +- AC_TRY_LINK([#include +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" +- AC_TRY_LINK([#include +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="$INCGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- dnl Often the include files are installed in /usr/include/glib-2.0 +- dnl and /usr/lib/glib-2.0/include. +- if test -n "$LIBGLIB_2_0_PREFIX"; then +- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- AC_TRY_LINK([#include +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for glib]) +- AC_MSG_RESULT([$gl_cv_libglib]) +- if test $gl_cv_libglib = yes; then +- LIBGLIB="$gl_cv_LIBGLIB" +- LTLIBGLIB="$gl_cv_LTLIBGLIB" +- INCGLIB="$gl_cv_INCGLIB" +- else +- gl_cv_libglib_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libglib_use_included" != yes; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) ++ LIBGLIB="$GLIB_LIBS" ++ LTLIBGLIB="$GLIB_LIBS" ++ INCGLIB="$GLIB_CFLAGS" ++ fi + AC_SUBST([LIBGLIB]) + AC_SUBST([LTLIBGLIB]) + AC_SUBST([INCGLIB]) +diff --git a/libtextstyle/lib/term-styled-ostream.c b/libtextstyle/lib/term-styled-ostream.c +index 3675b5f..811e546 100644 +--- a/libtextstyle/lib/term-styled-ostream.c ++++ b/libtextstyle/lib/term-styled-ostream.c +@@ -28,15 +28,15 @@ + + #include + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + /* has a broken double-inclusion guard in libcroco-0.6.1. */ + #ifndef __CR_FONTS_H__ +-# include ++# include + #endif +-#include ++#include + + #include "term-ostream.h" + #include "hash.h" +diff --git a/libtextstyle/lib/term-styled-ostream.oo.c b/libtextstyle/lib/term-styled-ostream.oo.c +index 2cfd4a8..d42c8b4 100644 +--- a/libtextstyle/lib/term-styled-ostream.oo.c ++++ b/libtextstyle/lib/term-styled-ostream.oo.c +@@ -22,15 +22,15 @@ + + #include + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + /* has a broken double-inclusion guard in libcroco-0.6.1. */ + #ifndef __CR_FONTS_H__ +-# include ++# include + #endif +-#include ++#include + + #include "term-ostream.h" + #include "hash.h" diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.19.8.1.bb deleted file mode 100644 index 30121ad23e..0000000000 --- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb +++ /dev/null @@ -1,188 +0,0 @@ -SUMMARY = "Utilities and libraries for producing multi-lingual messages" -DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. \ -These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file \ -naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and \ -a few stand-alone programs to massage in various ways the sets of translatable and already translated strings." -HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" -SECTION = "libs" -LICENSE = "GPLv3+ & LGPL-2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -# Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch, -# it requires yacc which provided by bison-native -# Please remove bison-native from DEPENDS* when next upgrade -DEPENDS = "bison-native gettext-native virtual/libiconv" -DEPENDS_class-native = "bison-native gettext-minimal-native" -PROVIDES = "virtual/libintl virtual/gettext" -PROVIDES_class-native = "virtual/gettext-native" -RCONFLICTS_${PN} = "proxy-libintl" -SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ - file://parallel.patch \ - file://add-with-bisonlocaledir.patch \ - file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ - file://use-pkgconfig.patch \ - file://fix-CVE-2018-18751.patch \ - file://run-ptest \ - file://serial-tests-config.patch \ -" - -SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" -SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43" - -inherit autotools texinfo pkgconfig ptest - -EXTRA_OECONF += "--without-lispdir \ - --disable-csharp \ - --disable-libasprintf \ - --disable-java \ - --disable-native-java \ - --disable-openmp \ - --disable-acl \ - --without-emacs \ - --without-cvs \ - --without-git \ - --cache-file=${B}/config.cache \ - " -EXTRA_OECONF_append_class-target = " \ - --with-bisonlocaledir=${datadir}/locale \ -" - -PACKAGECONFIG ??= "croco glib libxml" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG_class-nativesdk = "" - -PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco" -PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0" -PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2" -# Need paths here to avoid host contamination but this can cause RPATH warnings -# or problems if $libdir isn't $prefix/lib. -PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring" -PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," - -acpaths = '-I ${S}/gettext-runtime/m4 \ - -I ${S}/gettext-tools/m4' - -do_install_append_libc-musl () { - rm -f ${D}${libdir}/charset.alias - rm -f ${D}${includedir}/libintl.h - rm -f ${D}${libdir}/libintl.la -} - -# these lack the .x behind the .so, but shouldn't be in the -dev package -# Otherwise you get the following results: -# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz -# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz -# because gettext depends on gettext-dev, which pulls in more -dev packages: -# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk -# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk -# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk -# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk - -PACKAGES =+ "libgettextlib libgettextsrc" -FILES_libgettextlib = "${libdir}/libgettextlib-*.so*" -FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*" - -PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc" - -FILES_${PN} += "${libdir}/${BPN}/*" - -# The its/Makefile.am has defined: -# itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its -# not itsdir = $(pkgdatadir), so use wildcard to match the version. -FILES_${PN} += "${datadir}/${BPN}-*/*" - -FILES_gettext-runtime = "${bindir}/gettext \ - ${bindir}/ngettext \ - ${bindir}/envsubst \ - ${bindir}/gettext.sh \ - ${libdir}/libasprintf.so* \ - ${libdir}/GNU.Gettext.dll \ - " -FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \ - ${includedir}/autosprintf.h \ - " -FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \ - ${mandir}/man1/ngettext.* \ - ${mandir}/man1/envsubst.* \ - ${mandir}/man1/.* \ - ${mandir}/man3/* \ - ${docdir}/gettext/gettext.* \ - ${docdir}/gettext/ngettext.* \ - ${docdir}/gettext/envsubst.* \ - ${docdir}/gettext/*.3.html \ - ${datadir}/gettext/ABOUT-NLS \ - ${docdir}/gettext/csharpdoc/* \ - ${docdir}/libasprintf/autosprintf.html \ - ${infodir}/autosprintf.info \ - " - -do_install_append() { - rm -f ${D}${libdir}/preloadable_libintl.so -} - -do_install_append_class-native () { - rm ${D}${datadir}/aclocal/* - rm ${D}${datadir}/gettext/config.rpath - rm ${D}${datadir}/gettext/po/Makefile.in.in - rm ${D}${datadir}/gettext/po/remove-potcdate.sin - - create_wrapper ${D}${bindir}/msgfmt \ - GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.19.8/" - -} - -do_compile_ptest() { - cd ${B}/gettext-tools/tests/ - sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile - oe_runmake buildtest-TESTS - cd - -} - -do_install_ptest() { - if [ ${PTEST_ENABLED} = "1" ]; then - mkdir -p ${D}${PTEST_PATH}/tests - mkdir -p ${D}${PTEST_PATH}/src - mkdir -p ${D}${PTEST_PATH}/po - mkdir -p ${D}${PTEST_PATH}/misc - cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests - cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests - cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/ - cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests - sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile - sed -i -e 's:CONFIG_SHELL=.*:& LOCALE_FR='fr_FR.iso88591' LOCALE_FR_UTF8='fr_FR.utf8' LOCALE_JA='ja_JP.eucjp':g' \ - -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile - install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src - install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src - install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src - install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src - install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src - install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src - install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src - install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po - install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc - find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; - chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ - ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 - fi -} - -RDEPENDS_${PN}-ptest += "make" -RDEPENDS_${PN}-ptest_append_libc-glibc = "\ - glibc-gconv-big5 \ - glibc-charmap-big5 \ - glibc-gconv-cp1251 \ - glibc-charmap-cp1251 \ - glibc-charmap-iso-8859-9 \ - glibc-gconv-iso8859-9 \ - glibc-charmap-koi8-r \ - glibc-gconv-koi8-r \ - glibc-gconv-iso8859-2 \ - glibc-charmap-iso-8859-2 \ - glibc-gconv-euc-kr \ - glibc-charmap-euc-kr \ -" - -INSANE_SKIP_${PN}-ptest += "ldflags" -INSANE_SKIP_${PN}-ptest += "rpaths" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-core/gettext/gettext_0.20.1.bb b/meta/recipes-core/gettext/gettext_0.20.1.bb new file mode 100644 index 0000000000..fc05ef2e0a --- /dev/null +++ b/meta/recipes-core/gettext/gettext_0.20.1.bb @@ -0,0 +1,187 @@ +SUMMARY = "Utilities and libraries for producing multi-lingual messages" +DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. \ +These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file \ +naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and \ +a few stand-alone programs to massage in various ways the sets of translatable and already translated strings." +HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" +SECTION = "libs" +LICENSE = "GPLv3+ & LGPL-2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" + +# Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch, +# it requires yacc which provided by bison-native +# Please remove bison-native from DEPENDS* when next upgrade +DEPENDS = "bison-native gettext-native virtual/libiconv" +DEPENDS_class-native = "bison-native gettext-minimal-native" +PROVIDES = "virtual/libintl virtual/gettext" +PROVIDES_class-native = "virtual/gettext-native" +RCONFLICTS_${PN} = "proxy-libintl" +SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ + file://parallel.patch \ + file://add-with-bisonlocaledir.patch \ + file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ + file://use-pkgconfig.patch \ + file://run-ptest \ + file://serial-tests-config.patch \ + " + +SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2" +SRC_URI[sha256sum] = "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c" + +inherit autotools texinfo pkgconfig ptest + +EXTRA_OECONF += "--without-lispdir \ + --disable-csharp \ + --disable-libasprintf \ + --disable-java \ + --disable-native-java \ + --disable-openmp \ + --disable-acl \ + --without-emacs \ + --without-cvs \ + --without-git \ + --cache-file=${B}/config.cache \ + " +EXTRA_OECONF_append_class-target = " \ + --with-bisonlocaledir=${datadir}/locale \ +" + +PACKAGECONFIG ??= "croco glib libxml" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG_class-nativesdk = "" + +PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco" +PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0" +PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2" +# Need paths here to avoid host contamination but this can cause RPATH warnings +# or problems if $libdir isn't $prefix/lib. +PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring" +PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," + +acpaths = '-I ${S}/gettext-runtime/m4 \ + -I ${S}/gettext-tools/m4' + +do_install_append_libc-musl () { + rm -f ${D}${libdir}/charset.alias + rm -f ${D}${includedir}/libintl.h + rm -f ${D}${libdir}/libintl.la +} + +# these lack the .x behind the .so, but shouldn't be in the -dev package +# Otherwise you get the following results: +# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz +# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz +# because gettext depends on gettext-dev, which pulls in more -dev packages: +# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk +# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk +# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk +# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk + +PACKAGES =+ "libgettextlib libgettextsrc" +FILES_libgettextlib = "${libdir}/libgettextlib-*.so*" +FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*" + +PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc" + +FILES_${PN} += "${libdir}/${BPN}/*" + +# The its/Makefile.am has defined: +# itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its +# not itsdir = $(pkgdatadir), so use wildcard to match the version. +FILES_${PN} += "${datadir}/${BPN}-*/*" + +FILES_gettext-runtime = "${bindir}/gettext \ + ${bindir}/ngettext \ + ${bindir}/envsubst \ + ${bindir}/gettext.sh \ + ${libdir}/libasprintf.so* \ + ${libdir}/GNU.Gettext.dll \ + " +FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \ + ${includedir}/autosprintf.h \ + " +FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \ + ${mandir}/man1/ngettext.* \ + ${mandir}/man1/envsubst.* \ + ${mandir}/man1/.* \ + ${mandir}/man3/* \ + ${docdir}/gettext/gettext.* \ + ${docdir}/gettext/ngettext.* \ + ${docdir}/gettext/envsubst.* \ + ${docdir}/gettext/*.3.html \ + ${datadir}/gettext/ABOUT-NLS \ + ${docdir}/gettext/csharpdoc/* \ + ${docdir}/libasprintf/autosprintf.html \ + ${infodir}/autosprintf.info \ + " + +do_install_append() { + rm -f ${D}${libdir}/preloadable_libintl.so +} + +do_install_append_class-native () { + rm ${D}${datadir}/aclocal/* + rm ${D}${datadir}/gettext/config.rpath + rm ${D}${datadir}/gettext/po/Makefile.in.in + rm ${D}${datadir}/gettext/po/remove-potcdate.sin + + create_wrapper ${D}${bindir}/msgfmt \ + GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.20/" + +} + +do_compile_ptest() { + cd ${B}/gettext-tools/tests/ + sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile + oe_runmake buildtest-TESTS + cd - +} + +do_install_ptest() { + if [ ${PTEST_ENABLED} = "1" ]; then + mkdir -p ${D}${PTEST_PATH}/tests + mkdir -p ${D}${PTEST_PATH}/src + mkdir -p ${D}${PTEST_PATH}/po + mkdir -p ${D}${PTEST_PATH}/misc + cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests + cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests + cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/ + cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests + sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile + sed -i -e 's:CONFIG_SHELL=.*:& LOCALE_FR='fr_FR.iso88591' LOCALE_FR_UTF8='fr_FR.utf8' LOCALE_JA='ja_JP.eucjp':g' \ + -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile + install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src + install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src + install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src + install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po + install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc + find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; + chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ + ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 + fi +} + +RDEPENDS_${PN}-ptest += "make" +RDEPENDS_${PN}-ptest_append_libc-glibc = "\ + glibc-gconv-big5 \ + glibc-charmap-big5 \ + glibc-gconv-cp1251 \ + glibc-charmap-cp1251 \ + glibc-charmap-iso-8859-9 \ + glibc-gconv-iso8859-9 \ + glibc-charmap-koi8-r \ + glibc-gconv-koi8-r \ + glibc-gconv-iso8859-2 \ + glibc-charmap-iso-8859-2 \ + glibc-gconv-euc-kr \ + glibc-charmap-euc-kr \ +" + +INSANE_SKIP_${PN}-ptest += "ldflags" +INSANE_SKIP_${PN}-ptest += "rpaths" + +BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg