tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] gettext-lib: fix gettext detection on musl with old gettext.m4

Some packages, for example GNU sed, still use old versions of
gettext.m4 (serial 67 or older) despite having recent releases.

These versions of gettext.m4 fail to detect gettext on musl. While
there is some logic in gettext-lib/ for this situation,
it only covers the case where libintl is separate from libc. To fix
this, set the corresponding configure variables when gettext is
built-in to libc.
I'm looking for someone to review this patch before I commit. It
addresses one of the main issues I've encountered on linux-musl and
only affects systems with gettext built-in to libc (linux-gnu and
linux-musl are the ones I'm aware of). On linux-gnu, this is a no-op
since old gettext.m4 uses glibc-internal symbols to detect gettext,
so these cache variables just force the result that would have been
detected anyway.

Without this patch, I get errors about missing PLIST files
(.../LC_MESSAGES/*) when building packages like gsed that use old

For some context about gettext.m4 serial 67-68, see [0].


 devel/gettext-lib/ | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/devel/gettext-lib/ b/devel/gettext-lib/
index 1f42c7d777c..3769987ffb0 100644
--- a/devel/gettext-lib/
+++ b/devel/gettext-lib/
@@ -127,6 +127,13 @@ CONFIGURE_ENV+=		gt_cv_func_gnugettext1_libintl="yes"
 CONFIGURE_ENV+=		gt_cv_func_gnugettext2_libintl="yes"
 .        endif
+.      else
+CONFIGURE_ENV+=		gt_cv_func_gnugettext_libc="yes"
+CONFIGURE_ENV+=		gt_cv_func_gnugettext1_libc="yes"
+.        if empty(H_NGETTEXT_GETTEXT:M__nonexistent__) && \
+CONFIGURE_ENV+=		gt_cv_func_gnugettext2_libc="yes"
+.        endif
 .      endif
 .    endif
 .  endif

Home | Main Index | Thread Index | Old Index