Fri Jun 30 08:31:04 2023 UTC ()
gettext-lib: make sure bindtextdomain(3) is visible on macOS. Bump.


(tnn)
diff -r1.59 -r1.60 pkgsrc/devel/gettext-lib/Makefile
diff -r1.41 -r1.42 pkgsrc/devel/gettext-lib/distinfo
diff -r0 -r1.1 pkgsrc/devel/gettext-lib/patches/patch-gettext-runtime_intl_intl-compat.c

cvs diff -r1.59 -r1.60 pkgsrc/devel/gettext-lib/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/gettext-lib/Makefile 2019/11/03 10:39:12 1.59
+++ pkgsrc/devel/gettext-lib/Makefile 2023/06/30 08:31:04 1.60
@@ -1,18 +1,19 @@ @@ -1,18 +1,19 @@
1# $NetBSD: Makefile,v 1.59 2019/11/03 10:39:12 rillig Exp $ 1# $NetBSD: Makefile,v 1.60 2023/06/30 08:31:04 tnn Exp $
2 2
3.include "../../devel/gettext/Makefile.common" 3.include "../../devel/gettext/Makefile.common"
4 4
5PKGNAME= ${DISTNAME:S/-/-lib-/} 5PKGNAME= ${DISTNAME:S/-/-lib-/}
 6PKGREVISION= 1
6COMMENT= Internationalized Message Handling Library (libintl) 7COMMENT= Internationalized Message Handling Library (libintl)
7 8
8USE_LANGUAGES= c 9USE_LANGUAGES= c
9CONFIGURE_ARGS+= --with-included-gettext 10CONFIGURE_ARGS+= --with-included-gettext
10CONFIGURE_ARGS+= --disable-csharp 11CONFIGURE_ARGS+= --disable-csharp
11CONFIGURE_ARGS+= --disable-c++ 12CONFIGURE_ARGS+= --disable-c++
12CONFIGURE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR} 13CONFIGURE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR}
13MAKE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR} 14MAKE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR}
14GNU_CONFIGURE_STRICT= no # because of gettext-tools/examples 15GNU_CONFIGURE_STRICT= no # because of gettext-tools/examples
15 16
16CFLAGS+= ${CFLAGS.${ICONV_TYPE}-iconv} 17CFLAGS+= ${CFLAGS.${ICONV_TYPE}-iconv}
17CFLAGS.gnu-iconv+= -DHAVE_GNU_ICONV 18CFLAGS.gnu-iconv+= -DHAVE_GNU_ICONV
18 19

cvs diff -r1.41 -r1.42 pkgsrc/devel/gettext-lib/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/gettext-lib/distinfo 2023/06/29 08:24:19 1.41
+++ pkgsrc/devel/gettext-lib/distinfo 2023/06/30 08:31:04 1.42
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
1$NetBSD: distinfo,v 1.41 2023/06/29 08:24:19 adam Exp $ 1$NetBSD: distinfo,v 1.42 2023/06/30 08:31:04 tnn Exp $
2 2
3BLAKE2s (gettext-0.22.tar.gz) = 6b3b0b9824a6c8d58b28717b2d9089ed4895bbf4a1f7b0979117d8449a28b4ba 3BLAKE2s (gettext-0.22.tar.gz) = 6b3b0b9824a6c8d58b28717b2d9089ed4895bbf4a1f7b0979117d8449a28b4ba
4SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 4SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04
5Size (gettext-0.22.tar.gz) = 26105696 bytes 5Size (gettext-0.22.tar.gz) = 26105696 bytes
6SHA1 (patch-gettext-runtime_intl_configure) = 6b873572ad946e069f2a999c5795c9618688d7a1 6SHA1 (patch-gettext-runtime_intl_configure) = 6b873572ad946e069f2a999c5795c9618688d7a1
 7SHA1 (patch-gettext-runtime_intl_intl-compat.c) = 34e7d01f425c307cec029ae67304cf788a4b8f51

File Added: pkgsrc/devel/gettext-lib/patches/patch-gettext-runtime_intl_intl-compat.c
$NetBSD: patch-gettext-runtime_intl_intl-compat.c,v 1.1 2023/06/30 08:31:04 tnn Exp $

Make sure bindtextdomain(3) is visible on macOS, as it cannot be exported otherwise:

ld: warning: cannot export hidden symbol _bindtextdomain from .libs/intl-compat.o

--- gettext-runtime/intl/intl-compat.c.orig	2023-06-30 08:04:29.086186639 +0000
+++ gettext-runtime/intl/intl-compat.c
@@ -47,7 +47,7 @@
 /* When building a DLL, we must export some functions.  Note that because
    the functions are only defined for binary backward compatibility, we
    don't need to use __declspec(dllimport) in any case.  */
-#if HAVE_VISIBILITY && BUILDING_DLL
+#if HAVE_VISIBILITY && BUILDING_DLL || defined(__APPLE__)
 # define DLL_EXPORTED __attribute__((__visibility__("default")))
 #elif defined _MSC_VER && BUILDING_DLL
 # define DLL_EXPORTED __declspec(dllexport)