pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/opendkim make this work with OpenSSL-1.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/424cebac9c81
branches:  trunk
changeset: 405223:424cebac9c81
user:      christos <christos%pkgsrc.org@localhost>
date:      Sun Nov 24 23:20:40 2019 +0000

description:
make this work with OpenSSL-1.1

diffstat:

 mail/opendkim/Makefile                                 |   8 +-
 mail/opendkim/distinfo                                 |   5 +-
 mail/opendkim/patches/patch-configure                  |  17 -----
 mail/opendkim/patches/patch-configure.ac               |  55 ++++++++++++++++++
 mail/opendkim/patches/patch-opendkim_opendkim-crypto.c |  34 +++++++++++
 5 files changed, 98 insertions(+), 21 deletions(-)

diffs (163 lines):

diff -r 8ea56f689ce8 -r 424cebac9c81 mail/opendkim/Makefile
--- a/mail/opendkim/Makefile    Sun Nov 24 22:01:36 2019 +0000
+++ b/mail/opendkim/Makefile    Sun Nov 24 23:20:40 2019 +0000
@@ -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 @@
 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 @@
 
 .include "options.mk"
 
+pre-configure:
+       cd ${WRKSRC} && autoreconf -fiv
+
 PLIST_SRC+=            ${PKGDIR}/PLIST
 
 BUILDLINK_API_DEPENDS.openssl+=                openssl>=0.9.8
diff -r 8ea56f689ce8 -r 424cebac9c81 mail/opendkim/distinfo
--- a/mail/opendkim/distinfo    Sun Nov 24 22:01:36 2019 +0000
+++ b/mail/opendkim/distinfo    Sun Nov 24 23:20:40 2019 +0000
@@ -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 -r 8ea56f689ce8 -r 424cebac9c81 mail/opendkim/patches/patch-configure
--- a/mail/opendkim/patches/patch-configure     Sun Nov 24 22:01:36 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 8ea56f689ce8 -r 424cebac9c81 mail/opendkim/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/opendkim/patches/patch-configure.ac  Sun Nov 24 23:20:40 2019 +0000
@@ -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 -r 8ea56f689ce8 -r 424cebac9c81 mail/opendkim/patches/patch-opendkim_opendkim-crypto.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c    Sun Nov 24 23:20:40 2019 +0000
@@ -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)
+               {



Home | Main Index | Thread Index | Old Index