pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/libspf2 Add proper autoconfery for res_close(), f...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e972ef87246f
branches: trunk
changeset: 389020:e972ef87246f
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Mon Dec 17 19:24:44 2018 +0000
description:
Add proper autoconfery for res_close(), from maya@ (thanks!).
diffstat:
mail/libspf2/distinfo | 7 +-
mail/libspf2/patches/patch-configure | 41 +++++++++++++-
mail/libspf2/patches/patch-configure.ac | 30 ++++++++++
mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c | 13 ++--
4 files changed, 78 insertions(+), 13 deletions(-)
diffs (131 lines):
diff -r ebcfda2097ab -r e972ef87246f mail/libspf2/distinfo
--- a/mail/libspf2/distinfo Mon Dec 17 19:15:33 2018 +0000
+++ b/mail/libspf2/distinfo Mon Dec 17 19:24:44 2018 +0000
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.10 2018/12/17 18:32:42 schmonz Exp $
+$NetBSD: distinfo,v 1.11 2018/12/17 19:24:44 schmonz Exp $
SHA1 (libspf2-1.2.10.tar.gz) = 3c31b20c737d9a8044440e5bf25697016b9cb582
RMD160 (libspf2-1.2.10.tar.gz) = 5557435802896bec31362c1fa028e9e295656455
SHA512 (libspf2-1.2.10.tar.gz) = 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130
Size (libspf2-1.2.10.tar.gz) = 508842 bytes
-SHA1 (patch-configure) = 4457ad150c192031f5db020cfd10110f7e4f28b1
+SHA1 (patch-configure) = 0005180f6b9aedc45663dee6764c438d33078359
+SHA1 (patch-configure.ac) = eb0fae2a2bbe86f0e54b56c3ab2ec696f9a6788c
SHA1 (patch-src_include_spf__log.h) = 87b534d338b7fa36168cf8b745a285e38598cfed
SHA1 (patch-src_libreplace_Makefile.in) = 12fab6f97efff6cc1944ebb5a5cf26fdb79971c2
SHA1 (patch-src_libreplace_ensure__libreplace__symbol.c) = 1b2ccf11fe7cade3c7769e7388cdd79ee250b26e
-SHA1 (patch-src_libspf2_spf__dns__resolv.c) = 493449b294afa3154b8656d2155d3b144393d02c
+SHA1 (patch-src_libspf2_spf__dns__resolv.c) = b704c82f6627154470b07763d2233923bf0f6b10
diff -r ebcfda2097ab -r e972ef87246f mail/libspf2/patches/patch-configure
--- a/mail/libspf2/patches/patch-configure Mon Dec 17 19:15:33 2018 +0000
+++ b/mail/libspf2/patches/patch-configure Mon Dec 17 19:24:44 2018 +0000
@@ -1,10 +1,45 @@
-$NetBSD: patch-configure,v 1.3 2013/07/06 11:09:26 tron Exp $
+$NetBSD: patch-configure,v 1.4 2018/12/17 19:24:44 schmonz Exp $
Ensure that libreplace contains at least one symbol.
+test for res_close, not available in OpenBSD
--- configure.orig 2012-02-20 07:31:46.000000000 +0000
-+++ configure 2013-07-06 11:54:48.000000000 +0100
-@@ -13577,7 +13577,7 @@
++++ configure
+@@ -13494,6 +13494,33 @@ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_RES_NDESTROY $ac_have_decl
+ _ACEOF
+
++ac_fn_c_check_decl "$LINENO" "res_close" "ac_cv_have_decl_res_close" "
++ #ifdef HAVE_SYS_TYPES_H
++ # include <sys/types.h>
++ #endif
++ #ifdef HAVE_SYS_SOCKET_H
++ # include <sys/socket.h> /* inet_ functions / structs */
++ #endif
++ #ifdef HAVE_NETINET_IN_H
++ # include <netinet/in.h> /* inet_ functions / structs */
++ #endif
++ #ifdef HAVE_ARPA_NAMESER_H
++ # include <arpa/nameser.h> /* DNS HEADER struct */
++ #endif
++ #ifdef HAVE_RESOLV_H
++ # include <resolv.h>
++ #endif
++
++"
++if test "x$ac_cv_have_decl_res_close" = xyes; then :
++ ac_have_decl=1
++else
++ ac_have_decl=0
++fi
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_RES_CLOSE $ac_have_decl
++_ACEOF
+
+ ac_fn_c_check_decl "$LINENO" "ns_t_spf" "ac_cv_have_decl_ns_t_spf" "
+ #ifdef HAVE_SYS_TYPES_H
+@@ -13577,7 +13604,7 @@ _ACEOF
fi
done
diff -r ebcfda2097ab -r e972ef87246f mail/libspf2/patches/patch-configure.ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/libspf2/patches/patch-configure.ac Mon Dec 17 19:24:44 2018 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-configure.ac,v 1.1 2018/12/17 19:24:44 schmonz Exp $
+
+Test for res_close, not available in OpenBSD.
+
+--- configure.ac.orig 2012-02-20 07:30:42.000000000 +0000
++++ configure.ac
+@@ -231,6 +231,23 @@ AC_CHECK_DECLS([res_ndestroy], [], [], [
+ # include <resolv.h>
+ #endif
+ ]])
++AC_CHECK_DECLS([res_close], [], [], [[
++ #ifdef HAVE_SYS_TYPES_H
++ # include <sys/types.h>
++ #endif
++ #ifdef HAVE_SYS_SOCKET_H
++ # include <sys/socket.h> /* inet_ functions / structs */
++ #endif
++ #ifdef HAVE_NETINET_IN_H
++ # include <netinet/in.h> /* inet_ functions / structs */
++ #endif
++ #ifdef HAVE_ARPA_NAMESER_H
++ # include <arpa/nameser.h> /* DNS HEADER struct */
++ #endif
++ #ifdef HAVE_RESOLV_H
++ # include <resolv.h>
++ #endif
++ ]])
+
+ AC_CHECK_DECLS([ns_t_spf], [], [], [[
+ #ifdef HAVE_SYS_TYPES_H
diff -r ebcfda2097ab -r e972ef87246f mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c
--- a/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c Mon Dec 17 19:15:33 2018 +0000
+++ b/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c Mon Dec 17 19:24:44 2018 +0000
@@ -1,16 +1,15 @@
-$NetBSD: patch-src_libspf2_spf__dns__resolv.c,v 1.1 2018/12/17 18:32:42 schmonz Exp $
+$NetBSD: patch-src_libspf2_spf__dns__resolv.c,v 1.2 2018/12/17 19:24:44 schmonz Exp $
OpenBSD's libc resolver provides res_init() but not res_close().
---- src/libspf2/spf_dns_resolv.c.orig Sat Jan 28 08:24:47 2012
+--- src/libspf2/spf_dns_resolv.c.orig 2012-01-28 08:24:47.000000000 +0000
+++ src/libspf2/spf_dns_resolv.c
-@@ -607,7 +607,9 @@ SPF_dns_resolv_free(SPF_dns_server_t *spf_dns_server)
+@@ -606,7 +606,7 @@ SPF_dns_resolv_free(SPF_dns_server_t *sp
+ {
SPF_ASSERT_NOTNULL(spf_dns_server);
- #if ! HAVE_DECL_RES_NINIT
-+# ifndef __OpenBSD__
+-#if ! HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_CLOSE
res_close();
-+# endif
#endif
- free(spf_dns_server);
Home |
Main Index |
Thread Index |
Old Index