commit:     d7ececd067887a3dd8012ed475052e6d0bbed104
Author:     LinuxUserGD <hugegameartgd <AT> gmail <DOT> com>
AuthorDate: Tue Feb 17 12:20:11 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 18 13:41:33 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7ececd0

sys-devel/gettext: rebase musl-omit_setlocale_lock.patch

Closes: https://bugs.gentoo.org/970209
Signed-off-by: LinuxUserGD <hugegameartgd <AT> gmail.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/79
Merges: https://codeberg.org/gentoo/gentoo/pulls/79
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gettext-0.25-musl-omit_setlocale_lock.patch    | 37 ++++++++++++++++++++++
 sys-devel/gettext/gettext-0.25.1.ebuild            |  2 +-
 sys-devel/gettext/gettext-0.26.ebuild              |  2 +-
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git 
a/sys-devel/gettext/files/gettext-0.25-musl-omit_setlocale_lock.patch 
b/sys-devel/gettext/files/gettext-0.25-musl-omit_setlocale_lock.patch
new file mode 100644
index 000000000000..cbb6833df7f0
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.25-musl-omit_setlocale_lock.patch
@@ -0,0 +1,37 @@
+OMIT_SETLOCALE_LOCK should be true when gl_get_setlocale_null_lock is provided 
by a dependency library, like GNU libintl.
+On Gentoo musl we use musl's libintl and gl_get_setlocale_null_lock is not 
provided by it, therefore we set OMIT_SETLOCALE_LOCK to 0.
+
+To properly fix this we should do AC_SEARCH_LIBS([gl_get_setlocale_null_lock], 
[intl], ...) in automake, but instead we do this 
+hack to not get complacent. This should be fixed upstream.
+
+https://savannah.gnu.org/bugs/index.php?62659#comment7
+https://bugs.gentoo.org/830590
+diff --git a/gettext-tools/libgettextpo/Makefile.am 
b/gettext-tools/libgettextpo/Makefile.am
+index 971d136..740c455 100644
+--- a/gettext-tools/libgettextpo/Makefile.am
++++ b/gettext-tools/libgettextpo/Makefile.am
+@@ -42,7 +42,7 @@ AM_CPPFLAGS = \
+   -I../src -I$(top_srcdir)/src \
+   -I../../gettext-runtime/intl -I$(top_srcdir)/../gettext-runtime/intl
+
+-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@
+
+ # Enable more warning options in this directory.
+ AM_CFLAGS = @WARN_CFLAGS@
+diff --git a/gettext-tools/libgettextpo/Makefile.in 
b/gettext-tools/libgettextpo/Makefile.in
+index 0e655ea..57bb2c5 100644
+--- a/gettext-tools/libgettextpo/Makefile.in
++++ b/gettext-tools/libgettextpo/Makefile.in
+@@ -1376,7 +1376,7 @@ CXX_HAS_CHAR8_TYPE = @CXX_HAS_CHAR8_TYPE@
+ CXX_HAS_UCHAR_TYPES = @CXX_HAS_UCHAR_TYPES@
+ CYGPATH_W = @CYGPATH_W@
+ DC = @DC@
+-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@
+ DEPDIR = @DEPDIR@
+ DESIRED_LINGUAS = @DESIRED_LINGUAS@
+ DFLAGS = @DFLAGS@
+-- 
+2.35.1
+

diff --git a/sys-devel/gettext/gettext-0.25.1.ebuild 
b/sys-devel/gettext/gettext-0.25.1.ebuild
index c1f5cf219aea..82211b73d7b7 100644
--- a/sys-devel/gettext/gettext-0.25.1.ebuild
+++ b/sys-devel/gettext/gettext-0.25.1.ebuild
@@ -104,7 +104,7 @@ src_prepare() {
        elibtoolize
 
        if use elibc_musl || use elibc_Darwin; then
-               eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+               eapply "${FILESDIR}"/${PN}-0.25-musl-omit_setlocale_lock.patch
        fi
 }
 

diff --git a/sys-devel/gettext/gettext-0.26.ebuild 
b/sys-devel/gettext/gettext-0.26.ebuild
index c1f5cf219aea..82211b73d7b7 100644
--- a/sys-devel/gettext/gettext-0.26.ebuild
+++ b/sys-devel/gettext/gettext-0.26.ebuild
@@ -104,7 +104,7 @@ src_prepare() {
        elibtoolize
 
        if use elibc_musl || use elibc_Darwin; then
-               eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+               eapply "${FILESDIR}"/${PN}-0.25-musl-omit_setlocale_lock.patch
        fi
 }
 

Reply via email to