diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2016-02-19 00:54:41 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:32:58 +0000 |
commit | 9af773f1c6912b008ecdb460c9e93ea9476104b8 (patch) | |
tree | ab8c070e04d544f604e3bffa51ca68f6eb05a07e /meta/recipes-core | |
parent | b14e2ae9bcb53569ecefdaf6ef08fbca6242eb5c (diff) | |
download | poky-9af773f1c6912b008ecdb460c9e93ea9476104b8.tar.gz |
bison/gettext: add --with-bisonlocaledir to assign BISON_LOCALEDIR
This issue was triggered by buildpaths QA Warning.
...
|gettext-0.19.6: File work/core2-64-poky-linux/gettext/0.19.6-r0/
packages-split/gettext/usr/bin/msgcmp in package contained
reference to tmpdir
...
Previously, variable BISON_LOCALEDIR was assigned only by the
output of 'bison --print-localedir' which provided by native bison
that has buildpaths in it.
For target compile, we add option --with-bisonlocaledir to set
BISON_LOCALEDIR with "/usr/share/locale" to fix the QA issue.
The variable BISON_LOCALEDIR is used for internationalization of
the bison parser’s runtime output. Here is the introduction:
http://www.gnu.org/software/bison/manual/html_node/Internationalization.html
[YOCTO #7058]
(From OE-Core rev: aafb300a1f144b9ebda61a02fedd124fe0e1a83a)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch | 58 | ||||
-rw-r--r-- | meta/recipes-core/gettext/gettext_0.19.6.bb | 4 |
2 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch b/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch new file mode 100644 index 0000000000..35a131067a --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 04bd40fe2c48c6e01ab418a04d27c4aff644ad96 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 17 Feb 2016 23:54:02 -0500 | ||
4 | Subject: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign | ||
5 | BISON_LOCALEDIR | ||
6 | |||
7 | The variable BISON_LOCALEDIR is assigned only by the output of | ||
8 | 'bison --print-localedir', we add option --with-bisonlocaledir | ||
9 | to assign it explicitly. It is helpful for user to split the | ||
10 | native compile and cross compile. | ||
11 | |||
12 | For backward compatibility, if option not used, it still | ||
13 | make use of the output of 'bison --print-localedir'. | ||
14 | |||
15 | Upstream-Status: Submitted [bison-patches@gnu.org] | ||
16 | |||
17 | Signed-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 | |||
22 | diff --git a/gettext-tools/gnulib-m4/bison-i18n.m4 b/gettext-tools/gnulib-m4/bison-i18n.m4 | ||
23 | index 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 | -- | ||
57 | 1.9.1 | ||
58 | |||
diff --git a/meta/recipes-core/gettext/gettext_0.19.6.bb b/meta/recipes-core/gettext/gettext_0.19.6.bb index 737561d317..fead06aa85 100644 --- a/meta/recipes-core/gettext/gettext_0.19.6.bb +++ b/meta/recipes-core/gettext/gettext_0.19.6.bb | |||
@@ -12,6 +12,7 @@ PROVIDES_class-native = "virtual/gettext-native" | |||
12 | RCONFLICTS_${PN} = "proxy-libintl" | 12 | RCONFLICTS_${PN} = "proxy-libintl" |
13 | SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ | 13 | SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ |
14 | file://parallel.patch \ | 14 | file://parallel.patch \ |
15 | file://add-with-bisonlocaledir.patch \ | ||
15 | " | 16 | " |
16 | 17 | ||
17 | PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," | 18 | PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," |
@@ -38,6 +39,9 @@ EXTRA_OECONF += "--without-lispdir \ | |||
38 | --with-included-libcroco \ | 39 | --with-included-libcroco \ |
39 | --with-included-libunistring \ | 40 | --with-included-libunistring \ |
40 | " | 41 | " |
42 | EXTRA_OECONF_append_class-target = " \ | ||
43 | --with-bisonlocaledir=${datadir}/locale \ | ||
44 | " | ||
41 | 45 | ||
42 | acpaths = '-I ${S}/gettext-runtime/m4 \ | 46 | acpaths = '-I ${S}/gettext-runtime/m4 \ |
43 | -I ${S}/gettext-tools/m4' | 47 | -I ${S}/gettext-tools/m4' |