summaryrefslogtreecommitdiff
path: root/mail/qsmtp
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2020-01-12 23:03:28 +0000
committerjoerg <joerg@pkgsrc.org>2020-01-12 23:03:28 +0000
commitd0e194c2c46f2eba6b0be85feb45b2e8cdc4ba89 (patch)
tree09de1c8db70590cc463d247b8a443e62309e97f8 /mail/qsmtp
parent675bba51ac86e040747889fd897620623ad0f418 (diff)
downloadpkgsrc-d0e194c2c46f2eba6b0be85feb45b2e8cdc4ba89.tar.gz
Fix build on NetBSD current.
Diffstat (limited to 'mail/qsmtp')
-rw-r--r--mail/qsmtp/distinfo9
-rw-r--r--mail/qsmtp/patches/patch-CMakeLists.txt34
-rw-r--r--mail/qsmtp/patches/patch-qsmtpd_antispam.c14
-rw-r--r--mail/qsmtp/patches/patch-qsmtpd_auth.c17
-rw-r--r--mail/qsmtp/patches/patch-qsmtpd_data.c14
-rw-r--r--mail/qsmtp/patches/patch-tests_mmap__test.c11
-rw-r--r--mail/qsmtp/patches/patch-tests_qsdata__test.c16
7 files changed, 111 insertions, 4 deletions
diff --git a/mail/qsmtp/distinfo b/mail/qsmtp/distinfo
index 29efce11af4..77226880819 100644
--- a/mail/qsmtp/distinfo
+++ b/mail/qsmtp/distinfo
@@ -1,7 +1,12 @@
-$NetBSD: distinfo,v 1.1 2020/01/07 08:15:30 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2020/01/12 23:03:28 joerg Exp $
SHA1 (Qsmtp-0.37.tar.xz) = 768567e10adf47d651735bd8e7289a6b8a18d24a
RMD160 (Qsmtp-0.37.tar.xz) = abf841db63e94142f309fcac93c29a29c1a4d692
SHA512 (Qsmtp-0.37.tar.xz) = 911d9d956ef7d0c6ad150745db489dd96eca0b665d99c0db648b4382c0d21fc759ad4a138e7adf69c6749574ad619114e7f06f62c131d0ae103e9b0493d39ef3
Size (Qsmtp-0.37.tar.xz) = 250100 bytes
-SHA1 (patch-CMakeLists.txt) = de0a0f4acd99e1573937063fd89fec3caa4232e3
+SHA1 (patch-CMakeLists.txt) = ca780d4dfe778c359db03231b06382372e13a62f
+SHA1 (patch-qsmtpd_antispam.c) = 8df576496c31712e49f4679be172074d7712c089
+SHA1 (patch-qsmtpd_auth.c) = 48958cc70850e2016c755eb53c777998d1477018
+SHA1 (patch-qsmtpd_data.c) = 94a8c51a63c1d6db2433c932388bbac260f462c2
+SHA1 (patch-tests_mmap__test.c) = a39835b6fba0a183e8ff47bdeb7f26889cbb4b53
+SHA1 (patch-tests_qsdata__test.c) = 8b07628c00c05edee79fd6918ce6bc1a24747ebb
diff --git a/mail/qsmtp/patches/patch-CMakeLists.txt b/mail/qsmtp/patches/patch-CMakeLists.txt
index ddd0c93d3d0..95f56ac9d62 100644
--- a/mail/qsmtp/patches/patch-CMakeLists.txt
+++ b/mail/qsmtp/patches/patch-CMakeLists.txt
@@ -1,10 +1,40 @@
-$NetBSD: patch-CMakeLists.txt,v 1.1 2020/01/07 08:15:30 schmonz Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.2 2020/01/12 23:03:28 joerg Exp $
Support PKGMANDIR.
+Support explicit_memset on NetBSD.
--- CMakeLists.txt.orig 2020-01-06 19:19:59.000000000 +0000
+++ CMakeLists.txt
-@@ -220,8 +220,8 @@ if (BUILD_DOC)
+@@ -7,7 +7,7 @@ project(Qsmtp
+
+ option(CHECK_MEMORY "Add memory access checks" OFF)
+
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
++set (CMAKE_MODULE_PATH "/data/scratch/mail/qsmtp/work/.buildlink/cmake-Modules" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
+
+ set(CMAKE_C_STANDARD 99)
+ set(CMAKE_C_STANDARD_REQUIRED On)
+@@ -95,7 +95,8 @@ endif ()
+
+ set(CMAKE_REQUIRED_INCLUDES string.h)
+ CHECK_FUNCTION_EXISTS(explicit_bzero HAS_EXP_BZERO)
+-if (NOT HAS_EXP_BZERO)
++CHECK_FUNCTION_EXISTS(explicit_memset HAS_EXP_MEMSET)
++if (NOT HAS_EXP_BZERO AND NOT HAS_EXP_MEMSET)
+ set(CMAKE_REQUIRED_INCLUDES bsd/string.h)
+ find_library(LIBBSD NAMES bsd)
+ if (LIBBSD)
+@@ -111,6 +112,9 @@ if (NOT HAS_EXP_BZERO)
+ add_definitions(-DINSECURE_BZERO)
+ endif ()
+ endif ()
++if (HAS_EXP_MEMSET)
++ add_definitions(-DHAS_EXP_MEMSET)
++endif ()
+ set(CMAKE_REQUIRED_INCLUDES fcntl.h)
+ CHECK_FUNCTION_EXISTS(openat HAS_OPENAT)
+ unset(CMAKE_REQUIRED_INCLUDES)
+@@ -220,8 +224,8 @@ if (BUILD_DOC)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/Qremote.8
${CMAKE_CURRENT_BINARY_DIR}/Qsmtpd.8
diff --git a/mail/qsmtp/patches/patch-qsmtpd_antispam.c b/mail/qsmtp/patches/patch-qsmtpd_antispam.c
new file mode 100644
index 00000000000..ad9b8c34bfe
--- /dev/null
+++ b/mail/qsmtp/patches/patch-qsmtpd_antispam.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-qsmtpd_antispam.c,v 1.1 2020/01/12 23:03:28 joerg Exp $
+
+Find LOCK_* on NetBSD.
+
+--- qsmtpd/antispam.c.orig 2020-01-11 21:21:57.002915885 +0000
++++ qsmtpd/antispam.c
+@@ -1,6 +1,7 @@
+ /** \file antispam.c
+ \brief several helper functions for spam filters
+ */
++#define _NETBSD_SOURCE
+
+ #include <qsmtpd/antispam.h>
+
diff --git a/mail/qsmtp/patches/patch-qsmtpd_auth.c b/mail/qsmtp/patches/patch-qsmtpd_auth.c
new file mode 100644
index 00000000000..1cde1b230bf
--- /dev/null
+++ b/mail/qsmtp/patches/patch-qsmtpd_auth.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-qsmtpd_auth.c,v 1.1 2020/01/12 23:03:28 joerg Exp $
+
+Use explicit_memset as explicit_bzero implementation on NetBSD.
+
+--- qsmtpd/auth.c.orig 2020-01-11 21:10:23.629847795 +0000
++++ qsmtpd/auth.c
+@@ -26,7 +26,9 @@
+ #include <syslog.h>
+ #include <time.h>
+ #include <unistd.h>
+-#ifdef NEED_BSD_STRING_H
++#ifdef HAS_EXP_MEMSET
++#define explicit_bzero(a, b) explicit_memset((a), 0, (b))
++#elif defined(NEED_BSD_STRING_H)
+ #include <bsd/string.h>
+ #elif defined(INSECURE_BZERO)
+ // insecure fallback, could be optimized out by the compiler so memory is not overwritten
diff --git a/mail/qsmtp/patches/patch-qsmtpd_data.c b/mail/qsmtp/patches/patch-qsmtpd_data.c
new file mode 100644
index 00000000000..1f539945b7c
--- /dev/null
+++ b/mail/qsmtp/patches/patch-qsmtpd_data.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-qsmtpd_data.c,v 1.1 2020/01/12 23:03:28 joerg Exp $
+
+Find LOCK_* on NetBSD.
+
+--- qsmtpd/data.c.orig 2020-01-11 21:11:14.750764277 +0000
++++ qsmtpd/data.c
+@@ -4,6 +4,7 @@
+
+ #define _STD_SOURCE
+ #define _GNU_SOURCE
++#define _NETBSD_SOURCE
+ #include <qsmtpd/qsdata.h>
+
+ #include <fmt.h>
diff --git a/mail/qsmtp/patches/patch-tests_mmap__test.c b/mail/qsmtp/patches/patch-tests_mmap__test.c
new file mode 100644
index 00000000000..01ff0eedf1e
--- /dev/null
+++ b/mail/qsmtp/patches/patch-tests_mmap__test.c
@@ -0,0 +1,11 @@
+$NetBSD: patch-tests_mmap__test.c,v 1.1 2020/01/12 23:03:28 joerg Exp $
+
+Find LOCK_* on NetBSD.
+
+--- tests/mmap_test.c.orig 2020-01-11 21:22:55.244319133 +0000
++++ tests/mmap_test.c
+@@ -1,3 +1,4 @@
++#define _NETBSD_SOURCE
+ #include <mmap.h>
+ #include "test_io/testcase_io.h"
+
diff --git a/mail/qsmtp/patches/patch-tests_qsdata__test.c b/mail/qsmtp/patches/patch-tests_qsdata__test.c
new file mode 100644
index 00000000000..87d60373c0b
--- /dev/null
+++ b/mail/qsmtp/patches/patch-tests_qsdata__test.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-tests_qsdata__test.c,v 1.1 2020/01/12 23:03:28 joerg Exp $
+
+Patch the right function on NetBSD, symbol renaming doesn't agree with
+the manual definition.
+
+--- tests/qsdata_test.c.orig 2020-01-11 21:16:44.405991522 +0000
++++ tests/qsdata_test.c
+@@ -53,6 +53,8 @@ time(time_t *t __attribute__ ((unused)))
+ int
+ #ifdef __DARWIN_ONLY_UNIX_CONFORMANCE
+ gettimeofday(struct timeval *tv, void *tz)
++#elif defined(__NetBSD__)
++__gettimeofday50(struct timeval * __restrict tv, struct timezone * __restrict tz)
+ #else
+ gettimeofday(struct timeval *tv, struct timezone *tz)
+ #endif