Here are diffs to udet the libbind port (ISC stub resolver that used to be part of BIND) that Antoine removed, and switch mtr to using it (mtr depends on libbind internals a bit too much and is currently broken with asr). As a bonus this fixes the gtk flavour of mtr (broken by thread usage).
I have another WIP port which also requires things from libbind and I believe zhuk@ has had problems with something else in this way, so this seems like it might be a viable stopgap until we can add more libbind features. OK? (There is a minor symbol conflict: /usr/lib/libc.so.67.0: /usr/local/lib/libbind.so.3.0 : WARNING: symbol(__p_class_syms) size mismatch, relink your program /usr/lib/libc.so.67.0: /usr/local/lib/libbind.so.3.0 : WARNING: symbol(__p_type_syms) size mismatch, relink your program I would propose to resolve this at some point by syncing the class/type arrays in base with the newer versions from libbind.) Index: mtr/Makefile =================================================================== RCS file: /cvs/ports/net/mtr/Makefile,v retrieving revision 1.52 diff -u -p -r1.52 Makefile --- mtr/Makefile 11 Mar 2013 11:35:49 -0000 1.52 +++ mtr/Makefile 30 Mar 2013 15:04:03 -0000 @@ -3,6 +3,7 @@ COMMENT= Matt's traceroute - network diagnostic tool#' DISTNAME= mtr-0.82 +REVISION= 0 CATEGORIES= net MAINTAINER= Jakob Schlyter <[email protected]> @@ -12,17 +13,18 @@ HOMEPAGE= http://www.bitwizard.nl/mtr/ # GPLv2+ PERMIT_PACKAGE_CDROM= yes -WANTLIB= c m termcap +WANTLIB= bind c m termcap +LIB_DEPENDS= net/libbind MASTER_SITES= ftp://ftp.bitwizard.nl/mtr/ -CONFIGURE_STYLE=gnu +CONFIGURE_STYLE= gnu +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include/bind" \ + LDFLAGS="-L${LOCALBASE}/lib -lbind" FLAVORS= gtk - FLAVOR?= .if ${FLAVOR} == "gtk" -BROKEN= fails at runtime with "No nameservers defined" MODULES+= devel/gettext CONFIGURE_ARGS+= --with-gtk-prefix=${LOCALBASE} LIB_DEPENDS+= x11/gtk+2 Index: mtr/patches/patch-configure =================================================================== RCS file: mtr/patches/patch-configure diff -N mtr/patches/patch-configure --- mtr/patches/patch-configure 29 May 2012 23:43:47 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@ ---- configure.orig Fri Dec 2 13:21:30 2011 -+++ configure Mon May 7 22:20:59 2012 -@@ -5325,6 +5325,7 @@ _ACEOF - - - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -+#include <sys/types.h> - #include <netinet/in.h> - #ifdef HAVE_SOCKET_H - #include <socket.h> -@@ -5342,6 +5343,7 @@ fi - - - ac_fn_c_check_type "$LINENO" "struct in_addr" "ac_cv_type_struct_in_addr" " -+#include <sys/types.h> - #include <netinet/in.h> - - " Index: libbind/Makefile =================================================================== RCS file: libbind/Makefile diff -N libbind/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libbind/Makefile 30 Mar 2013 15:02:33 -0000 @@ -0,0 +1,31 @@ +# $OpenBSD$ + +COMMENT= BIND stub resolver library + +V= 6.0 +DISTNAME= libbind-6.0 +EPOCH= 0 + +SHARED_LIBS += bind 3.0 # 6.1 + +CATEGORIES= net + +HOMEPAGE= http://www.isc.org/software/libbind + +MAINTAINER= Stuart Henderson <[email protected]> + +# ISC +PERMIT_PACKAGE_CDROM= Yes + +MASTER_SITES= ${MASTER_SITE_ISC:=libbind/$V/} + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= ${CONFIGURE_SHARED} \ + --with-libtool + +NO_TEST= Yes + +post-install: + rm -f ${PREFIX}/man/cat?/* + +.include <bsd.port.mk> Index: libbind/distinfo =================================================================== RCS file: libbind/distinfo diff -N libbind/distinfo --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libbind/distinfo 30 Mar 2013 15:02:33 -0000 @@ -0,0 +1,2 @@ +SHA256 (libbind-6.0.tar.gz) = uYtqpufEA/WmUi/7aDJXhah+qLEzd62ouoeVOj6Msp0= +SIZE (libbind-6.0.tar.gz) = 757162 Index: libbind//pkg/DESCR =================================================================== RCS file: libbind//pkg/DESCR diff -N libbind//pkg/DESCR --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libbind//pkg/DESCR 30 Mar 2013 15:02:34 -0000 @@ -0,0 +1,8 @@ +ISC's libbind provides the standard resolver library, along with header +files and documentation, for communicating with domain name servers, +retrieving network host entries from /etc/hosts or via DNS, converting +CIDR network addresses, performing Hesiod information lookups, +retrieving network entries from /etc/networks, implementing TSIG +transaction/request security of DNS messages, performing name-to-address +and address-to-name translations, and utilizing /etc/resolv.conf for +resolver configuration. Index: libbind//pkg/PLIST =================================================================== RCS file: libbind//pkg/PLIST diff -N libbind//pkg/PLIST --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libbind//pkg/PLIST 30 Mar 2013 15:02:34 -0000 @@ -0,0 +1,44 @@ +@comment $OpenBSD$ +include/bind/ +include/bind/arpa/ +include/bind/arpa/inet.h +include/bind/arpa/nameser.h +include/bind/arpa/nameser_compat.h +include/bind/fd_setsize.h +include/bind/hesiod.h +include/bind/irp.h +include/bind/irs.h +include/bind/isc/ +include/bind/isc/assertions.h +include/bind/isc/ctl.h +include/bind/isc/dst.h +include/bind/isc/eventlib.h +include/bind/isc/heap.h +include/bind/isc/irpmarshall.h +include/bind/isc/list.h +include/bind/isc/logging.h +include/bind/isc/memcluster.h +include/bind/isc/misc.h +include/bind/isc/platform.h +include/bind/isc/tree.h +include/bind/netdb.h +include/bind/netgroup.h +include/bind/res_update.h +include/bind/resolv.h +include/bind/sys/ +include/bind/sys/bitypes.h +lib/libbind.a +lib/libbind.la +@lib lib/libbind.so.${LIBbind_VERSION} +@man man/man3/getaddrinfo.3 +@man man/man3/gethostbyname.3 +@man man/man3/getipnodebyname.3 +@man man/man3/getnameinfo.3 +@man man/man3/getnetent.3 +@man man/man3/hesiod.3 +@man man/man3/inet_cidr.3 +@man man/man3/resolver.3 +@man man/man3/tsig.3 +@man man/man5/irs.conf.5 +@man man/man5/resolver.5 +@man man/man7/hostname.7
