pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/djbdns Fix ${MACHINE_ARCH} conditional (it's "x86_...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a3ae70ddfc80
branches:  trunk
changeset: 506066:a3ae70ddfc80
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Wed Jan 11 17:20:32 2006 +0000

description:
Fix ${MACHINE_ARCH} conditional (it's "x86_64, not "amd64"). Since
Bernhard Roth's tinydns-data patch for 64-bit systems is no longer
available on the net, store it directly in pkgsrc.

diffstat:

 net/djbdns/files/patch-tinydns64 |  55 ++++++++++++++++++++++++++++++++++++++++
 net/djbdns/options.mk            |   9 ++---
 2 files changed, 59 insertions(+), 5 deletions(-)

diffs (86 lines):

diff -r b82cce936674 -r a3ae70ddfc80 net/djbdns/files/patch-tinydns64
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/djbdns/files/patch-tinydns64  Wed Jan 11 17:20:32 2006 +0000
@@ -0,0 +1,55 @@
+--- tinydns-data.c.orig        2001-02-11 16:11:45.000000000 -0500
++++ tinydns-data.c     2005-03-30 04:14:07.000000000 -0500
+@@ -196,6 +196,7 @@
+   char type[2];
+   char soa[20];
+   char buf[4];
++  uint32 hack64bit;
+ 
+   umask(022);
+ 
+@@ -251,19 +252,39 @@
+       if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
+ 
+       if (!stralloc_0(&f[3])) nomem();
+-      if (!scan_ulong(f[3].s,&u)) uint32_unpack_big(defaultsoa,&u);
++      if (!scan_ulong(f[3].s,&u))
++      {
++        uint32_unpack_big(defaultsoa,&hack64bit);
++        u = hack64bit;
++      }
+       uint32_pack_big(soa,u);
+       if (!stralloc_0(&f[4])) nomem();
+-      if (!scan_ulong(f[4].s,&u)) uint32_unpack_big(defaultsoa + 4,&u);
++      if (!scan_ulong(f[4].s,&u))
++      {
++        uint32_unpack_big(defaultsoa + 4,&hack64bit);
++        u = hack64bit;
++      }
+       uint32_pack_big(soa + 4,u);
+       if (!stralloc_0(&f[5])) nomem();
+-      if (!scan_ulong(f[5].s,&u)) uint32_unpack_big(defaultsoa + 8,&u);
++      if (!scan_ulong(f[5].s,&u))
++      {
++        uint32_unpack_big(defaultsoa + 8,&hack64bit);
++        u = hack64bit;
++      }
+       uint32_pack_big(soa + 8,u);
+       if (!stralloc_0(&f[6])) nomem();
+-      if (!scan_ulong(f[6].s,&u)) uint32_unpack_big(defaultsoa + 12,&u);
++      if (!scan_ulong(f[6].s,&u))
++      {
++        uint32_unpack_big(defaultsoa + 12,&hack64bit);
++        u = hack64bit;
++      }
+       uint32_pack_big(soa + 12,u);
+       if (!stralloc_0(&f[7])) nomem();
+-      if (!scan_ulong(f[7].s,&u)) uint32_unpack_big(defaultsoa + 16,&u);
++      if (!scan_ulong(f[7].s,&u))
++      {
++        uint32_unpack_big(defaultsoa + 16,&hack64bit);
++        u = hack64bit;
++      }
+       uint32_pack_big(soa + 16,u);
+ 
+       if (!stralloc_0(&f[8])) nomem();
diff -r b82cce936674 -r a3ae70ddfc80 net/djbdns/options.mk
--- a/net/djbdns/options.mk     Wed Jan 11 17:02:39 2006 +0000
+++ b/net/djbdns/options.mk     Wed Jan 11 17:20:32 2006 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: options.mk,v 1.8 2005/10/05 05:46:54 schmonz Exp $
+# $NetBSD: options.mk,v 1.9 2006/01/11 17:20:32 schmonz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.djbdns
 PKG_SUPPORTED_OPTIONS+=        inet6 djbdns-ignoreip2 djbdns-tinydns64
 
 .if ${MACHINE_ARCH} == "sparc64" || \
        ${MACHINE_ARCH} == "alpha" || \
-       ${MACHINE_ARCH} == "amd64"
+       ${MACHINE_ARCH} == "x86_64"
 PKG_SUGGESTED_OPTIONS+=   djbdns-tinydns64
 .endif
 
@@ -26,7 +26,6 @@
 .endif
 
 .if !empty(PKG_OPTIONS:Mdjbdns-tinydns64)
-TINYDNS64_PATCH=               tinydns64.diff
-PATCHFILES+=                   ${TINYDNS64_PATCH}
-SITES_${TINYDNS64_PATCH}=      http://www.pwrlock.de/br/
+post-patch:
+       @cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} < ${FILESDIR}/patch-tinydns64
 .endif



Home | Main Index | Thread Index | Old Index