summaryrefslogtreecommitdiff
path: root/devel/libdnsres
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2006-02-19 17:11:06 +0000
committeradrianp <adrianp@pkgsrc.org>2006-02-19 17:11:06 +0000
commit9b2396034e598a1ecc0558fd87a91497c3c7e85e (patch)
tree4d049d93b78192ad6e182e7b739670fcc74f1094 /devel/libdnsres
parentb70df58b70da11d98d26984e81e43c7aef509efa (diff)
downloadpkgsrc-9b2396034e598a1ecc0558fd87a91497c3c7e85e.tar.gz
Libdnsres provides a non-blocking thread-safe API for resolving DNS names.
It requires that your main application is built on top of libevent. Libdnsres' API essentially mirrors the traditional gethostbyname and getaddrinfo interfaces. All return values have been replaced by callbacks instead. The code borrows heavily from the BSD resolver library. In fact, it is an extremely ugly hack to make the BSD resolver library non-blocking and thread-safe without changing the API too much.
Diffstat (limited to 'devel/libdnsres')
-rw-r--r--devel/libdnsres/DESCR8
-rw-r--r--devel/libdnsres/Makefile16
-rw-r--r--devel/libdnsres/PLIST4
-rw-r--r--devel/libdnsres/buildlink3.mk18
-rw-r--r--devel/libdnsres/distinfo6
-rw-r--r--devel/libdnsres/patches/patch-aa13
6 files changed, 65 insertions, 0 deletions
diff --git a/devel/libdnsres/DESCR b/devel/libdnsres/DESCR
new file mode 100644
index 00000000000..d288a2941c7
--- /dev/null
+++ b/devel/libdnsres/DESCR
@@ -0,0 +1,8 @@
+Libdnsres provides a non-blocking thread-safe API for resolving DNS names.
+It requires that your main application is built on top of libevent. Libdnsres'
+API essentially mirrors the traditional gethostbyname and getaddrinfo
+interfaces. All return values have been replaced by callbacks instead.
+
+The code borrows heavily from the BSD resolver library. In fact, it is an
+extremely ugly hack to make the BSD resolver library non-blocking and
+thread-safe without changing the API too much.
diff --git a/devel/libdnsres/Makefile b/devel/libdnsres/Makefile
new file mode 100644
index 00000000000..2f68a570a08
--- /dev/null
+++ b/devel/libdnsres/Makefile
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/02/19 17:11:06 adrianp Exp $
+#
+
+DISTNAME= libdnsres-0.1a
+CATEGORIES= devel
+MASTER_SITES= http://www.monkey.org/~provos/
+
+MAINTAINER= adrianp@NetBSD.org
+HOMEPAGE= http://www.monkey.org/~provos/
+COMMENT= Non-blocking thread-safe API for resolving DNS names
+
+USE_PKGLOCALEDIR= YES
+USE_LIBTOOL= YES
+GNU_CONFIGURE= YES
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/libdnsres/PLIST b/devel/libdnsres/PLIST
new file mode 100644
index 00000000000..377b4e4ce16
--- /dev/null
+++ b/devel/libdnsres/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/19 17:11:06 adrianp Exp $
+include/dnsres.h
+lib/libdnsres.la
+man/man3/dnsres.3
diff --git a/devel/libdnsres/buildlink3.mk b/devel/libdnsres/buildlink3.mk
new file mode 100644
index 00000000000..f728c3a31e7
--- /dev/null
+++ b/devel/libdnsres/buildlink3.mk
@@ -0,0 +1,18 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2006/02/19 17:11:06 adrianp Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+LIBDNSRES_BUILDLINK3_MK:= ${LIBDNSRES_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= libdnsres
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibdnsres}
+BUILDLINK_PACKAGES+= libdnsres
+
+.if !empty(LIBDNSRES_BUILDLINK3_MK:M+)
+BUILDLINK_DEPENDS.libdnsres+= libdnsres>=0.1a
+BUILDLINK_PKGSRCDIR.libdnsres?= ../../devel/libdnsres
+.endif # LIBDNSRES_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/devel/libdnsres/distinfo b/devel/libdnsres/distinfo
new file mode 100644
index 00000000000..ce6adbd3111
--- /dev/null
+++ b/devel/libdnsres/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2006/02/19 17:11:06 adrianp Exp $
+
+SHA1 (libdnsres-0.1a.tar.gz) = 570b5d8071dacf16ba7588d6c3fc6f4c3ed55976
+RMD160 (libdnsres-0.1a.tar.gz) = 05a92882d1fc0394792e9f28be4584650b46e323
+Size (libdnsres-0.1a.tar.gz) = 360583 bytes
+SHA1 (patch-aa) = e18e80c307c26e0d7c1626171f7c881092174b29
diff --git a/devel/libdnsres/patches/patch-aa b/devel/libdnsres/patches/patch-aa
new file mode 100644
index 00000000000..3275d2b5300
--- /dev/null
+++ b/devel/libdnsres/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2006/02/19 17:11:06 adrianp Exp $
+
+--- Makefile.in.orig 2005-09-23 17:13:06.000000000 +0100
++++ Makefile.in
+@@ -221,7 +221,7 @@ INCLUDES = -I$(top_srcdir)/compat @EVENT
+ man_MANS = dnsres.3
+ simple_test_SOURCES = test/simple_test.c
+ simple_test_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/compat @EVENTINC@
+-simple_test_LDADD = -L$(top_buildir) -ldnsres @EVENTLIB@
++simple_test_LDADD = -L. -ldnsres @EVENTLIB@
+ DISTCLEANFILES = *~ test/*~
+ all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive