summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/gettext
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-09-07 21:20:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-08 18:02:40 +0100
commit1cad0ccc890b50210dce241d40e91b4415760f93 (patch)
treed545c381c4f81242133ed494daa62768c3b62c70 /meta/recipes-core/gettext
parent533adb63d178be9feb4ba62862a4eb254d02726b (diff)
downloadpoky-1cad0ccc890b50210dce241d40e91b4415760f93.tar.gz
gettext, gettext-minimal-native: upgrade 0.23.1 -> 0.26
Changelog: 0.24: https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00010.html 0.25: https://lists.gnu.org/archive/html/info-gnu/2025-05/msg00000.html 0.26: https://lists.gnu.org/archive/html/info-gnu/2025-07/msg00007.html - gettext-minimal-native recipe adapted to the new macro name (aclocal_DATA -> macros_DATA) - install Makevars.template to gettext-minimal-native to be able to update missing variables The file is renamed in the desitanion to Makevars.template.minimal, to avoid clashing with the full gettext package (some recipes have both as dependency). - autotools.bbclass: search for all po folders, and update the Makefile.in.in file in each of them. This is required, because without this the old Makefile.in.in files in these non ${S}/po folders are not updated with the new version of gettext, and the compilation routinely fails due to this. As part of the same change, also concatenate the source's Makevars files with the gettext Makevars.template: this allows all variables to be defined, even the new ones that the source didn't contain originally. First set the gettext template, and then append the source's original Makevars to it, so it should override the variables that it was setting originally, and keep the new variables at their default value. - Add new PACKAGECONFIG to use libselinux, and also fix libselinux discovery in autotools (use pkg-config instead of autotools discovery, because autotools' library search doesn't respect custom sysroot) Ptest results: ======================= All 626 tests passed (40 tests were not run) ======================= DURATION: 36 END: /usr/lib/gettext/ptest 2025-08-30T17:49 STOP: ptest-runner TOTAL: 1 FAIL: 0 With the previous version: All 545 tests passed (34 tests were not run) (From OE-Core rev: f4b240b4d2c4b424e5dc8f739d8702c736f32d13) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/gettext')
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-native_0.26.bb (renamed from meta/recipes-core/gettext/gettext-minimal-native_0.23.1.bb)4
-rw-r--r--meta/recipes-core/gettext/gettext-sources.inc5
-rw-r--r--meta/recipes-core/gettext/gettext/0001-tests-autopoint-3-unset-MAKEFLAGS.patch8
-rw-r--r--meta/recipes-core/gettext/gettext/serial-tests-config.patch28
-rw-r--r--meta/recipes-core/gettext/gettext/use-pkgconfig.patch39
-rw-r--r--meta/recipes-core/gettext/gettext_0.26.bb (renamed from meta/recipes-core/gettext/gettext_0.23.1.bb)11
6 files changed, 69 insertions, 26 deletions
diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.23.1.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.26.bb
index 941896ec48..b5c32d0786 100644
--- a/meta/recipes-core/gettext/gettext-minimal-native_0.23.1.bb
+++ b/meta/recipes-core/gettext/gettext-minimal-native_0.26.bb
@@ -24,7 +24,7 @@ python get_aclocal_files() {
24 with open(fpath) as f: 24 with open(fpath) as f:
25 content = f.read() 25 content = f.read()
26 for l in content.replace("\\\n","").split("\n"): 26 for l in content.replace("\\\n","").split("\n"):
27 if l.startswith("aclocal_DATA"): 27 if l.startswith("macros_DATA"):
28 aclocal_files = l.split("=")[1] 28 aclocal_files = l.split("=")[1]
29 with open(oe.path.join(d.getVar("WORKDIR"),"aclocal-files"),'w') as outf: 29 with open(oe.path.join(d.getVar("WORKDIR"),"aclocal-files"),'w') as outf:
30 outf.write(aclocal_files) 30 outf.write(aclocal_files)
@@ -43,4 +43,6 @@ do_install () {
43 cp ${S}/build-aux/config.rpath ${D}${datadir}/gettext/ 43 cp ${S}/build-aux/config.rpath ${D}${datadir}/gettext/
44 cp ${S}/gettext-runtime/po/Makefile.in.in ${D}${datadir}/gettext/po/ 44 cp ${S}/gettext-runtime/po/Makefile.in.in ${D}${datadir}/gettext/po/
45 cp ${S}/gettext-runtime/po/remove-potcdate.sed ${D}${datadir}/gettext/po/ 45 cp ${S}/gettext-runtime/po/remove-potcdate.sed ${D}${datadir}/gettext/po/
46 # The gettext recipe also installs the same Makevars.template at the same place, rename it
47 cp ${S}/gettext-tools/po/Makevars.template ${D}${datadir}/gettext/po/Makevars.template.minimal
46} 48}
diff --git a/meta/recipes-core/gettext/gettext-sources.inc b/meta/recipes-core/gettext/gettext-sources.inc
index 5d90d81b58..2ddf47334d 100644
--- a/meta/recipes-core/gettext/gettext-sources.inc
+++ b/meta/recipes-core/gettext/gettext-sources.inc
@@ -1,4 +1,3 @@
1HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" 1HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
2SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ 2SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz"
3 " 3SRC_URI[sha256sum] = "39acf4b0371e9b110b60005562aace5b3631fed9b1bb9ecccfc7f56e58bb1d7f"
4SRC_URI[sha256sum] = "52a578960fe308742367d75cd1dff8552c5797bd0beba7639e12bdcda28c0e49"
diff --git a/meta/recipes-core/gettext/gettext/0001-tests-autopoint-3-unset-MAKEFLAGS.patch b/meta/recipes-core/gettext/gettext/0001-tests-autopoint-3-unset-MAKEFLAGS.patch
index a8f6684bd7..f14d8df689 100644
--- a/meta/recipes-core/gettext/gettext/0001-tests-autopoint-3-unset-MAKEFLAGS.patch
+++ b/meta/recipes-core/gettext/gettext/0001-tests-autopoint-3-unset-MAKEFLAGS.patch
@@ -16,10 +16,10 @@ diff --git a/gettext-tools/tests/autopoint-3 b/gettext-tools/tests/autopoint-3
16index af2e17f..46cf3f7 100755 16index af2e17f..46cf3f7 100755
17--- a/gettext-tools/tests/autopoint-3 17--- a/gettext-tools/tests/autopoint-3
18+++ b/gettext-tools/tests/autopoint-3 18+++ b/gettext-tools/tests/autopoint-3
19@@ -137,6 +137,7 @@ ${CONFIG_SHELL} ./configure >/dev/null 2>autopoint.err 19@@ -149,6 +149,7 @@
20 test $? = 0 || { cat autopoint.err; Exit 1; } 20 *) MAKE=make ;;
21 21 esac
22 : ${MAKE=make} 22 fi
23+unset MAKEFLAGS 23+unset MAKEFLAGS
24 ${MAKE} >/dev/null 2>autopoint.err 24 ${MAKE} >/dev/null 2>autopoint.err
25 test $? = 0 || { cat autopoint.err; Exit 1; } 25 test $? = 0 || { cat autopoint.err; Exit 1; }
diff --git a/meta/recipes-core/gettext/gettext/serial-tests-config.patch b/meta/recipes-core/gettext/gettext/serial-tests-config.patch
index 3baf549795..88bd33951a 100644
--- a/meta/recipes-core/gettext/gettext/serial-tests-config.patch
+++ b/meta/recipes-core/gettext/gettext/serial-tests-config.patch
@@ -18,23 +18,23 @@ diff --git a/configure.ac b/configure.ac
18index 5106676..3114998 100644 18index 5106676..3114998 100644
19--- a/configure.ac 19--- a/configure.ac
20+++ b/configure.ac 20+++ b/configure.ac
21@@ -22,7 +22,7 @@ AC_INIT([gettext], 21@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([build-aux])
22 [bug-gettext@gnu.org]) 22 VERSION_NUMBER=`cd $srcdir \
23 AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) 23 && build-aux/git-version-gen .tarball-version`
24 AC_CONFIG_AUX_DIR([build-aux]) 24 gl_INIT_PACKAGE_VERSION([$VERSION_NUMBER])
25-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar]) 25-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar])
26+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar]) 26+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar])
27 27
28 dnl Override automake's tar command used for creating distributions. 28 dnl Override automake's tar command used for creating distributions:
29 am__tar='${AMTAR} chf - --format=ustar --owner=root --group=root "$$tardir"' 29 dnl - Sort the files by basename, not by dirname, to achieve higher compression
30diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac 30diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac
31index e128f5b..9f7447c 100644 31index e128f5b..9f7447c 100644
32--- a/gettext-runtime/configure.ac 32--- a/gettext-runtime/configure.ac
33+++ b/gettext-runtime/configure.ac 33+++ b/gettext-runtime/configure.ac
34@@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], 34@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([../build-aux])
35 [bug-gettext@gnu.org]) 35 VERSION_NUMBER=`cd $srcdir/.. \
36 AC_CONFIG_SRCDIR([intl/dcigettext.c]) 36 && build-aux/git-version-gen .tarball-version`
37 AC_CONFIG_AUX_DIR([../build-aux]) 37 gl_INIT_PACKAGE_VERSION([$VERSION_NUMBER])
38-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) 38-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
39+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) 39+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests])
40 AC_CONFIG_HEADERS([config.h]) 40 AC_CONFIG_HEADERS([config.h])
@@ -44,10 +44,10 @@ diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
44index 3b1f461..14510a9 100644 44index 3b1f461..14510a9 100644
45--- a/gettext-tools/configure.ac 45--- a/gettext-tools/configure.ac
46+++ b/gettext-tools/configure.ac 46+++ b/gettext-tools/configure.ac
47@@ -22,7 +22,7 @@ AC_INIT([gettext-tools], 47@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([../build-aux])
48 [bug-gettext@gnu.org]) 48 VERSION_NUMBER=`cd $srcdir/.. \
49 AC_CONFIG_SRCDIR([src/msgfmt.c]) 49 && build-aux/git-version-gen .tarball-version`
50 AC_CONFIG_AUX_DIR([../build-aux]) 50 gl_INIT_PACKAGE_VERSION([$VERSION_NUMBER])
51-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) 51-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
52+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) 52+AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests])
53 AC_CONFIG_HEADERS([config.h]) 53 AC_CONFIG_HEADERS([config.h])
diff --git a/meta/recipes-core/gettext/gettext/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext/use-pkgconfig.patch
index 9774c4cce0..2b9fef1e94 100644
--- a/meta/recipes-core/gettext/gettext/use-pkgconfig.patch
+++ b/meta/recipes-core/gettext/gettext/use-pkgconfig.patch
@@ -12,6 +12,11 @@ Simply delete all the crazy, and replace with a single call to pkg-config.
12 12
13Upstream-Status: Inappropriate [upstream still refuse to consider pkg-config] 13Upstream-Status: Inappropriate [upstream still refuse to consider pkg-config]
14Signed-off-by: Ross Burton <ross.burton@intel.com> 14Signed-off-by: Ross Burton <ross.burton@intel.com>
15
16Added also selinux discovery.
17
18Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
19
15--- 20---
16 gettext-tools/gnulib-m4/libxml.m4 | 105 ++--------------------- 21 gettext-tools/gnulib-m4/libxml.m4 | 105 ++---------------------
17 libtextstyle/gnulib-local/m4/libglib.m4 | 106 +++--------------------- 22 libtextstyle/gnulib-local/m4/libglib.m4 | 106 +++---------------------
@@ -389,3 +394,37 @@ index baa2cf4..b287c5b 100644
389 AC_SUBST([LIBGLIB]) 394 AC_SUBST([LIBGLIB])
390 AC_SUBST([LTLIBGLIB]) 395 AC_SUBST([LTLIBGLIB])
391 AC_SUBST([INCGLIB]) 396 AC_SUBST([INCGLIB])
397
398diff --git a/gettext-tools/gnulib-m4/selinux-selinux-h.m4 b/gettext-tools/gnulib-m4/selinux-selinux-h.m4
399index e2613fa..2a733a7 100644
400--- a/gettext-tools/gnulib-m4/selinux-selinux-h.m4
401+++ b/gettext-tools/gnulib-m4/selinux-selinux-h.m4
402@@ -71,6 +71,7 @@ AC_DEFUN([gl_LIBSELINUX],
403 [
404 AC_REQUIRE([AC_CANONICAL_HOST])
405 AC_REQUIRE([AC_CANONICAL_BUILD])
406+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
407
408 AC_ARG_WITH([selinux],
409 AS_HELP_STRING([[--without-selinux]], [do not use SELinux, even on systems with SELinux]),
410@@ -79,19 +80,8 @@ AC_DEFUN([gl_LIBSELINUX],
411 LIB_SELINUX=
412 if test "$with_selinux" != no; then
413 gl_saved_LIBS=$LIBS
414- AC_SEARCH_LIBS([setfilecon], [selinux],
415- [test "$ac_cv_search_setfilecon" = "none required" ||
416- LIB_SELINUX=$ac_cv_search_setfilecon])
417+ PKG_CHECK_MODULES([SELINUX], [libselinux], [LIB_SELINUX=$SELINUX_LIBS])
418 LIBS=$gl_saved_LIBS
419 fi
420 AC_SUBST([LIB_SELINUX])
421-
422- # Warn if SELinux is found but libselinux is absent;
423- if test "$ac_cv_search_setfilecon" = no; then
424- if test "$host" = "$build" && test -d /selinux; then
425- AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
426- AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
427- fi
428- with_selinux=no
429- fi
430 ])
diff --git a/meta/recipes-core/gettext/gettext_0.23.1.bb b/meta/recipes-core/gettext/gettext_0.26.bb
index 509438c2a7..b99b301af4 100644
--- a/meta/recipes-core/gettext/gettext_0.23.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.26.bb
@@ -37,7 +37,6 @@ EXTRA_OECONF += "--without-lispdir \
37 --disable-java \ 37 --disable-java \
38 --disable-native-java \ 38 --disable-native-java \
39 --disable-openmp \ 39 --disable-openmp \
40 --disable-acl \
41 --without-emacs \ 40 --without-emacs \
42 --without-cvs \ 41 --without-cvs \
43 --without-git \ 42 --without-git \
@@ -56,7 +55,7 @@ EXTRA_OECONF:append:libc-musl = "\
56 --enable-threads=posix \ 55 --enable-threads=posix \
57 gt_cv_func_printf_posix=yes \ 56 gt_cv_func_printf_posix=yes \
58" 57"
59PACKAGECONFIG ??= "glib libxml" 58PACKAGECONFIG ??= "glib libxml ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
60PACKAGECONFIG:class-native = "" 59PACKAGECONFIG:class-native = ""
61PACKAGECONFIG:class-nativesdk = "" 60PACKAGECONFIG:class-nativesdk = ""
62 61
@@ -66,6 +65,7 @@ PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml
66# or problems if $libdir isn't $prefix/lib. 65# or problems if $libdir isn't $prefix/lib.
67PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring" 66PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring"
68PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," 67PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
68PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux --disable-acl,attr libselinux"
69 69
70do_install:append:libc-musl () { 70do_install:append:libc-musl () {
71 rm -f ${D}${libdir}/charset.alias 71 rm -f ${D}${libdir}/charset.alias
@@ -94,7 +94,8 @@ FILES:${PN} += "${libdir}/${BPN}/"
94# The its/Makefile.am has defined: 94# The its/Makefile.am has defined:
95# itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its 95# itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its
96# not itsdir = $(pkgdatadir), so use wildcard to match the version. 96# not itsdir = $(pkgdatadir), so use wildcard to match the version.
97FILES:${PN} += "${datadir}/${BPN}-*/*" 97FILES:${PN} += "${datadir}/${BPN}-*/* \
98 ${datadir}/${BPN}/m4/*"
98 99
99FILES:gettext-runtime = "${bindir}/gettext \ 100FILES:gettext-runtime = "${bindir}/gettext \
100 ${bindir}/ngettext \ 101 ${bindir}/ngettext \
@@ -175,7 +176,9 @@ do_install_ptest() {
175 find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; 176 find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
176 chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ 177 chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \
177 ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 ${D}${PTEST_PATH}/tests/xgettext-vala-6 \ 178 ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 ${D}${PTEST_PATH}/tests/xgettext-vala-6 \
178 ${D}${PTEST_PATH}/tests/plural-3 ${D}${PTEST_PATH}/tests/plural-4 ${D}${PTEST_PATH}/tests/xgettext-java-8 ${D}${PTEST_PATH}/tests/xgettext-java-9 179 ${D}${PTEST_PATH}/tests/plural-3 ${D}${PTEST_PATH}/tests/plural-4 ${D}${PTEST_PATH}/tests/xgettext-java-8 ${D}${PTEST_PATH}/tests/xgettext-java-9 \
180 ${D}${PTEST_PATH}/tests/msgfmt-21 ${D}${PTEST_PATH}/tests/format-modula2-1 ${D}${PTEST_PATH}/tests/format-modula2-2 \
181 ${D}${PTEST_PATH}/tests/lang-go ${D}${PTEST_PATH}/tests/lang-ruby ${D}${PTEST_PATH}/tests/lang-modula2 ${D}${PTEST_PATH}/tests/lang-d
179 sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env 182 sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env
180} 183}
181 184