diff options
author | joerg <joerg@pkgsrc.org> | 2007-07-03 13:54:45 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-07-03 13:54:45 +0000 |
commit | e24209d1455027ac9e39ab799fbdc2c1e21f9cfc (patch) | |
tree | f0384614f91c073d547064a3c7e0dd2d67393d7e /mail | |
parent | fa3e8e36f943b91d9e0ce955b1413de422524561 (diff) | |
download | pkgsrc-e24209d1455027ac9e39ab799fbdc2c1e21f9cfc.tar.gz |
Add common handling for libresolv similiar to dlopen(3) wrapping.
For now, DragonFly and FreeBSD use the libc version, it is not reentrant,
but thread-safe. NetBSD 3.0+ and Darwin 8.0+ use libresolv from base
(the BIND9 resolver), all other fall back to net/bind9. Feel free to add
your favorite platform if it has a thread-safe resolver in base.
Modify mail/libspf-alf, mail/milter-greylist, mail/spamdyke and
net/nocol accordingly. Testing on !DragonFly and feedback from tron@
Diffstat (limited to 'mail')
-rw-r--r-- | mail/libspf-alt/Makefile | 4 | ||||
-rw-r--r-- | mail/libspf-alt/buildlink3.mk | 4 | ||||
-rw-r--r-- | mail/libspf-alt/distinfo | 3 | ||||
-rw-r--r-- | mail/libspf-alt/patches/patch-aa | 56 | ||||
-rw-r--r-- | mail/milter-greylist/options.mk | 4 | ||||
-rw-r--r-- | mail/spamdyke/Makefile | 3 | ||||
-rw-r--r-- | mail/spamdyke/distinfo | 6 | ||||
-rw-r--r-- | mail/spamdyke/patches/patch-ab | 9 | ||||
-rw-r--r-- | mail/spamdyke/patches/patch-ac | 10 |
9 files changed, 80 insertions, 19 deletions
diff --git a/mail/libspf-alt/Makefile b/mail/libspf-alt/Makefile index 309fa2e6a58..60083601cde 100644 --- a/mail/libspf-alt/Makefile +++ b/mail/libspf-alt/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2006/10/04 21:47:16 wiz Exp $ +# $NetBSD: Makefile,v 1.15 2007/07/03 13:54:45 joerg Exp $ DISTNAME= libspf_alt-0.4.0 PKGREVISION= 3 @@ -15,5 +15,5 @@ GNU_CONFIGURE= YES CONFIGURE_ARGS+=--with-bind=${BUILDLINK_PREFIX.bind} .include "../../devel/gettext-lib/buildlink3.mk" -.include "../../net/bind9/buildlink3.mk" +.include "../../mk/resolv.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/libspf-alt/buildlink3.mk b/mail/libspf-alt/buildlink3.mk index 53bc698e008..242d4af2373 100644 --- a/mail/libspf-alt/buildlink3.mk +++ b/mail/libspf-alt/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.8 2006/07/08 23:10:57 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.9 2007/07/03 13:54:45 joerg Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ LIBSPF_ALT_BUILDLINK3_MK:= ${LIBSPF_ALT_BUILDLINK3_MK}+ @@ -18,6 +18,6 @@ BUILDLINK_PKGSRCDIR.libspf_alt?= ../../mail/libspf-alt .endif # LIBSPF_ALT_BUILDLINK3_MK .include "../../devel/gettext-lib/buildlink3.mk" -.include "../../net/bind9/buildlink3.mk" +.include "../../mk/resolv.buildlink3.mk" BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/mail/libspf-alt/distinfo b/mail/libspf-alt/distinfo index 9a5e945292d..16f666e5b99 100644 --- a/mail/libspf-alt/distinfo +++ b/mail/libspf-alt/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.2 2005/02/24 09:59:23 agc Exp $ +$NetBSD: distinfo,v 1.3 2007/07/03 13:54:45 joerg Exp $ SHA1 (libspf_alt-0.4.0.tar.gz) = ba269d7508daebf42e9e20720f410c9409207558 RMD160 (libspf_alt-0.4.0.tar.gz) = 67a789cfbc4df391fd6938e81ce90e3b24264615 Size (libspf_alt-0.4.0.tar.gz) = 598003 bytes +SHA1 (patch-aa) = c2663da02cd12ff6c148f4dd2d9670e5ce71d3cb diff --git a/mail/libspf-alt/patches/patch-aa b/mail/libspf-alt/patches/patch-aa new file mode 100644 index 00000000000..82997b35131 --- /dev/null +++ b/mail/libspf-alt/patches/patch-aa @@ -0,0 +1,56 @@ +$NetBSD: patch-aa,v 1.1 2007/07/03 13:54:45 joerg Exp $ + +--- configure.orig 2007-07-02 14:03:12.000000000 +0000 ++++ configure +@@ -19389,13 +19389,13 @@ echo "${ECHO_T}$ac_cv_lib_bind_res_query + if test $ac_cv_lib_bind_res_query = yes; then + LIBS="$LIBS -lbind" + else +- echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 +-echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6 ++ echo "$as_me:$LINENO: checking for res_query in ${RESOLV_LDFLAGS}" >&5 ++echo $ECHO_N "checking for res_query in ${RESOLV_LDFLAGS}... $ECHO_C" >&6 + if test "${ac_cv_lib_resolv_res_query+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lresolv $LIBS" ++LIBS="${RESOLV_LDFLAGS} $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -19453,7 +19453,7 @@ fi + echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5 + echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6 + if test $ac_cv_lib_resolv_res_query = yes; then +- LIBS="$LIBS -lresolv" ++ LIBS="$LIBS ${RESOLV_LDFLAGS}" + else + echo "cannot find resolver library"; exit 1; + fi +@@ -19464,13 +19464,13 @@ fi + + else + +-echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 +-echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6 ++echo "$as_me:$LINENO: checking for res_query in ${RESOLV_LDFLAGS}" >&5 ++echo $ECHO_N "checking for res_query in ${RESOLV_LDFLAGS}... $ECHO_C" >&6 + if test "${ac_cv_lib_resolv_res_query+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lresolv $LIBS" ++LIBS="${RESOLV_LDFLAGS} $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -19532,7 +19532,7 @@ if test $ac_cv_lib_resolv_res_query = ye + #define HAVE_LIBRESOLV 1 + _ACEOF + +- LIBS="-lresolv $LIBS" ++ LIBS="${RESOLV_LDFLAGS} $LIBS" + + fi + diff --git a/mail/milter-greylist/options.mk b/mail/milter-greylist/options.mk index a47af91b6e5..0231f4063ad 100644 --- a/mail/milter-greylist/options.mk +++ b/mail/milter-greylist/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.2 2006/11/09 13:15:10 ghen Exp $ +# $NetBSD: options.mk,v 1.3 2007/07/03 13:54:45 joerg Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.milter-greylist PKG_SUPPORTED_OPTIONS= dnsrbl drac spf @@ -12,7 +12,7 @@ PKG_SUGGESTED_OPTIONS= dnsrbl spf .if empty(PKG_OPTIONS:Mdnsrbl) CONFIGURE_ARGS+= --disable-dnsrbl .else -CONFIGURE_ARGS+= --enable-dnsrbl +CONFIGURE_ARGS+= --enable-dnsrbl --with-thread-safe-resolver .endif ### diff --git a/mail/spamdyke/Makefile b/mail/spamdyke/Makefile index e077078119f..477b9a0fe82 100644 --- a/mail/spamdyke/Makefile +++ b/mail/spamdyke/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2007/06/21 19:08:45 schmonz Exp $ +# $NetBSD: Makefile,v 1.9 2007/07/03 13:54:45 joerg Exp $ # DISTNAME= spamdyke-2.6.3 @@ -41,4 +41,5 @@ do-install: ${INSTALL_DATA} $${f} ${PREFIX}/share/doc/${PKGBASE}; \ done +.include "../../mk/resolv.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/spamdyke/distinfo b/mail/spamdyke/distinfo index c6bfa30c3a3..72ea49a64f8 100644 --- a/mail/spamdyke/distinfo +++ b/mail/spamdyke/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.7 2007/06/21 19:08:45 schmonz Exp $ +$NetBSD: distinfo,v 1.8 2007/07/03 13:54:46 joerg Exp $ SHA1 (spamdyke-2.6.3.tgz) = e893b319c8808bc26a649b5ec7b82dae41e64e5f RMD160 (spamdyke-2.6.3.tgz) = 9b061fc32ee92d731db0d8ad2cf04d61829d59ac Size (spamdyke-2.6.3.tgz) = 116041 bytes SHA1 (patch-aa) = 9bb28e5535b28fa558ce577670e4a13324664ef4 -SHA1 (patch-ab) = e92e9ed2265debd1bf3607d83c3645a37acb4ffe -SHA1 (patch-ac) = b8e6f4aedfcc721055c280d23019e26ac4e05ca1 +SHA1 (patch-ab) = 7297b987c9195d5c111390aaa4dfd2c82df37bac +SHA1 (patch-ac) = 64e4f02e7ff14dee2016c33a4678eba2dc2951f0 diff --git a/mail/spamdyke/patches/patch-ab b/mail/spamdyke/patches/patch-ab index e758026dbcd..a8a18acfed9 100644 --- a/mail/spamdyke/patches/patch-ab +++ b/mail/spamdyke/patches/patch-ab @@ -1,14 +1,15 @@ -$NetBSD: patch-ab,v 1.3 2007/05/30 05:58:11 schmonz Exp $ +$NetBSD: patch-ab,v 1.4 2007/07/03 13:54:46 joerg Exp $ ---- spamdyke/Makefile.orig 2007-05-24 18:55:10.000000000 -0400 +--- spamdyke/Makefile.orig 2007-05-24 22:55:10.000000000 +0000 +++ spamdyke/Makefile @@ -1,8 +1,8 @@ #CFLAGS := -Wall -g -funsigned-char -CFLAGS := -Wall -O2 -funsigned-char -+CFLAGS += -Wall -O2 -funsigned-char - LFLAGS := -lresolv +-LFLAGS := -lresolv -CFLAGS_TLS := -DTLS -LFLAGS_TLS := -lssl -lcrypto ++CFLAGS += -Wall -O2 -funsigned-char ++LFLAGS := ${RESOLV_DLFAGS} +CFLAGS_TLS ?= -DTLS +LFLAGS_TLS ?= -lssl -lcrypto OFILES := spamdyke.o command_line.o dns.o environment.o usage.o search_fs.o exec.o base64.o tls.o diff --git a/mail/spamdyke/patches/patch-ac b/mail/spamdyke/patches/patch-ac index fe41b569b34..f048fec2075 100644 --- a/mail/spamdyke/patches/patch-ac +++ b/mail/spamdyke/patches/patch-ac @@ -1,11 +1,13 @@ -$NetBSD: patch-ac,v 1.4 2007/06/08 01:08:29 schmonz Exp $ +$NetBSD: patch-ac,v 1.5 2007/07/03 13:54:46 joerg Exp $ ---- utils/Makefile.orig 2007-06-05 22:51:35.000000000 -0400 +--- utils/Makefile.orig 2007-06-06 02:51:35.000000000 +0000 +++ utils/Makefile -@@ -1,5 +1,5 @@ +@@ -1,6 +1,6 @@ #CFLAGS := -Wall -g -funsigned-char -I../spamdyke -CFLAGS := -Wall -O2 -funsigned-char -I../spamdyke +-LFLAGS := -lresolv +CFLAGS += -Wall -O2 -funsigned-char -I../spamdyke - LFLAGS := -lresolv ++LFLAGS := ${RESOLV_LDFLAGS} all: domain2path domainsplit dnstxt dnsptr dnsmx passwordcheck + |