diff options
author | joerg <joerg@pkgsrc.org> | 2020-08-12 23:31:09 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2020-08-12 23:31:09 +0000 |
commit | 988037ae7884b367d41d3f22e1b16b14c7c69a33 (patch) | |
tree | aeef5718366ad100c05e50e1968311afa9fa91a5 /devel | |
parent | 0e988c1bc6886bad1eb0b8d2c2a4e9559af4e719 (diff) | |
download | pkgsrc-988037ae7884b367d41d3f22e1b16b14c7c69a33.tar.gz |
Workaround for msgfmt -o /dev/null being broken on Illumos
On Illumos, O_TRUNC|O_WRONLY currently fails outside the global zone for
/dev/null. The mmap-safe rewrite logic used by gettext 0.21 fails for
that reason, breaking at least textproc/po4a with a rather mysterious
error.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/gettext-tools/Makefile | 3 | ||||
-rw-r--r-- | devel/gettext/distinfo | 3 | ||||
-rw-r--r-- | devel/gettext/patches/patch-gettext-tools_src_write-mo.c | 16 |
3 files changed, 20 insertions, 2 deletions
diff --git a/devel/gettext-tools/Makefile b/devel/gettext-tools/Makefile index 2bd21131315..98951615b77 100644 --- a/devel/gettext-tools/Makefile +++ b/devel/gettext-tools/Makefile @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.40 2020/01/23 11:42:16 nia Exp $ +# $NetBSD: Makefile,v 1.41 2020/08/12 23:31:10 joerg Exp $ .include "../../devel/gettext/Makefile.common" PKGNAME= ${DISTNAME:S/-/-tools-/} COMMENT= Tools for providing messages in different languages +PKGREVISION= 1 DISTINFO_FILE= ${.CURDIR}/../../devel/gettext/distinfo PATCHDIR= ${.CURDIR}/../../devel/gettext/patches diff --git a/devel/gettext/distinfo b/devel/gettext/distinfo index b3ce64c6871..379653aa757 100644 --- a/devel/gettext/distinfo +++ b/devel/gettext/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.39 2020/07/29 07:00:15 wiz Exp $ +$NetBSD: distinfo,v 1.40 2020/08/12 23:31:09 joerg Exp $ SHA1 (gettext-0.21.tar.gz) = e6c0a0cba5b00a604c9118403a8199c77a538526 RMD160 (gettext-0.21.tar.gz) = 93b5bf20f0cb7f0fb5342a948b86d55682b99521 @@ -13,4 +13,5 @@ SHA1 (patch-al) = 15563935bd43886309dd95a0816a5c2153b5da3c SHA1 (patch-an) = 2284bfe8a44873776970af7fc70a419fa2a10054 SHA1 (patch-ao) = d0ab5520f53f38c7b2eb76395c5d6dd24407ef4f SHA1 (patch-gettext-runtime_m4_gettext.m4) = a154919e5da2013c3a2eaa965dc5f12460b1d4f4 +SHA1 (patch-gettext-tools_src_write-mo.c) = e0d3512fd60b5d471248ffe9998d272bdc0a60ef SHA1 (patch-gettext-tools_tests_Makefile.in) = 17dbffc987536d56d2792cf5f459a3a0eccd33dc diff --git a/devel/gettext/patches/patch-gettext-tools_src_write-mo.c b/devel/gettext/patches/patch-gettext-tools_src_write-mo.c new file mode 100644 index 00000000000..48fcb6bb3c3 --- /dev/null +++ b/devel/gettext/patches/patch-gettext-tools_src_write-mo.c @@ -0,0 +1,16 @@ +$NetBSD: patch-gettext-tools_src_write-mo.c,v 1.1 2020/08/12 23:31:09 joerg Exp $ + +Workaround for /dev/null failing with O_TRUNC|O_WRONLY in Illumos zones. + +--- gettext-tools/src/write-mo.c.orig 2020-07-05 22:39:41.000000000 +0000 ++++ gettext-tools/src/write-mo.c +@@ -809,6 +809,9 @@ msgdomain_write_mo (message_list_ty *mlp + (through SIGSEGV or SIGBUS). */ + struct supersede_final_action action; + FILE *output_file = ++#ifdef __sun__ ++ strcmp(file_name, "/dev/null") == 0 ? fopen (file_name, "wb") : ++#endif + fopen_supersede (file_name, "wb", true, true, &action); + if (output_file == NULL) + { |