From 0a58725f24b0f8992da33337155beabcd7dac406 Mon Sep 17 00:00:00 2001 From: schmonz Date: Sun, 11 Jun 2023 00:41:07 +0000 Subject: [PATCH] Borrow upstream gnulib commit 0814a293 to fix static_assert on Solaris 11.4. --- devel/libidn2/distinfo | 4 +++- devel/libidn2/patches/patch-config.h.in | 18 ++++++++++++++++++ .../libidn2/patches/patch-gl_m4_assert__h.m4 | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 devel/libidn2/patches/patch-config.h.in create mode 100644 devel/libidn2/patches/patch-gl_m4_assert__h.m4 diff --git a/devel/libidn2/distinfo b/devel/libidn2/distinfo index e0b6127c5bc7..01db159a2e58 100644 --- a/devel/libidn2/distinfo +++ b/devel/libidn2/distinfo @@ -1,5 +1,7 @@ -$NetBSD: distinfo,v 1.13 2022/10/30 11:17:47 wiz Exp $ +$NetBSD: distinfo,v 1.14 2023/06/11 00:41:07 schmonz Exp $ BLAKE2s (libidn2-2.3.4.tar.gz) = 945e961371d041f46f684e2d9690c819c27accd1c34fbe0c885bd12ebc3b1e93 SHA512 (libidn2-2.3.4.tar.gz) = a6e90ccef56cfd0b37e3333ab3594bb3cec7ca42a138ca8c4f4ce142da208fa792f6c78ca00c01001c2bc02831abcbaf1cf9bcc346a5290fd7b30708f5a462f3 Size (libidn2-2.3.4.tar.gz) = 2083823 bytes +SHA1 (patch-config.h.in) = e816f95edf082f0dbaf924216ee53b9ed7afaf9f +SHA1 (patch-gl_m4_assert__h.m4) = 29e36c8b7604f266825759b2a18223b11ae446e8 diff --git a/devel/libidn2/patches/patch-config.h.in b/devel/libidn2/patches/patch-config.h.in new file mode 100644 index 000000000000..21edbd97a6ff --- /dev/null +++ b/devel/libidn2/patches/patch-config.h.in @@ -0,0 +1,18 @@ +$NetBSD: patch-config.h.in,v 1.1 2023/06/11 00:41:07 schmonz Exp $ + +Borrow upstream gnulib commit 0814a293: +Make static_assert work on Solaris 11.4. + +--- config.h.in.orig 2022-10-23 13:43:26.000000000 +0000 ++++ config.h.in +@@ -1427,4 +1427,10 @@ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert ++ /* Solaris 11.4 defines static_assert as a macro with 2 arguments. ++ We need it also to be invocable with a single argument. */ ++ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus ++ #undef static_assert ++ #define static_assert _Static_assert ++ #endif + #endif diff --git a/devel/libidn2/patches/patch-gl_m4_assert__h.m4 b/devel/libidn2/patches/patch-gl_m4_assert__h.m4 new file mode 100644 index 000000000000..17752d3b426e --- /dev/null +++ b/devel/libidn2/patches/patch-gl_m4_assert__h.m4 @@ -0,0 +1,19 @@ +$NetBSD: patch-gl_m4_assert__h.m4,v 1.1 2023/06/11 00:41:07 schmonz Exp $ + +Borrow upstream gnulib commit 0814a293: +Make static_assert work on Solaris 11.4. + +--- gl/m4/assert_h.m4.orig 2022-10-23 13:39:39.000000000 +0000 ++++ gl/m4/assert_h.m4 +@@ -57,5 +57,11 @@ AC_DEFUN([gl_ASSERT_H], + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert ++ /* Solaris 11.4 defines static_assert as a macro with 2 arguments. ++ We need it also to be invocable with a single argument. */ ++ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus ++ #undef static_assert ++ #define static_assert _Static_assert ++ #endif + #endif]) + ])