ports@,

I had discovered an issue in our patches for protobufers.

We need not only undef some macroses, but also revert it back,
other wise some software can't be build with quite wired errors like TRUE
macrose doesn't define.

Here a diff which fixes this issue and allows me to build audio/clementine,
which update I'll send soon as well.

Ok?

Index: devel/protobuf/Makefile
===================================================================
RCS file: /home/cvs/ports/devel/protobuf/Makefile,v
diff -u -p -r1.86 Makefile
--- devel/protobuf/Makefile     22 Mar 2025 17:07:06 -0000      1.86
+++ devel/protobuf/Makefile     29 Mar 2025 12:22:01 -0000
@@ -2,6 +2,7 @@ COMMENT =               c++ protocol buffers
 
 CPPMAJOR =             5
 PROTOBUF_VERSION =     29.4
+REVISION =             0
 V =                    ${CPPMAJOR}.${PROTOBUF_VERSION}
 TAG =                  v${PROTOBUF_VERSION:S/rc-/rc/}
 DISTNAME =             protobuf-${PROTOBUF_VERSION}
Index: devel/protobuf/patches/patch-src_google_protobuf_port_def_inc
===================================================================
RCS file: 
/home/cvs/ports/devel/protobuf/patches/patch-src_google_protobuf_port_def_inc,v
diff -u -p -r1.7 patch-src_google_protobuf_port_def_inc
--- devel/protobuf/patches/patch-src_google_protobuf_port_def_inc       18 Dec 
2024 18:11:32 -0000      1.7
+++ devel/protobuf/patches/patch-src_google_protobuf_port_def_inc       29 Mar 
2025 12:35:43 -0000
@@ -20,3 +20,12 @@ Index: src/google/protobuf/port_def.inc
  // Inconvenient macro names from /usr/include/mach/boolean.h in some macOS 
SDKs.
  #pragma push_macro("TRUE")
  #undef TRUE
+@@ -794,7 +795,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
+ // TYPE_BOOL is defined in the MacOS's ConditionalMacros.h.
+ #pragma push_macro("TYPE_BOOL")
+ #undef TYPE_BOOL
+-#endif  // __APPLE__
++#endif  // defined(__APPLE__) || defined(__OpenBSD__)
+ 
+ #if defined(ANDROID) || defined(__ANDROID__)
+ // Inconvenient macro names from usr/include/limits.h in some Android NDKs.
Index: devel/protobuf/patches/patch-src_google_protobuf_port_undef_inc
===================================================================
RCS file: devel/protobuf/patches/patch-src_google_protobuf_port_undef_inc
diff -N devel/protobuf/patches/patch-src_google_protobuf_port_undef_inc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ devel/protobuf/patches/patch-src_google_protobuf_port_undef_inc     29 Mar 
2025 12:35:43 -0000
@@ -0,0 +1,19 @@
+Index: src/google/protobuf/port_undef.inc
+--- src/google/protobuf/port_undef.inc.orig
++++ src/google/protobuf/port_undef.inc
+@@ -141,13 +141,13 @@
+ #pragma pop_macro("FALSE")
+ #endif
+ 
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__OpenBSD__)
+ #pragma pop_macro("TRUE")
+ #pragma pop_macro("FALSE")
+ #pragma pop_macro("UID_MAX")
+ #pragma pop_macro("GID_MAX")
+ #pragma pop_macro("TYPE_BOOL")
+-#endif  // __APPLE__
++#endif  // defined(__APPLE__) || defined(__OpenBSD__)
+ 
+ #if defined(ANDROID) || defined(__ANDROID__)
+ #pragma pop_macro("UID_MAX")

Reply via email to