summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/gettext/gettext-0.19.8.1
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-12-17 17:00:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-02 16:39:13 +0000
commit4cd9a3045c87b37a2d48142bd78ab1e2616026f8 (patch)
treeca2f82e49d5a32ce6c339ed34e5b6154dbcf32be /meta/recipes-core/gettext/gettext-0.19.8.1
parent0ae95bcc5113a9913aeabaccd5629f2165d986ed (diff)
downloadpoky-4cd9a3045c87b37a2d48142bd78ab1e2616026f8.tar.gz
gettext: update to 0.20.1
License-Update: URLs changed from http to https (From OE-Core rev: c9f8b48ddae0c951fe4df99fda062526160c0a9f) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/gettext/gettext-0.19.8.1')
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch58
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch87
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch141
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch23
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest6
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch58
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch321
7 files changed, 0 insertions, 694 deletions
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 @@
1From 04bd40fe2c48c6e01ab418a04d27c4aff644ad96 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 17 Feb 2016 23:54:02 -0500
4Subject: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign
5 BISON_LOCALEDIR
6
7The variable BISON_LOCALEDIR is assigned only by the output of
8'bison --print-localedir', we add option --with-bisonlocaledir
9to assign it explicitly. It is helpful for user to split the
10native compile and cross compile.
11
12For backward compatibility, if option not used, it still
13make use of the output of 'bison --print-localedir'.
14
15Upstream-Status: Submitted [bison-patches@gnu.org]
16
17Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
18---
19 gettext-tools/gnulib-m4/bison-i18n.m4 | 10 ++++++++--
20 1 file changed, 8 insertions(+), 2 deletions(-)
21
22diff --git a/gettext-tools/gnulib-m4/bison-i18n.m4 b/gettext-tools/gnulib-m4/bison-i18n.m4
23index f5cfd3a..fb6ac4d 100644
24--- a/gettext-tools/gnulib-m4/bison-i18n.m4
25+++ b/gettext-tools/gnulib-m4/bison-i18n.m4
26@@ -14,11 +14,16 @@ dnl sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files
27 dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all.
28 AC_DEFUN([BISON_I18N],
29 [
30+ dnl Default is not to set bisonlocaledir
31+ AC_ARG_WITH([bisonlocaledir],
32+ [ --with-bisonlocaledir sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files],
33+ BISON_LOCALEDIR=$withval,
34+ BISON_LOCALEDIR=)
35+
36 if test -z "$USE_NLS"; then
37 echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2
38 exit 1
39 fi
40- BISON_LOCALEDIR=
41 BISON_USE_NLS=no
42 if test "$USE_NLS" = yes; then
43 dnl Determine bison's localedir.
44@@ -26,9 +31,10 @@ AC_DEFUN([BISON_I18N],
45 dnl But even is YACC is called "yacc", it may be a script that invokes bison
46 dnl and accepts the --print-localedir option.
47 dnl YACC's default value is empty; BISON's default value is :.
48- if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
49+ if test -z "$BISON_LOCALEDIR" -a ${YACC-${BISON-:}} --print-localedir >/dev/null 2>&1; then
50 BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
51 fi
52+ AC_MSG_RESULT([$BISON_LOCALEDIR])
53 AC_SUBST([BISON_LOCALEDIR])
54 if test -n "$BISON_LOCALEDIR"; then
55 dnl There is no need to enable internationalization if the user doesn't
56--
571.9.1
58
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 @@
1From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sun, 19 Feb 2017 23:32:46 -0800
4Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues
5
6Fixed when compile with "-Wformat -Wformat-security -Werror=format-security":
7| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset':
8| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security]
9| fprintf (a_fp, str) ;
10
11And:
12gettext-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=]
13 fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
14
15Upstream-Status: Pending
16
17Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
18---
19 gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++-----
20 gettext-tools/gnulib-lib/libxml/timsort.h | 2 +-
21 2 files changed, 6 insertions(+), 6 deletions(-)
22
23diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
24index 617520f..100104b 100644
25--- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c
26+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
27@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
28 g_return_if_fail (a_fp && a_this);
29 str = cr_statement_ruleset_to_string (a_this, a_indent);
30 if (str) {
31- fprintf (a_fp, str);
32+ fprintf (a_fp, "%s", str);
33 g_free (str);
34 str = NULL;
35 }
36@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
37 str = cr_statement_charset_to_string (a_this,
38 a_indent) ;
39 if (str) {
40- fprintf (a_fp, str) ;
41+ fprintf (a_fp, "%s", str) ;
42 g_free (str) ;
43 str = NULL ;
44 }
45@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
46
47 str = cr_statement_at_page_rule_to_string (a_this, a_indent) ;
48 if (str) {
49- fprintf (a_fp, str);
50+ fprintf (a_fp, "%s", str);
51 g_free (str) ;
52 str = NULL ;
53 }
54@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this,
55
56 str = cr_statement_media_rule_to_string (a_this, a_indent) ;
57 if (str) {
58- fprintf (a_fp, str) ;
59+ fprintf (a_fp, "%s", str) ;
60 g_free (str) ;
61 str = NULL ;
62 }
63@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
64
65 str = cr_statement_import_rule_to_string (a_this, a_indent) ;
66 if (str) {
67- fprintf (a_fp, str) ;
68+ fprintf (a_fp, "%s", str) ;
69 g_free (str) ;
70 str = NULL ;
71 }
72diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h
73index 795f272..443918a 100644
74--- a/gettext-tools/gnulib-lib/libxml/timsort.h
75+++ b/gettext-tools/gnulib-lib/libxml/timsort.h
76@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size)
77 SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
78 if (tempstore == NULL)
79 {
80- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
81+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size);
82 exit(1);
83 }
84 store->storage = tempstore;
85--
862.10.2
87
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 @@
1Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=dce3a16]
2CVE: CVE-2018-18751
3
4Signed-off-by: Kai Kang <kai.kang@windriver.com>
5
6From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
7From: Daiki Ueno <ueno@gnu.org>
8Date: Thu, 15 Sep 2016 13:57:24 +0200
9Subject: [PATCH] xgettext: Fix crash with *.po file input
10
11When xgettext was given two *.po files with the same msgid_plural, it
12crashed with double-free. Problem reported by Davlet Panech in:
13http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html
14* gettext-tools/src/po-gram-gen.y: Don't free msgid_pluralform after
15calling do_callback_message, assuming that it takes ownership.
16* gettext-tools/src/read-catalog.c (default_add_message): Free
17msgid_plural after calling message_alloc.
18* gettext-tools/tests/xgettext-po-2: New file.
19* gettext-tools/tests/Makefile.am (TESTS): Add new test.
20---
21 gettext-tools/src/po-gram-gen.y | 13 ++++-----
22 gettext-tools/src/read-catalog.c | 2 ++
23 gettext-tools/tests/Makefile.am | 2 +-
24 gettext-tools/tests/xgettext-po-2 | 55 +++++++++++++++++++++++++++++++++++++++
25 4 files changed, 63 insertions(+), 9 deletions(-)
26 create mode 100755 gettext-tools/tests/xgettext-po-2
27
28diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y
29index becf5e6..4428e77 100644
30--- a/gettext-tools/src/po-gram-gen.y
31+++ b/gettext-tools/src/po-gram-gen.y
32@@ -221,14 +221,11 @@ message
33 check_obsolete ($1, $3);
34 check_obsolete ($1, $4);
35 if (!$1.obsolete || pass_obsolete_entries)
36- {
37- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
38- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
39- $1.prev_ctxt,
40- $1.prev_id, $1.prev_id_plural,
41- $1.obsolete);
42- free ($3.string);
43- }
44+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
45+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
46+ $1.prev_ctxt,
47+ $1.prev_id, $1.prev_id_plural,
48+ $1.obsolete);
49 else
50 {
51 free_message_intro ($1);
52diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c
53index 571d18e..6af6d20 100644
54--- a/gettext-tools/src/read-catalog.c
55+++ b/gettext-tools/src/read-catalog.c
56@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this,
57 appropriate. */
58 mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len,
59 msgstr_pos);
60+ if (msgid_plural != NULL)
61+ free (msgid_plural);
62 mp->prev_msgctxt = prev_msgctxt;
63 mp->prev_msgid = prev_msgid;
64 mp->prev_msgid_plural = prev_msgid_plural;
65diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am
66index 23b09b1..0dfb4d8 100644
67--- a/gettext-tools/tests/Makefile.am
68+++ b/gettext-tools/tests/Makefile.am
69@@ -95,7 +95,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \
70 xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \
71 xgettext-perl-5 xgettext-perl-6 xgettext-perl-7 xgettext-perl-8 \
72 xgettext-php-1 xgettext-php-2 xgettext-php-3 xgettext-php-4 \
73- xgettext-po-1 \
74+ xgettext-po-1 xgettext-po-2 \
75 xgettext-properties-1 \
76 xgettext-python-1 xgettext-python-2 xgettext-python-3 \
77 xgettext-python-4 \
78diff --git a/gettext-tools/tests/xgettext-po-2 b/gettext-tools/tests/xgettext-po-2
79new file mode 100755
80index 0000000..c4bd9d0
81--- /dev/null
82+++ b/gettext-tools/tests/xgettext-po-2
83@@ -0,0 +1,55 @@
84+#! /bin/sh
85+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
86+
87+# Test PO extractors with multiple input files.
88+
89+cat <<EOF > xg-po-2-1.po
90+msgid "first msgid"
91+msgid_plural "first msgid (plural)"
92+msgstr[0] ""
93+msgstr[1] ""
94+
95+msgid "second msgid"
96+msgid_plural "second msgid (plural)"
97+msgstr[0] ""
98+msgstr[1] ""
99+EOF
100+
101+cat <<EOF > xg-po-2-2.po
102+msgid "third msgid"
103+msgid_plural "third msgid (plural)"
104+msgstr[0] ""
105+msgstr[1] ""
106+
107+msgid "second msgid"
108+msgid_plural "second msgid (plural)"
109+msgstr[0] ""
110+msgstr[1] ""
111+EOF
112+
113+: ${XGETTEXT=xgettext}
114+${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po || Exit 1
115+LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1
116+
117+cat <<EOF > xg-po-2.ok
118+msgid "first msgid"
119+msgid_plural "first msgid (plural)"
120+msgstr[0] ""
121+msgstr[1] ""
122+
123+msgid "second msgid"
124+msgid_plural "second msgid (plural)"
125+msgstr[0] ""
126+msgstr[1] ""
127+
128+msgid "third msgid"
129+msgid_plural "third msgid (plural)"
130+msgstr[0] ""
131+msgstr[1] ""
132+EOF
133+
134+: ${DIFF=diff}
135+${DIFF} xg-po-2.ok xg-po-2.po
136+result=$?
137+
138+exit $result
139--
1401.9.1
141
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 @@
1instal libgettextlib.a before removing it
2
3In a multiple job build, Makefile can simultaneously
4be installing and removing libgettextlib.a. We serialize
5the operations.
6
7Upstream-Status: Pending
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11--- a/gettext-tools/gnulib-lib/Makefile.am
12+++ b/gettext-tools/gnulib-lib/Makefile.am
13@@ -57,6 +57,10 @@ endif
14 # Rules generated and collected by gnulib-tool.
15 include Makefile.gnulib
16
17+# defined in Makefile.gnulib but missing this dependency
18+#
19+install-exec-clean: install-libLTLIBRARIES
20+
21 # Which classes to export from the shared library.
22 MOOPPFLAGS += --dllexport=styled_ostream
23
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 @@
1#!/bin/sh
2#
3#This script is used to run gettext test suites
4cd tests
5
6make -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 @@
1From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001
2From: "Hongjun.Yang" <hongjun.yang@windriver.com>
3Date: Thu, 28 Jul 2016 12:36:15 +0800
4Subject: [PATCH] fix for ptest
5
6Add serial-tests support, ptest need it
7
8Upstream-Status: Inappropriate [oe specific]
9
10Signed-off-by: Changqing Li <changqing.li@windriver.com>
11---
12 configure.ac | 2 +-
13 gettext-runtime/configure.ac | 2 +-
14 gettext-tools/configure.ac | 2 +-
15 3 files changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 5e996fa..880581f 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -23,7 +23,7 @@ AC_INIT([gettext],
22 [bug-gnu-gettext@gnu.org])
23 AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c])
24 AC_CONFIG_AUX_DIR([build-aux])
25-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip])
26+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip])
27
28 dnl Override automake's tar command used for creating distributions.
29 am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"'
30diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac
31index e9299b6..d4f5528 100644
32--- a/gettext-runtime/configure.ac
33+++ b/gettext-runtime/configure.ac
34@@ -22,7 +22,7 @@ AC_INIT([gettext-runtime],
35 [bug-gnu-gettext@gnu.org])
36 AC_CONFIG_SRCDIR([intl/dcigettext.c])
37 AC_CONFIG_AUX_DIR([../build-aux])
38-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
39+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests])
40 AC_CONFIG_HEADERS([config.h])
41
42 dnl Installation directories.
43diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
44index 920eeb6..c507434 100644
45--- a/gettext-tools/configure.ac
46+++ b/gettext-tools/configure.ac
47@@ -22,7 +22,7 @@ AC_INIT([gettext-tools],
48 [bug-gnu-gettext@gnu.org])
49 AC_CONFIG_SRCDIR([src/msgfmt.c])
50 AC_CONFIG_AUX_DIR([../build-aux])
51-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
52+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests])
53 AC_CONFIG_HEADERS([config.h])
54
55 dnl Installation directories.
56--
572.1.4
58
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 @@
1For reasons which I just can't fathom gnulib doesn't use the expected tools to
2find libraries but badly reinvents the wheel. This will trivially lead to host
3contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad
4canonicalisation resulting in relative paths).
5
6Simply delete all the crazy, and replace with a single call to pkg-config.
7
8Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config)
9Signed-off-by: Ross Burton <ross.burton@intel.com>
10
11diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4
12index f79ea82f1..1f67274db 100644
13--- a/gettext-tools/gnulib-m4/libcroco.m4
14+++ b/gettext-tools/gnulib-m4/libcroco.m4
15@@ -8,6 +8,7 @@ dnl From Bruno Haible.
16
17 AC_DEFUN([gl_LIBCROCO],
18 [
19+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
20 dnl libcroco depends on libglib.
21 AC_REQUIRE([gl_LIBGLIB])
22
23@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO],
24 LTLIBCROCO=
25 INCCROCO=
26 if test "$gl_cv_libcroco_use_included" != yes; then
27- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to
28- dnl use the included one.
29- AC_CACHE_VAL([gl_cv_libcroco], [
30- gl_cv_libcroco=no
31- gl_cv_LIBCROCO=
32- gl_cv_LTLIBCROCO=
33- gl_cv_INCCROCO=
34- gl_save_LIBS="$LIBS"
35- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and
36- dnl INCCROCO_0_6 accordingly.
37- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when
38- dnl cross-compiling or when the C compiler in use is different from the
39- dnl one that built the library.
40- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0])
41- LIBS="$gl_save_LIBS $LIBCROCO_0_6"
42- AC_TRY_LINK([#include <libcroco-config.h>],
43- [const char *version = LIBCROCO_VERSION; return !version;],
44- [gl_cv_libcroco=yes
45- gl_cv_LIBCROCO="$LIBCROCO_0_6"
46- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
47- ])
48- if test "$gl_cv_libcroco" != yes; then
49- gl_save_CPPFLAGS="$CPPFLAGS"
50- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6"
51- AC_TRY_LINK([#include <libcroco-config.h>],
52- [const char *version = LIBCROCO_VERSION; return !version;],
53- [gl_cv_libcroco=yes
54- gl_cv_LIBCROCO="$LIBCROCO_0_6"
55- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
56- gl_cv_INCCROCO="$INCCROCO_0_6"
57- ])
58- if test "$gl_cv_libcroco" != yes; then
59- dnl Often the include files are installed in
60- dnl /usr/include/libcroco-0.6/libcroco.
61- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>],
62- [const char *version = LIBCROCO_VERSION; return !version;],
63- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])
64- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
65- if test -d "$libcroco_include_dir"; then
66- gl_cv_libcroco=yes
67- gl_cv_LIBCROCO="$LIBCROCO_0_6"
68- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
69- gl_cv_INCCROCO="-I$libcroco_include_dir"
70- fi
71- ])
72- fi
73- CPPFLAGS="$gl_save_CPPFLAGS"
74- fi
75- LIBS="$gl_save_LIBS"
76- ])
77- AC_MSG_CHECKING([for libcroco])
78- AC_MSG_RESULT([$gl_cv_libcroco])
79- if test $gl_cv_libcroco = yes; then
80- LIBCROCO="$gl_cv_LIBCROCO"
81- LTLIBCROCO="$gl_cv_LTLIBCROCO"
82- INCCROCO="$gl_cv_INCCROCO"
83- else
84- gl_cv_libcroco_use_included=yes
85- fi
86+ PKG_CHECK_MODULES([CROCO], [libcroco-0.6])
87+ LIBCROCO=$CROCO_LIBS
88+ LTLIBCROCO=$CROCO_LIBS
89+ INCCROCO=$CROCO_CFLAGS
90 fi
91 AC_SUBST([LIBCROCO])
92 AC_SUBST([LTLIBCROCO])
93diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4
94index 42e55e6fd..ab25a5b22 100644
95--- a/gettext-tools/gnulib-m4/libglib.m4
96+++ b/gettext-tools/gnulib-m4/libglib.m4
97@@ -8,6 +8,7 @@ dnl From Bruno Haible.
98
99 AC_DEFUN([gl_LIBGLIB],
100 [
101+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
102 AC_MSG_CHECKING([whether included glib is requested])
103 AC_ARG_WITH([included-glib],
104 [ --with-included-glib use the glib2 included here],
105@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB],
106 LTLIBGLIB=
107 INCGLIB=
108 if test "$gl_cv_libglib_use_included" != yes; then
109- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use
110- dnl the included one.
111- AC_CACHE_VAL([gl_cv_libglib], [
112- gl_cv_libglib=no
113- gl_cv_LIBGLIB=
114- gl_cv_LTLIBGLIB=
115- gl_cv_INCGLIB=
116- gl_save_LIBS="$LIBS"
117- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and
118- dnl INCGLIB_2_0 accordingly.
119- dnl Don't use glib-config nor pkg-config, since it doesn't work when
120- dnl cross-compiling or when the C compiler in use is different from the
121- dnl one that built the library.
122- AC_LIB_LINKFLAGS_BODY([glib-2.0])
123- LIBS="$gl_save_LIBS $LIBGLIB_2_0"
124- AC_TRY_LINK([#include <glib.h>
125-#ifndef G_BEGIN_DECLS
126-error this glib.h includes a glibconfig.h from a glib version 1.x
127-#endif
128-],
129- [g_string_new ("foo");],
130- [gl_cv_libglib=yes
131- gl_cv_LIBGLIB="$LIBGLIB_2_0"
132- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
133- ])
134- if test "$gl_cv_libglib" != yes; then
135- gl_save_CPPFLAGS="$CPPFLAGS"
136- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0"
137- AC_TRY_LINK([#include <glib.h>
138-#ifndef G_BEGIN_DECLS
139-error this glib.h includes a glibconfig.h from a glib version 1.x
140-#endif
141-],
142- [g_string_new ("foo");],
143- [gl_cv_libglib=yes
144- gl_cv_LIBGLIB="$LIBGLIB_2_0"
145- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
146- gl_cv_INCGLIB="$INCGLIB_2_0"
147- ])
148- if test "$gl_cv_libglib" != yes; then
149- dnl Often the include files are installed in /usr/include/glib-2.0
150- dnl and /usr/lib/glib-2.0/include.
151- if test -n "$LIBGLIB_2_0_PREFIX"; then
152- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
153- AC_TRY_LINK([#include <glib.h>
154-#ifndef G_BEGIN_DECLS
155-error this glib.h includes a glibconfig.h from a glib version 1.x
156-#endif
157-],
158- [g_string_new ("foo");],
159- [gl_cv_libglib=yes
160- gl_cv_LIBGLIB="$LIBGLIB_2_0"
161- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
162- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
163- ])
164- fi
165- fi
166- CPPFLAGS="$gl_save_CPPFLAGS"
167- fi
168- LIBS="$gl_save_LIBS"
169- ])
170- AC_MSG_CHECKING([for glib])
171- AC_MSG_RESULT([$gl_cv_libglib])
172- if test $gl_cv_libglib = yes; then
173- LIBGLIB="$gl_cv_LIBGLIB"
174- LTLIBGLIB="$gl_cv_LTLIBGLIB"
175- INCGLIB="$gl_cv_INCGLIB"
176- else
177- gl_cv_libglib_use_included=yes
178- fi
179+ PKG_CHECK_MODULES([GLIB], [glib-2.0])
180+ LIBGLIB="$GLIB_LIBS"
181+ LTLIBGLIB="$GLIB_LIBS"
182+ INCGLIB="$GLIB_CFLAGS"
183 fi
184 AC_SUBST([LIBGLIB])
185 AC_SUBST([LTLIBGLIB])
186diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4
187index 480c700d2..cb39309d5 100644
188--- a/gettext-tools/gnulib-m4/libxml.m4
189+++ b/gettext-tools/gnulib-m4/libxml.m4
190@@ -8,6 +8,7 @@ dnl From Bruno Haible.
191
192 AC_DEFUN([gl_LIBXML],
193 [
194+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
195 AC_REQUIRE([AM_ICONV_LINK])
196
197 AC_MSG_CHECKING([whether included libxml is requested])
198@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML],
199 LTLIBXML=
200 INCXML=
201 if test "$gl_cv_libxml_use_included" != yes; then
202- dnl Figure out whether we can use a preinstalled libxml2, or have to use
203- dnl the included one.
204- AC_CACHE_VAL([gl_cv_libxml], [
205- gl_cv_libxml=no
206- gl_cv_LIBXML=
207- gl_cv_LTLIBXML=
208- gl_cv_INCXML=
209- gl_save_LIBS="$LIBS"
210- LIBS="$LIBS $LIBICONV"
211- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2
212- dnl accordingly.
213- dnl Don't use xml2-config nor pkg-config, since it doesn't work when
214- dnl cross-compiling or when the C compiler in use is different from the
215- dnl one that built the library.
216- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x,
217- dnl libxml2 is built in such a way that uses of xmlFree work fine with
218- dnl -Wl,--enable-auto-import but lead to a link error with
219- dnl -Wl,--disable-auto-import.
220- AC_LIB_LINKFLAGS_BODY([xml2])
221- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
222- AC_TRY_LINK([#include <libxml/xmlversion.h>
223- #include <libxml/xmlmemory.h>
224- #include <libxml/xpath.h>
225- ],
226- [xmlCheckVersion (0);
227- xmlFree ((void *) 0);
228- xmlXPathSetContextNode ((void *)0, (void *)0);
229- ],
230- [gl_cv_libxml=yes
231- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
232- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
233- ])
234- if test "$gl_cv_libxml" != yes; then
235- gl_save_CPPFLAGS="$CPPFLAGS"
236- CPPFLAGS="$CPPFLAGS $INCXML2"
237- AC_TRY_LINK([#include <libxml/xmlversion.h>
238- #include <libxml/xmlmemory.h>
239- #include <libxml/xpath.h>
240- ],
241- [xmlCheckVersion (0);
242- xmlFree ((void *) 0);
243- xmlXPathSetContextNode ((void *)0, (void *)0);
244- ],
245- [gl_cv_libxml=yes
246- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
247- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
248- gl_cv_INCXML="$INCXML2"
249- ])
250- if test "$gl_cv_libxml" != yes; then
251- dnl Often the include files are installed in /usr/include/libxml2.
252- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained.
253- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is
254- dnl self-contained.
255- libxml2_include_dir=
256- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>],
257- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h])
258- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
259- ])
260- if test -z "$libxml2_include_dir"; then
261- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>],
262- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h])
263- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
264- ])
265- fi
266- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
267- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
268- AC_TRY_LINK([#include <libxml/xmlversion.h>
269- #include <libxml/xmlmemory.h>
270- #include <libxml/xpath.h>
271- ],
272- [xmlCheckVersion (0);
273- xmlFree ((void *) 0);
274- xmlXPathSetContextNode ((void *)0, (void *)0);
275- ],
276- [gl_cv_libxml=yes
277- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
278- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
279- gl_cv_INCXML="-I$libxml2_include_dir"
280- ])
281- fi
282- fi
283- CPPFLAGS="$gl_save_CPPFLAGS"
284- fi
285- LIBS="$gl_save_LIBS"
286- ])
287- AC_MSG_CHECKING([for libxml])
288- AC_MSG_RESULT([$gl_cv_libxml])
289- if test $gl_cv_libxml = yes; then
290- LIBXML="$gl_cv_LIBXML"
291- LTLIBXML="$gl_cv_LTLIBXML"
292- INCXML="$gl_cv_INCXML"
293- else
294- gl_cv_libxml_use_included=yes
295- fi
296+ PKG_CHECK_MODULES([XML], [libxml-2.0])
297+ LIBXML=$XML_LIBS
298+ LTLIBXML=$XML_LIBS
299+ INCXML=$XML_CFLAGS
300 fi
301 AC_SUBST([LIBXML])
302 AC_SUBST([LTLIBXML])
303diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c
304index 81a407467..218565329 100644
305--- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
306+++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
307@@ -25,4 +25,4 @@
308-#include <cr-om-parser.h>
309-#include <cr-sel-eng.h>
310-#include <cr-style.h>
311-#include <cr-rgb.h>
312+#include <libcroco/cr-om-parser.h>
313+#include <libcroco/cr-sel-eng.h>
314+#include <libcroco/cr-style.h>
315+#include <libcroco/cr-rgb.h>
316@@ -31 +31 @@
317-# include <cr-fonts.h>
318+# include <libcroco/cr-fonts.h>
319@@ -33 +33 @@
320-#include <cr-string.h>
321+#include <libcroco/cr-string.h>