diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-11-26 20:04:48 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-11-26 20:04:48 -0600 |
commit | 7adca47033d4e3a5de17a0f8fc4e8077244db02b (patch) | |
tree | 7107c599e24735c8dab44d61f44d087f7e162d04 /user/cracklib/nls.patch | |
parent | fa82bc47b5a3bb9b333f05c329294fcca8c0f139 (diff) | |
download | packages-7adca47033d4e3a5de17a0f8fc4e8077244db02b.tar.gz packages-7adca47033d4e3a5de17a0f8fc4e8077244db02b.tar.bz2 packages-7adca47033d4e3a5de17a0f8fc4e8077244db02b.tar.xz packages-7adca47033d4e3a5de17a0f8fc4e8077244db02b.zip |
user/cracklib: Update to 2.9.8, fix NLS
The l10n code did not call bindtextdomain so it did not work on musl.
Also, formalise --without-python since the default changed and we do not
build the Python module.
Diffstat (limited to 'user/cracklib/nls.patch')
-rw-r--r-- | user/cracklib/nls.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/user/cracklib/nls.patch b/user/cracklib/nls.patch new file mode 100644 index 000000000..20d695fc0 --- /dev/null +++ b/user/cracklib/nls.patch @@ -0,0 +1,48 @@ +From f0610dec6dafa550c87809d39ea1c43701af4f31 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Sat, 26 Nov 2022 19:55:12 -0600 +Subject: [PATCH] util: Call bindtextdomain to initialise gettext + +This fixes localised message output in the following cases: + +* non-standard PREFIX on GNU systems + + GNU systems wouldn't be able to find the message catalog files. + +* musl systems + + musl relies on bindtextdomain being called; it has no default catalog + path. +--- + util/Makefile.am | 2 +- + util/check.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/util/Makefile.am b/util/Makefile.am +index 4649416..409dc29 100644 +--- a/util/Makefile.am ++++ b/util/Makefile.am +@@ -6,7 +6,7 @@ dist_sbin_SCRIPTS = create-cracklib-dict cracklib-format + + LDADD = ../lib/libcrack.la + +-AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"' -Wall ++AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"' '-DLOCALEDIR="$(localedir)"' -Wall + + cracklib_check_SOURCES = check.c + cracklib_check_LDADD = $(LDADD) $(LTLIBINTL) +diff --git a/util/check.c b/util/check.c +index 7db0c88..bb8fff5 100644 +--- a/util/check.c ++++ b/util/check.c +@@ -24,6 +24,7 @@ main(int argc, char **argv) + setlocale(LC_ALL, ""); + + #ifdef ENABLE_NLS ++ bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + #endif + +-- +2.36.0 + |