diff options
author | christos <christos@pkgsrc.org> | 2019-11-24 23:20:40 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2019-11-24 23:20:40 +0000 |
commit | b4536b3ea3ad1edaf8daf4e3078cb8b85e45ac68 (patch) | |
tree | 8983b53bba8eaddf82d6109d35ab45ecf3d23a84 /mail | |
parent | b97ee58efe317957410a885ea08e45e91f2050a9 (diff) | |
download | pkgsrc-b4536b3ea3ad1edaf8daf4e3078cb8b85e45ac68.tar.gz |
make this work with OpenSSL-1.1
Diffstat (limited to 'mail')
-rw-r--r-- | mail/opendkim/Makefile | 8 | ||||
-rw-r--r-- | mail/opendkim/distinfo | 5 | ||||
-rw-r--r-- | mail/opendkim/patches/patch-configure | 17 | ||||
-rw-r--r-- | mail/opendkim/patches/patch-configure.ac | 55 | ||||
-rw-r--r-- | mail/opendkim/patches/patch-opendkim_opendkim-crypto.c | 34 |
5 files changed, 98 insertions, 21 deletions
diff --git a/mail/opendkim/Makefile b/mail/opendkim/Makefile index 61129b23c17..66314cbcfbf 100644 --- a/mail/opendkim/Makefile +++ b/mail/opendkim/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.29 2019/08/11 13:21:30 wiz Exp $ +# $NetBSD: Makefile,v 1.30 2019/11/24 23:20:40 christos Exp $ DISTNAME= opendkim-2.10.3 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opendkim/} @@ -11,6 +11,7 @@ COMMENT= Open source DKIM library, MTA filter implementation and tools LICENSE= sendmail-open-source-license USE_LIBTOOL= yes +USE_TOOLS+= autoconf automake autoreconf USE_TOOLS+= pkg-config perl:run GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} @@ -41,6 +42,9 @@ PKGCONFIG_OVERRIDE+= libopendkim/opendkim.pc.in .include "options.mk" +pre-configure: + cd ${WRKSRC} && autoreconf -fiv + PLIST_SRC+= ${PKGDIR}/PLIST BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.8 diff --git a/mail/opendkim/distinfo b/mail/opendkim/distinfo index 9e4becd720d..10130883217 100644 --- a/mail/opendkim/distinfo +++ b/mail/opendkim/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.18 2016/03/18 06:16:18 pettai Exp $ +$NetBSD: distinfo,v 1.19 2019/11/24 23:20:40 christos Exp $ SHA1 (opendkim-2.10.3.tar.gz) = 4e9b966860bcfbca6441ed84a95bbe762fff69f4 RMD160 (opendkim-2.10.3.tar.gz) = c6553757ae9675434e647f3cc1e6357bc60c7d2a SHA512 (opendkim-2.10.3.tar.gz) = 97923e533d072c07ae4d16a46cbed95ee799aa50f19468d8bc6d1dc534025a8616c3b4b68b5842bc899b509349a2c9a67312d574a726b048c0ea46dd4fcc45d8 Size (opendkim-2.10.3.tar.gz) = 1210224 bytes -SHA1 (patch-configure) = 3e6bc994f72ed146770190a6b8a178abf4ebe4cd +SHA1 (patch-configure.ac) = 17eeb1927fb19ba7f48f9dfd8a9c2f6c44d823ca +SHA1 (patch-opendkim_opendkim-crypto.c) = d7d08fda3dba5bf9cb834123218b1e89b78878e5 diff --git a/mail/opendkim/patches/patch-configure b/mail/opendkim/patches/patch-configure deleted file mode 100644 index 33dd58bcd0f..00000000000 --- a/mail/opendkim/patches/patch-configure +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-configure,v 1.2 2013/12/12 14:11:32 pettai Exp $ - -Portability fixes - -$NetBSD: patch-configure,v 1.2 2013/12/12 14:11:32 pettai Exp $ - ---- configure.orig 2013-12-12 12:59:10.000000000 +0000 -+++ configure -@@ -19585,7 +19585,7 @@ then - as_fn_error $? "reputation requires libjansson" "$LINENO" 5 - fi - --if test x"$jansson_found" == x"yes" -+if test x"$jansson_found" = x"yes" - then - - $as_echo "#define USE_JANSSON 1" >>confdefs.h diff --git a/mail/opendkim/patches/patch-configure.ac b/mail/opendkim/patches/patch-configure.ac new file mode 100644 index 00000000000..a647254b4d0 --- /dev/null +++ b/mail/opendkim/patches/patch-configure.ac @@ -0,0 +1,55 @@ +$NetBSD: patch-configure.ac,v 1.1 2019/11/24 23:20:40 christos Exp $ + +- compat for OpenSSL 1.1 https://sourceforge.net/p/opendkim/patches/37/ +- fix == bashism + +--- configure.ac.orig 2015-05-12 14:43:09.000000000 -0400 ++++ configure.ac 2019-11-24 18:03:48.650839906 -0500 +@@ -860,26 +860,28 @@ + AC_SEARCH_LIBS([ERR_peek_error], [crypto], , + AC_MSG_ERROR([libcrypto not found])) + +- AC_SEARCH_LIBS([SSL_library_init], [ssl], , +- [ +- if test x"$enable_shared" = x"yes" +- then +- AC_MSG_ERROR([Cannot build shared opendkim +- against static openssl libraries. +- Configure with --disable-shared +- to get this working or obtain a +- shared libssl library for +- opendkim to use.]) +- fi + +- # avoid caching issue - last result of SSL_library_init +- # shouldn't be cached for this next check +- unset ac_cv_search_SSL_library_init +- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" +- AC_SEARCH_LIBS([SSL_library_init], [ssl], , +- AC_MSG_ERROR([libssl not found]), [-ldl]) +- ] +- ) ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], ++ [[SSL_library_init();]])], ++ [od_have_ossl="yes";], ++ [od_have_ossl="no";]) ++ if test x"$od_have_ossl" = x"no" ++ then ++ if test x"$enable_shared" = x"yes" ++ then ++ AC_MSG_ERROR([Cannot build shared opendkim ++ against static openssl libraries. ++ Configure with --disable-shared ++ to get this working or obtain a ++ shared libssl library for ++ opendkim to use.]) ++ fi ++ ++ LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" ++ AC_SEARCH_LIBS([SSL_library_init], [ssl], , ++ AC_MSG_ERROR([libssl not found]), [-ldl]) ++ fi + + AC_CHECK_DECL([SHA256_DIGEST_LENGTH], + AC_DEFINE([HAVE_SHA256], 1, diff --git a/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c b/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c new file mode 100644 index 00000000000..216efdedcd1 --- /dev/null +++ b/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c @@ -0,0 +1,34 @@ +$NetBSD: patch-opendkim_opendkim-crypto.c,v 1.1 2019/11/24 23:20:40 christos Exp $ + +- OpenSSL 1.1 compat https://sourceforge.net/p/opendkim/patches/37/ + +--- opendkim/opendkim-crypto.c.orig 2013-02-25 16:02:41.000000000 -0500 ++++ opendkim/opendkim-crypto.c 2019-11-24 18:04:07.924299914 -0500 +@@ -222,7 +222,11 @@ + { + assert(pthread_setspecific(id_key, ptr) == 0); + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ OPENSSL_thread_stop(); ++#else + ERR_remove_state(0); ++#endif + + free(ptr); + +@@ -392,11 +396,15 @@ + { + if (crypto_init_done) + { ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ OPENSSL_thread_stop(); ++#else + CRYPTO_cleanup_all_ex_data(); + CONF_modules_free(); + EVP_cleanup(); + ERR_free_strings(); + ERR_remove_state(0); ++#endif + + if (nmutexes > 0) + { |