summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2006-07-18 22:38:18 +0000
committeradrianp <adrianp@pkgsrc.org>2006-07-18 22:38:18 +0000
commit90632e9598416269bd2ff1e5d049d7978b14fea5 (patch)
treea24004a515ce44a2048512d2ae7fe232f4a077a2 /net
parent04dea1605fc44d79ee6a27f2eebebe8d00bda551 (diff)
downloadpkgsrc-90632e9598416269bd2ff1e5d049d7978b14fea5.tar.gz
Add ares_get_config() from CVS for unrealircd 3.2.5 to work
Bump to nb1
Diffstat (limited to 'net')
-rw-r--r--net/libcares/Makefile3
-rw-r--r--net/libcares/buildlink3.mk4
-rw-r--r--net/libcares/distinfo4
-rw-r--r--net/libcares/patches/patch-aa27
-rw-r--r--net/libcares/patches/patch-ab29
5 files changed, 63 insertions, 4 deletions
diff --git a/net/libcares/Makefile b/net/libcares/Makefile
index 5fca391b068..5a7948e811c 100644
--- a/net/libcares/Makefile
+++ b/net/libcares/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2006/02/04 19:10:09 adrianp Exp $
+# $NetBSD: Makefile,v 1.3 2006/07/18 22:38:18 adrianp Exp $
#
# Please do not update or modify this package as it has been imported only
@@ -8,6 +8,7 @@
DISTNAME= c-ares-1.3.0
PKGNAME= libcares-1.3.0
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://daniel.haxx.se/projects/c-ares/
diff --git a/net/libcares/buildlink3.mk b/net/libcares/buildlink3.mk
index 149d6c33ca2..4dedddbc527 100644
--- a/net/libcares/buildlink3.mk
+++ b/net/libcares/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.5 2006/07/08 23:11:03 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2006/07/18 22:38:18 adrianp Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
LIBCARES_BUILDLINK3_MK:= ${LIBCARES_BUILDLINK3_MK}+
@@ -12,7 +12,7 @@ BUILDLINK_PACKAGES+= libcares
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libcares
.if !empty(LIBCARES_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.libcares+= libcares>=1.3.0
+BUILDLINK_API_DEPENDS.libcares+= libcares>=1.3.0nb1
BUILDLINK_PKGSRCDIR.libcares?= ../../net/libcares
.endif # LIBCARES_BUILDLINK3_MK
diff --git a/net/libcares/distinfo b/net/libcares/distinfo
index bada434a548..d2353bc9915 100644
--- a/net/libcares/distinfo
+++ b/net/libcares/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2005/12/01 17:27:10 adrianp Exp $
+$NetBSD: distinfo,v 1.2 2006/07/18 22:38:18 adrianp Exp $
SHA1 (c-ares-1.3.0.tar.gz) = 73c2bfa9dc1bde6b364a485c0c05ecf05688debe
RMD160 (c-ares-1.3.0.tar.gz) = f788b06b881ed71366f10761ae673965439ad07a
Size (c-ares-1.3.0.tar.gz) = 355195 bytes
+SHA1 (patch-aa) = 320b3da925b0bb5fa8c286480ca2420735c54da6
+SHA1 (patch-ab) = 7beaebd2b3d08549e013c831991a8c23fb584431
diff --git a/net/libcares/patches/patch-aa b/net/libcares/patches/patch-aa
new file mode 100644
index 00000000000..d1a773a0498
--- /dev/null
+++ b/net/libcares/patches/patch-aa
@@ -0,0 +1,27 @@
+$NetBSD: patch-aa,v 1.1 2006/07/18 22:38:18 adrianp Exp $
+
+--- ares.h.orig 2005-08-18 12:49:29.000000000 +0100
++++ ares.h
+@@ -122,6 +122,14 @@ struct ares_options {
+ char *lookups;
+ };
+
++/** Public available config (readonly) interface for ares_get_config(). */
++struct ares_config_info {
++ int timeout;
++ int tries;
++ int numservers;
++ char **servers;
++};
++
+ struct hostent;
+ struct timeval;
+ struct sockaddr;
+@@ -173,6 +181,7 @@ void ares_free_string(void *str);
+ void ares_free_hostent(struct hostent *host);
+ const char *ares_strerror(int code);
+
++int ares_get_config(struct ares_config_info *d, ares_channel c);
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/net/libcares/patches/patch-ab b/net/libcares/patches/patch-ab
new file mode 100644
index 00000000000..32f510af859
--- /dev/null
+++ b/net/libcares/patches/patch-ab
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.1 2006/07/18 22:38:18 adrianp Exp $
+
+--- ares_init.c.orig 2005-08-22 07:40:07.000000000 +0100
++++ ares_init.c
+@@ -1060,3 +1060,24 @@ static void natural_mask(struct apattern
+ pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET);
+ }
+ #endif
++
++int ares_get_config(struct ares_config_info *d, ares_channel c)
++{
++int i;
++char *p;
++
++ memset(d, 0, sizeof(struct ares_config_info));
++
++ d->timeout = c->timeout;
++ d->tries = c->tries;
++ d->numservers = c->nservers;
++ d->servers = calloc(sizeof(char *), c->nservers);
++ for (i = 0; i < c->nservers; i++)
++ {
++ p = inet_ntoa(c->servers[i].addr);
++ d->servers[i] = p ? strdup(p) : NULL;
++ }
++
++ return ARES_SUCCESS;
++}
++