gettext-lib: make sure bindtextdomain(3) is visible on macOS. Bump.diff -r1.59 -r1.60 pkgsrc/devel/gettext-lib/Makefile
(tnn)
@@ -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 | |||
5 | PKGNAME= ${DISTNAME:S/-/-lib-/} | 5 | PKGNAME= ${DISTNAME:S/-/-lib-/} | |
6 | PKGREVISION= 1 | |||
6 | COMMENT= Internationalized Message Handling Library (libintl) | 7 | COMMENT= Internationalized Message Handling Library (libintl) | |
7 | 8 | |||
8 | USE_LANGUAGES= c | 9 | USE_LANGUAGES= c | |
9 | CONFIGURE_ARGS+= --with-included-gettext | 10 | CONFIGURE_ARGS+= --with-included-gettext | |
10 | CONFIGURE_ARGS+= --disable-csharp | 11 | CONFIGURE_ARGS+= --disable-csharp | |
11 | CONFIGURE_ARGS+= --disable-c++ | 12 | CONFIGURE_ARGS+= --disable-c++ | |
12 | CONFIGURE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR} | 13 | CONFIGURE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR} | |
13 | MAKE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR} | 14 | MAKE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR} | |
14 | GNU_CONFIGURE_STRICT= no # because of gettext-tools/examples | 15 | GNU_CONFIGURE_STRICT= no # because of gettext-tools/examples | |
15 | 16 | |||
16 | CFLAGS+= ${CFLAGS.${ICONV_TYPE}-iconv} | 17 | CFLAGS+= ${CFLAGS.${ICONV_TYPE}-iconv} | |
17 | CFLAGS.gnu-iconv+= -DHAVE_GNU_ICONV | 18 | CFLAGS.gnu-iconv+= -DHAVE_GNU_ICONV | |
18 | 19 |
@@ -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 | |||
3 | BLAKE2s (gettext-0.22.tar.gz) = 6b3b0b9824a6c8d58b28717b2d9089ed4895bbf4a1f7b0979117d8449a28b4ba | 3 | BLAKE2s (gettext-0.22.tar.gz) = 6b3b0b9824a6c8d58b28717b2d9089ed4895bbf4a1f7b0979117d8449a28b4ba | |
4 | SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 | 4 | SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 | |
5 | Size (gettext-0.22.tar.gz) = 26105696 bytes | 5 | Size (gettext-0.22.tar.gz) = 26105696 bytes | |
6 | SHA1 (patch-gettext-runtime_intl_configure) = 6b873572ad946e069f2a999c5795c9618688d7a1 | 6 | SHA1 (patch-gettext-runtime_intl_configure) = 6b873572ad946e069f2a999c5795c9618688d7a1 | |
7 | SHA1 (patch-gettext-runtime_intl_intl-compat.c) = 34e7d01f425c307cec029ae67304cf788a4b8f51 |
$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)