pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

dovecot24: get rid of _NETBSD_SOURCE.



Module Name:	pkgsrc-wip
Committed By:	Olaf Seibert <rhialto%falu.nl@localhost>
Pushed By:	rhialto
Date:		Sat Feb 7 16:51:00 2026 +0100
Changeset:	68650317c23882dc364c1fb722b377d2feaaaf61

Modified Files:
	dovecot24/Makefile.common
	dovecot24/TODO
	dovecot24/distinfo
	dovecot24/patches/patch-src_lib-var-expand-crypt_Makefile.in
	dovecot24/patches/patch-src_lib_lib.h

Log Message:
dovecot24: get rid of _NETBSD_SOURCE.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=68650317c23882dc364c1fb722b377d2feaaaf61

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 dovecot24/Makefile.common                          |  2 --
 dovecot24/TODO                                     | 16 ++++++++++
 dovecot24/distinfo                                 |  4 +--
 .../patch-src_lib-var-expand-crypt_Makefile.in     |  1 +
 dovecot24/patches/patch-src_lib_lib.h              | 34 ++++++++++++++++++++--
 5 files changed, 50 insertions(+), 7 deletions(-)

diffs:
diff --git a/dovecot24/Makefile.common b/dovecot24/Makefile.common
index bb847fd509..b430fe4898 100644
--- a/dovecot24/Makefile.common
+++ b/dovecot24/Makefile.common
@@ -29,7 +29,6 @@ BUILD_DEFS+=		VARBASE
 
 .include "../../mk/bsd.prefs.mk"
 
-#.if "${PKGPATH}" != "mail/dovecot24"
 .if "${PKGPATH}" != "wip/dovecot24"
 DEPENDS+=		dovecot>=${PKGVERSION_NOREV}{nb*,}:../../wip/dovecot24
 .endif
@@ -60,7 +59,6 @@ CONFIGURE_ARGS.SunOS+=	--with-ioloop=poll
 CONFIGURE_ARGS.SunOS+=	--with-notify=none
 
 # Enable platform specific extensions
-CFLAGS.NetBSD+=  -D_NETBSD_SOURCE
 CFLAGS.FreeBSD+= -D__BSD_VISIBLE -D__XSI_VISIBLE
 CFLAGS.OpenBSD+= -D__BSD_VISIBLE -D__XSI_VISIBLE
 CFLAGS.SunOS+=   -D__EXTENSIONS__
diff --git a/dovecot24/TODO b/dovecot24/TODO
index e41e30c346..ea28bdf9a5 100644
--- a/dovecot24/TODO
+++ b/dovecot24/TODO
@@ -26,6 +26,22 @@ upstream bug that some XOPEN visibility define is set, and that turns
 everything else off.  Consider if avoiding defining that is adequate,
 and/or patching, and filing upstream.
 
+    src/lib/lib.h has the dubious setting of a bunch of these flags:
+
+    #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+    #  define __BSD_VISIBLE 1
+    #elif defined(__APPLE__)
+    #  define _DARWIN_C_SOURCE 1
+    #endif
+    #define _BSD_SOURCE 1
+    #define _DEFAULT_SOURCE 1
+    #define _POSIX_C_SOURCE 200809L
+    #define _XOPEN_SOURCE 700
+
+    After disabling the lot of them, it still builds and my quick runtime test
+    also works.
+
+
 Address the strategy of a lot of config files.  Does dovecot really
 need all those files?  Installed config should be minimal and the user
 is welcome to steal from examples.
diff --git a/dovecot24/distinfo b/dovecot24/distinfo
index b139f978d8..6fd238d78d 100644
--- a/dovecot24/distinfo
+++ b/dovecot24/distinfo
@@ -6,5 +6,5 @@ Size (dovecot-2.4.2.tar.gz) = 7807240 bytes
 SHA1 (patch-configure) = 6adc141ed30241300c4e51b07488c3d65ceacfca
 SHA1 (patch-doc_dovecot.conf.in) = cad98a01a577b1f253b8d783e5105c22bfd964cd
 SHA1 (patch-src_lib-storage_mail-storage.c) = ef9d6ad2198be3fbe274f860a00d2dcb4f4beeaa
-SHA1 (patch-src_lib-var-expand-crypt_Makefile.in) = 5fe989b91828fd9d7589db94b6ca6030bc574b29
-SHA1 (patch-src_lib_lib.h) = cac10ddeb45cf4de4f1d3d15d568ae72f403dc7b
+SHA1 (patch-src_lib-var-expand-crypt_Makefile.in) = 5e7a03ea899bf81e70431f64cf21289cf33ea357
+SHA1 (patch-src_lib_lib.h) = b36c157e4237512d14b486c6dc142a1b98b42b60
diff --git a/dovecot24/patches/patch-src_lib-var-expand-crypt_Makefile.in b/dovecot24/patches/patch-src_lib-var-expand-crypt_Makefile.in
index e05a6dd467..6217609cab 100644
--- a/dovecot24/patches/patch-src_lib-var-expand-crypt_Makefile.in
+++ b/dovecot24/patches/patch-src_lib-var-expand-crypt_Makefile.in
@@ -12,3 +12,4 @@ Fix linking errors on non-Linux platforms for a test binary
 +@HAVE_WHOLE_ARCHIVE_TRUE@test_var_expand_crypt_LDFLAGS = -static -export-dynamic -Wl,$(LD_WHOLE_ARCHIVE),../lib/.libs/liblib.a,../lib-json/.libs/libjson.a,../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE)
  test_var_expand_crypt_CFLAGS = $(AM_CFLAGS) \
  	-DDCRYPT_BUILD_DIR=\"$(top_builddir)/src/lib-dcrypt\"
+ 
diff --git a/dovecot24/patches/patch-src_lib_lib.h b/dovecot24/patches/patch-src_lib_lib.h
index 10425b7dc2..830397eecd 100644
--- a/dovecot24/patches/patch-src_lib_lib.h
+++ b/dovecot24/patches/patch-src_lib_lib.h
@@ -1,6 +1,9 @@
 $NetBSD$
 
-Fix re-definition warnings like
+- Fix needing to define _NETBSD_SOURCE by disabling the whole dubious lot
+  of visibility defines.
+
+- Fix re-definition warnings like
 
 CC       welcome-plugin.lo
 In file included from welcome-plugin.c:3:
@@ -13,8 +16,33 @@ In file included from /usr/include/string.h:127,
    95 | #define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len)
       |
 
---- src/lib/lib.h.orig	2026-02-03 17:35:03.025316093 +0000
-+++ src/lib/lib.h
+--- ./src/lib/lib.h.orig	2025-10-29 06:58:41.000000000 +0000
++++ ./src/lib/lib.h
+@@ -1,15 +1,15 @@
+ #ifndef LIB_H
+ #define LIB_H
+ 
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+-#  define __BSD_VISIBLE 1
+-#elif defined(__APPLE__)
+-#  define _DARWIN_C_SOURCE 1
+-#endif
+-#define _BSD_SOURCE 1
+-#define _DEFAULT_SOURCE 1
+-#define _POSIX_C_SOURCE 200809L
+-#define _XOPEN_SOURCE 700
++//#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++//#  define __BSD_VISIBLE 1
++//#elif defined(__APPLE__)
++//#  define _DARWIN_C_SOURCE 1
++//#endif
++//#define _BSD_SOURCE 1
++//#define _DEFAULT_SOURCE 1
++//#define _POSIX_C_SOURCE 200809L
++//#define _XOPEN_SOURCE 700
+ 
+ /* default lib includes */
+ #ifdef HAVE_CONFIG_H
 @@ -76,6 +76,7 @@ static inline void *i_memcpy(void *dest,
  	return memcpy(dest, src, n);
  }


Home | Main Index | Thread Index | Old Index