diff options
| -rw-r--r-- | meta/recipes-extended/man-db/files/0001-check-for-_nl_msg_cat_cntr-in-configure.patch | 61 | ||||
| -rw-r--r-- | meta/recipes-extended/man-db/man-db_2.13.0.bb | 4 |
2 files changed, 62 insertions, 3 deletions
diff --git a/meta/recipes-extended/man-db/files/0001-check-for-_nl_msg_cat_cntr-in-configure.patch b/meta/recipes-extended/man-db/files/0001-check-for-_nl_msg_cat_cntr-in-configure.patch new file mode 100644 index 0000000000..feef52b11c --- /dev/null +++ b/meta/recipes-extended/man-db/files/0001-check-for-_nl_msg_cat_cntr-in-configure.patch | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | From ea00e32a87cc733dd5aa05cef407a5bee3e6db29 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 18 Mar 2025 22:42:45 -0700 | ||
| 4 | Subject: [PATCH] check for _nl_msg_cat_cntr in configure | ||
| 5 | |||
| 6 | _nl_msg_cat_cntr is not available in all implementations e.g. musl libintl | ||
| 7 | does not have it, therefore add a check to detect it and use it only if | ||
| 8 | it is found. | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://gitlab.com/man-db/man-db/-/commit/7430ca617b5cee3d4420da3158382c5ffbc3e77d] | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 9 +++++++++ | ||
| 14 | include/manconfig.h | 6 ++++-- | ||
| 15 | 2 files changed, 13 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | --- a/configure.ac | ||
| 18 | +++ b/configure.ac | ||
| 19 | @@ -404,6 +404,15 @@ AC_TYPE_PID_T | ||
| 20 | AC_TYPE_UID_T | ||
| 21 | AC_TYPE_SIZE_T | ||
| 22 | |||
| 23 | +dnl _nl_msg_cat_cntr is required for GNU gettext | ||
| 24 | +AC_MSG_CHECKING([for _nl_msg_cat_cntr]) | ||
| 25 | +AC_LINK_IFELSE([AC_LANG_PROGRAM( | ||
| 26 | + [[#include <libintl.h> | ||
| 27 | + extern int _nl_msg_cat_cntr;]], | ||
| 28 | + [[++_nl_msg_cat_cntr;]])], | ||
| 29 | + AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_NL_MSG_CAT_CNTR], [], [_nl_msg_cat_cntr from GNU Gettext]), | ||
| 30 | + AC_MSG_RESULT([no])) | ||
| 31 | + | ||
| 32 | # Check for pipeline library. | ||
| 33 | PKG_CHECK_MODULES([libpipeline], [libpipeline >= 1.5.0]) | ||
| 34 | |||
| 35 | --- a/include/manconfig.h | ||
| 36 | +++ b/include/manconfig.h | ||
| 37 | @@ -24,6 +24,8 @@ | ||
| 38 | #ifndef MANCONFIG_H | ||
| 39 | #define MANCONFIG_H | ||
| 40 | |||
| 41 | +#include "config.h" | ||
| 42 | + | ||
| 43 | /* STD_SECTIONS must contain all of your man hierarchy subdirectories. The | ||
| 44 | order is important. Manual pages will be displayed in this order. Ie | ||
| 45 | if "1" comes before "2", then a kill(1) will be displayed in preference to | ||
| 46 | @@ -138,13 +140,13 @@ | ||
| 47 | #define UNLIKELY(cond) __builtin_expect ((cond), 0) | ||
| 48 | |||
| 49 | /* GNU gettext needs to know when the locale changes. This macro tells it. */ | ||
| 50 | -#ifdef ENABLE_NLS | ||
| 51 | +#ifdef HAVE_NL_MSG_CAT_CNTR | ||
| 52 | extern int _nl_msg_cat_cntr; | ||
| 53 | # define locale_changed() \ | ||
| 54 | do { \ | ||
| 55 | ++_nl_msg_cat_cntr; \ | ||
| 56 | } while (0) | ||
| 57 | -#else /* !ENABLE_NLS */ | ||
| 58 | +#else /* !HAVE_NL_MSG_CAT_CNTR */ | ||
| 59 | # define locale_changed() | ||
| 60 | #endif /* ENABLE_NLS */ | ||
| 61 | |||
diff --git a/meta/recipes-extended/man-db/man-db_2.13.0.bb b/meta/recipes-extended/man-db/man-db_2.13.0.bb index 2178239bb6..6e7af950fc 100644 --- a/meta/recipes-extended/man-db/man-db_2.13.0.bb +++ b/meta/recipes-extended/man-db/man-db_2.13.0.bb | |||
| @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ | |||
| 9 | 9 | ||
| 10 | SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ | 10 | SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ |
| 11 | file://flex.patch \ | 11 | file://flex.patch \ |
| 12 | file://0001-check-for-_nl_msg_cat_cntr-in-configure.patch \ | ||
| 12 | file://99_mandb \ | 13 | file://99_mandb \ |
| 13 | " | 14 | " |
| 14 | SRC_URI[sha256sum] = "82f0739f4f61aab5eb937d234de3b014e777b5538a28cbd31433c45ae09aefb9" | 15 | SRC_URI[sha256sum] = "82f0739f4f61aab5eb937d234de3b014e777b5538a28cbd31433c45ae09aefb9" |
| @@ -17,9 +18,6 @@ DEPENDS = "libpipeline gdbm groff-native base-passwd" | |||
| 17 | RDEPENDS:${PN} += "base-passwd" | 18 | RDEPENDS:${PN} += "base-passwd" |
| 18 | PACKAGE_WRITE_DEPS += "base-passwd" | 19 | PACKAGE_WRITE_DEPS += "base-passwd" |
| 19 | 20 | ||
| 20 | # | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr' | ||
| 21 | USE_NLS:libc-musl = "no" | ||
| 22 | |||
| 23 | inherit gettext pkgconfig autotools systemd | 21 | inherit gettext pkgconfig autotools systemd |
| 24 | 22 | ||
| 25 | EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}" | 23 | EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}" |
