pkgsrc-Changes archive

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

CVS commit: pkgsrc/mail/opensmtpd-extras



Module Name:    pkgsrc
Committed By:   vins
Date:           Sat Mar  9 23:55:46 UTC 2024

Modified Files:
        pkgsrc/mail/opensmtpd-extras: Makefile distinfo
Added Files:
        pkgsrc/mail/opensmtpd-extras/patches:
            patch-extras_tables_table-ldap_ber.h
            patch-extras_tables_table-socketmap_table__socketmap.c
            patch-openbsd-compat_imsg-buffer.c patch-openbsd-compat_imsg.c

Log Message:
mail/opensmtpd-extras: fix build on SunOS


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mail/opensmtpd-extras/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/opensmtpd-extras/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-ldap_ber.h \
    pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-socketmap_table__socketmap.c \
    pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg-buffer.c \
    pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg.c

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

Modified files:

Index: pkgsrc/mail/opensmtpd-extras/Makefile
diff -u pkgsrc/mail/opensmtpd-extras/Makefile:1.3 pkgsrc/mail/opensmtpd-extras/Makefile:1.4
--- pkgsrc/mail/opensmtpd-extras/Makefile:1.3   Sat Mar  2 19:25:29 2024
+++ pkgsrc/mail/opensmtpd-extras/Makefile       Sat Mar  9 23:55:45 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2024/03/02 19:25:29 vins Exp $
+# $NetBSD: Makefile,v 1.4 2024/03/09 23:55:45 vins Exp $
 
 DISTNAME=              opensmtpd-extras-6.7.1_20240228
+PKGREVISION=           1
 CATEGORIES=            mail
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=OpenSMTPD/}
 GITHUB_PROJECT=                OpenSMTPD-extras
@@ -26,6 +27,8 @@ DEPENDS+=     opensmtpd-[0-9]*:../../mail/op
 
 PKG_SYSCONFSUBDIR=     smtpd
 
+.include "../../mk/bsd.prefs.mk"
+
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_MESSAGE.paths=   Replacing hard-coded paths.
@@ -41,6 +44,15 @@ SUBST_SED.paths+=    -e "s:/usr/local:${PRE
 SUBST_SED.paths+=      -e "s:/etc/mail:${PKG_SYSCONFDIR}:g"
 SUBST_SED.paths+=      -e "s:/var/vmail:${VARBASE}/vmail:g"
 
+.if ${OPSYS} == "SunOS"
+SUBST_CLASSES+=                ints
+SUBST_MESSAGE.ints=    SunOS stdint(3) doesn't provide `u_int*' typedefs
+SUBST_STAGE.ints=      pre-configure
+SUBST_FILES.ints+=     extras/tables/table-ldap/*.c
+SUBST_FILES.ints+=     extras/tables/table-ldap/*.h
+SUBST_SED.ints=                -e 's|u_int|uint|g'
+.endif
+
 CONFIGURE_ENV+=                TEST_MINUS_S_SH=${SH:Q}
 CONFIGURE_ARGS+=       --with-pie
 CONFIGURE_ARGS+=       --with-mantype=man

Index: pkgsrc/mail/opensmtpd-extras/distinfo
diff -u pkgsrc/mail/opensmtpd-extras/distinfo:1.2 pkgsrc/mail/opensmtpd-extras/distinfo:1.3
--- pkgsrc/mail/opensmtpd-extras/distinfo:1.2   Sat Mar  2 17:53:23 2024
+++ pkgsrc/mail/opensmtpd-extras/distinfo       Sat Mar  9 23:55:45 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2024/03/02 17:53:23 vins Exp $
+$NetBSD: distinfo,v 1.3 2024/03/09 23:55:45 vins Exp $
 
 BLAKE2s (opensmtpd-extras-6.7.1_20240228-86f2f1927743257674d29d4fed250bdce5d1c0b5.tar.gz) = 8ab39a010dd16e74912a15aba9cef5d9dd6aac347f7aea574cbc55ff364cbcd4
 SHA512 (opensmtpd-extras-6.7.1_20240228-86f2f1927743257674d29d4fed250bdce5d1c0b5.tar.gz) = 
3a51bc561769d55e0e528fb4d9a02f355e66bfe9b14a94d5a88bbc446da4567e34e6438def040b5af1d749d7e601a953e84252ff52ede49cf991d288a4d7bfe7
@@ -8,3 +8,7 @@ SHA1 (patch-api_queue__api.c) = 95cb46aa
 SHA1 (patch-api_scheduler__api.c) = 926efe385a7cfe5844af80041e01b1886a27fea6
 SHA1 (patch-api_table__api.c) = a0a96fb0e8f26d4595dc92ad8c3844270530c4d1
 SHA1 (patch-configure.ac) = b0057b9f04c128c0c91a0185defafa0717f506a9
+SHA1 (patch-extras_tables_table-ldap_ber.h) = bbc02f3c7c3f8ac755b52470705805487ad2d20e
+SHA1 (patch-extras_tables_table-socketmap_table__socketmap.c) = 2e10cf645899c53e67381dcc967ff7b22f4638b6
+SHA1 (patch-openbsd-compat_imsg-buffer.c) = 1b7e13feb37f641e48c5b074572ef6e280d53dbb
+SHA1 (patch-openbsd-compat_imsg.c) = 0082bad5bbbc006968c8a2463ac601c7549bc7d4

Added files:

Index: pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-ldap_ber.h
diff -u /dev/null pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-ldap_ber.h:1.1
--- /dev/null   Sat Mar  9 23:55:46 2024
+++ pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-ldap_ber.h   Sat Mar  9 23:55:46 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-extras_tables_table-ldap_ber.h,v 1.1 2024/03/09 23:55:46 vins Exp $
+
+Define _BEGIN_DECLS on SunOS
+
+--- extras/tables/table-ldap/ber.h.orig        2024-03-09 22:45:06.596577402 +0000
++++ extras/tables/table-ldap/ber.h
+@@ -20,6 +20,11 @@
+ #ifndef _BER_H
+ #define _BER_H
+ 
++#ifndef __BEGIN_DECLS
++# define __BEGIN_DECLS
++# define __END_DECLS
++#endif
++
+ struct ber_octetstring {
+       size_t                   ostr_len;
+       const void              *ostr_val;
Index: pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-socketmap_table__socketmap.c
diff -u /dev/null pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-socketmap_table__socketmap.c:1.1
--- /dev/null   Sat Mar  9 23:55:46 2024
+++ pkgsrc/mail/opensmtpd-extras/patches/patch-extras_tables_table-socketmap_table__socketmap.c Sat Mar  9 23:55:46 2024
@@ -0,0 +1,35 @@
+$NetBSD: patch-extras_tables_table-socketmap_table__socketmap.c,v 1.1 2024/03/09 23:55:46 vins Exp $
+
+Rename local variables to avoid name clash on SmartOS
+
+--- extras/tables/table-socketmap/table_socketmap.c.orig       2024-03-09 22:58:23.569776538 +0000
++++ extras/tables/table-socketmap/table_socketmap.c
+@@ -48,22 +48,22 @@ enum socketmap_reply{
+ static int
+ table_socketmap_connect(const char *s)
+ {
+-      struct sockaddr_un      sun;
++      struct sockaddr_un      lsun;
+ 
+       if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
+               log_warn("warn: socket");
+               goto err;
+       }
+ 
+-      memset(&sun, 0, sizeof sun);
+-      sun.sun_family = AF_UNIX;
+-      if (strlcpy(sun.sun_path, s, sizeof(sun.sun_path)) >=
+-          sizeof(sun.sun_path)) {
++      memset(&lsun, 0, sizeof lsun);
++      lsun.sun_family = AF_UNIX;
++      if (strlcpy(lsun.sun_path, s, sizeof(lsun.sun_path)) >=
++          sizeof(lsun.sun_path)) {
+               log_warnx("warn: socket path too long");
+               goto err;
+       }
+ 
+-      if (connect(sock, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
++      if (connect(sock, (struct sockaddr *)&lsun, sizeof(lsun)) == -1) {
+               log_warn("warn: connect");
+               goto err;
+       }
Index: pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg-buffer.c
diff -u /dev/null pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg-buffer.c:1.1
--- /dev/null   Sat Mar  9 23:55:46 2024
+++ pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg-buffer.c     Sat Mar  9 23:55:46 2024
@@ -0,0 +1,22 @@
+$NetBSD: patch-openbsd-compat_imsg-buffer.c,v 1.1 2024/03/09 23:55:46 vins Exp $
+
+Fix build on SmartOS
+
+--- openbsd-compat/imsg-buffer.c.orig  2024-03-09 21:39:43.809503619 +0000
++++ openbsd-compat/imsg-buffer.c
+@@ -16,6 +16,15 @@
+  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
++/* needed for CMSG_* functions on SunOS */
++#if defined(__sun)
++#if (__STDC_VERSION__ - 0 < 199901L)
++#define _XOPEN_SOURCE 500
++#else
++#define _XOPEN_SOURCE 600
++#endif
++#endif
++
+ #include "includes.h"
+ 
+ #include <sys/param.h>
Index: pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg.c
diff -u /dev/null pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg.c:1.1
--- /dev/null   Sat Mar  9 23:55:46 2024
+++ pkgsrc/mail/opensmtpd-extras/patches/patch-openbsd-compat_imsg.c    Sat Mar  9 23:55:46 2024
@@ -0,0 +1,22 @@
+$NetBSD: patch-openbsd-compat_imsg.c,v 1.1 2024/03/09 23:55:46 vins Exp $
+
+Fix build on SmartOS 
+
+--- openbsd-compat/imsg.c.orig 2024-03-09 21:33:04.519759277 +0000
++++ openbsd-compat/imsg.c
+@@ -16,6 +16,15 @@
+  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
++/* needed for CMSG_* functions on SunOS */
++#if defined(__sun)
++#if (__STDC_VERSION__ - 0 < 199901L)
++#define _XOPEN_SOURCE 500
++#else
++#define _XOPEN_SOURCE 600
++#endif
++#endif
++
+ #include "includes.h"
+ 
+ #include <sys/param.h>



Home | Main Index | Thread Index | Old Index