From a421d6e754bb8b00ced093002a35f9dbe85cbb61 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Mon, 6 Aug 2012 21:13:50 -0500
Subject: docutils 9.9.1

---
 abs/core/dnsutils/PKGBUILD               | 64 ++++++++++++++++++++------------
 abs/core/dnsutils/bind.so_bsdcompat.diff | 11 ------
 abs/core/dnsutils/remove-bind.patch      | 25 +++++++++++++
 abs/core/dnsutils/tools-only.patch       | 25 -------------
 4 files changed, 65 insertions(+), 60 deletions(-)
 delete mode 100644 abs/core/dnsutils/bind.so_bsdcompat.diff
 create mode 100644 abs/core/dnsutils/remove-bind.patch
 delete mode 100644 abs/core/dnsutils/tools-only.patch

diff --git a/abs/core/dnsutils/PKGBUILD b/abs/core/dnsutils/PKGBUILD
index 336f534..9fc5101 100644
--- a/abs/core/dnsutils/PKGBUILD
+++ b/abs/core/dnsutils/PKGBUILD
@@ -1,36 +1,52 @@
-# $Id: PKGBUILD 85957 2010-07-22 20:05:06Z kevin $
-# Maintainer: kevin <kevin@archlinux.org>
+# $Id: PKGBUILD 161356 2012-06-10 08:42:42Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: kevin <kevin@archlinux.org>
 # Contributor: mario <mario_vazq@hotmail.com>
+
 pkgname=dnsutils
+
 # Use a period and not a hyphen before the patch level for proper versioning.
-pkgver=9.7.1.P2
-_pkgver=9.7.1-P2
+pkgver=9.9.1.P1
+_pkgver=9.9.1-P1
 pkgrel=1
-pkgdesc="Various DNS utilities - dig host nslookup nsupdate"
-arch=(i686 x86_64)
-url="https://www.isc.org/software/bind"
+
+pkgdesc='DNS utilities: dig host nslookup'
+url='http://www.isc.org/software/bind/'
 license=('custom:ISC')
-depends=('openssl')
+arch=('i686' 'x86_64')
+options=('!makeflags')
+depends=('openssl' 'krb5' 'idnkit' 'dnssec-anchors')
+source=("http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz"
+        'remove-bind.patch')
+sha1sums=('a2263b96ccd8a143ea54b39958142c542bf605a8'
+          'b465ef6160b004838f04de9978fe1be8422af777')
+
 replaces=('bind-tools' 'host')
-options=('makeflags')
-source=(http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz
-	bind.so_bsdcompat.diff tools-only.patch)
-md5sums=('bd6be63cc910d04da39103d441871596'
-         '447d58721cfee0e1e377b46f7d50b327'
-         'be0558f70ed81d90e68e6b6003ba12ed')
 
 build() {
-  cd "${srcdir}/bind-${_pkgver}"
-  patch -Np0 -i "${srcdir}/bind.so_bsdcompat.diff" || return 1
-  patch -Np1 -i "${srcdir}/tools-only.patch" || return 1
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
-		--with-openssl=yes --disable-linux-caps --without-libxml2 || return 1
-  make || return 1
+	cd "${srcdir}/bind-${_pkgver}"
+
+	patch -p1 -i ../remove-bind.patch
+	export STD_CDEFINES='-DDIG_SIGCHASE'
+
+	# hack to remove unused bloat from the binaries
+	CFLAGS+=' -fdata-sections -ffunction-sections'
+	LDFLAGS+=' -Wl,--gc-sections'
+
+	./configure \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--localstatedir=/var \
+		--disable-static \
+		--disable-linux-caps \
+		--with-openssl \
+		--with-idn \
+
+	make
 }
 
 package() {
-  cd "${srcdir}/bind-${_pkgver}/bin"
-  make DESTDIR="${pkgdir}" install || return 1
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 ../COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
+	cd "${srcdir}/bind-${_pkgver}"
+	install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+	cd bin; make DESTDIR="${pkgdir}" install
 }
diff --git a/abs/core/dnsutils/bind.so_bsdcompat.diff b/abs/core/dnsutils/bind.so_bsdcompat.diff
deleted file mode 100644
index 5d78031..0000000
--- a/abs/core/dnsutils/bind.so_bsdcompat.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./lib/isc/unix/socket.c.orig	2005-11-03 17:08:42.000000000 -0600
-+++ ./lib/isc/unix/socket.c	2006-02-18 13:09:15.000000000 -0600
-@@ -245,6 +245,8 @@
- 
- #define SOCK_DEAD(s)			((s)->references == 0)
- 
-+#undef SO_BSDCOMPAT
-+
- static void
- manager_log(isc_socketmgr_t *sockmgr,
- 	    isc_logcategory_t *category, isc_logmodule_t *module, int level,
diff --git a/abs/core/dnsutils/remove-bind.patch b/abs/core/dnsutils/remove-bind.patch
new file mode 100644
index 0000000..19d6509
--- /dev/null
+++ b/abs/core/dnsutils/remove-bind.patch
@@ -0,0 +1,25 @@
+diff -aur old/bin/Makefile.in new/bin/Makefile.in
+--- old/bin/Makefile.in	2009-10-05 05:07:08.000000000 -0700
++++ new/bin/Makefile.in	2011-08-28 19:16:17.245495043 -0700
+@@ -19,8 +19,7 @@
+ VPATH =		@srcdir@
+ top_srcdir =	@top_srcdir@
+ 
+-SUBDIRS =	named rndc dig dnssec tests tools nsupdate \
+-		check confgen @PKCS11_TOOLS@
++SUBDIRS =	dig
+ TARGETS =
+ 
+ @BIND9_MAKE_RULES@
+diff -aur old/lib/Makefile.in new/lib/Makefile.in
+--- old/lib/Makefile.in	2007-06-19 16:47:13.000000000 -0700
++++ new/lib/Makefile.in	2011-08-28 19:17:50.828688599 -0700
+@@ -23,7 +23,7 @@
+ # Attempt to disable parallel processing.
+ .NOTPARALLEL:
+ .NO_PARALLEL:
+-SUBDIRS =	isc isccc dns isccfg bind9 lwres tests
++SUBDIRS =	isc dns isccfg bind9 lwres
+ TARGETS =
+ 
+ @BIND9_MAKE_RULES@
diff --git a/abs/core/dnsutils/tools-only.patch b/abs/core/dnsutils/tools-only.patch
deleted file mode 100644
index b46b71f..0000000
--- a/abs/core/dnsutils/tools-only.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naur bind-9.7.1-P2.orig/bin/Makefile.in bind-9.7.1-P2/bin/Makefile.in
---- bind-9.7.1-P2.orig/bin/Makefile.in	2009-10-05 08:07:08.000000000 -0400
-+++ bind-9.7.1-P2/bin/Makefile.in	2010-07-22 15:55:00.000000000 -0400
-@@ -19,8 +19,7 @@
- VPATH =		@srcdir@
- top_srcdir =	@top_srcdir@
- 
--SUBDIRS =	named rndc dig dnssec tests tools nsupdate \
--		check confgen @PKCS11_TOOLS@
-+SUBDIRS =	dig nsupdate
- TARGETS =
- 
- @BIND9_MAKE_RULES@
-diff -Naur bind-9.7.1-P2.orig/lib/Makefile.in bind-9.7.1-P2/lib/Makefile.in
---- bind-9.7.1-P2.orig/lib/Makefile.in	2007-06-19 19:47:13.000000000 -0400
-+++ bind-9.7.1-P2/lib/Makefile.in	2010-07-22 15:56:29.000000000 -0400
-@@ -23,7 +23,7 @@
- # Attempt to disable parallel processing.
- .NOTPARALLEL:
- .NO_PARALLEL:
--SUBDIRS =	isc isccc dns isccfg bind9 lwres tests
-+SUBDIRS =	isc dns isccfg bind9 lwres
- TARGETS =
- 
- @BIND9_MAKE_RULES@
-- 
cgit v0.12