summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dns
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/avahi/Manifest1
-rw-r--r--net-dns/avahi/avahi-0.6.31-r6.ebuild248
-rw-r--r--net-dns/avahi/avahi-0.6.31-r7.ebuild245
-rw-r--r--net-dns/avahi/avahi-0.6.31-r8.ebuild250
-rw-r--r--net-dns/avahi/files/autoipd-openrc.sh32
-rw-r--r--net-dns/avahi/files/autoipd.sh52
-rw-r--r--net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch102
-rw-r--r--net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch83
-rw-r--r--net-dns/avahi/files/avahi-0.6.30-parallel.patch34
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch27
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch31
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch20
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch85
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch11
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch30
-rw-r--r--net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch22
-rw-r--r--net-dns/avahi/metadata.xml21
-rw-r--r--net-dns/bind-dns-keygen/Manifest1
-rw-r--r--net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild31
-rw-r--r--net-dns/bind-dns-keygen/metadata.xml8
-rw-r--r--net-dns/bind-tools/Manifest2
-rw-r--r--net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild119
-rw-r--r--net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild125
-rw-r--r--net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch145
-rw-r--r--net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch63
-rw-r--r--net-dns/bind-tools/metadata.xml14
-rw-r--r--net-dns/bind/Manifest3
-rw-r--r--net-dns/bind/bind-9.10.2_p2.ebuild407
-rw-r--r--net-dns/bind/bind-9.10.2_p3.ebuild407
-rw-r--r--net-dns/bind/files/10bind.env1
-rw-r--r--net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch21
-rw-r--r--net-dns/bind/files/bind-dlzmysql5-reconnect.patch59
-rwxr-xr-xnet-dns/bind/files/generate-rndc-key.sh7
-rw-r--r--net-dns/bind/files/localhost.zone-r311
-rw-r--r--net-dns/bind/files/named.cache88
-rw-r--r--net-dns/bind/files/named.conf-r8166
-rw-r--r--net-dns/bind/files/named.confd-r748
-rw-r--r--net-dns/bind/files/named.init-r13248
-rw-r--r--net-dns/bind/files/named.service-r113
-rw-r--r--net-dns/bind/metadata.xml20
-rw-r--r--net-dns/c-ares/Manifest5
-rw-r--r--net-dns/c-ares/c-ares-1.10.0-r1.ebuild35
-rw-r--r--net-dns/c-ares/c-ares-1.10.0.ebuild28
-rw-r--r--net-dns/c-ares/c-ares-1.7.4.ebuild27
-rw-r--r--net-dns/c-ares/c-ares-1.7.5.ebuild28
-rw-r--r--net-dns/c-ares/c-ares-1.8.0.ebuild28
-rw-r--r--net-dns/c-ares/c-ares-1.9.1.ebuild28
-rw-r--r--net-dns/c-ares/metadata.xml11
-rw-r--r--net-dns/cagibi/Manifest1
-rw-r--r--net-dns/cagibi/cagibi-0.2.0.ebuild26
-rw-r--r--net-dns/cagibi/metadata.xml5
-rw-r--r--net-dns/ddclient/Manifest2
-rw-r--r--net-dns/ddclient/ddclient-3.8.1-r5.ebuild56
-rw-r--r--net-dns/ddclient/ddclient-3.8.2.ebuild47
-rw-r--r--net-dns/ddclient/files/cmd-over-cfg.patch11
-rw-r--r--net-dns/ddclient/files/ddclient-reasonable-security.patch21
-rw-r--r--net-dns/ddclient/files/ddclient.confd2
-rw-r--r--net-dns/ddclient/files/ddclient.confd-r12
-rw-r--r--net-dns/ddclient/files/ddclient.initd52
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r144
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r244
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r358
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r436
-rw-r--r--net-dns/ddclient/files/ddclient.service12
-rw-r--r--net-dns/ddclient/files/iproute2.patch30
-rw-r--r--net-dns/ddclient/metadata.xml14
-rw-r--r--net-dns/djbdns/Manifest4
-rw-r--r--net-dns/djbdns/djbdns-1.05-r29.ebuild146
-rw-r--r--net-dns/djbdns/djbdns-1.05-r30.ebuild151
-rw-r--r--net-dns/djbdns/files/1.05-errno.patch11
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch351
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch349
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch68
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch70
-rw-r--r--net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch11
-rw-r--r--net-dns/djbdns/files/dnsroots.patch20
-rw-r--r--net-dns/djbdns/files/dnstracesort.patch11
-rw-r--r--net-dns/djbdns/files/headtail.patch67
-rw-r--r--net-dns/djbdns/files/makefile-parallel-test25.patch91
-rw-r--r--net-dns/djbdns/files/srv_record_support.patch180
-rw-r--r--net-dns/djbdns/files/string_length_255.patch11
-rw-r--r--net-dns/djbdns/metadata.xml8
-rw-r--r--net-dns/dnrd/Manifest1
-rw-r--r--net-dns/dnrd/dnrd-2.20.3-r1.ebuild44
-rw-r--r--net-dns/dnrd/files/dnrd24
-rw-r--r--net-dns/dnrd/files/dnrd-2.20.3-docdir.patch21
-rw-r--r--net-dns/dnrd/files/dnrd.conf11
-rw-r--r--net-dns/dnrd/metadata.xml18
-rw-r--r--net-dns/dnscap/Manifest1
-rw-r--r--net-dns/dnscap/dnscap-20130814.ebuild30
-rw-r--r--net-dns/dnscap/files/dnscap-20130814.install.patch22
-rw-r--r--net-dns/dnscap/metadata.xml12
-rw-r--r--net-dns/dnscrypt-proxy/Manifest2
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild43
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild43
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd7
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd48
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service20
-rw-r--r--net-dns/dnscrypt-proxy/metadata.xml20
-rw-r--r--net-dns/dnshijacker/Manifest1
-rw-r--r--net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild37
-rw-r--r--net-dns/dnshijacker/files/1.3-libnet-1.0.patch39
-rw-r--r--net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch37
-rw-r--r--net-dns/dnshijacker/metadata.xml8
-rw-r--r--net-dns/dnsimple-dyndns/Manifest1
-rw-r--r--net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild34
-rw-r--r--net-dns/dnsimple-dyndns/metadata.xml19
-rw-r--r--net-dns/dnsmasq/Manifest3
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.66.ebuild137
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild190
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.75.ebuild186
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch16
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch134
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch28
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch40
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-dhcp-r130
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-r224
-rw-r--r--net-dns/dnsmasq/files/dnsmasq.confd-r14
-rw-r--r--net-dns/dnsmasq/files/dnsmasq.service12
-rw-r--r--net-dns/dnsmasq/files/dnsmasq.service-r112
-rw-r--r--net-dns/dnsmasq/metadata.xml20
-rw-r--r--net-dns/dnssec-check/Manifest5
-rw-r--r--net-dns/dnssec-check/dnssec-check-1.13.ebuild31
-rw-r--r--net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild31
-rw-r--r--net-dns/dnssec-check/dnssec-check-1.14.ebuild33
-rw-r--r--net-dns/dnssec-check/dnssec-check-2.0.ebuild31
-rw-r--r--net-dns/dnssec-check/dnssec-check-2.1.ebuild31
-rw-r--r--net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch11
-rw-r--r--net-dns/dnssec-check/metadata.xml9
-rw-r--r--net-dns/dnssec-lookup/Manifest4
-rw-r--r--net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild38
-rw-r--r--net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild38
-rw-r--r--net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild38
-rw-r--r--net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild38
-rw-r--r--net-dns/dnssec-lookup/metadata.xml15
-rw-r--r--net-dns/dnssec-nodes/Manifest4
-rw-r--r--net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild32
-rw-r--r--net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild32
-rw-r--r--net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild32
-rw-r--r--net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild33
-rw-r--r--net-dns/dnssec-nodes/metadata.xml9
-rw-r--r--net-dns/dnssec-root/Manifest17
-rw-r--r--net-dns/dnssec-root/dnssec-root-20100715.ebuild51
-rw-r--r--net-dns/dnssec-root/dnssec-root-20110630.ebuild62
-rw-r--r--net-dns/dnssec-root/dnssec-root-20150403.ebuild82
-rw-r--r--net-dns/dnssec-root/files/anchors2ds.xsl32
-rw-r--r--net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc70
-rw-r--r--net-dns/dnssec-root/metadata.xml9
-rw-r--r--net-dns/dnssec-system-tray/Manifest4
-rw-r--r--net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild32
-rw-r--r--net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild32
-rw-r--r--net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild34
-rw-r--r--net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild34
-rw-r--r--net-dns/dnssec-system-tray/metadata.xml9
-rw-r--r--net-dns/dnssec-tools/Manifest4
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild65
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-1.14.ebuild65
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild67
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-2.0.ebuild65
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-2.1.ebuild66
-rw-r--r--net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch23
-rw-r--r--net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch24
-rw-r--r--net-dns/dnssec-tools/files/donutsd.confd9
-rw-r--r--net-dns/dnssec-tools/files/donutsd.initd20
-rw-r--r--net-dns/dnssec-tools/files/donutsd.service8
-rw-r--r--net-dns/dnssec-tools/files/rollerd.confd9
-rw-r--r--net-dns/dnssec-tools/files/rollerd.initd17
-rw-r--r--net-dns/dnssec-tools/files/rollerd.service8
-rw-r--r--net-dns/dnssec-tools/metadata.xml9
-rw-r--r--net-dns/dnssec-validator/Manifest4
-rw-r--r--net-dns/dnssec-validator/dnssec-validator-1.13.ebuild47
-rw-r--r--net-dns/dnssec-validator/dnssec-validator-1.14.ebuild47
-rw-r--r--net-dns/dnssec-validator/dnssec-validator-2.0.ebuild47
-rw-r--r--net-dns/dnssec-validator/dnssec-validator-2.1.ebuild47
-rw-r--r--net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch22
-rw-r--r--net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch22
-rw-r--r--net-dns/dnssec-validator/metadata.xml9
-rw-r--r--net-dns/dnstop/Manifest2
-rw-r--r--net-dns/dnstop/dnstop-20121017.ebuild35
-rw-r--r--net-dns/dnstop/dnstop-20140915.ebuild35
-rw-r--r--net-dns/dnstop/metadata.xml17
-rw-r--r--net-dns/dnswalk/Manifest1
-rw-r--r--net-dns/dnswalk/dnswalk-2.0.2.ebuild29
-rw-r--r--net-dns/dnswalk/metadata.xml10
-rw-r--r--net-dns/ez-ipupdate/Manifest2
-rw-r--r--net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild128
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff65
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff262
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff41
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff213
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate.initd94
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate.service12
-rw-r--r--net-dns/ez-ipupdate/metadata.xml12
-rw-r--r--net-dns/fpdns/Manifest1
-rw-r--r--net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch33
-rw-r--r--net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild34
-rw-r--r--net-dns/fpdns/metadata.xml31
-rw-r--r--net-dns/hash-slinger/Manifest1
-rw-r--r--net-dns/hash-slinger/hash-slinger-2.6.ebuild44
-rw-r--r--net-dns/hash-slinger/metadata.xml13
-rw-r--r--net-dns/hesinfo/Manifest1
-rw-r--r--net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch58
-rw-r--r--net-dns/hesinfo/hesinfo-3.1.0.ebuild29
-rw-r--r--net-dns/hesinfo/metadata.xml10
-rw-r--r--net-dns/hesiod/Manifest2
-rw-r--r--net-dns/hesiod/hesiod-3.1.0.ebuild36
-rw-r--r--net-dns/hesiod/metadata.xml7
-rw-r--r--net-dns/host/Manifest1
-rw-r--r--net-dns/host/files/host-20070128-Makefile.patch62
-rw-r--r--net-dns/host/host-20070128-r1.ebuild42
-rw-r--r--net-dns/host/metadata.xml7
-rw-r--r--net-dns/idnkit/Manifest1
-rw-r--r--net-dns/idnkit/files/idnkit-1.0-autotools.patch64
-rw-r--r--net-dns/idnkit/idnkit-1.0-r2.ebuild42
-rw-r--r--net-dns/idnkit/metadata.xml8
-rw-r--r--net-dns/knot/Manifest3
-rw-r--r--net-dns/knot/files/1.6.3-dont-create-extra-directories.patch15
-rw-r--r--net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch15
-rw-r--r--net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch11
-rw-r--r--net-dns/knot/files/knot.init42
-rw-r--r--net-dns/knot/knot-1.5.3.ebuild61
-rw-r--r--net-dns/knot/knot-1.6.3.ebuild95
-rw-r--r--net-dns/knot/knot-2.0.0_beta.ebuild96
-rw-r--r--net-dns/knot/metadata.xml25
-rw-r--r--net-dns/ldns-utils/Manifest2
-rw-r--r--net-dns/ldns-utils/files/1.6.12-cflags.patch22
-rw-r--r--net-dns/ldns-utils/ldns-utils-1.6.12.ebuild62
-rw-r--r--net-dns/ldns-utils/ldns-utils-1.6.17.ebuild56
-rw-r--r--net-dns/ldns-utils/metadata.xml19
-rw-r--r--net-dns/libidn/Manifest2
-rw-r--r--net-dns/libidn/files/50libidn-gentoo.el12
-rw-r--r--net-dns/libidn/libidn-1.30.ebuild112
-rw-r--r--net-dns/libidn/libidn-1.32.ebuild112
-rw-r--r--net-dns/libidn/metadata.xml8
-rw-r--r--net-dns/libidn2/Manifest1
-rw-r--r--net-dns/libidn2/files/libidn2-0.10-Werror.patch11
-rw-r--r--net-dns/libidn2/files/libidn2-0.10-examples.patch11
-rw-r--r--net-dns/libidn2/libidn2-0.10.ebuild26
-rw-r--r--net-dns/libidn2/metadata.xml7
-rw-r--r--net-dns/maradns/Manifest1
-rw-r--r--net-dns/maradns/files/deadwood22
-rw-r--r--net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch251
-rw-r--r--net-dns/maradns/files/maradns-2.0.06-duende-man.patch109
-rw-r--r--net-dns/maradns/files/maradns-2.0.09-build.patch43
-rw-r--r--net-dns/maradns/files/maradns.rc623
-rw-r--r--net-dns/maradns/files/maradns.service.in9
-rw-r--r--net-dns/maradns/files/maradns223
-rw-r--r--net-dns/maradns/files/zoneserver.rc621
-rw-r--r--net-dns/maradns/files/zoneserver222
-rw-r--r--net-dns/maradns/maradns-2.0.09.ebuild98
-rw-r--r--net-dns/maradns/metadata.xml10
-rw-r--r--net-dns/metadata.xml35
-rw-r--r--net-dns/mydns/Manifest1
-rw-r--r--net-dns/mydns/files/mydns-1.2.8.27-m4.patch53
-rw-r--r--net-dns/mydns/files/mydns.confd4
-rw-r--r--net-dns/mydns/files/mydns.initd35
-rw-r--r--net-dns/mydns/metadata.xml14
-rw-r--r--net-dns/mydns/mydns-1.2.8.31.ebuild84
-rw-r--r--net-dns/namecoin-qt/Manifest1
-rw-r--r--net-dns/namecoin-qt/metadata.xml8
-rw-r--r--net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild129
-rw-r--r--net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild134
-rw-r--r--net-dns/namecoind/Manifest1
-rw-r--r--net-dns/namecoind/files/namecoin.conf8
-rw-r--r--net-dns/namecoind/files/namecoin.confd10
-rw-r--r--net-dns/namecoind/files/namecoin.initd104
-rw-r--r--net-dns/namecoind/files/namecoind-0.3.72-makefile.patch52
-rw-r--r--net-dns/namecoind/files/namecoind-0.3.80-makefile.patch30
-rw-r--r--net-dns/namecoind/metadata.xml8
-rw-r--r--net-dns/namecoind/namecoind-0.3.72.ebuild78
-rw-r--r--net-dns/namecoind/namecoind-0.3.80.ebuild84
-rw-r--r--net-dns/ndu/Manifest1
-rw-r--r--net-dns/ndu/files/ndu-0.4-binary-locations.patch14
-rw-r--r--net-dns/ndu/metadata.xml8
-rw-r--r--net-dns/ndu/ndu-0.4-r4.ebuild60
-rw-r--r--net-dns/noip-updater/Manifest1
-rw-r--r--net-dns/noip-updater/files/noip-2.1.9-daemon.patch21
-rw-r--r--net-dns/noip-updater/files/noip-2.1.9-flags.patch11
-rw-r--r--net-dns/noip-updater/files/noip.service12
-rw-r--r--net-dns/noip-updater/files/noip2.start34
-rw-r--r--net-dns/noip-updater/metadata.xml13
-rw-r--r--net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild56
-rw-r--r--net-dns/nsd/Manifest2
-rw-r--r--net-dns/nsd/files/nsd.initd53
-rw-r--r--net-dns/nsd/files/nsd.munin-conf2
-rw-r--r--net-dns/nsd/files/nsd.service14
-rw-r--r--net-dns/nsd/files/nsd3-patch.cron9
-rw-r--r--net-dns/nsd/files/nsd3.initd-r166
-rw-r--r--net-dns/nsd/files/nsd_munin_.patch17
-rw-r--r--net-dns/nsd/metadata.xml34
-rw-r--r--net-dns/nsd/nsd-3.2.18.ebuild77
-rw-r--r--net-dns/nsd/nsd-4.1.0.ebuild94
-rw-r--r--net-dns/odsclient/Manifest1
-rw-r--r--net-dns/odsclient/files/1.03-gentoo.patch21
-rw-r--r--net-dns/odsclient/metadata.xml7
-rw-r--r--net-dns/odsclient/odsclient-1.03-r1.ebuild35
-rw-r--r--net-dns/opendnssec/Manifest4
-rw-r--r--net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch43
-rw-r--r--net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch21
-rw-r--r--net-dns/opendnssec/files/opendnssec-drop-privileges.patch28
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch32
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-run-dir.patch26
-rw-r--r--net-dns/opendnssec/files/opendnssec-use-system-trang.patch20
-rw-r--r--net-dns/opendnssec/files/opendnssec.confd12
-rw-r--r--net-dns/opendnssec/files/opendnssec.confd-1.3.x14
-rw-r--r--net-dns/opendnssec/files/opendnssec.initd86
-rw-r--r--net-dns/opendnssec/files/opendnssec.initd-1.3.x124
-rw-r--r--net-dns/opendnssec/metadata.xml16
-rw-r--r--net-dns/opendnssec/opendnssec-1.3.17.ebuild203
-rw-r--r--net-dns/opendnssec/opendnssec-1.3.18.ebuild203
-rw-r--r--net-dns/opendnssec/opendnssec-1.4.4.ebuild206
-rw-r--r--net-dns/opendnssec/opendnssec-1.4.6.ebuild206
-rw-r--r--net-dns/openresolv/Manifest3
-rw-r--r--net-dns/openresolv/files/pdnsd673
-rw-r--r--net-dns/openresolv/files/restartcmd20
-rw-r--r--net-dns/openresolv/metadata.xml10
-rw-r--r--net-dns/openresolv/openresolv-3.6.1.ebuild50
-rw-r--r--net-dns/openresolv/openresolv-3.6.2.ebuild50
-rw-r--r--net-dns/openresolv/openresolv-3.7.0.ebuild50
-rw-r--r--net-dns/pdns-ldap-backend/Manifest1
-rw-r--r--net-dns/pdns-ldap-backend/metadata.xml9
-rw-r--r--net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild40
-rw-r--r--net-dns/pdns-recursor/Manifest8
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-3.1.7.2-error-message.patch11
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-3.5.3-fdlimit.patch67
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-3.6.1-CVE-2014-8601.patch52
-rw-r--r--net-dns/pdns-recursor/files/precursor28
-rw-r--r--net-dns/pdns-recursor/files/recursor.conf21
-rw-r--r--net-dns/pdns-recursor/metadata.xml18
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.5.3-r1.ebuild61
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.6.1-r1.ebuild59
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.6.1.ebuild55
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.6.2.ebuild55
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.6.3.ebuild55
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.6.4.ebuild55
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.7.1.ebuild61
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.7.2.ebuild61
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-3.7.3.ebuild61
-rw-r--r--net-dns/pdns/Manifest8
-rw-r--r--net-dns/pdns/files/dnsdomain2.schema195
-rw-r--r--net-dns/pdns/files/pdns61
-rw-r--r--net-dns/pdns/files/pdns-3.3.1-fix-curl-link.patch11
-rw-r--r--net-dns/pdns/metadata.xml24
-rw-r--r--net-dns/pdns/pdns-3.3.1.ebuild186
-rw-r--r--net-dns/pdns/pdns-3.3.2.ebuild186
-rw-r--r--net-dns/pdns/pdns-3.3.3.ebuild186
-rw-r--r--net-dns/pdns/pdns-3.4.0-r1.ebuild173
-rw-r--r--net-dns/pdns/pdns-3.4.0.ebuild170
-rw-r--r--net-dns/pdns/pdns-3.4.1.ebuild173
-rw-r--r--net-dns/pdns/pdns-3.4.2.ebuild175
-rw-r--r--net-dns/pdns/pdns-3.4.4.ebuild177
-rw-r--r--net-dns/pdns/pdns-3.4.5.ebuild177
-rw-r--r--net-dns/pdnsd/Manifest1
-rw-r--r--net-dns/pdnsd/files/pdnsd.conf.test27
-rw-r--r--net-dns/pdnsd/files/pdnsd.online.234
-rw-r--r--net-dns/pdnsd/files/pdnsd.rc828
-rw-r--r--net-dns/pdnsd/files/pdnsd.resolvconf-r1631
-rw-r--r--net-dns/pdnsd/files/pdnsd.service11
-rw-r--r--net-dns/pdnsd/files/pdnsd.tmpfiles1
-rw-r--r--net-dns/pdnsd/metadata.xml25
-rw-r--r--net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild132
-rw-r--r--net-dns/rbldnsd/Manifest2
-rw-r--r--net-dns/rbldnsd/files/confd20
-rw-r--r--net-dns/rbldnsd/files/confd-0.997a35
-rw-r--r--net-dns/rbldnsd/files/example23
-rw-r--r--net-dns/rbldnsd/files/initd20
-rw-r--r--net-dns/rbldnsd/files/initd-0.997a25
-rw-r--r--net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch11
-rw-r--r--net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch30
-rw-r--r--net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch329
-rw-r--r--net-dns/rbldnsd/metadata.xml26
-rw-r--r--net-dns/rbldnsd/rbldnsd-0.996b.ebuild51
-rw-r--r--net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild67
-rw-r--r--net-dns/rbldnsd/rbldnsd-0.997a-r2.ebuild67
-rw-r--r--net-dns/resolvconf-symlink/metadata.xml12
-rw-r--r--net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild53
-rw-r--r--net-dns/sheerdns/Manifest1
-rw-r--r--net-dns/sheerdns/metadata.xml15
-rw-r--r--net-dns/sheerdns/sheerdns-1.0.3.ebuild33
-rw-r--r--net-dns/tinystats/Manifest1
-rw-r--r--net-dns/tinystats/metadata.xml9
-rw-r--r--net-dns/tinystats/tinystats-1.1.ebuild30
-rw-r--r--net-dns/totd/Manifest1
-rwxr-xr-xnet-dns/totd/files/totd39
-rw-r--r--net-dns/totd/files/totd-1.5.1-no_werror.patch11
-rw-r--r--net-dns/totd/metadata.xml13
-rw-r--r--net-dns/totd/totd-1.5.1.ebuild46
-rw-r--r--net-dns/unbound/Manifest3
-rw-r--r--net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch72
-rw-r--r--net-dns/unbound/files/unbound-1.4.12-gentoo.patch12
-rw-r--r--net-dns/unbound/files/unbound-anchor.service13
-rw-r--r--net-dns/unbound/files/unbound.confd4
-rw-r--r--net-dns/unbound/files/unbound.initd56
-rw-r--r--net-dns/unbound/files/unbound.service12
-rw-r--r--net-dns/unbound/files/unbound_at.service13
-rw-r--r--net-dns/unbound/metadata.xml30
-rw-r--r--net-dns/unbound/unbound-1.4.22-r1.ebuild112
-rw-r--r--net-dns/unbound/unbound-1.5.1-r2.ebuild123
-rw-r--r--net-dns/unbound/unbound-1.5.4.ebuild122
-rw-r--r--net-dns/updatedd/Manifest1
-rw-r--r--net-dns/updatedd/files/updatedd-2.6-options.patch12
-rw-r--r--net-dns/updatedd/metadata.xml8
-rw-r--r--net-dns/updatedd/updatedd-2.6.ebuild27
-rw-r--r--net-dns/validns/Manifest2
-rw-r--r--net-dns/validns/metadata.xml16
-rw-r--r--net-dns/validns/validns-0.7.ebuild26
-rw-r--r--net-dns/validns/validns-0.8.ebuild26
-rw-r--r--net-dns/valtz/Manifest1
-rw-r--r--net-dns/valtz/metadata.xml9
-rw-r--r--net-dns/valtz/valtz-0.7.ebuild19
410 files changed, 20387 insertions, 0 deletions
diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest
new file mode 100644
index 00000000000..0206eaaa522
--- /dev/null
+++ b/net-dns/avahi/Manifest
@@ -0,0 +1 @@
+DIST avahi-0.6.31.tar.gz 1268686 SHA256 8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48 SHA512 53eb00d570a274d841e1e6ad07da077950089ae39b4f7aa21fcd21cc5320b30b506b43e7e57e56198e155cc7bd289b779a48b2b2fc002dc6194a946110451858 WHIRLPOOL a6d97b87dfbb81be359ee03d8f32ebafdbb311bd596d686aeb55a2952ecb6c7c84466b1230e70392ffe23a20a56da7e0a5bd00c8dc1812b2156c0b4a8022144f
diff --git a/net-dns/avahi/avahi-0.6.31-r6.ebuild b/net-dns/avahi/avahi-0.6.31-r6.ebuild
new file mode 100644
index 00000000000..a6e13444156
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r6.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4 )
+ gtk? ( x11-libs/gtk+:2 )
+ gtk3? ( x11-libs/gtk+:3 )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # necessary until the UI libraries are ported
+ /usr/include/avahi-qt4/qt-watch.h
+ /usr/include/avahi-ui/avahi-ui.h
+)
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(multilib_native_use_enable gtk) \
+ $(multilib_native_use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(multilib_native_use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.31-r7.ebuild b/net-dns/avahi/avahi-0.6.31-r7.ebuild
new file mode 100644
index 00000000000..974a9e7fda6
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r7.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.31-r8.ebuild b/net-dns/avahi/avahi-0.6.31-r8.ebuild
new file mode 100644
index 00000000000..a1bde8114a3
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r8.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ # Needed for running on systemd properly, bug #537000
+ if multilib_is_native_abi; then
+ ln -s avahi-daemon.service "${D}$(systemd_get_unitdir)"/dbus-org.freedesktop.Avahi.service || die
+ fi
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/files/autoipd-openrc.sh b/net-dns/avahi/files/autoipd-openrc.sh
new file mode 100644
index 00000000000..dec3aa0521c
--- /dev/null
+++ b/net-dns/avahi/files/autoipd-openrc.sh
@@ -0,0 +1,32 @@
+# Copyright (C) 2004-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+_config_vars="$_config_vars autoipd"
+
+autoipd_depend() {
+ program /usr/sbin/avahi-autoipd
+ after interface
+}
+
+autoipd_start() {
+ _exists true || return 1
+
+ eval args=\$autoipd_${IFVAR}
+
+ ebegin "Starting avahi-autoipd"
+ /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
+ eend "${?}" || return 1
+
+ _show_address
+
+ return 0
+}
+
+autoipd_stop() {
+ /usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${IFACE}"
+ eend "${?}"
+}
diff --git a/net-dns/avahi/files/autoipd.sh b/net-dns/avahi/files/autoipd.sh
new file mode 100644
index 00000000000..89d02e338bc
--- /dev/null
+++ b/net-dns/avahi/files/autoipd.sh
@@ -0,0 +1,52 @@
+# Copyright (c) 2004-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+# void autoipd_depend(void)
+#
+# Sets up the dependencies for the module
+autoipd_depend() {
+ after interface
+}
+
+# void autoipd_expose(void)
+#
+# Expose variables that can be configured
+autoipd_expose() {
+ variables autoipd
+}
+
+# bool autoipd_start(char *iface)
+#
+# Tries to configure the interface via avahi-autoipd
+autoipd_start() {
+ local iface="${1}" ifvar="$(bash_variable "${iface}")" opts="autoipd_${ifvar}" addr=""
+
+ interface_exists "${iface}" true || return 1
+
+ ebegin "Starting avahi-autoipd"
+ if /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${!opts} "${iface}"
+ then
+ eend 0
+ addr="$(interface_get_address "${iface}")"
+ einfo "${iface} received address ${addr}"
+ return 0
+ fi
+
+ eend "${?}" "Failed to get address via avahi-autoipd!"
+}
+
+# bool autoipd_stop(char *iface)
+#
+# Stops a running avahi-autoipd instance
+autoipd_stop() {
+ local iface="${1}"
+
+ /usr/sbin/avahi-autoipd --check --syslog "${iface}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${iface}"
+ eend "${?}" "Failed to stop running avahi-autoipd instance!"
+}
+
+# vim: set ts=4 :
diff --git a/net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch b/net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch
new file mode 100644
index 00000000000..be385f6cfbe
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.30-automake-1.11.2.patch
@@ -0,0 +1,102 @@
+http://bugs.gentoo.org/397477
+
+--- avahi-python/avahi/Makefile.am
++++ avahi-python/avahi/Makefile.am
+@@ -31,7 +31,7 @@
+ -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
+ -e 's,@CHECK_KEY\@,while key is not None:,g' \
+ -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
+- -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
++ -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ && \
+ chmod +x $@
+ endif
+
+@@ -44,7 +44,7 @@
+ -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
+ -e 's,@CHECK_KEY\@,for key in keys:,g' \
+ -e 's,@NEXT_KEY\@,,g' \
+- -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
++ -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ && \
+ chmod +x $@
+ endif
+
+--- avahi-python/avahi/ServiceTypeDatabase.py.in
++++ avahi-python/avahi/ServiceTypeDatabase.py.in
+@@ -26,7 +26,7 @@
+ class ServiceTypeDatabase:
+ """ServiceTypeDatabase maps service types to descriptions"""
+
+- def __init__(self, filename = "@pkglibdir@/service-types.db"):
++ def __init__(self, filename = "@pkgdatadir@/service-types.db"):
+
+ self.db = @DBM@.open(filename, "r")
+
+--- avahi-ui/Makefile.am
++++ avahi-ui/Makefile.am
+@@ -62,18 +62,18 @@
+
+ if HAVE_GDBM
+ libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c
+-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
++libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+ libavahi_ui_la_LIBADD += -lgdbm
+
+-libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
++libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+ libavahi_ui_gtk3_la_LIBADD += -lgdbm
+ endif
+
+ if HAVE_DBM
+ libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c
+-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
++libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+
+-libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
++libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+ endif
+
+ bin_PROGRAMS = bssh
+--- avahi-utils/Makefile.am
++++ avahi-utils/Makefile.am
+@@ -30,13 +30,13 @@
+
+ if HAVE_GDBM
+ avahi_browse_SOURCES += stdb.h stdb.c
+-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
++avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+ avahi_browse_LDADD += -lgdbm
+ endif
+
+ if HAVE_DBM
+ avahi_browse_SOURCES += stdb.h stdb.c
+-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
++avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+ endif
+
+ avahi_resolve_SOURCES = avahi-resolve.c sigint.c sigint.h
+--- service-type-database/Makefile.am
++++ service-type-database/Makefile.am
+@@ -18,13 +18,12 @@
+ EXTRA_DIST=build-db.in service-types
+
+ pkgdata_DATA=service-types
+-pkglib_DATA=
+
+ if HAVE_PYTHON
+ if HAVE_GDBM
+
+ noinst_SCRIPTS=build-db
+-pkglib_DATA+=service-types.db
++pkgdata_DATA+=service-types.db
+
+ build-db: build-db.in
+ $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
+@@ -41,7 +40,7 @@
+ if HAVE_DBM
+
+ noinst_SCRIPTS=build-db
+-pkglib_DATA+=service-types.db.pag service-types.db.dir
++pkgdata_DATA+=service-types.db.pag service-types.db.dir
+
+ build-db: build-db.in
+ $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
diff --git a/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
new file mode 100644
index 00000000000..2c615a2b3a0
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
@@ -0,0 +1,83 @@
+--- avahi-discover-standalone/Makefile.am
++++ avahi-discover-standalone/Makefile.am
+@@ -23,7 +23,7 @@
+ # This cool debug trap works on i386/gcc only
+ AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+-if HAVE_GTK2OR3
++if ENABLE_GTK_UTILS
+ if HAVE_GLIB
+ bin_PROGRAMS = \
+ avahi-discover-standalone
+--- avahi-ui/Makefile.am
++++ avahi-ui/Makefile.am
+@@ -76,6 +76,7 @@
+ libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+ endif
+
++if ENABLE_GTK_UTILS
+ bin_PROGRAMS = bssh
+ desktop_DATA += bssh.desktop bvnc.desktop
+ @INTLTOOL_DESKTOP_RULE@
+@@ -102,6 +103,7 @@
+ bvnc.desktop.in: bvnc.desktop.in.in
+ $(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@
+
++endif # ENABLE_GTK_UTILS
+ endif # HAVE_GLIB
+ endif
+ endif
+--- configure.ac
++++ configure.ac
+@@ -564,7 +564,29 @@
+ fi
+ AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
+
+-AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes" )
++#
++# Check for GTK+ Utils
++#
++AC_ARG_ENABLE(gtk-utils,
++ AS_HELP_STRING([--disable-gtk-utils],[Disable GTK+ utilities]),
++ [case "${enableval}" in
++ yes) WANT_GTK_UTILS=yes ;;
++ no) WANT_GTK_UTILS=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk-utils) ;;
++ esac],
++ [WANT_GTK_UTILS=yes])
++
++ENABLE_GTK_UTILS=no
++HAVE_GTK2OR3=no
++if test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
++ HAVE_GTK2OR3=yes
++ if test "x$WANT_GTK_UTILS" = "xyes"; then
++ ENABLE_GTK_UTILS=yes
++ fi
++fi
++
++AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK2OR3" = "xyes")
++AM_CONDITIONAL(ENABLE_GTK_UTILS, test "x$ENABLE_GTK_UTILS" = "xyes")
+
+ #
+ # D-Bus
+@@ -1199,11 +1221,6 @@
+ ENABLE_AUTOIPD="no (You need libdaemon!)"
+ fi
+
+-HAVE_GTK2OR3=no
+-if test "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes" ; then
+- HAVE_GTK2OR3=yes
+-fi
+-
+ BUILD_UI="no"
+ if test "x$HAVE_GTK2OR3" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
+ BUILD_UI="yes"
+@@ -1223,7 +1240,7 @@
+ Building avahi-python: ${BUILD_PYTHON}
+ Building libavahi-glib: ${HAVE_GLIB}
+ Building libavahi-gobject: ${BUILD_GOBJECT}
+- Building avahi-discover-standalone: ${HAVE_GTK2OR3}
++ Building avahi-discover-standalone: ${ENABLE_GTK_UTILS}
+ Building libavahi-qt3: ${HAVE_QT3}
+ Building libavahi-qt4: ${HAVE_QT4}
+ Building avahi-sharp: ${HAVE_MONO}
diff --git a/net-dns/avahi/files/avahi-0.6.30-parallel.patch b/net-dns/avahi/files/avahi-0.6.30-parallel.patch
new file mode 100644
index 00000000000..a75f99109c6
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.30-parallel.patch
@@ -0,0 +1,34 @@
+From cb10a844f9e91322aca91340b7adc0db19c96b36 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu>
+Date: Mon, 30 Apr 2012 17:07:41 -0700
+Subject: [PATCH] build-sys: fix parallel install in avahi-utils
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The moment install-exec-local is called, we might still not have
+created ${DESTDIR}/${bindir} so we should make sure to create it
+first, and then try to chdir into it.
+
+Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
+---
+ avahi-utils/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/avahi-utils/Makefile.am b/avahi-utils/Makefile.am
+index a644b4a..1abc79a 100644
+--- a/avahi-utils/Makefile.am
++++ b/avahi-utils/Makefile.am
+@@ -54,7 +54,8 @@ avahi_set_host_name_CFLAGS = $(AM_CFLAGS)
+ avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
+
+ install-exec-local:
+- cd $(DESTDIR)/$(bindir) && \
++ $(mkdir_p) $(DESTDIR)/$(bindir) && \
++ cd $(DESTDIR)/$(bindir) && \
+ rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
+ $(LN_S) avahi-resolve avahi-resolve-host-name && \
+ $(LN_S) avahi-resolve avahi-resolve-address && \
+--
+1.7.8.6
+
diff --git a/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
new file mode 100644
index 00000000000..df0c420fa62
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
@@ -0,0 +1,27 @@
+From ce3b83de6aa689c0cefe0b1e85c03a627b537099 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 12 May 2014 19:46:22 +0200
+Subject: [PATCH] Allow building client without the daemon.
+
+There's no good reason to disallow that, and that's what we specifically
+want to do for multilib.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0e190ba..c56cf01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1185,7 +1185,7 @@ fi
+
+ BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)"
+
+-if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
++if "x$HAVE_DBUS" = "xyes" ; then
+ BUILD_CLIENT=yes
+ fi
+
+--
+1.9.3
+
diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
new file mode 100644
index 00000000000..62ba967c26f
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
@@ -0,0 +1,31 @@
+--- avahi-0.6.30.old/avahi-python/avahi-discover/Makefile.am 2010-06-28 23:30:34.000000000 -0400
++++ avahi-0.6.30/avahi-python/avahi-discover/Makefile.am 2012-04-21 18:02:01.642934527 -0400
+@@ -22,6 +22,7 @@
+ avahi-discover.py \
+ avahi-discover.desktop.in.in
+
++if ENABLE_GTK_UTILS
+ if HAVE_PYTHON
+ if HAVE_PYTHON_DBUS
+ if HAVE_PYGTK
+@@ -67,3 +68,4 @@
+ endif
+ endif
+ endif
++endif
+--- avahi-0.6.30.old/man/Makefile.am 2012-04-21 18:10:45.690900742 -0400
++++ avahi-0.6.30/man/Makefile.am 2012-04-21 18:09:15.146906578 -0400
+@@ -65,11 +65,13 @@
+ man_MANS += \
+ avahi-bookmarks.1
+ if HAVE_GTK
++if ENABLE_GTK_UTILS
+ man_MANS += \
+ avahi-discover.1
+ endif
+ endif
+ endif
++endif
+
+ if ENABLE_AUTOIPD
+ if HAVE_LIBDAEMON
diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
new file mode 100644
index 00000000000..b0e47e90746
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
@@ -0,0 +1,20 @@
+avahi-gobject fails to build under et_EE and possibly other locales.
+
+The regex for a sed in avahi-gobject/Makefile fails under various locales.
+Forcing LC_ALL=C fixes the issue.
+
+X-Gentoo-Bug: 501664
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/501664
+
+diff -Naur avahi-0.6.31.orig/avahi-gobject/Makefile.am avahi-0.6.31/avahi-gobject/Makefile.am
+--- avahi-0.6.31.orig/avahi-gobject/Makefile.am 2010-08-25 20:51:39.007153001 -0400
++++ avahi-0.6.31/avahi-gobject/Makefile.am 2014-09-07 19:00:05.485657990 -0400
+@@ -76,7 +76,7 @@
+
+ signals-marshal.list: $(CORE_SOURCES) Makefile.am
+ $(AM_V_GEN)( cd $(srcdir) && \
+- sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
++ LC_ALL=C sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
+ $(CORE_SOURCES) ) \
+ | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \
+ if cmp -s $@.tmp $@; then \
diff --git a/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
new file mode 100644
index 00000000000..17ecba52534
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
@@ -0,0 +1,85 @@
+From: David Zeuthen <zeuthen@chromium.org>
+Date: Tue, 5 Mar 2013 19:52:38 +0000 (-0800)
+Subject: avahi-daemon: add option "host-name-from-machine-id="
+X-Git-Url: http://git.0pointer.de/?p=avahi.git;a=commitdiff_plain;h=147cdce70b22ae7cee9fb4fe123db40952f31c9e
+
+avahi-daemon: add option "host-name-from-machine-id="
+
+Signed-off-by: David Zeuthen <zeuthen@chromium.org>
+---
+
+diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c
+index d46f40a..8c28fd6 100644
+--- a/avahi-daemon/main.c
++++ b/avahi-daemon/main.c
+@@ -65,6 +65,7 @@
+ #include <avahi-core/publish.h>
+ #include <avahi-core/dns-srv-rr.h>
+ #include <avahi-core/log.h>
++#include <avahi-core/util.h>
+
+ #ifdef ENABLE_CHROOT
+ #include "chroot.h"
+@@ -576,6 +577,29 @@ static int parse_usec(const char *s, AvahiUsec *u) {
+ return 0;
+ }
+
++static char *get_machine_id(void) {
++ int fd;
++ char buf[32];
++
++ fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
++ if (fd == -1 && errno == ENOENT)
++ fd = open("/var/lib/dbus/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
++ if (fd == -1)
++ return NULL;
++
++ /* File is on a filesystem so we never get EINTR or partial reads */
++ if (read(fd, buf, sizeof buf) != sizeof buf) {
++ close(fd);
++ return NULL;
++ }
++ close(fd);
++
++ /* Contents can be lower, upper and even mixed case so normalize */
++ avahi_strdown(buf);
++
++ return avahi_strndup(buf, sizeof buf);
++}
++
+ static int load_config_file(DaemonConfig *c) {
+ int r = -1;
+ AvahiIniFile *f;
+@@ -631,6 +655,15 @@ static int load_config_file(DaemonConfig *c) {
+ c->server_config.use_iff_running = is_yes(p->value);
+ else if (strcasecmp(p->key, "disallow-other-stacks") == 0)
+ c->server_config.disallow_other_stacks = is_yes(p->value);
++ else if (strcasecmp(p->key, "host-name-from-machine-id") == 0) {
++ if (*(p->value) == 'y' || *(p->value) == 'Y') {
++ char *machine_id = get_machine_id();
++ if (machine_id != NULL) {
++ avahi_free(c->server_config.host_name);
++ c->server_config.host_name = machine_id;
++ }
++ }
++ }
+ #ifdef HAVE_DBUS
+ else if (strcasecmp(p->key, "enable-dbus") == 0) {
+
+diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in
+index bea7ed5..2d15017 100644
+--- a/man/avahi-daemon.conf.5.xml.in
++++ b/man/avahi-daemon.conf.5.xml.in
+@@ -40,6 +40,12 @@
+ </option>
+
+ <option>
++ <p><opt>host-name-from-machine-id=</opt> Takes a boolean
++ value ("yes" or "no"). If set to "yes" avahi-daemon
++ will use the machine-id as name on the LAN.</p>
++ </option>
++
++ <option>
+ <p><opt>domain-name=</opt> Set the default domain name avahi-daemon
+ tries to register its host name and services on the LAN in. If
+ omitted defaults to ".local".</p>
diff --git a/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
new file mode 100644
index 00000000000..d9a7bc3434c
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
@@ -0,0 +1,11 @@
+--- avahi-0.6.31/avahi-utils/Makefile.am
++++ avahi-0.6.31/avahi-utils/Makefile.am
+@@ -53,7 +53,7 @@
+ avahi_set_host_name_CFLAGS = $(AM_CFLAGS)
+ avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
+
+-install-exec-local:
++install-exec-hook:
+ cd $(DESTDIR)/$(bindir) && \
+ rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
+ $(LN_S) avahi-resolve avahi-resolve-host-name && \
diff --git a/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
new file mode 100644
index 00000000000..9c23ca5e455
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/484212
+
+Description: SO_REUSEPORT may not exist in running kernel
+ When userspace defines SO_REUSEPORT we will attempt to enable socket
+ port number reuse. However if the running kernel does not support
+ this call it will fail preventing daemon startup. If this call is
+ present but fails ENOPROTOOPT then we know that actually the kernel
+ does not support it and we should continue as if we did not have the
+ call at all. (LP: #1228204)
+ .
+ This patch could be removed from the debian package after jessie release.
+Author: Andy Whitcroft <apw@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009
+Last-Update: 2013-09-20
+
+Index: avahi-0.6.31/avahi-core/socket.c
+===================================================================
+--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
++++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
+@@ -177,7 +177,8 @@
+ yes = 1;
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
+ avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
+- return -1;
++ if (errno != ENOPROTOOPT)
++ return -1;
+ }
+ #endif
+
diff --git a/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
new file mode 100644
index 00000000000..394f6d34d0f
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
@@ -0,0 +1,22 @@
+--- avahi-0.6.30/initscript/gentoo/avahi-daemon.in
++++ avahi-0.6.30/initscript/gentoo/avahi-daemon.in
+@@ -2,7 +2,7 @@
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-opts="reload"
++extra_started_commands="reload"
+
+ depend() {
+ before netmount nfsmount
+--- avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
++++ avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
+@@ -2,7 +2,7 @@
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-opts="reload"
++extra_started_commands="reload"
+
+ depend() {
+ need avahi-daemon
diff --git a/net-dns/avahi/metadata.xml b/net-dns/avahi/metadata.xml
new file mode 100644
index 00000000000..8fd09aff984
--- /dev/null
+++ b/net-dns/avahi/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+</maintainer>
+<use>
+ <flag name='autoipd'>Build and install the IPv4LL (RFC3927) network address
+ configuration daemon</flag>
+ <flag name='bookmarks'>Install the avahi-bookmarks application (requires
+ <pkg>dev-python/twisted</pkg>)</flag>
+ <flag name='howl-compat'>Enable compat libraries for howl</flag>
+ <flag name="gtk3">Build the avahi-ui-gtk3 library, and use gtk3 for the
+ avahi utilities under USE=utils</flag>
+ <flag name='mdnsresponder-compat'>Enable compat libraries for
+ mDNSResponder</flag>
+ <flag name="utils">Install the avahi gtk+ utils avahi-discover, bssh, and
+ bvnc</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dns/bind-dns-keygen/Manifest b/net-dns/bind-dns-keygen/Manifest
new file mode 100644
index 00000000000..34fea850227
--- /dev/null
+++ b/net-dns/bind-dns-keygen/Manifest
@@ -0,0 +1 @@
+DIST bind-9.3.2-39.fc6.src.rpm 5480548 SHA256 8e5b98a2cd2f5003b28ba9c7a9229efe135a6439c64cc1a9b6aa91811258ef21 SHA512 8959274880aca83d0882fcd825627cdf1000536d2c6e08fad83fe6b85aecbbeb404e6bf7fc7f1d718aa17d85465198565adffd3628a615744d828a674a775736 WHIRLPOOL 0854c7223d97ea82ac90ec6c7e792778bd7493f919a0b6e6e344e0c70745e28effabf63a45da9e87b65bd7eaa0b3f146ea78aa21e4cfbe6cde3e7f4f0a3b7bcf
diff --git a/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild b/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild
new file mode 100644
index 00000000000..a8a4de38fad
--- /dev/null
+++ b/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit rpm toolchain-funcs
+
+# Tag for which Fedora Core version it's from
+FCVER="6"
+
+MY_PV="${PV%.*}-${PV##*.}"
+MY_P="${PN%%-*}-${MY_PV}"
+DESCRIPTION="A simple BIND key generator"
+HOMEPAGE="http://fedora.redhat.com/projects/config-tools/"
+SRC_URI="mirror://gentoo/${MY_P}.fc${FCVER}.src.rpm"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+S="${WORKDIR}"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN#*-} ${PN##*-}.c || die "compile failed"
+}
+
+src_install() {
+ dosbin ${PN#*-} || die "dosbin failed"
+}
diff --git a/net-dns/bind-dns-keygen/metadata.xml b/net-dns/bind-dns-keygen/metadata.xml
new file mode 100644
index 00000000000..59e2b8f78cb
--- /dev/null
+++ b/net-dns/bind-dns-keygen/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/bind-tools/Manifest b/net-dns/bind-tools/Manifest
new file mode 100644
index 00000000000..15de6564f82
--- /dev/null
+++ b/net-dns/bind-tools/Manifest
@@ -0,0 +1,2 @@
+DIST bind-9.10.1-P1.tar.gz 8356463 SHA256 974343108d32f253a130383d0ba51290fb7bf372092f1451f264a9e3ac09898d SHA512 5fedff46d9cb0ff2544624c6d998f4f4bcd82152730e8e936c2611847fe443018b5c5c1dfb1dc49888dde5e3e30c3814f08369525612f0770575d54a3133ed48 WHIRLPOOL 6f39ff0e15676ed68f6d48d2ec5894b00de5192edbbbff94444f62dcf83e62a1e72019d575da97b6e6cde91b8918da78721c48510dbaad88095d4f2b3af375eb
+DIST bind-9.10.2-P2.tar.gz 8469608 SHA256 b1e6f0af88634aaf48fb9d06bbf82968264f49b8e2685f061dd3fd4c1ab76c5f SHA512 f59a4e7ef268cd95be9c31b8f908a77b261c76bfad0572608f503175e4e06e69c22ee88f4b6ae9578cd096aa069d9401f76084c7e07b3e98e9dbbb40d535695c WHIRLPOOL 10b035f790a43552b22eed13a98b8dcfdc0cc0614342ae221ce23ba655fb40a46e336cca8575460bf26a792303c6eba61e184ca5deb219372fdd09609b4c9798
diff --git a/net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild b/net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild
new file mode 100644
index 00000000000..1c50debf7bc
--- /dev/null
+++ b/net-dns/bind-tools/bind-tools-9.10.1_p1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic toolchain-funcs
+
+MY_PN=${PN//-tools}
+MY_PV=${PV/_p/-P}
+MY_PV=${MY_PV/_rc/rc}
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD BSD-2 HPND JNIC RSA openssl"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc gost gssapi idn ipv6 readline ssl urandom xml"
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="gost? ( ssl )"
+
+DEPEND="ssl? ( dev-libs/openssl:0 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ xml? ( dev-libs/libxml2 )
+ idn? ( net-dns/idnkit )
+ gssapi? ( virtual/krb5 )
+ readline? ( sys-libs/readline )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+src_prepare() {
+ # bug 231247
+ epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ # bug 344029
+ append-cflags "-DDIG_SIGCHASE"
+
+ # localstatedir for nsupdate -l, bug 395785
+ tc-export BUILD_CC
+ econf \
+ --localstatedir=/var \
+ --without-python \
+ --disable-seccomp \
+ --without-libjson \
+ $(use_enable ipv6) \
+ $(use_with idn) \
+ $(usex idn --with-idnlib=-lidnkit '') \
+ $(use_with ssl openssl "${EPREFIX}"/usr) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_with readline) \
+ $(use_with gost) \
+ ${myconf}
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+}
+
+src_compile() {
+ local AR=$(tc-getAR)
+
+ emake AR=$AR -C lib/ || die "emake lib failed"
+ emake AR=$AR -C bin/delv/ || die "emake bin/delv failed"
+ emake AR=$AR -C bin/dig/ || die "emake bin/dig failed"
+ emake AR=$AR -C bin/nsupdate/ || die "emake bin/nsupdate failed"
+ emake AR=$AR -C bin/dnssec/ || die "emake bin/dnssec failed"
+}
+
+src_install() {
+ dodoc README CHANGES FAQ
+
+ cd "${S}"/bin/delv
+ dobin delv
+ doman delv.1
+
+ cd "${S}"/bin/dig
+ dobin dig host nslookup
+ doman {dig,host,nslookup}.1
+
+ cd "${S}"/bin/nsupdate
+ dobin nsupdate
+ doman nsupdate.1
+ if use doc; then
+ dohtml nsupdate.html
+ fi
+
+ cd "${S}"/bin/dnssec
+ dobin dnssec-keygen
+ doman dnssec-keygen.8
+ if use doc; then
+ dohtml dnssec-keygen.html
+ fi
+}
diff --git a/net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild b/net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild
new file mode 100644
index 00000000000..6db6fe9a3b8
--- /dev/null
+++ b/net-dns/bind-tools/bind-tools-9.10.2_p2.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic toolchain-funcs
+
+MY_PN=${PN//-tools}
+MY_PV=${PV/_p/-P}
+MY_PV=${MY_PV/_rc/rc}
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD BSD-2 HPND JNIC RSA openssl"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc gost gssapi idn ipv6 readline seccomp ssl urandom xml"
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="gost? ( ssl )"
+
+DEPEND="ssl? ( dev-libs/openssl:0 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ xml? ( dev-libs/libxml2 )
+ idn? ( net-dns/idnkit )
+ gssapi? ( virtual/krb5 )
+ readline? ( sys-libs/readline:0= )
+ seccomp? ( sys-libs/libseccomp )"
+RDEPEND="${DEPEND}
+ !<net-dns/bind-9.10.2"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch #231247
+ epatch "${FILESDIR}"/${PN}-9.10.2-openssl.patch #417129
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ # bug 344029
+ append-cflags "-DDIG_SIGCHASE"
+
+ # localstatedir for nsupdate -l, bug 395785
+ tc-export BUILD_CC
+ econf \
+ --localstatedir=/var \
+ --without-python \
+ --without-libjson \
+ --disable-openssl-version-check \
+ $(use_enable ipv6) \
+ $(use_with idn) \
+ $(usex idn --with-idnlib=-lidnkit '') \
+ $(use_enable seccomp) \
+ $(use_with ssl openssl) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_with readline) \
+ $(use_with gost) \
+ ${myconf}
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+}
+
+src_compile() {
+ local AR=$(tc-getAR)
+
+ emake AR="${AR}" -C lib/
+ emake AR="${AR}" -C bin/delv/
+ emake AR="${AR}" -C bin/dig/
+ emake AR="${AR}" -C bin/nsupdate/
+ emake AR="${AR}" -C bin/dnssec/
+}
+
+src_install() {
+ dodoc README CHANGES FAQ
+
+ cd "${S}"/bin/delv
+ dobin delv
+ doman delv.1
+
+ cd "${S}"/bin/dig
+ dobin dig host nslookup
+ doman {dig,host,nslookup}.1
+
+ cd "${S}"/bin/nsupdate
+ dobin nsupdate
+ doman nsupdate.1
+ if use doc; then
+ dohtml nsupdate.html
+ fi
+
+ cd "${S}"/bin/dnssec
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ dobin dnssec-"${tool}"
+ doman dnssec-"${tool}".8
+ if use doc; then
+ dohtml dnssec-"${tool}".html
+ fi
+ done
+}
diff --git a/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch b/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch
new file mode 100644
index 00000000000..deeb1096162
--- /dev/null
+++ b/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch
@@ -0,0 +1,145 @@
+https://bugs.gentoo.org/417129
+
+fix openssl build logic:
+* do not probe direct filesystem paths (including hardcoding things like /usr)
+* use pkg-config to locate proper openssl libraries
+* turn dsa check into a header one
+* turn ecdsa check into a link one
+* have gost/aes actually default to --with-xxx value when cross-compiling
+
+Patch by Mike Frysinger <vapier@chromium.org>
+
+--- a/configure.in
++++ b/configure.in
+@@ -1442,16 +1442,21 @@ case "$use_openssl" in
+ OPENSSLLINKOBJS=""
+ OPENSSLLINKSRCS=""
+ ;;
+- auto)
+- DST_OPENSSL_INC=""
+- CRYPTO=""
++ yes|auto)
++ CRYPTO=""
++ PKG_CHECK_MODULES([OPENSSL], [libcrypto], [CRYPTO='-DOPENSSL'], [
++ if test "$use_openssl" = "yes"; then
++ AC_MSG_ERROR(openssl not found)
++ fi
++ use_openssl="no"
++ ])
++
++ DST_OPENSSL_INC=$OPENSSL_CFLAGS
++ DST_OPENSSL_LIBS=$OPENSSL_LIBS
+ OPENSSLGOSTLINKOBJS=""
+ OPENSSLGOSTLINKSRS=""
+ OPENSSLLINKOBJS=""
+ OPENSSLLINKSRCS=""
+- AC_MSG_ERROR(
+-[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
+-If you don't want OpenSSL, use --without-openssl])
+ ;;
+ *)
+ if test "$want_native_pkcs11" = "yes"
+@@ -1588,27 +1593,39 @@ no)
+ ;;
+ esac
+
++ CC="$saved_cc"
++ CFLAGS="$saved_cflags"
++ LIBS="$saved_libs"
++ OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
++ OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
++ ;;
++esac
++
++if test "$use_openssl" = "yes"; then
++ saved_cc="$CC"
++ saved_cflags="$CFLAGS"
++ saved_libs="$LIBS"
++ CFLAGS="$CFLAGS $DST_OPENSSL_INC"
++ LIBS="$LIBS $DST_OPENSSL_LIBS"
++
+- AC_MSG_CHECKING(for OpenSSL DSA support)
+- if test -f $use_openssl/include/openssl/dsa.h
+- then
++ AC_CHECK_HEADERS([openssl/dsa.h])
++ if test "$ac_cv_header_openssl_dsa_h" = yes; then
+ AC_DEFINE(HAVE_OPENSSL_DSA)
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_RESULT(no)
+ fi
+
+ AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512)
+
+ AC_MSG_CHECKING(for OpenSSL ECDSA support)
+ have_ecdsa=""
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #include <openssl/ecdsa.h>
+ #include <openssl/objects.h>
++],[
+ int main() {
+ EC_KEY *ec256, *ec384;
+
+ #if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384)
+- return (1);
++#error choke
+ #endif
+ ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+ ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);
+@@ -1637,24 +1654,7 @@ int main() {
+ [AC_MSG_RESULT(yes)
+ have_ecdsa="yes"],
+ [AC_MSG_RESULT(no)
+- have_ecdsa="no"],
++ have_ecdsa="no"])
+- [AC_MSG_RESULT(using --with-ecdsa)])
+- case "$with_ecdsa" in
+- yes)
+- case "$have_ecdsa" in
+- no) AC_MSG_ERROR([ecdsa not supported]) ;;
+- *) have_ecdsa=yes ;;
+- esac
+- ;;
+- no)
+- have_ecdsa=no ;;
+- *)
+- case "$have_ecdsa" in
+- yes|no) ;;
+- *) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;;
+- esac
+- ;;
+- esac
+ case $have_ecdsa in
+ yes)
+ OPENSSL_ECDSA="yes"
+@@ -1702,7 +1702,8 @@ int main() {
+ have_gost="yes"],
+ [AC_MSG_RESULT(no)
+ have_gost="no"],
+- [AC_MSG_RESULT(using --with-gost)])
++ [AC_MSG_RESULT(using --with-gost)
++ have_gost=$with_gost])
+ case "$with_gost" in
+ yes)
+ case "$have_gost" in
+@@ -1752,7 +1753,8 @@ int main() {
+ [AC_MSG_RESULT(yes)
+ have_aes="yes"],
+ [AC_MSG_RESULT(no)])],
+- [AC_MSG_RESULT(using --with-aes)])
++ [AC_MSG_RESULT(using --with-aes)
++ have_aes=$with_aes])
+
+ ISC_OPENSSL_INC=""
+ ISC_OPENSSL_LIBS=""
+@@ -1765,8 +1767,7 @@ int main() {
+ OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
+ OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
+
+- ;;
+-esac
++fi
+
+ #
+ # This would include the system openssl path (and linker options to use
diff --git a/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch b/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch
new file mode 100644
index 00000000000..7aa1d16e92c
--- /dev/null
+++ b/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch
@@ -0,0 +1,63 @@
+--- lib/lwres/lwconfig.c.old 2007-06-20 01:47:22.000000000 +0200
++++ lib/lwres/lwconfig.c 2008-06-15 02:57:02.000000000 +0200
+@@ -175,13 +175,8 @@
+ REQUIRE(buffer != NULL);
+ REQUIRE(size > 0U);
+
+- *p = '\0';
+-
+ ch = eatwhite(fp);
+
+- if (ch == EOF)
+- return (EOF);
+-
+ do {
+ *p = '\0';
+
+@@ -592,23 +587,37 @@
+ if (strlen(word) == 0U)
+ rval = LWRES_R_SUCCESS;
+ else if (strcmp(word, "nameserver") == 0)
+- rval = lwres_conf_parsenameserver(ctx, fp);
++ rval = (stopchar != '\n')? /* fail instantly if EOL is reached */
++ lwres_conf_parsenameserver(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "lwserver") == 0)
+- rval = lwres_conf_parselwserver(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parselwserver(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "domain") == 0)
+- rval = lwres_conf_parsedomain(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parsedomain(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "search") == 0)
+- rval = lwres_conf_parsesearch(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parsesearch(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "sortlist") == 0)
+- rval = lwres_conf_parsesortlist(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parsesortlist(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "options") == 0)
+- rval = lwres_conf_parseoption(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parseoption(ctx, fp)
++ : LWRES_R_FAILURE;
+ else {
+ /* unrecognised word. Ignore entire line */
+ rval = LWRES_R_SUCCESS;
+- stopchar = eatline(fp);
+- if (stopchar == EOF) {
+- break;
++ if (stopchar != '\n') { /* do not eat the next line */
++ stopchar = eatline(fp);
++ if (stopchar == EOF) {
++ break;
++ }
+ }
+ }
+ if (ret == LWRES_R_SUCCESS && rval != LWRES_R_SUCCESS)
diff --git a/net-dns/bind-tools/metadata.xml b/net-dns/bind-tools/metadata.xml
new file mode 100644
index 00000000000..fb31564a3fa
--- /dev/null
+++ b/net-dns/bind-tools/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <use>
+ <flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
+ <flag name="gssapi">Enable gssapi support</flag>
+ <flag name="gost">Enables gost OpenSSL engine support</flag>
+ </use>
+ <longdescription>ISC's Bind DNS' server tools</longdescription>
+</pkgmetadata>
diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
new file mode 100644
index 00000000000..5831123d83b
--- /dev/null
+++ b/net-dns/bind/Manifest
@@ -0,0 +1,3 @@
+DIST bind-9.10.2-P2.tar.gz 8469608 SHA256 b1e6f0af88634aaf48fb9d06bbf82968264f49b8e2685f061dd3fd4c1ab76c5f SHA512 f59a4e7ef268cd95be9c31b8f908a77b261c76bfad0572608f503175e4e06e69c22ee88f4b6ae9578cd096aa069d9401f76084c7e07b3e98e9dbbb40d535695c WHIRLPOOL 10b035f790a43552b22eed13a98b8dcfdc0cc0614342ae221ce23ba655fb40a46e336cca8575460bf26a792303c6eba61e184ca5deb219372fdd09609b4c9798
+DIST bind-9.10.2-P3.tar.gz 8469831 SHA256 78079a66dda455ffecfe93ef72d1ffc947f17b1c453d55ec06b860b49a5e1d4a SHA512 cf33c3f83ab7c46f5919c16719870310f9e82237df4ed7ba4f7eb76ddae14b9644bd67dbb6c46e75650f59185aee391d3ac6fee45b2edb88473f9dbc578bb016 WHIRLPOOL ff7e1c827bfb62e229b8d93c299ff0647614f8403ba84cd3ebdbcafd51d37fdfcee7afd3feaf73036dfc46904b9b506b1da7c7e8ae73e167fe6f1f0246dc6163
+DIST dyndns-samples.tbz2 22866 SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac WHIRLPOOL 08d4e6a817f1d02597631e18152dbd55ea1bc4c82174be150cc77efc9e1f0f03b6471d1cefbe4229cd3161de752ef232a43ca274a07b78e9c974ceb04cfe99a2
diff --git a/net-dns/bind/bind-9.10.2_p2.ebuild b/net-dns/bind/bind-9.10.2_p2.ebuild
new file mode 100644
index 00000000000..8642d0421be
--- /dev/null
+++ b/net-dns/bind/bind-9.10.2_p2.ebuild
@@ -0,0 +1,407 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Re dlz/mysql and threads, needs to be verified..
+# MySQL uses thread local storage in its C api. Thus MySQL
+# requires that each thread of an application execute a MySQL
+# thread initialization to setup the thread local storage.
+# This is impossible to do safely while staying within the DLZ
+# driver API. This is a limitation caused by MySQL, and not the DLZ API.
+# Because of this BIND MUST only run with a single thread when
+# using the MySQL driver.
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+
+inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
+
+MY_PV="${PV/_p/-P}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SDB_LDAP_VER="1.1.0-fc14"
+
+RRL_PV="${MY_PV}"
+
+NSLINT_DIR="contrib/nslint-3.0a2/"
+
+# SDB-LDAP: http://bind9-ldap.bayour.com/
+
+DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
+# sdb-ldap? (
+# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
+# )"
+
+LICENSE="GPL-2 ISC BSD BSD-2 HPND JNIC openssl"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb +caps dlz doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
+json ldap mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
++threads urandom xml"
+# sdb-ldap - patch broken
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="postgres? ( dlz )
+ berkdb? ( dlz )
+ mysql? ( dlz !threads )
+ odbc? ( dlz )
+ ldap? ( dlz )
+ gost? ( ssl )
+ threads? ( caps )"
+# sdb-ldap? ( dlz )
+
+DEPEND="ssl? ( dev-libs/openssl:0[-bindist] )
+ mysql? ( >=virtual/mysql-4.0 )
+ odbc? ( >=dev-db/unixODBC-2.2.6 )
+ ldap? ( net-nds/openldap )
+ idn? ( net-dns/idnkit )
+ postgres? ( dev-db/postgresql:= )
+ caps? ( >=sys-libs/libcap-2.1.0 )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( >=dev-libs/geoip-1.4.6 )
+ gssapi? ( virtual/krb5 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ seccomp? ( sys-libs/libseccomp )
+ json? ( dev-libs/json-c )"
+# sdb-ldap? ( net-nds/openldap )
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-bind )
+ || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup named 40
+ enewuser named 40 -1 /etc/bind named
+ eend ${?}
+}
+
+src_prepare() {
+ # Adjusting PATHs in manpages
+ for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || die "sed failed, ${i} doesn't exist"
+ done
+
+# if use dlz; then
+# # sdb-ldap patch as per bug #160567
+# # Upstream URL: http://bind9-ldap.bayour.com/
+# # New patch take from bug 302735
+# if use sdb-ldap; then
+# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
+# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
+# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
+# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
+# fi
+# fi
+
+ # should be installed by bind-tools
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ if use nslint; then
+ sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
+ fi
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ use geoip && myconf="${myconf} --with-geoip"
+
+ # bug #158664
+# gcc-specs-ssp && replace-flags -O[23s] -O
+
+ # To include db.h from proper path
+ use berkdb && append-flags "-I$(db_includedir)"
+
+ export BUILD_CC=$(tc-getBUILD_CC)
+ econf \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-libtool \
+ --enable-full-report \
+ $(use_enable threads) \
+ $(use_with dlz dlopen) \
+ $(use_with dlz dlz-filesystem) \
+ $(use_with dlz dlz-stub) \
+ $(use_with postgres dlz-postgres) \
+ $(use_with mysql dlz-mysql) \
+ $(use_with berkdb dlz-bdb) \
+ $(use_with ldap dlz-ldap) \
+ $(use_with odbc dlz-odbc) \
+ $(use_with ssl openssl "${EPREFIX}"/usr) \
+ $(use_with ssl ecdsa) \
+ $(use_with idn) \
+ $(use_enable ipv6) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_enable rpz rpz-nsip) \
+ $(use_enable rpz rpz-nsdname) \
+ $(use_enable caps linux-caps) \
+ $(use_with gost) \
+ $(use_enable filter-aaaa) \
+ $(use_enable fixed-rrset) \
+ $(use_with python) \
+ $(use_enable seccomp) \
+ $(use_with json libjson) \
+ --without-readline \
+ ${myconf}
+
+ # $(use_enable static-libs static) \
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ econf
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use nslint; then
+ emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ dobin nslint
+ doman nslint.8
+ cd "${S}"
+ fi
+
+ dodoc CHANGES FAQ README
+
+ if use idn; then
+ dodoc contrib/idn/README.idnkit
+ fi
+
+ if use doc; then
+ dodoc doc/arm/Bv9ARM.pdf
+
+ docinto misc
+ dodoc doc/misc/*
+
+ # might a 'html' useflag make sense?
+ docinto html
+ dohtml -r doc/arm/*
+
+ docinto contrib
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
+
+ # some handy-dandy dynamic dns examples
+ pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
+ popd 1>/dev/null
+ fi
+
+ insinto /etc/bind
+ newins "${FILESDIR}"/named.conf-r8 named.conf
+
+ # ftp://ftp.rs.internic.net/domain/named.cache:
+ insinto /var/bind
+ doins "${FILESDIR}"/named.cache
+
+ insinto /var/bind/pri
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
+
+ newinitd "${FILESDIR}"/named.init-r13 named
+ newconfd "${FILESDIR}"/named.confd-r7 named
+
+ if use gost; then
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
+ else
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
+ fi
+
+ newenvd "${FILESDIR}"/10bind.env 10bind
+
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools
+ rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
+ rm -f "${D}"/usr/share/man/man8/nsupdate.8*
+ rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
+ rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
+ rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
+ done
+
+ # bug 405251, library archives aren't properly handled by --enable/disable-static
+ if ! use static-libs; then
+ find "${D}" -type f -name '*.a' -delete || die
+ fi
+
+ # bug 405251
+ find "${D}" -type f -name '*.la' -delete || die
+
+ if use python; then
+ install_python_tools() {
+ dosbin bin/python/dnssec-{checkds,coverage}
+ }
+ python_foreach_impl install_python_tools
+
+ python_replicate_script "${D}usr/sbin/dnssec-checkds"
+ python_replicate_script "${D}usr/sbin/dnssec-coverage"
+ fi
+
+ # bug 450406
+ dosym named.cache /var/bind/root.cache
+
+ dosym /var/bind/pri /etc/bind/pri
+ dosym /var/bind/sec /etc/bind/sec
+ dosym /var/bind/dyn /etc/bind/dyn
+ keepdir /var/bind/{pri,sec,dyn}
+
+ dodir /var/log/named
+
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0750 /etc/bind /var/bind/pri
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn}
+
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/generate-rndc-key.sh"
+}
+
+pkg_postinst() {
+ if [ ! -f '/etc/bind/rndc.key' ]; then
+ if use urandom; then
+ einfo "Using /dev/urandom for generating rndc.key"
+ /usr/sbin/rndc-confgen -r /dev/urandom -a
+ echo
+ else
+ einfo "Using /dev/random for generating rndc.key"
+ /usr/sbin/rndc-confgen -a
+ echo
+ fi
+ chown root:named /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+ fi
+
+ einfo
+ einfo "You can edit /etc/conf.d/named to customize named settings"
+ einfo
+ use mysql || use postgres || use ldap && {
+ elog "If your named depends on MySQL/PostgreSQL or LDAP,"
+ elog "uncomment the specified rc_named_* lines in your"
+ elog "/etc/conf.d/named config to ensure they'll start before bind"
+ einfo
+ }
+ einfo "If you'd like to run bind in a chroot AND this is a new"
+ einfo "install OR your bind doesn't already run in a chroot:"
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
+ einfo
+
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
+ if [[ -n ${CHROOT} ]]; then
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ elog "To enable the old behaviour (without using mount) uncomment the"
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ elog "If you decide to use the new/default method, ensure to make backup"
+ elog "first and merge your existing configs/zones to /etc/bind and"
+ elog "/var/bind because bind will now mount the needed directories into"
+ elog "the chroot dir."
+ fi
+}
+
+pkg_config() {
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
+
+ if [[ -z "${CHROOT}" ]]; then
+ eerror "This config script is designed to automate setting up"
+ eerror "a chrooted bind/named. To do so, please first uncomment"
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'."
+ die "Unset CHROOT"
+ fi
+ if [[ -d "${CHROOT}" ]]; then
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ ewarn "To enable the old behaviour (without using mount) uncomment the"
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ ewarn
+ ewarn "${CHROOT} already exists... some things might become overridden"
+ ewarn "press CTRL+C if you don't want to continue"
+ sleep 10
+ fi
+
+ echo; einfo "Setting up the chroot directory..."
+
+ mkdir -m 0750 -p ${CHROOT}
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
+ mkdir -m 0750 -p ${CHROOT}/etc/bind
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
+ # As of bind 9.8.0
+ if has_version net-dns/bind[gost]; then
+ if [ "$(get_libdir)" = "lib64" ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
+ ln -s lib64 ${CHROOT}/usr/lib
+ else
+ mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
+ fi
+ fi
+ chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
+
+ mknod ${CHROOT}/dev/null c 1 3
+ chmod 0666 ${CHROOT}/dev/null
+
+ mknod ${CHROOT}/dev/zero c 1 5
+ chmod 0666 ${CHROOT}/dev/zero
+
+ if use urandom; then
+ mknod ${CHROOT}/dev/urandom c 1 9
+ chmod 0666 ${CHROOT}/dev/urandom
+ else
+ mknod ${CHROOT}/dev/random c 1 8
+ chmod 0666 ${CHROOT}/dev/random
+ fi
+
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
+ cp -a /etc/bind ${CHROOT}/etc/
+ cp -a /var/bind ${CHROOT}/var/
+ fi
+
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
+ fi
+
+ elog "You may need to add the following line to your syslog-ng.conf:"
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
+}
diff --git a/net-dns/bind/bind-9.10.2_p3.ebuild b/net-dns/bind/bind-9.10.2_p3.ebuild
new file mode 100644
index 00000000000..7232f705745
--- /dev/null
+++ b/net-dns/bind/bind-9.10.2_p3.ebuild
@@ -0,0 +1,407 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Re dlz/mysql and threads, needs to be verified..
+# MySQL uses thread local storage in its C api. Thus MySQL
+# requires that each thread of an application execute a MySQL
+# thread initialization to setup the thread local storage.
+# This is impossible to do safely while staying within the DLZ
+# driver API. This is a limitation caused by MySQL, and not the DLZ API.
+# Because of this BIND MUST only run with a single thread when
+# using the MySQL driver.
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+
+inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
+
+MY_PV="${PV/_p/-P}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SDB_LDAP_VER="1.1.0-fc14"
+
+RRL_PV="${MY_PV}"
+
+NSLINT_DIR="contrib/nslint-3.0a2/"
+
+# SDB-LDAP: http://bind9-ldap.bayour.com/
+
+DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
+# sdb-ldap? (
+# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
+# )"
+
+LICENSE="GPL-2 ISC BSD BSD-2 HPND JNIC openssl"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb +caps dlz doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
+json ldap mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
++threads urandom xml"
+# sdb-ldap - patch broken
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="postgres? ( dlz )
+ berkdb? ( dlz )
+ mysql? ( dlz !threads )
+ odbc? ( dlz )
+ ldap? ( dlz )
+ gost? ( ssl )
+ threads? ( caps )"
+# sdb-ldap? ( dlz )
+
+DEPEND="ssl? ( dev-libs/openssl:0[-bindist] )
+ mysql? ( >=virtual/mysql-4.0 )
+ odbc? ( >=dev-db/unixODBC-2.2.6 )
+ ldap? ( net-nds/openldap )
+ idn? ( net-dns/idnkit )
+ postgres? ( dev-db/postgresql:= )
+ caps? ( >=sys-libs/libcap-2.1.0 )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( >=dev-libs/geoip-1.4.6 )
+ gssapi? ( virtual/krb5 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ seccomp? ( sys-libs/libseccomp )
+ json? ( dev-libs/json-c )"
+# sdb-ldap? ( net-nds/openldap )
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-bind )
+ || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup named 40
+ enewuser named 40 -1 /etc/bind named
+ eend ${?}
+}
+
+src_prepare() {
+ # Adjusting PATHs in manpages
+ for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || die "sed failed, ${i} doesn't exist"
+ done
+
+# if use dlz; then
+# # sdb-ldap patch as per bug #160567
+# # Upstream URL: http://bind9-ldap.bayour.com/
+# # New patch take from bug 302735
+# if use sdb-ldap; then
+# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
+# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
+# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
+# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
+# fi
+# fi
+
+ # should be installed by bind-tools
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ if use nslint; then
+ sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
+ fi
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ use geoip && myconf="${myconf} --with-geoip"
+
+ # bug #158664
+# gcc-specs-ssp && replace-flags -O[23s] -O
+
+ # To include db.h from proper path
+ use berkdb && append-flags "-I$(db_includedir)"
+
+ export BUILD_CC=$(tc-getBUILD_CC)
+ econf \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-libtool \
+ --enable-full-report \
+ $(use_enable threads) \
+ $(use_with dlz dlopen) \
+ $(use_with dlz dlz-filesystem) \
+ $(use_with dlz dlz-stub) \
+ $(use_with postgres dlz-postgres) \
+ $(use_with mysql dlz-mysql) \
+ $(use_with berkdb dlz-bdb) \
+ $(use_with ldap dlz-ldap) \
+ $(use_with odbc dlz-odbc) \
+ $(use_with ssl openssl "${EPREFIX}"/usr) \
+ $(use_with ssl ecdsa) \
+ $(use_with idn) \
+ $(use_enable ipv6) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_enable rpz rpz-nsip) \
+ $(use_enable rpz rpz-nsdname) \
+ $(use_enable caps linux-caps) \
+ $(use_with gost) \
+ $(use_enable filter-aaaa) \
+ $(use_enable fixed-rrset) \
+ $(use_with python) \
+ $(use_enable seccomp) \
+ $(use_with json libjson) \
+ --without-readline \
+ ${myconf}
+
+ # $(use_enable static-libs static) \
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ econf
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use nslint; then
+ emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ dobin nslint
+ doman nslint.8
+ cd "${S}"
+ fi
+
+ dodoc CHANGES FAQ README
+
+ if use idn; then
+ dodoc contrib/idn/README.idnkit
+ fi
+
+ if use doc; then
+ dodoc doc/arm/Bv9ARM.pdf
+
+ docinto misc
+ dodoc doc/misc/*
+
+ # might a 'html' useflag make sense?
+ docinto html
+ dohtml -r doc/arm/*
+
+ docinto contrib
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
+
+ # some handy-dandy dynamic dns examples
+ pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
+ popd 1>/dev/null
+ fi
+
+ insinto /etc/bind
+ newins "${FILESDIR}"/named.conf-r8 named.conf
+
+ # ftp://ftp.rs.internic.net/domain/named.cache:
+ insinto /var/bind
+ doins "${FILESDIR}"/named.cache
+
+ insinto /var/bind/pri
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
+
+ newinitd "${FILESDIR}"/named.init-r13 named
+ newconfd "${FILESDIR}"/named.confd-r7 named
+
+ if use gost; then
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
+ else
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
+ fi
+
+ newenvd "${FILESDIR}"/10bind.env 10bind
+
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools
+ rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
+ rm -f "${D}"/usr/share/man/man8/nsupdate.8*
+ rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
+ rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
+ rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
+ done
+
+ # bug 405251, library archives aren't properly handled by --enable/disable-static
+ if ! use static-libs; then
+ find "${D}" -type f -name '*.a' -delete || die
+ fi
+
+ # bug 405251
+ find "${D}" -type f -name '*.la' -delete || die
+
+ if use python; then
+ install_python_tools() {
+ dosbin bin/python/dnssec-{checkds,coverage}
+ }
+ python_foreach_impl install_python_tools
+
+ python_replicate_script "${D}usr/sbin/dnssec-checkds"
+ python_replicate_script "${D}usr/sbin/dnssec-coverage"
+ fi
+
+ # bug 450406
+ dosym named.cache /var/bind/root.cache
+
+ dosym /var/bind/pri /etc/bind/pri
+ dosym /var/bind/sec /etc/bind/sec
+ dosym /var/bind/dyn /etc/bind/dyn
+ keepdir /var/bind/{pri,sec,dyn}
+
+ dodir /var/log/named
+
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0750 /etc/bind /var/bind/pri
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn}
+
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/generate-rndc-key.sh"
+}
+
+pkg_postinst() {
+ if [ ! -f '/etc/bind/rndc.key' ]; then
+ if use urandom; then
+ einfo "Using /dev/urandom for generating rndc.key"
+ /usr/sbin/rndc-confgen -r /dev/urandom -a
+ echo
+ else
+ einfo "Using /dev/random for generating rndc.key"
+ /usr/sbin/rndc-confgen -a
+ echo
+ fi
+ chown root:named /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+ fi
+
+ einfo
+ einfo "You can edit /etc/conf.d/named to customize named settings"
+ einfo
+ use mysql || use postgres || use ldap && {
+ elog "If your named depends on MySQL/PostgreSQL or LDAP,"
+ elog "uncomment the specified rc_named_* lines in your"
+ elog "/etc/conf.d/named config to ensure they'll start before bind"
+ einfo
+ }
+ einfo "If you'd like to run bind in a chroot AND this is a new"
+ einfo "install OR your bind doesn't already run in a chroot:"
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
+ einfo
+
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
+ if [[ -n ${CHROOT} ]]; then
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ elog "To enable the old behaviour (without using mount) uncomment the"
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ elog "If you decide to use the new/default method, ensure to make backup"
+ elog "first and merge your existing configs/zones to /etc/bind and"
+ elog "/var/bind because bind will now mount the needed directories into"
+ elog "the chroot dir."
+ fi
+}
+
+pkg_config() {
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
+
+ if [[ -z "${CHROOT}" ]]; then
+ eerror "This config script is designed to automate setting up"
+ eerror "a chrooted bind/named. To do so, please first uncomment"
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'."
+ die "Unset CHROOT"
+ fi
+ if [[ -d "${CHROOT}" ]]; then
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ ewarn "To enable the old behaviour (without using mount) uncomment the"
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ ewarn
+ ewarn "${CHROOT} already exists... some things might become overridden"
+ ewarn "press CTRL+C if you don't want to continue"
+ sleep 10
+ fi
+
+ echo; einfo "Setting up the chroot directory..."
+
+ mkdir -m 0750 -p ${CHROOT}
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
+ mkdir -m 0750 -p ${CHROOT}/etc/bind
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
+ # As of bind 9.8.0
+ if has_version net-dns/bind[gost]; then
+ if [ "$(get_libdir)" = "lib64" ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
+ ln -s lib64 ${CHROOT}/usr/lib
+ else
+ mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
+ fi
+ fi
+ chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
+
+ mknod ${CHROOT}/dev/null c 1 3
+ chmod 0666 ${CHROOT}/dev/null
+
+ mknod ${CHROOT}/dev/zero c 1 5
+ chmod 0666 ${CHROOT}/dev/zero
+
+ if use urandom; then
+ mknod ${CHROOT}/dev/urandom c 1 9
+ chmod 0666 ${CHROOT}/dev/urandom
+ else
+ mknod ${CHROOT}/dev/random c 1 8
+ chmod 0666 ${CHROOT}/dev/random
+ fi
+
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
+ cp -a /etc/bind ${CHROOT}/etc/
+ cp -a /var/bind ${CHROOT}/var/
+ fi
+
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
+ fi
+
+ elog "You may need to add the following line to your syslog-ng.conf:"
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
+}
diff --git a/net-dns/bind/files/10bind.env b/net-dns/bind/files/10bind.env
new file mode 100644
index 00000000000..13c7910b2c6
--- /dev/null
+++ b/net-dns/bind/files/10bind.env
@@ -0,0 +1 @@
+CONFIG_PROTECT="/var/bind"
diff --git a/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch b/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch
new file mode 100644
index 00000000000..1577d578ddd
--- /dev/null
+++ b/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch
@@ -0,0 +1,21 @@
+diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in
+index ff3783a..bd7a700 100644
+--- a/contrib/dlz/config.dlz.in
++++ b/contrib/dlz/config.dlz.in
+@@ -407,10 +407,13 @@ then
+ odbcdirs="/usr /usr/local /usr/pkg"
+ for d in $odbcdirs
+ do
+- if test -f $d/include/sql.h -a -f $d/lib/libodbc.a
++ if test -f $d/include/sql.h
+ then
+- use_dlz_odbc=$d
+- break
++ if test -f $d/lib/libodbc.a -o -f $d/lib/libodbc.la -o $d/lib/libodbc.so
++ then
++ use_dlz_odbc=$d
++ break
++ fi
+ fi
+ done
+ fi
diff --git a/net-dns/bind/files/bind-dlzmysql5-reconnect.patch b/net-dns/bind/files/bind-dlzmysql5-reconnect.patch
new file mode 100644
index 00000000000..b854b9583f1
--- /dev/null
+++ b/net-dns/bind/files/bind-dlzmysql5-reconnect.patch
@@ -0,0 +1,59 @@
+--- bind-9.5.0a6.orig/contrib/dlz/drivers/dlz_mysql_driver.c 2007-02-06 06:44:26.000000000 +0100
++++ bind-9.5.0a6/contrib/dlz/drivers/dlz_mysql_driver.c 2007-09-04 23:57:57.000000000 +0200
+@@ -92,6 +92,25 @@
+ */
+
+ /*%
++ * Factorize the mysql_ping for adding a log error message
++ */
++static isc_result_t
++mysqldrv_ping(dbinstance_t *dbi) {
++ int pres = 0;
++
++ pres = mysql_ping(dbi->dbconn);
++ if ( pres != 0 ) {
++ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
++ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1),
++ "\nMySQL Ping Error : %s (%i)\n",
++ mysql_error(dbi->dbconn),
++ mysql_errno(dbi->dbconn));
++ return (ISC_R_FAILURE);
++ }
++ return (ISC_R_SUCCESS);
++}
++
++/*%
+ * Allocates memory for a new string, and then constructs the new
+ * string by "escaping" the input string. The new string is
+ * safe to be used in queries. This is necessary because we cannot
+@@ -225,6 +244,8 @@
+ }
+
+
++ mysqldrv_ping(dbi);
++
+ /*
+ * was a zone string passed? If so, make it safe for use in
+ * queries.
+@@ -324,7 +345,7 @@
+ qres = mysql_query((MYSQL *) dbi->dbconn, querystring);
+ if (qres == 0)
+ break;
+- for (j=0; mysql_ping((MYSQL *) dbi->dbconn) != 0 && j < 4; j++)
++ for (j=0; mysqldrv_ping(dbi) != 0 && j < 4; j++)
+ ;
+ }
+
+@@ -923,6 +944,12 @@
+ pass = getParameterValue(argv[1], "pass=");
+ socket = getParameterValue(argv[1], "socket=");
+
++ if(mysql_options((MYSQL *) dbi->dbconn, MYSQL_OPT_RECONNECT, "1")) {
++ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
++ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
++ "Could not set database reconnect option");
++ }
++
+ for (j=0; dbc == NULL && j < 4; j++)
+ dbc = mysql_real_connect((MYSQL *) dbi->dbconn, host,
+ user, pass, dbname, port, socket,
diff --git a/net-dns/bind/files/generate-rndc-key.sh b/net-dns/bind/files/generate-rndc-key.sh
new file mode 100755
index 00000000000..8314d77cd68
--- /dev/null
+++ b/net-dns/bind/files/generate-rndc-key.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ ! -s /etc/bind/rndc.key ]; then
+ /usr/sbin/rndc-confgen -a > /dev/null 2>&1 || exit 1
+ chmod 640 /etc/bind/rndc.key
+ chown root.named /etc/bind/rndc.key
+fi
diff --git a/net-dns/bind/files/localhost.zone-r3 b/net-dns/bind/files/localhost.zone-r3
new file mode 100644
index 00000000000..2e7a5912b97
--- /dev/null
+++ b/net-dns/bind/files/localhost.zone-r3
@@ -0,0 +1,11 @@
+$TTL 1W
+@ IN SOA localhost. root.localhost. (
+ 2008122601 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 604800 ; Expire - 1 week
+ 86400 ) ; Minimum
+@ IN NS localhost.
+@ IN A 127.0.0.1
+
+@ IN AAAA ::1
diff --git a/net-dns/bind/files/named.cache b/net-dns/bind/files/named.cache
new file mode 100644
index 00000000000..6c19741298d
--- /dev/null
+++ b/net-dns/bind/files/named.cache
@@ -0,0 +1,88 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: Jan 3, 2013
+; related version of root zone: 2013010300
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 IN NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2D::D
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2F::F
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FE::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FD::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:DC3::35
+; End of File
diff --git a/net-dns/bind/files/named.conf-r8 b/net-dns/bind/files/named.conf-r8
new file mode 100644
index 00000000000..39f9be267f3
--- /dev/null
+++ b/net-dns/bind/files/named.conf-r8
@@ -0,0 +1,166 @@
+/*
+ * Refer to the named.conf(5) and named(8) man pages, and the documentation
+ * in /usr/share/doc/bind-* for more details.
+ * Online versions of the documentation can be found here:
+ * https://kb.isc.org/article/AA-01031
+ *
+ * If you are going to set up an authoritative server, make sure you
+ * understand the hairy details of how DNS works. Even with simple mistakes,
+ * you can break connectivity for affected parties, or cause huge amounts of
+ * useless Internet traffic.
+ */
+
+acl "xfer" {
+ /* Deny transfers by default except for the listed hosts.
+ * If we have other name servers, place them here.
+ */
+ none;
+};
+
+/*
+ * You might put in here some ips which are allowed to use the cache or
+ * recursive queries
+ */
+acl "trusted" {
+ 127.0.0.0/8;
+ ::1/128;
+};
+
+options {
+ directory "/var/bind";
+ pid-file "/run/named/named.pid";
+
+ /* https://www.isc.org/solutions/dlv >=bind-9.7.x only */
+ //bindkeys-file "/etc/bind/bind.keys";
+
+ listen-on-v6 { ::1; };
+ listen-on { 127.0.0.1; };
+
+ allow-query {
+ /*
+ * Accept queries from our "trusted" ACL. We will
+ * allow anyone to query our master zones below.
+ * This prevents us from becoming a free DNS server
+ * to the masses.
+ */
+ trusted;
+ };
+
+ allow-query-cache {
+ /* Use the cache for the "trusted" ACL. */
+ trusted;
+ };
+
+ allow-recursion {
+ /* Only trusted addresses are allowed to use recursion. */
+ trusted;
+ };
+
+ allow-transfer {
+ /* Zone tranfers are denied by default. */
+ none;
+ };
+
+ allow-update {
+ /* Don't allow updates, e.g. via nsupdate. */
+ none;
+ };
+
+ /*
+ * If you've got a DNS server around at your upstream provider, enter its
+ * IP address here, and enable the line below. This will make you benefit
+ * from its cache, thus reduce overall DNS traffic in the Internet.
+ *
+ * Uncomment the following lines to turn on DNS forwarding, and change
+ * and/or update the forwarding ip address(es):
+ */
+/*
+ forward first;
+ forwarders {
+ // 123.123.123.123; // Your ISP NS
+ // 124.124.124.124; // Your ISP NS
+ // 4.2.2.1; // Level3 Public DNS
+ // 4.2.2.2; // Level3 Public DNS
+ 8.8.8.8; // Google Open DNS
+ 8.8.4.4; // Google Open DNS
+ };
+
+*/
+
+ dnssec-enable yes;
+ //dnssec-validation yes;
+
+ /*
+ * As of bind 9.8.0:
+ * "If the root key provided has expired,
+ * named will log the expiration and validation will not work."
+ */
+ dnssec-validation auto;
+
+ /* if you have problems and are behind a firewall: */
+ //query-source address * port 53;
+};
+
+/*
+logging {
+ channel default_log {
+ file "/var/log/named/named.log" versions 5 size 50M;
+ print-time yes;
+ print-severity yes;
+ print-category yes;
+ };
+
+ category default { default_log; };
+ category general { default_log; };
+};
+*/
+
+include "/etc/bind/rndc.key";
+controls {
+ inet 127.0.0.1 port 953 allow { 127.0.0.1/32; ::1/128; } keys { "rndc-key"; };
+};
+
+zone "." in {
+ type hint;
+ file "/var/bind/named.cache";
+};
+
+zone "localhost" IN {
+ type master;
+ file "pri/localhost.zone";
+ notify no;
+};
+
+/*
+ * Briefly, a zone which has been declared delegation-only will be effectively
+ * limited to containing NS RRs for subdomains, but no actual data beyond its
+ * own apex (for example, its SOA RR and apex NS RRset). This can be used to
+ * filter out "wildcard" or "synthesized" data from NAT boxes or from
+ * authoritative name servers whose undelegated (in-zone) data is of no
+ * interest.
+ * See http://www.isc.org/software/bind/delegation-only for more info
+ */
+
+//zone "COM" { type delegation-only; };
+//zone "NET" { type delegation-only; };
+
+//zone "YOUR-DOMAIN.TLD" {
+// type master;
+// file "/var/bind/pri/YOUR-DOMAIN.TLD.zone";
+// allow-query { any; };
+// allow-transfer { xfer; };
+//};
+
+//zone "YOUR-SLAVE.TLD" {
+// type slave;
+// file "/var/bind/sec/YOUR-SLAVE.TLD.zone";
+// masters { <MASTER>; };
+
+ /* Anybody is allowed to query but transfer should be controlled by the master. */
+// allow-query { any; };
+// allow-transfer { none; };
+
+ /* The master should be the only one who notifies the slaves, shouldn't it? */
+// allow-notify { <MASTER>; };
+// notify no;
+//};
diff --git a/net-dns/bind/files/named.confd-r7 b/net-dns/bind/files/named.confd-r7
new file mode 100644
index 00000000000..477a4806151
--- /dev/null
+++ b/net-dns/bind/files/named.confd-r7
@@ -0,0 +1,48 @@
+# Set various named options here.
+#
+#OPTIONS=""
+
+# Set this to the number of processors you want bind to use.
+# Leave this unchanged if you want bind to automatically detect the number
+#CPU="1"
+
+# If you wish to run bind in a chroot:
+# 1) un-comment the CHROOT= assignment, below. You may use
+# a different chroot directory but MAKE SURE it's empty.
+# 2) run: emerge --config =<bind-version>
+#
+#CHROOT="/chroot/dns"
+
+# Uncomment to enable binmount of /usr/share/GeoIP
+#CHROOT_GEOIP="1"
+
+# Uncomment the line below to avoid that the init script mounts the needed paths
+# into the chroot directory.
+# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1".
+#CHROOT_NOMOUNT="1"
+
+# Uncomment this option if you have setup your own chroot environment and you
+# don't want/need the chroot consistency check
+#CHROOT_NOCHECK=1
+
+# Default pid file location
+PIDFILE="${CHROOT}/run/named/named.pid"
+
+# Scheduling priority: 19 is the lowest and -20 is the highest.
+# Default: 0
+#NAMED_NICELEVEL="0"
+
+# Uncomment rc_named_use/rc_named_after for the database you need.
+# Its necessary to ensure the database backend will be started before named.
+
+# MySQL
+#rc_named_use="mysql"
+#rc_named_after="mysql"
+
+# PostgreSQL
+#rc_named_use="pg_autovacuum postgresql"
+#rc_named_after="pg_autovacuum postgresql"
+
+# LDAP
+#rc_named_use="ldap"
+#rc_named_after="ldap"
diff --git a/net-dns/bind/files/named.init-r13 b/net-dns/bind/files/named.init-r13
new file mode 100644
index 00000000000..a320d34f30e
--- /dev/null
+++ b/net-dns/bind/files/named.init-r13
@@ -0,0 +1,248 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig checkzones"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+NAMED_CONF=${CHROOT}/etc/bind/named.conf
+
+OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}
+MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60}
+
+_mount() {
+ local from
+ local to
+ local opts
+ local ret=0
+
+ if [ "${#}" -lt 3 ]; then
+ eerror "_mount(): to few arguments"
+ return 1
+ fi
+
+ from=$1
+ to=$2
+ shift 2
+
+ opts="${*}"
+ shift $#
+
+ if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then
+ einfo "mounting ${from} to ${to}"
+ mount ${from} ${to} ${opts}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_umount() {
+ local dir=$1
+ local ret=0
+
+ if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then
+ ebegin "umounting ${dir}"
+ umount ${dir}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_get_pidfile() {
+ # as suggested in bug #107724, bug 335398#c17
+ [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\
+ /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2)
+ [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/run/named/named.pid
+}
+
+check_chroot() {
+ if [ -n "${CHROOT}" ]; then
+ [ ! -d "${CHROOT}" ] && return 1
+ [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1
+ [ ! -d "${CHROOT}/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1
+ [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1
+ [ ! -d "${CHROOT}/var/log/named" ] && return 1
+ [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1
+ [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ -d "/usr/lib64" ]; then
+ [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1
+ elif [ -d "/usr/lib" ]; then
+ [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1
+ fi
+ fi
+ fi
+
+ return 0
+}
+
+checkconfig() {
+ ebegin "Checking named configuration"
+
+ if [ ! -f "${NAMED_CONF}" ] ; then
+ eerror "No ${NAMED_CONF} file exists!"
+ return 1
+ fi
+
+ /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} || {
+ eerror "named-checkconf failed! Please fix your config first."
+ return 1
+ }
+
+ eend 0
+ return 0
+}
+
+checkzones() {
+ ebegin "Checking named configuration and zones"
+ /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}}
+ eend $?
+}
+
+start() {
+ local piddir
+
+ ebegin "Starting ${CHROOT:+chrooted }named"
+
+ if [ -n "${CHROOT}" ]; then
+ if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ ! -e /usr/lib/engines/libgost.so ]; then
+ eend 1
+ eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support"
+ return 1
+ fi
+ cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || {
+ eend 1
+ eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'"
+ return 1
+ }
+ fi
+ cp -Lp /etc/localtime "${CHROOT}/etc/localtime"
+
+ if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ einfo "Mounting chroot dirs"
+ _mount /etc/bind ${CHROOT}/etc/bind -o bind
+ _mount /var/bind ${CHROOT}/var/bind -o bind
+ _mount /var/log/named ${CHROOT}/var/log/named -o bind
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind
+ fi
+ fi
+ fi
+
+ checkconfig || { eend 1; return 1; }
+
+ # create piddir (usually /run/named) if necessary, bug 334535
+ _get_pidfile
+ piddir="${PIDFILE%/*}"
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+ eend 1
+ return 1
+ }
+
+ # In case someone have $CPU set in /etc/conf.d/named
+ if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then
+ CPU="-n ${CPU}"
+ fi
+
+ start-stop-daemon --start --pidfile ${PIDFILE} \
+ --nicelevel ${NAMED_NICELEVEL:-0} \
+ --exec /usr/sbin/named \
+ -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT}
+ eend $?
+}
+
+stop() {
+ local reported=0
+
+ ebegin "Stopping ${CHROOT:+chrooted }named"
+
+ # Workaround for now, until openrc's restart has been fixed.
+ # openrc doesn't care about a restart() function in init scripts.
+ if [ "${RC_CMD}" = "restart" ]; then
+ if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ checkconfig || { eend 1; return 1; }
+ fi
+
+ # -R 10, bug 335398
+ _get_pidfile
+ start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \
+ --exec /usr/sbin/named
+
+ if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ ebegin "Umounting chroot dirs"
+
+ # just to be sure everything gets clean
+ while fuser -s ${CHROOT} 2>/dev/null; do
+ if [ "${reported}" -eq 0 ]; then
+ einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)"
+ elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then
+ eerror "Waiting until all named processes are stopped failed!"
+ eend 1
+ break
+ fi
+ sleep 1
+ reported=$((reported+1))
+ done
+
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP
+ _umount ${CHROOT}/etc/bind
+ _umount ${CHROOT}/var/log/named
+ _umount ${CHROOT}/var/bind
+ fi
+
+ eend $?
+}
+
+reload() {
+ local ret
+
+ ebegin "Reloading named.conf and zone files"
+
+ checkconfig || { eend 1; return 1; }
+
+ _get_pidfile
+ if [ -n "${PIDFILE}" ]; then
+ start-stop-daemon --pidfile $PIDFILE --signal HUP
+ ret=$?
+ else
+ ewarn "Unable to determine the pidfile... this is"
+ ewarn "a fallback mode. Please check your installation!"
+
+ $RC_SERVICE restart
+ ret=$?
+ fi
+
+ eend $ret
+}
diff --git a/net-dns/bind/files/named.service-r1 b/net-dns/bind/files/named.service-r1
new file mode 100644
index 00000000000..65fbdb941ca
--- /dev/null
+++ b/net-dns/bind/files/named.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=Internet domain name server
+After=network.target
+
+[Service]
+ExecStartPre=/usr/libexec/generate-rndc-key.sh
+ExecStartPre=/usr/sbin/named-checkconf -z /etc/bind/named.conf
+ExecStart=/usr/sbin/named -f -u named
+ExecReload=/usr/sbin/rndc reload
+ExecStop=/usr/sbin/rndc stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml
new file mode 100644
index 00000000000..9fd3987e4fc
--- /dev/null
+++ b/net-dns/bind/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <longdescription>ISC's bind dns server, used the world 'round.</longdescription>
+ <use>
+ <flag name="dlz">Enables dynamic loaded zones, 3rd party extension</flag>
+ <flag name="filter-aaaa">Enable filtering of AAAA records over IPv4</flag>
+ <flag name="fixed-rrset">Enables fixed rrset-order option</flag>
+ <flag name="gost">Enables gost OpenSSL engine support</flag>
+ <flag name="gssapi">Enable gssapi support</flag>
+ <flag name="json">Enable JSON statistics channel</flag>
+ <flag name="nslint">Build and install the nslint util</flag>
+ <flag name="rpz">Enable response policy rewriting (rpz)</flag>
+ <flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/c-ares/Manifest b/net-dns/c-ares/Manifest
new file mode 100644
index 00000000000..c41ce7a4bd1
--- /dev/null
+++ b/net-dns/c-ares/Manifest
@@ -0,0 +1,5 @@
+DIST c-ares-1.10.0.tar.gz 809073 SHA256 3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db SHA512 fef6945549034390ddaa03acf5509d0095e97c151e5f4047ffc32c51945a7261759228b20fdd77b9e4bf4a95f3a61bfb79bee0c66a860219debfd2916b390693 WHIRLPOOL 660d04b20371a75b4a9dea45449407b10c782ae8367356e2f6b0b73cb2d62485068a543b4a2303673f688c6c784afd9925faa18be943aa771d8467077f8ea407
+DIST c-ares-1.7.4.tar.gz 639365 SHA256 6b8a7c4ecd67240cca50a345bc955ffbe2d6d1f43982defc77a8e76031a6cb06 SHA512 e16703c158cebbdf8f1b8a83f47496d5c6450905a9f267aaf07c8968715a6f8746e30421eb1b6e877e99ddf82e93e6ce11bd8c4f1859913cf1f41abc69b47245 WHIRLPOOL fc719d15fcad0c0c3859da8ec8684a7331c61390be619a1e4dad386b5fb3ddb5eaf4e1ef6ec8a5fc2b0e11087e92c71024b9376cb75541e2fa66fa6867d5e792
+DIST c-ares-1.7.5.tar.gz 746032 SHA256 a6b6381e5a025ef942c76360989341ac5b0c82007e2979d40ded7d16396656a8 SHA512 121be9eaeb127f2648744d0b74d93ea80c02932082e42f08df42834aa0f9180e386cb26f85f1962d5388365770f7204510f5f22ed9b85ee01dbcf8009d9f74ce WHIRLPOOL 1faf9f740fbb6543e09447310b0f9a4f277312f7bdb9a261830b021052619f8f0b6ccfe0906c4cfe37323b87ef97e10665722158b7fca101c1043b1582f6df6f
+DIST c-ares-1.8.0.tar.gz 778926 SHA256 f4d9b3721966043645f3b953b40c0185483d597f743cb834456d85fa501d8f62 SHA512 972f21a8ee50268773f4b90be6380c405fcd11089c102068665615c8a9bd8f8b7726d53d45cea46a87b863983535afd412cdddae83083e9cbd036ed8a4e7b5fa WHIRLPOOL ad54c63eca4d62760d17135628319b4e77b6baafb6007a1e0538e9d0b8cddd25f7062fd68dd9149672adc24a917058d93990354db69176f6522571d75ee3e7ef
+DIST c-ares-1.9.1.tar.gz 782945 SHA256 023f28001f2f839645c8700187391a011198950c73ddd91510c7549d87373936 SHA512 896acd810912ae269d67904e0a2533faab855943444fffae45aa4c1633eefec72a59006cbdf5b8cc67788df6977ed72244e8d14bd6fff9e6d5670283d12be6d2 WHIRLPOOL d32efdce6ddafbb1e13f9203eb82ffdcb4d08737225bba0a4aeefa50f78717b21add847beb2f328f7516695f80dd983f687ff31bb0c56f75ee54819d0cd6f261
diff --git a/net-dns/c-ares/c-ares-1.10.0-r1.ebuild b/net-dns/c-ares/c-ares-1.10.0-r1.ebuild
new file mode 100644
index 00000000000..ff08bef9e29
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.10.0-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib-minimal
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS CHANGES NEWS README RELEASE-NOTES TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ares_build.h
+)
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+}
diff --git a/net-dns/c-ares/c-ares-1.10.0.ebuild b/net-dns/c-ares/c-ares-1.10.0.ebuild
new file mode 100644
index 00000000000..7e7ddf5bade
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.10.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS CHANGES NEWS README RELEASE-NOTES TODO )
+
+src_configure() {
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name "*.la" -exec rm {} + || die
+}
diff --git a/net-dns/c-ares/c-ares-1.7.4.ebuild b/net-dns/c-ares/c-ares-1.7.4.ebuild
new file mode 100644
index 00000000000..a3745ad9cde
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.7.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_configure() {
+ econf --enable-shared --enable-nonblocking --enable-symbol-hiding \
+ --enable-warnings
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc RELEASE-NOTES CHANGES NEWS README*
+}
diff --git a/net-dns/c-ares/c-ares-1.7.5.ebuild b/net-dns/c-ares/c-ares-1.7.5.ebuild
new file mode 100644
index 00000000000..6e7fb3dfbeb
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.7.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS CHANGES README README.cares RELEASE-NOTES TODO )
+
+src_configure() {
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name "*.la" -exec rm {} + || die
+}
diff --git a/net-dns/c-ares/c-ares-1.8.0.ebuild b/net-dns/c-ares/c-ares-1.8.0.ebuild
new file mode 100644
index 00000000000..6e7fb3dfbeb
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.8.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS CHANGES README README.cares RELEASE-NOTES TODO )
+
+src_configure() {
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name "*.la" -exec rm {} + || die
+}
diff --git a/net-dns/c-ares/c-ares-1.9.1.ebuild b/net-dns/c-ares/c-ares-1.9.1.ebuild
new file mode 100644
index 00000000000..1c9d1e07ffc
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.9.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS CHANGES NEWS README RELEASE-NOTES TODO )
+
+src_configure() {
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name "*.la" -exec rm {} + || die
+}
diff --git a/net-dns/c-ares/metadata.xml b/net-dns/c-ares/metadata.xml
new file mode 100644
index 00000000000..74544dbbc61
--- /dev/null
+++ b/net-dns/c-ares/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+</maintainer>
+<upstream>
+ <remote-id type="cpe">cpe:/a:daniel_stenberg:c-ares</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-dns/cagibi/Manifest b/net-dns/cagibi/Manifest
new file mode 100644
index 00000000000..c7d0c79222f
--- /dev/null
+++ b/net-dns/cagibi/Manifest
@@ -0,0 +1 @@
+DIST cagibi-0.2.0.tar.bz2 28959 SHA256 77f9ec1eff5a5e0db90708a789a7cb82ff3780069f9e6f21b03a23813258b24b
diff --git a/net-dns/cagibi/cagibi-0.2.0.ebuild b/net-dns/cagibi/cagibi-0.2.0.ebuild
new file mode 100644
index 00000000000..d39bd7b8b22
--- /dev/null
+++ b/net-dns/cagibi/cagibi-0.2.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+DESCRIPTION="Cache/proxy system for the SSDP part of UPnP"
+HOMEPAGE="http://frinring.wordpress.com/2010/08/09/cagibi-0-1-1-released-network-kio-slave-freezes-kded-in-4-5-0/"
+SRC_URI="mirror://kde/stable/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="debug"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+"
+DEPEND="${RDEPEND}
+ dev-util/automoc
+"
+
+DOCS=( Changelog README TODO )
diff --git a/net-dns/cagibi/metadata.xml b/net-dns/cagibi/metadata.xml
new file mode 100644
index 00000000000..a23f444b67d
--- /dev/null
+++ b/net-dns/cagibi/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+</pkgmetadata>
diff --git a/net-dns/ddclient/Manifest b/net-dns/ddclient/Manifest
new file mode 100644
index 00000000000..b59c6787ac7
--- /dev/null
+++ b/net-dns/ddclient/Manifest
@@ -0,0 +1,2 @@
+DIST ddclient-3.8.1.tar.gz 48600 SHA256 f22ac7b0ec78e310d7b88a1cf636e5c00360b2ed9c087f231b3522ef3e6295f2 SHA512 d6722582dffe0c5a806176f24bd3d9117bc1210ea0137aa92138390be16e67d47b746777dc431282a664849c91626969a5e267777126bac03304c7aa34a9dad7 WHIRLPOOL 7785e6a9cacc10bfc4a21d01287602f0edf3b45e38c4f5352415160fc9857223c630b9b42f067fcabd1080be1482da549c1dccbcd8f1a5cf860c236326050f45
+DIST ddclient-3.8.2.tar.gz 46059 SHA256 3c335ed456fcd55c1ffefbaec7c75d1b13794626b1c38e6a01cc28ce3a6eac9e SHA512 8f74ce90ce4a31b8d53887b99556661343b96734ae630403434689459eaeb1354159ae26f0404b9db21a0ff4151816d1650746a13c547064748656a8c6e3f13b WHIRLPOOL f7f0c4f28f5c59ad16989813edbb7a94bc99e91a0ed7c6b93d5455abee2a7e80d96ba0d26e6016bf8a4843a44772132918ac1c8555b829f0d4ad53d30f5aa793
diff --git a/net-dns/ddclient/ddclient-3.8.1-r5.ebuild b/net-dns/ddclient/ddclient-3.8.1-r5.ebuild
new file mode 100644
index 00000000000..3325070dedb
--- /dev/null
+++ b/net-dns/ddclient/ddclient-3.8.1-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils systemd user
+
+DESCRIPTION="Perl updater client for dynamic DNS services"
+HOMEPAGE="http://ddclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="hardened"
+
+RDEPEND=">=dev-lang/perl-5.1
+ dev-perl/Digest-SHA1
+ dev-perl/IO-Socket-SSL
+ hardened? ( sys-apps/iproute2 )
+"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ # Remove pid line, because it is specified in /etc/init.d/ddclient
+ ebegin "Removing PID setup from ${PN}.conf"
+ if ! sed '/^pid/d' -i "sample-etc_${PN}.conf"; then
+ eerror "Failed to remove pid from /etc/${PN}/${PN}.conf"
+ fi
+ eend $?
+
+ use hardened && epatch "${FILESDIR}/iproute2.patch"
+
+ epatch "${FILESDIR}/cmd-over-cfg.patch"
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc Change* COPYRIGHT README* RELEASENOTE sample*
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ keepdir /var/cache/${PN}
+ fowners -R ${PN}:${PN} /var/cache/${PN}
+
+ insinto /etc/${PN}
+ insopts -m 0600 -o ${PN} -g ${PN}
+ newins sample-etc_${PN}.conf ${PN}.conf
+ newins sample-etc_${PN}.conf ${PN}.conf.sample
+ fowners -R ${PN}:${PN} /etc/${PN}
+}
diff --git a/net-dns/ddclient/ddclient-3.8.2.ebuild b/net-dns/ddclient/ddclient-3.8.2.ebuild
new file mode 100644
index 00000000000..2e1d25f95c0
--- /dev/null
+++ b/net-dns/ddclient/ddclient-3.8.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit systemd user
+
+DESCRIPTION="Perl updater client for dynamic DNS services"
+HOMEPAGE="http://ddclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="hardened"
+
+RDEPEND=">=dev-lang/perl-5.1
+ virtual/perl-Digest-SHA
+ dev-perl/IO-Socket-SSL
+ hardened? ( sys-apps/iproute2 )
+"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ # Remove pid setting because we can't leave it user configurable and
+ # reliably setup the environment for the init script to stop ${PN}
+ ebegin "Removing PID setting from ${PN}.conf"
+ sed '/^pid/d' -i "sample-etc_${PN}.conf"
+ eend $?
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc Change* COPYRIGHT README* RELEASENOTE sample*
+
+ newinitd "${FILESDIR}/${PN}.initd-r4" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insopts -m 0600 -o ${PN} -g ${PN}
+ insinto /etc/${PN}
+ newins sample-etc_${PN}.conf ${PN}.conf
+ newins sample-etc_${PN}.conf ${PN}.conf.sample
+}
diff --git a/net-dns/ddclient/files/cmd-over-cfg.patch b/net-dns/ddclient/files/cmd-over-cfg.patch
new file mode 100644
index 00000000000..9033873fde7
--- /dev/null
+++ b/net-dns/ddclient/files/cmd-over-cfg.patch
@@ -0,0 +1,11 @@
+--- ddclient.old 2011-11-13 10:14:59.957846596 -0500
++++ ddclient 2011-11-13 10:18:33.864245944 -0500
+@@ -773,7 +773,7 @@
+ foreach my $h (sort keys %config) {
+ next if $config{$h}{'protocol'} ne lc($s);
+ $examined{$h} = 1;
+- my $use = $config{$h}{'use'} || opt('use');
++ my $use = opt('use') || $config{$h}{'use'};
+ local $opt{$use} = $config{$h}{$use} if $config{$h}{$use};
+ # bug #13: we should only do this once
+ # use isn't enough, we have to save the origin to.
diff --git a/net-dns/ddclient/files/ddclient-reasonable-security.patch b/net-dns/ddclient/files/ddclient-reasonable-security.patch
new file mode 100644
index 00000000000..9dc7930b98a
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient-reasonable-security.patch
@@ -0,0 +1,21 @@
+--- ddclient 2006-04-11 10:14:16.000000000 +0100
++++ ddclient 2006-04-11 20:31:14.000000000 +0100
+@@ -776,15 +776,10 @@
+ # fatal("Cannot open file '%s'. ($!)", $file);
+ warning("Cannot open file '%s'. ($!)", $file);
+ }
+- # Check for only owner has any access to config file
++ # Guard against world-readability of config file
+ my ($dev, $ino, $mode, @statrest) = stat(FD);
+- if ($mode & 077) {
+- if (-f FD && (chmod 0600, $file)) {
+- warning("file $file must be accessible only by its owner (fixed).");
+- } else {
+- # fatal("file $file must be accessible only by its owner.");
+- warning("file $file must be accessible only by its owner.");
+- }
++ if ($mode & 007) {
++ fatal("Must not be world-accessible\nchange its permissions using e.g.\nchmod 640", $file);
+ }
+
+ local $lineno = 0;
diff --git a/net-dns/ddclient/files/ddclient.confd b/net-dns/ddclient/files/ddclient.confd
new file mode 100644
index 00000000000..2408a40bb6f
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.confd
@@ -0,0 +1,2 @@
+# No need to specify a pid in /etc/ddclient/ddclient.conf
+PIDFILE=/var/run/ddclient/ddclient.pid
diff --git a/net-dns/ddclient/files/ddclient.confd-r1 b/net-dns/ddclient/files/ddclient.confd-r1
new file mode 100644
index 00000000000..69ad0eeff87
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.confd-r1
@@ -0,0 +1,2 @@
+# No need to specify a pid in /etc/ddclient/ddclient.conf
+#PIDFILE=/var/run/ddclient/ddclient.pid
diff --git a/net-dns/ddclient/files/ddclient.initd b/net-dns/ddclient/files/ddclient.initd
new file mode 100644
index 00000000000..b0ad57acb7a
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Default location if not specified in /etc/conf.d/ddclient
+PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid}
+
+depend() {
+ before cron
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ local conf="/etc/ddclient/ddclient.conf"
+
+ if [ -e "${conf}" ] ; then
+ if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0004)" ] ; then
+ eerror "${conf} must not be world-readable. Run e.g.:"
+ eerror " chmod 640 ${conf}"
+ eerror " chown root:ddclient ${conf}"
+ return 1
+ fi
+ else
+ eerror "/etc/ddclient/ddclient.conf is needed to run ddclient"
+ eerror "There is a sample file in /etc/ddclient/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon \
+ --start \
+ --chuid ddclient \
+ --exec /usr/sbin/ddclient \
+ --name ddclient \
+ --pidfile "${PIDFILE}" \
+ -- -pid="${PIDFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon \
+ --stop \
+ --signal USR1 \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.initd-r1 b/net-dns/ddclient/files/ddclient.initd-r1
new file mode 100644
index 00000000000..ea5baf5ad6c
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r1
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Default location if not specified in /etc/conf.d/ddclient
+PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid}
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ local conf="/etc/ddclient/ddclient.conf"
+
+ if [ -e "${conf}" ] ; then
+ if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm -0044)" ] ; then
+ eerror "${conf} must not be world or group readable. Try:"
+ eerror " chmod 600 ${conf}"
+ eerror " chown ddclient:ddclient ${conf}"
+ return 1
+ fi
+ else
+ eerror "${conf} is needed to run ddclient"
+ eerror "There is a sample file in /etc/ddclient/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \
+ --name ddclient --pidfile "${PIDFILE}" -- -pid="${PIDFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.initd-r2 b/net-dns/ddclient/files/ddclient.initd-r2
new file mode 100644
index 00000000000..2e6acaa100e
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r2
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Default location if not specified in /etc/conf.d/ddclient
+PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid}
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ local conf="/etc/ddclient/ddclient.conf"
+
+ if [ -e "${conf}" ] ; then
+ if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then
+ eerror "${conf} must not be world or group readable. Try:"
+ eerror " chmod 600 ${conf}"
+ eerror " chown ddclient:ddclient ${conf}"
+ return 1
+ fi
+ else
+ eerror "${conf} is needed to run ddclient"
+ eerror "There is a sample file in /etc/ddclient/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \
+ --name ddclient --pidfile "${PIDFILE}" -- -pid="${PIDFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.initd-r3 b/net-dns/ddclient/files/ddclient.initd-r3
new file mode 100644
index 00000000000..30b84fd71b6
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r3
@@ -0,0 +1,58 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+if [ -d /run ] ; then
+ PIDFILE=${PIDFILE:-/run/ddclient/ddclient.pid}
+else
+ PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid}
+fi
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ local conf="/etc/ddclient/ddclient.conf"
+
+ if [ -e "${conf}" ] ; then
+ if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then
+ eerror "${conf} must not be world or group readable. Try:"
+ eerror " chmod 600 ${conf}"
+ eerror " chown ddclient:ddclient ${conf}"
+ return 1
+ fi
+ else
+ eerror "${conf} is needed to run ddclient"
+ eerror "There is a sample file in /etc/ddclient/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ local piddir=$(dirname ${PIDFILE})
+ if [ ! -d ${piddir} ] ; then
+ ebegin "Making ${piddir}"
+ mkdir -p ${piddir}
+ eend $?
+ ebegin "Changing permissions of ${piddir}"
+ chown ddclient:ddclient ${piddir}
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \
+ --name ddclient --pidfile ${PIDFILE} -- -pid=${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.initd-r4 b/net-dns/ddclient/files/ddclient.initd-r4
new file mode 100644
index 00000000000..81425126e08
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r4
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDFILE="/run/ddclient/ddclient.pid"
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ checkpath -f -m 0600 -o ddclient:ddclient /etc/ddclient/ddclient.conf || return 1
+ checkpath -d -m 0700 -o ddclient:ddclient /run/ddclient || return 1
+ checkpath -d -m 0700 -o ddclient:ddclient /var/cache/ddclient || return 1
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start \
+ --user ddclient \
+ --name ddclient \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/ddclient -- -pid=${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.service b/net-dns/ddclient/files/ddclient.service
new file mode 100644
index 00000000000..e2d3608d44d
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Dynamic DNS Update Client
+After=network.target
+ConditionPathExists=/etc/ddclient/ddclient.conf
+
+[Service]
+ExecStart=/usr/sbin/ddclient --foreground
+User=ddclient
+Group=ddclient
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/ddclient/files/iproute2.patch b/net-dns/ddclient/files/iproute2.patch
new file mode 100644
index 00000000000..f81dd8c00d8
--- /dev/null
+++ b/net-dns/ddclient/files/iproute2.patch
@@ -0,0 +1,30 @@
+diff -u a/ddclient b/ddclient
+--- a/ddclient 2011-07-11 17:04:21.000000000 -0400
++++ b/ddclient 2011-08-12 20:13:15.980466303 -0400
+@@ -588,7 +588,7 @@
+ [ "ip", "=s", "-ip address : set the IP address to 'address'" ],
+ "",
+ [ "if", "=s", "-if interface : obtain IP address from 'interface'" ],
+- [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ],
++ [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ip addr show {if}" ],
+ "",
+ [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ],
+ [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ],
+@@ -1316,7 +1316,7 @@
+
+ {
+ local $opt{'use'} = 'if';
+- foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) {
++ foreach my $if (grep {/^[a-zA-Z]/} `ip addr show`) {
+ $if =~ s/:?\s.*//is;
+ local $opt{'if'} = $if;
+ printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND');
+@@ -1937,7 +1937,7 @@
+
+ } elsif ($use eq 'if') {
+ $skip = opt('if-skip', $h) || '';
+- $reply = `ifconfig $arg 2> /dev/null`;
++ $reply = `ip addr show $arg 2> /dev/null`;
+ $reply = '' if $?;
+
+ } elsif ($use eq 'cmd') {
diff --git a/net-dns/ddclient/metadata.xml b/net-dns/ddclient/metadata.xml
new file mode 100644
index 00000000000..cc58aadeb41
--- /dev/null
+++ b/net-dns/ddclient/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>titanofold@gentoo.org</email>
+ <name>Aaron W. Swenson</name>
+ </maintainer>
+ <use>
+ <flag name="hardened">Use iproute2 instead of ifconfig to grab an IP address</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ddclient</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/djbdns/Manifest b/net-dns/djbdns/Manifest
new file mode 100644
index 00000000000..91dd57c4e4c
--- /dev/null
+++ b/net-dns/djbdns/Manifest
@@ -0,0 +1,4 @@
+DIST djbdns-1.05-man.tar.gz 17170 SHA256 ba1c58f14bc928908d8618230f400d73cfe2200ed800a272b63048e3e50be569 SHA512 98af7bd9033a2205fbbc0f23b7eab45b9756f6ceff5199a62952e19c89c9fe3c03495cb6f8621d388f883c40650309a1509095417df3f54af21a71350c4aa183 WHIRLPOOL b611e37e7422a4ae405fa15a4b9ff7eb8d0007d81310d044bc1982fe70dada1e4646cf22832e8e5320bae8d2e328eb87d59eb51c3d390f1089f30548053b839b
+DIST djbdns-1.05-test25.diff.bz2 20376 SHA256 28c88de08822894cf252e54ed3be9abfdf4f492644ff74a7c479340bdce051ea SHA512 41cca597dba971010b9844071e0349d3a4b25cc4b144e12721b0bc8250589fb374e40ece8908f1081762597048179b1177e88b9a5f97be0b47b63e3183e654bb WHIRLPOOL d531001511ead02f51558909b13e14734f013213e0f13ec7589876878928bd4057f917e004e8d37955c2965aeba5d92a9fc481f2f9ac48c08edaeb9bb9b821d9
+DIST djbdns-1.05-test27.diff.bz2 20695 SHA256 0de38133336016d5a9159d0fe1beaea809e2229820256af114cbf911f04f202a SHA512 e5acf26ff353ae20b6c2186140255bf0ae478a75a9946163d4474a003afbf8c2f47e61a12fc3ed4b9eff17ec8732e9d91bfbb10fb2762310b067180b6d471ba0 WHIRLPOOL 5c89691836a349553531816a8b4c5b6edc18c2c0a1cf8309b67344ad04c9575fbc5f9d79dcf156aeb692ccd7a6fbd2ce2838fb2fd7b85bd6cd0693a9f657e66e
+DIST djbdns-1.05.tar.gz 85648 SHA256 3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48 SHA512 20f066402801d7bec183cb710a5bc51e41f1410024741e5803e26f68f2c13567e48eba793f233dfab903459c3335bc169e24b99d66a4c64e617e1f0779732fa9 WHIRLPOOL 0fb67d19fcbf1cf21debcedfd3456d9cb9160079631ae1995e94aa9db3969ae02927f215ee8a5f03b34a6523cb9e3abebabf23e08e95eb1efdb626eb8b10312f
diff --git a/net-dns/djbdns/djbdns-1.05-r29.ebuild b/net-dns/djbdns/djbdns-1.05-r29.ebuild
new file mode 100644
index 00000000000..14e4a297c81
--- /dev/null
+++ b/net-dns/djbdns/djbdns-1.05-r29.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic readme.gentoo toolchain-funcs user
+
+DESCRIPTION="Collection of DNS client/server software"
+HOMEPAGE="http://cr.yp.to/djbdns.html"
+IPV6_PATCH="test25"
+
+SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
+ http://smarden.org/pape/djb/manpages/${P}-man.tar.gz
+ ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86"
+IUSE="ipv6 selinux"
+
+DEPEND="!app-doc/djbdns-man"
+RDEPEND="${DEPEND}
+ sys-apps/ucspi-tcp
+ virtual/daemontools
+ selinux? ( sec-policy/selinux-djbdns )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/headtail.patch" \
+ "${FILESDIR}/dnsroots.patch" \
+ "${FILESDIR}/dnstracesort.patch" \
+ "${FILESDIR}/string_length_255.patch"
+
+ # Fix CVE2009-0858
+ epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
+
+ if use ipv6; then
+ elog 'At present dnstrace does NOT support IPv6. It will'\
+ 'be compiled without IPv6 support.'
+
+ # Create a separate copy of the source tree for dnstrace.
+ cp -pR "${S}" "${S}-noipv6" || die
+
+ # The big ipv6 patch.
+ epatch "${WORKDIR}/${P}-${IPV6_PATCH}.diff"
+
+ # Fix CVE2008-4392 (ipv6)
+ epatch \
+ "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-${IPV6_PATCH}.patch" \
+ "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \
+ "${FILESDIR}/makefile-parallel-${IPV6_PATCH}.patch"
+
+ cd "${S}-noipv6" || die
+ fi
+
+ # Fix CVE2008-4392 (no ipv6)
+ epatch \
+ "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \
+ "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
+
+ # Later versions of the ipv6 patch include this, but even if
+ # USE=ipv6, we're in the ${S}-noipv6 directory at this point.
+ epatch "${FILESDIR}/${PV}-errno.patch"
+
+ epatch_user
+}
+
+src_compile() {
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
+ echo "/usr" > conf-home || die
+ emake
+
+ # If djbdns is compiled with IPv6 support, it breaks dnstrace.
+ # Therefore we must compile dnstrace separately without IPv6
+ # support.
+ if use ipv6; then
+ elog 'Compiling dnstrace without ipv6 support'
+ cp conf-cc conf-ld conf-home "${S}-noipv6/" || die
+ cd "${S}-noipv6" || die
+ emake dnstrace
+ fi
+}
+
+src_install() {
+ insinto /etc
+ doins dnsroots.global
+
+ into /usr
+ dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \
+ *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \
+ dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort
+
+ if use ipv6; then
+ dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace"
+ fi
+
+ dodoc CHANGES README
+
+ cd "${WORKDIR}/${PN}-man" || die
+ doman *.1 *.5 *.8
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # The nofiles group is no longer provided by baselayout.
+ # Share it with qmail if possible.
+ enewgroup nofiles 200
+
+ enewuser dnscache -1 -1 -1 nofiles
+ enewuser dnslog -1 -1 -1 nofiles
+ enewuser tinydns -1 -1 -1 nofiles
+}
+
+DISABLE_AUTOFORMATTING=1
+FORCE_PRINT_ELOG=1 # remove after this message sees the stable tree
+DOC_CONTENTS='
+The dnscache-setup, tinydns-setup, and djbdns-setup programs have
+been removed to follow upstream more closely. To configure djbdns,
+please follow the instructions at,
+
+ http://cr.yp.to/djbdns.html
+
+Of particular interest are,
+
+ axfrdns : http://cr.yp.to/djbdns/axfrdns-conf.html
+ dnscache: http://cr.yp.to/djbdns/run-cache-x-home.html
+ tinydns : http://cr.yp.to/djbdns/run-server.html
+
+Portage has created users for axfrdns, dnscache, and tinydns; the
+commands to configure these programs are,
+
+ 1. axfrdns-conf tinydns dnslog /var/axfrdns /var/tinydns $ip
+ 2. dnscache-conf dnscache dnslog /var/dnscache $ip
+ 3. tinydns-conf tinydns dnslog /var/tinydns $ip
+
+(replace $ip with the ip address on which the server will run).
+
+If you wish to configure rbldns or walldns, you will need to create
+those users yourself (although you should still use the "dnslog"
+user for the logs):
+
+ 4. rbldns-conf $username dnslog /var/rbldns $ip $base
+ 5. walldns-conf $username dnslog /var/walldns $ip
+'
diff --git a/net-dns/djbdns/djbdns-1.05-r30.ebuild b/net-dns/djbdns/djbdns-1.05-r30.ebuild
new file mode 100644
index 00000000000..3afbb661902
--- /dev/null
+++ b/net-dns/djbdns/djbdns-1.05-r30.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic readme.gentoo toolchain-funcs user
+
+DESCRIPTION="Collection of DNS client/server software"
+HOMEPAGE="http://cr.yp.to/djbdns.html"
+IPV6_PATCH="test27"
+
+SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
+ http://smarden.org/pape/djb/manpages/${P}-man.tar.gz
+ ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86"
+IUSE="ipv6 selinux"
+
+DEPEND=""
+RDEPEND="sys-apps/ucspi-tcp
+ virtual/daemontools
+ selinux? ( sec-policy/selinux-djbdns )"
+
+src_unpack(){
+ # Unpack both djbdns and its man pages to separate directories.
+ default
+
+ # Now move the man pages under ${S} so that user patches can be
+ # applied to them as well in src_prepare().
+ mv "${PN}-man" "${P}/man" || die "failed to transplant man pages"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/headtail.patch" \
+ "${FILESDIR}/dnsroots.patch" \
+ "${FILESDIR}/dnstracesort.patch" \
+ "${FILESDIR}/string_length_255.patch" \
+ "${FILESDIR}/srv_record_support.patch"
+
+ # Fix CVE2009-0858
+ epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
+
+ if use ipv6; then
+ elog 'At present dnstrace does NOT support IPv6. It will'\
+ 'be compiled without IPv6 support.'
+
+ # Create a separate copy of the source tree for dnstrace.
+ cp -pR "${S}" "${S}-noipv6" || die
+
+ # The big ipv6 patch.
+ epatch "${WORKDIR}/${P}-${IPV6_PATCH}.diff"
+
+ # Fix CVE2008-4392 (ipv6)
+ epatch \
+ "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch" \
+ "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \
+ "${FILESDIR}/makefile-parallel-test25.patch"
+
+ cd "${S}-noipv6" || die
+ fi
+
+ # Fix CVE2008-4392 (no ipv6)
+ epatch \
+ "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \
+ "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
+
+ # Later versions of the ipv6 patch include this, but even if
+ # USE=ipv6, we're in the ${S}-noipv6 directory at this point.
+ epatch "${FILESDIR}/${PV}-errno.patch"
+
+ epatch_user
+}
+
+src_compile() {
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
+ echo "/usr" > conf-home || die
+ emake
+
+ # If djbdns is compiled with IPv6 support, it breaks dnstrace.
+ # Therefore we must compile dnstrace separately without IPv6
+ # support.
+ if use ipv6; then
+ elog 'Compiling dnstrace without ipv6 support'
+ cp conf-cc conf-ld conf-home "${S}-noipv6/" || die
+ cd "${S}-noipv6" || die
+ emake dnstrace
+ fi
+}
+
+src_install() {
+ insinto /etc
+ doins dnsroots.global
+
+ into /usr
+ dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \
+ *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \
+ dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort
+
+ if use ipv6; then
+ dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace"
+ fi
+
+ dodoc CHANGES README
+
+ doman man/*.[158]
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # The nofiles group is no longer provided by baselayout.
+ # Share it with qmail if possible.
+ enewgroup nofiles 200
+
+ enewuser dnscache -1 -1 -1 nofiles
+ enewuser dnslog -1 -1 -1 nofiles
+ enewuser tinydns -1 -1 -1 nofiles
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS='
+To configure djbdns, please follow the instructions at,
+
+ http://cr.yp.to/djbdns.html
+
+Of particular interest are,
+
+ axfrdns : http://cr.yp.to/djbdns/axfrdns-conf.html
+ dnscache: http://cr.yp.to/djbdns/run-cache-x-home.html
+ tinydns : http://cr.yp.to/djbdns/run-server.html
+
+Portage has created users for axfrdns, dnscache, and tinydns; the
+commands to configure these programs are,
+
+ 1. axfrdns-conf tinydns dnslog /var/axfrdns /var/tinydns $ip
+ 2. dnscache-conf dnscache dnslog /var/dnscache $ip
+ 3. tinydns-conf tinydns dnslog /var/tinydns $ip
+
+(replace $ip with the ip address on which the server will run).
+
+If you wish to configure rbldns or walldns, you will need to create
+those users yourself (although you should still use the "dnslog"
+user for the logs):
+
+ 4. rbldns-conf $username dnslog /var/rbldns $ip $base
+ 5. walldns-conf $username dnslog /var/walldns $ip
+'
diff --git a/net-dns/djbdns/files/1.05-errno.patch b/net-dns/djbdns/files/1.05-errno.patch
new file mode 100644
index 00000000000..b4650b1a9cf
--- /dev/null
+++ b/net-dns/djbdns/files/1.05-errno.patch
@@ -0,0 +1,11 @@
+--- error.h 2001-02-11 15:11:45.000000000 -0600
++++ error.h 2003-02-26 02:10:21.000000000 -0600
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch
new file mode 100644
index 00000000000..e33e0ccd601
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25.patch
@@ -0,0 +1,351 @@
+diff --git a/Makefile b/Makefile
+index 5ccd647..eee09dd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -346,11 +346,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h
+ ./compile dns_txt.c
+
+ dnscache: \
+-load dnscache.o droproot.o okclient.o log.o cache.o query.o \
++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \
+ response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \
+ libtai.a unix.a byte.a socket.lib
+ ./load dnscache droproot.o okclient.o log.o cache.o \
+- query.o response.o dd.o roots.o iopause.o prot.o dns.a \
++ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \
+ env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \
+ socket.lib`
+
+@@ -371,7 +371,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \
+ uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \
+ iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \
+ iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \
+-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h
++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h
+ ./compile dnscache.c
+
+ dnsfilter: \
+@@ -749,11 +749,16 @@ qlog.o: \
+ compile qlog.c buffer.h qlog.h uint16.h
+ ./compile qlog.c
+
++qmerge.o: \
++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \
++taia.h tai.h uint64.h log.h maxclient.h
++ ./compile qmerge.c
++
+ query.o: \
+ compile query.c error.h roots.h log.h uint64.h case.h cache.h \
+ uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \
+ taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \
+-response.h uint32.h query.h dns.h uint32.h
++response.h uint32.h query.h dns.h uint32.h qmerge.h
+ ./compile query.c
+
+ random-ip: \
+diff --git a/dnscache.c b/dnscache.c
+index abcba69..c84e4b8 100644
+--- a/dnscache.c
++++ b/dnscache.c
+@@ -23,6 +23,7 @@
+ #include "log.h"
+ #include "okclient.h"
+ #include "droproot.h"
++#include "maxclient.h"
+
+ long interface;
+
+@@ -59,7 +60,6 @@ uint64 numqueries = 0;
+
+ static int udp53;
+
+-#define MAXUDP 200
+ static struct udpclient {
+ struct query q;
+ struct taia start;
+@@ -136,7 +136,6 @@ void u_new(void)
+
+ static int tcp53;
+
+-#define MAXTCP 20
+ struct tcpclient {
+ struct query q;
+ struct taia start;
+diff --git a/log.c b/log.c
+index df465e2..1b0d98c 100644
+--- a/log.c
++++ b/log.c
+@@ -149,6 +149,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser
+ line();
+ }
+
++void log_tx_piggyback(const char *q, const char qtype[2], const char *control)
++{
++ string("txpb ");
++ logtype(qtype); space(); name(q); space(); name(control);
++ line();
++}
++
+ void log_cachedanswer(const char *q,const char type[2])
+ {
+ string("cached "); logtype(type); space();
+diff --git a/log.h b/log.h
+index fe62fa3..d9a829b 100644
+--- a/log.h
++++ b/log.h
+@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *);
+ extern void log_cachedns(const char *,const char *);
+
+ extern void log_tx(const char *,const char *,const char *,const char *,unsigned int);
++extern void log_tx_piggyback(const char *,const char *,const char *);
+
+ extern void log_nxdomain(const char *,const char *,unsigned int);
+ extern void log_nodata(const char *,const char *,const char *,unsigned int);
+diff --git a/maxclient.h b/maxclient.h
+new file mode 100644
+index 0000000..e52fcd1
+--- /dev/null
++++ b/maxclient.h
+@@ -0,0 +1,7 @@
++#ifndef MAXCLIENT_H
++#define MAXCLIENT_H
++
++#define MAXUDP 200
++#define MAXTCP 20
++
++#endif /* MAXCLIENT_H */
+diff --git a/qmerge.c b/qmerge.c
+new file mode 100644
+index 0000000..7c92299
+--- /dev/null
++++ b/qmerge.c
+@@ -0,0 +1,115 @@
++#include "qmerge.h"
++#include "byte.h"
++#include "log.h"
++#include "maxclient.h"
++
++#define QMERGE_MAX (MAXUDP+MAXTCP)
++struct qmerge inprogress[QMERGE_MAX];
++
++static
++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2],
++ const char *control)
++{
++ if (!dns_domain_copy(&qmk->q, q)) return 0;
++ byte_copy(qmk->qtype, 2, qtype);
++ if (!dns_domain_copy(&qmk->control, control)) return 0;
++ return 1;
++}
++
++static
++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b)
++{
++ return
++ byte_equal(a->qtype, 2, b->qtype) &&
++ dns_domain_equal(a->q, b->q) &&
++ dns_domain_equal(a->control, b->control);
++}
++
++static
++void qmerge_key_free(struct qmerge_key *qmk)
++{
++ dns_domain_free(&qmk->q);
++ dns_domain_free(&qmk->control);
++}
++
++void qmerge_free(struct qmerge **x)
++{
++ struct qmerge *qm;
++
++ qm = *x;
++ *x = 0;
++ if (!qm || !qm->active) return;
++
++ qm->active--;
++ if (!qm->active) {
++ qmerge_key_free(&qm->key);
++ dns_transmit_free(&qm->dt);
++ }
++}
++
++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive,
++ const char *q, const char qtype[2], const char localip[4],
++ const char *control)
++{
++ struct qmerge_key k;
++ int i;
++ int r;
++
++ qmerge_free(qm);
++
++ byte_zero(&k, sizeof k);
++ if (!qmerge_key_init(&k, q, qtype, control)) return -1;
++ for (i = 0; i < QMERGE_MAX; i++) {
++ if (!inprogress[i].active) continue;
++ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue;
++ log_tx_piggyback(q, qtype, control);
++ inprogress[i].active++;
++ *qm = &inprogress[i];
++ qmerge_key_free(&k);
++ return 0;
++ }
++
++ for (i = 0; i < QMERGE_MAX; i++)
++ if (!inprogress[i].active)
++ break;
++ if (i == QMERGE_MAX) return -1;
++
++ log_tx(q, qtype, control, servers, 0);
++ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip);
++ if (r == -1) { qmerge_key_free(&k); return -1; }
++ inprogress[i].active++;
++ inprogress[i].state = 0;
++ qmerge_key_free(&inprogress[i].key);
++ byte_copy(&inprogress[i].key, sizeof k, &k);
++ *qm = &inprogress[i];
++ return 0;
++}
++
++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline)
++{
++ if (qm->state == 0) {
++ dns_transmit_io(&qm->dt, io, deadline);
++ qm->state = 1;
++ }
++ else {
++ io->fd = -1;
++ io->events = 0;
++ }
++}
++
++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when)
++{
++ int r;
++ struct qmerge *qm;
++
++ qm = *x;
++ if (qm->state == -1) return -1; /* previous error */
++ if (qm->state == 0) return 0; /* no packet */
++ if (qm->state == 2) return 1; /* already got packet */
++
++ r = dns_transmit_get(&qm->dt, io, when);
++ if (r == -1) { qm->state = -1; return -1; } /* error */
++ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */
++ if (r == 1) { qm->state = 2; return 1; } /* got packet */
++ return -1; /* bug */
++}
+diff --git a/qmerge.h b/qmerge.h
+new file mode 100644
+index 0000000..9a58157
+--- /dev/null
++++ b/qmerge.h
+@@ -0,0 +1,24 @@
++#ifndef QMERGE_H
++#define QMERGE_H
++
++#include "dns.h"
++
++struct qmerge_key {
++ char *q;
++ char qtype[2];
++ char *control;
++};
++
++struct qmerge {
++ int active;
++ struct qmerge_key key;
++ struct dns_transmit dt;
++ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */
++};
++
++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *);
++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *);
++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *);
++extern void qmerge_free(struct qmerge **);
++
++#endif /* QMERGE_H */
+diff --git a/query.c b/query.c
+index d61b20c..d9be8b8 100644
+--- a/query.c
++++ b/query.c
+@@ -84,7 +84,7 @@ static void cleanup(struct query *z)
+ int j;
+ int k;
+
+- dns_transmit_free(&z->dt);
++ qmerge_free(&z->qm);
+ for (j = 0;j < QUERY_MAXALIAS;++j)
+ dns_domain_free(&z->alias[j]);
+ for (j = 0;j < QUERY_MAXLEVEL;++j) {
+@@ -624,15 +624,9 @@ static int doit(struct query *z,int state)
+ if (j == 256) goto SERVFAIL;
+
+ dns_sortip6(z->servers[z->level],256);
+- if (z->level) {
+- dtype = z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A;
+- log_tx(z->name[z->level],dtype,z->control[z->level],z->servers[z->level],z->level);
+- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip) == -1) goto DIE;
+- }
+- else {
+- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0);
+- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE;
+- }
++ dtype = z->level ? (z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A) : z->type;
++ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE;
++
+ return 0;
+
+
+@@ -646,10 +640,10 @@ static int doit(struct query *z,int state)
+
+ HAVEPACKET:
+ if (++z->loop == 100) goto DIE;
+- buf = z->dt.packet;
+- len = z->dt.packetlen;
++ buf = z->qm->dt.packet;
++ len = z->qm->dt.packetlen;
+
+- whichserver = z->dt.servers + 16 * z->dt.curserver;
++ whichserver = z->qm->dt.servers + 16 * z->qm->dt.curserver;
+ control = z->control[z->level];
+ d = z->name[z->level];
+ /* dtype = z->level ? DNS_T_A : z->type; */
+@@ -1071,7 +1065,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip
+
+ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+ {
+- switch(dns_transmit_get(&z->dt,x,stamp)) {
++ switch(qmerge_get(&z->qm,x,stamp)) {
+ case 1:
+ return doit(z,1);
+ case -1:
+@@ -1082,5 +1076,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+
+ void query_io(struct query *z,iopause_fd *x,struct taia *deadline)
+ {
+- dns_transmit_io(&z->dt,x,deadline);
++ qmerge_io(z->qm,x,deadline);
+ }
+diff --git a/query.h b/query.h
+index 61812aa..93a322e 100644
+--- a/query.h
++++ b/query.h
+@@ -1,7 +1,7 @@
+ #ifndef QUERY_H
+ #define QUERY_H
+
+-#include "dns.h"
++#include "qmerge.h"
+ #include "uint32.h"
+
+ #define QUERY_MAXLEVEL 5
+@@ -22,7 +22,7 @@ struct query {
+ uint32 scope_id;
+ char type[2];
+ char class[2];
+- struct dns_transmit dt;
++ struct qmerge *qm;
+ } ;
+
+ extern int query_start(struct query *,char *,char *,char *,char *,unsigned int);
diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch
new file mode 100644
index 00000000000..a0391ff0071
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch
@@ -0,0 +1,349 @@
+diff --git a/Makefile b/Makefile
+index 1429643..bc047c0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -318,11 +318,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h
+ ./compile dns_txt.c
+
+ dnscache: \
+-load dnscache.o droproot.o okclient.o log.o cache.o query.o \
++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \
+ response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \
+ libtai.a unix.a byte.a socket.lib
+ ./load dnscache droproot.o okclient.o log.o cache.o \
+- query.o response.o dd.o roots.o iopause.o prot.o dns.a \
++ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \
+ env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \
+ socket.lib`
+
+@@ -343,7 +343,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \
+ uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \
+ iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \
+ iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \
+-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h
++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h
+ ./compile dnscache.c
+
+ dnsfilter: \
+@@ -687,11 +687,16 @@ qlog.o: \
+ compile qlog.c buffer.h qlog.h uint16.h
+ ./compile qlog.c
+
++qmerge.o: \
++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \
++taia.h tai.h uint64.h log.h maxclient.h
++ ./compile qmerge.c
++
+ query.o: \
+ compile query.c error.h roots.h log.h uint64.h case.h cache.h \
+ uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \
+ taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \
+-response.h uint32.h query.h dns.h uint32.h
++response.h uint32.h query.h dns.h uint32.h qmerge.h
+ ./compile query.c
+
+ random-ip: \
+diff --git a/dnscache.c b/dnscache.c
+index 8c899a3..5ccb16a 100644
+--- a/dnscache.c
++++ b/dnscache.c
+@@ -22,6 +22,7 @@
+ #include "log.h"
+ #include "okclient.h"
+ #include "droproot.h"
++#include "maxclient.h"
+
+ static int packetquery(char *buf,unsigned int len,char **q,char qtype[2],char qclass[2],char id[2])
+ {
+@@ -54,7 +55,6 @@ uint64 numqueries = 0;
+
+ static int udp53;
+
+-#define MAXUDP 200
+ static struct udpclient {
+ struct query q;
+ struct taia start;
+@@ -131,7 +131,6 @@ void u_new(void)
+
+ static int tcp53;
+
+-#define MAXTCP 20
+ struct tcpclient {
+ struct query q;
+ struct taia start;
+diff --git a/log.c b/log.c
+index c43e8b0..b8cd7ce 100644
+--- a/log.c
++++ b/log.c
+@@ -150,6 +150,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser
+ line();
+ }
+
++void log_tx_piggyback(const char *q, const char qtype[2], const char *control)
++{
++ string("txpb ");
++ logtype(qtype); space(); name(q); space(); name(control);
++ line();
++}
++
+ void log_cachedanswer(const char *q,const char type[2])
+ {
+ string("cached "); logtype(type); space();
+diff --git a/log.h b/log.h
+index fe62fa3..d9a829b 100644
+--- a/log.h
++++ b/log.h
+@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *);
+ extern void log_cachedns(const char *,const char *);
+
+ extern void log_tx(const char *,const char *,const char *,const char *,unsigned int);
++extern void log_tx_piggyback(const char *,const char *,const char *);
+
+ extern void log_nxdomain(const char *,const char *,unsigned int);
+ extern void log_nodata(const char *,const char *,const char *,unsigned int);
+diff --git a/maxclient.h b/maxclient.h
+new file mode 100644
+index 0000000..e52fcd1
+--- /dev/null
++++ b/maxclient.h
+@@ -0,0 +1,7 @@
++#ifndef MAXCLIENT_H
++#define MAXCLIENT_H
++
++#define MAXUDP 200
++#define MAXTCP 20
++
++#endif /* MAXCLIENT_H */
+diff --git a/qmerge.c b/qmerge.c
+new file mode 100644
+index 0000000..7c92299
+--- /dev/null
++++ b/qmerge.c
+@@ -0,0 +1,115 @@
++#include "qmerge.h"
++#include "byte.h"
++#include "log.h"
++#include "maxclient.h"
++
++#define QMERGE_MAX (MAXUDP+MAXTCP)
++struct qmerge inprogress[QMERGE_MAX];
++
++static
++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2],
++ const char *control)
++{
++ if (!dns_domain_copy(&qmk->q, q)) return 0;
++ byte_copy(qmk->qtype, 2, qtype);
++ if (!dns_domain_copy(&qmk->control, control)) return 0;
++ return 1;
++}
++
++static
++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b)
++{
++ return
++ byte_equal(a->qtype, 2, b->qtype) &&
++ dns_domain_equal(a->q, b->q) &&
++ dns_domain_equal(a->control, b->control);
++}
++
++static
++void qmerge_key_free(struct qmerge_key *qmk)
++{
++ dns_domain_free(&qmk->q);
++ dns_domain_free(&qmk->control);
++}
++
++void qmerge_free(struct qmerge **x)
++{
++ struct qmerge *qm;
++
++ qm = *x;
++ *x = 0;
++ if (!qm || !qm->active) return;
++
++ qm->active--;
++ if (!qm->active) {
++ qmerge_key_free(&qm->key);
++ dns_transmit_free(&qm->dt);
++ }
++}
++
++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive,
++ const char *q, const char qtype[2], const char localip[4],
++ const char *control)
++{
++ struct qmerge_key k;
++ int i;
++ int r;
++
++ qmerge_free(qm);
++
++ byte_zero(&k, sizeof k);
++ if (!qmerge_key_init(&k, q, qtype, control)) return -1;
++ for (i = 0; i < QMERGE_MAX; i++) {
++ if (!inprogress[i].active) continue;
++ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue;
++ log_tx_piggyback(q, qtype, control);
++ inprogress[i].active++;
++ *qm = &inprogress[i];
++ qmerge_key_free(&k);
++ return 0;
++ }
++
++ for (i = 0; i < QMERGE_MAX; i++)
++ if (!inprogress[i].active)
++ break;
++ if (i == QMERGE_MAX) return -1;
++
++ log_tx(q, qtype, control, servers, 0);
++ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip);
++ if (r == -1) { qmerge_key_free(&k); return -1; }
++ inprogress[i].active++;
++ inprogress[i].state = 0;
++ qmerge_key_free(&inprogress[i].key);
++ byte_copy(&inprogress[i].key, sizeof k, &k);
++ *qm = &inprogress[i];
++ return 0;
++}
++
++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline)
++{
++ if (qm->state == 0) {
++ dns_transmit_io(&qm->dt, io, deadline);
++ qm->state = 1;
++ }
++ else {
++ io->fd = -1;
++ io->events = 0;
++ }
++}
++
++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when)
++{
++ int r;
++ struct qmerge *qm;
++
++ qm = *x;
++ if (qm->state == -1) return -1; /* previous error */
++ if (qm->state == 0) return 0; /* no packet */
++ if (qm->state == 2) return 1; /* already got packet */
++
++ r = dns_transmit_get(&qm->dt, io, when);
++ if (r == -1) { qm->state = -1; return -1; } /* error */
++ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */
++ if (r == 1) { qm->state = 2; return 1; } /* got packet */
++ return -1; /* bug */
++}
+diff --git a/qmerge.h b/qmerge.h
+new file mode 100644
+index 0000000..9a58157
+--- /dev/null
++++ b/qmerge.h
+@@ -0,0 +1,24 @@
++#ifndef QMERGE_H
++#define QMERGE_H
++
++#include "dns.h"
++
++struct qmerge_key {
++ char *q;
++ char qtype[2];
++ char *control;
++};
++
++struct qmerge {
++ int active;
++ struct qmerge_key key;
++ struct dns_transmit dt;
++ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */
++};
++
++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *);
++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *);
++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *);
++extern void qmerge_free(struct qmerge **);
++
++#endif /* QMERGE_H */
+diff --git a/query.c b/query.c
+index 46cdc00..f091fdd 100644
+--- a/query.c
++++ b/query.c
+@@ -81,7 +81,7 @@ static void cleanup(struct query *z)
+ int j;
+ int k;
+
+- dns_transmit_free(&z->dt);
++ qmerge_free(&z->qm);
+ for (j = 0;j < QUERY_MAXALIAS;++j)
+ dns_domain_free(&z->alias[j]);
+ for (j = 0;j < QUERY_MAXLEVEL;++j) {
+@@ -429,14 +429,8 @@ static int doit(struct query *z,int state)
+ if (j == 64) goto SERVFAIL;
+
+ dns_sortip(z->servers[z->level],64);
+- if (z->level) {
+- log_tx(z->name[z->level],DNS_T_A,z->control[z->level],z->servers[z->level],z->level);
+- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],DNS_T_A,z->localip) == -1) goto DIE;
+- }
+- else {
+- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0);
+- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE;
+- }
++ dtype = z->level ? DNS_T_A : z->type;
++ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE;
+ return 0;
+
+
+@@ -450,10 +444,10 @@ static int doit(struct query *z,int state)
+
+ HAVEPACKET:
+ if (++z->loop == 100) goto DIE;
+- buf = z->dt.packet;
+- len = z->dt.packetlen;
++ buf = z->qm->dt.packet;
++ len = z->qm->dt.packetlen;
+
+- whichserver = z->dt.servers + 4 * z->dt.curserver;
++ whichserver = z->qm->dt.servers + 4 * z->qm->dt.curserver;
+ control = z->control[z->level];
+ d = z->name[z->level];
+ dtype = z->level ? DNS_T_A : z->type;
+@@ -836,7 +830,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip
+
+ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+ {
+- switch(dns_transmit_get(&z->dt,x,stamp)) {
++ switch(qmerge_get(&z->qm,x,stamp)) {
+ case 1:
+ return doit(z,1);
+ case -1:
+@@ -847,5 +841,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+
+ void query_io(struct query *z,iopause_fd *x,struct taia *deadline)
+ {
+- dns_transmit_io(&z->dt,x,deadline);
++ qmerge_io(z->qm,x,deadline);
+ }
+diff --git a/query.h b/query.h
+index eff68b2..06feab4 100644
+--- a/query.h
++++ b/query.h
+@@ -1,7 +1,7 @@
+ #ifndef QUERY_H
+ #define QUERY_H
+
+-#include "dns.h"
++#include "qmerge.h"
+ #include "uint32.h"
+
+ #define QUERY_MAXLEVEL 5
+@@ -20,7 +20,7 @@ struct query {
+ char localip[4];
+ char type[2];
+ char class[2];
+- struct dns_transmit dt;
++ struct qmerge *qm;
+ } ;
+
+ extern int query_start(struct query *,char *,char *,char *,char *);
diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch
new file mode 100644
index 00000000000..d5b9c10d64d
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch
@@ -0,0 +1,68 @@
+diff -urNp a/query.c b/query.c
+--- a/query.c 2009-03-19 11:35:28.452472164 -0700
++++ b/query.c 2009-03-19 11:59:19.798221593 -0700
+@@ -476,6 +476,29 @@ static int doit(struct query *z,int stat
+ }
+ }
+
++ if (typematch(DNS_T_SOA,dtype)) {
++ byte_copy(key,2,DNS_T_SOA);
++ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
++ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
++ log_cachedanswer(d,DNS_T_SOA);
++ if (!rqa(z)) goto DIE;
++ pos = 0;
++ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) {
++ pos = dns_packet_getname(cached,cachedlen,pos,&t2);
++ if (!pos) break;
++ pos = dns_packet_getname(cached,cachedlen,pos,&t3);
++ if (!pos) break;
++ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE;
++ if (!response_addname(t2)) goto DIE;
++ if (!response_addname(t3)) goto DIE;
++ if (!response_addbytes(misc,20)) goto DIE;
++ response_rfinish(RESPONSE_ANSWER);
++ }
++ cleanup(z);
++ return 1;
++ }
++ }
++
+ if (typematch(DNS_T_A,dtype)) {
+ byte_copy(key,2,DNS_T_A);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+@@ -541,7 +564,7 @@ static int doit(struct query *z,int stat
+ }
+ }
+
+- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_AAAA,dtype)) {
++ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype) && !typematch(DNS_T_AAAA,dtype)) {
+ byte_copy(key,2,dtype);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
+@@ -769,15 +792,24 @@ static int doit(struct query *z,int stat
+ else if (byte_equal(type,2,DNS_T_AXFR))
+ ;
+ else if (byte_equal(type,2,DNS_T_SOA)) {
++ int non_authority = 0;
++ save_start();
+ while (i < j) {
+ pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE;
+ pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE;
+- if (records[i] < posauthority)
++ if (records[i] < posauthority) {
+ log_rrsoa(whichserver,t1,t2,t3,misc,ttl);
++ save_data(misc,20);
++ save_data(t2,dns_domain_length(t2));
++ save_data(t3,dns_domain_length(t3));
++ non_authority++;
++ }
+ ++i;
+ }
++ if (non_authority)
++ save_finish(DNS_T_SOA,t1,ttl);
+ }
+ else if (byte_equal(type,2,DNS_T_CNAME)) {
+ pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE;
diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch
new file mode 100644
index 00000000000..9230e7583dd
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch
@@ -0,0 +1,70 @@
+diff --git a/query.c b/query.c
+index 46cdc00..4574e97 100644
+--- a/query.c
++++ b/query.c
+@@ -319,6 +319,29 @@ static int doit(struct query *z,int state)
+ }
+ }
+
++ if (typematch(DNS_T_SOA,dtype)) {
++ byte_copy(key,2,DNS_T_SOA);
++ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
++ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
++ log_cachedanswer(d,DNS_T_SOA);
++ if (!rqa(z)) goto DIE;
++ pos = 0;
++ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) {
++ pos = dns_packet_getname(cached,cachedlen,pos,&t2);
++ if (!pos) break;
++ pos = dns_packet_getname(cached,cachedlen,pos,&t3);
++ if (!pos) break;
++ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE;
++ if (!response_addname(t2)) goto DIE;
++ if (!response_addname(t3)) goto DIE;
++ if (!response_addbytes(misc,20)) goto DIE;
++ response_rfinish(RESPONSE_ANSWER);
++ }
++ cleanup(z);
++ return 1;
++ }
++ }
++
+ if (typematch(DNS_T_A,dtype)) {
+ byte_copy(key,2,DNS_T_A);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+@@ -351,7 +374,7 @@ static int doit(struct query *z,int state)
+ }
+ }
+
+- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype)) {
++ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype)) {
+ byte_copy(key,2,dtype);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
+@@ -585,15 +608,24 @@ static int doit(struct query *z,int state)
+ else if (byte_equal(type,2,DNS_T_AXFR))
+ ;
+ else if (byte_equal(type,2,DNS_T_SOA)) {
++ int non_authority = 0;
++ save_start();
+ while (i < j) {
+ pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE;
+ pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE;
+- if (records[i] < posauthority)
++ if (records[i] < posauthority) {
+ log_rrsoa(whichserver,t1,t2,t3,misc,ttl);
++ save_data(misc,20);
++ save_data(t2,dns_domain_length(t2));
++ save_data(t3,dns_domain_length(t3));
++ non_authority++;
++ }
+ ++i;
+ }
++ if (non_authority)
++ save_finish(DNS_T_SOA,t1,ttl);
+ }
+ else if (byte_equal(type,2,DNS_T_CNAME)) {
+ pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE;
+
diff --git a/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch b/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch
new file mode 100644
index 00000000000..23d8e9f86b1
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch
@@ -0,0 +1,11 @@
+--- a/response.c
++++ b/response.c
+@@ -34,7 +34,7 @@ int response_addname(const char *d)
+ uint16_pack_big(buf,49152 + name_ptr[i]);
+ return response_addbytes(buf,2);
+ }
+- if (dlen <= 128)
++ if ((dlen <= 128) && (response_len < 16384))
+ if (name_num < NAMES) {
+ byte_copy(name[name_num],dlen,d);
+ name_ptr[name_num] = response_len;
diff --git a/net-dns/djbdns/files/dnsroots.patch b/net-dns/djbdns/files/dnsroots.patch
new file mode 100644
index 00000000000..d2524be5a87
--- /dev/null
+++ b/net-dns/djbdns/files/dnsroots.patch
@@ -0,0 +1,20 @@
+--- a/dnsroots.global
++++ b/dnsroots.global
+@@ -1,13 +1,13 @@
+ 198.41.0.4
+-128.9.0.107
++192.228.79.201
+ 192.33.4.12
+-128.8.10.90
++199.7.91.13
+ 192.203.230.10
+ 192.5.5.241
+ 192.112.36.4
+ 128.63.2.53
+ 192.36.148.17
+-198.41.0.10
++192.58.128.30
+ 193.0.14.129
+-198.32.64.12
++199.7.83.42
+ 202.12.27.33
diff --git a/net-dns/djbdns/files/dnstracesort.patch b/net-dns/djbdns/files/dnstracesort.patch
new file mode 100644
index 00000000000..3bf56f5a1ce
--- /dev/null
+++ b/net-dns/djbdns/files/dnstracesort.patch
@@ -0,0 +1,11 @@
+--- djbdns-1.05/dnstracesort.sh.orig 2006-04-26 21:52:54.000000000 +0200
++++ djbdns-1.05/dnstracesort.sh 2006-04-26 21:53:02.000000000 +0200
+@@ -12,7 +12,7 @@
+ }
+ print
+ }
+-' | sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: '
++' | sort -t: -k 1,3 -k 5 -k 4,5 -k 3,4 | uniq | awk -F: '
+ {
+ type = $1
+ q = $2
diff --git a/net-dns/djbdns/files/headtail.patch b/net-dns/djbdns/files/headtail.patch
new file mode 100644
index 00000000000..6321cc1ebd9
--- /dev/null
+++ b/net-dns/djbdns/files/headtail.patch
@@ -0,0 +1,67 @@
+diff -Naur /tmp/djbdns-1.05/Makefile djbdns-1.05/Makefile
+--- a/djbdns-1.05/Makefile 2003-11-16 20:33:41.000000000 +0100
++++ b/djbdns-1.05/Makefile 2003-11-16 20:35:15.000000000 +0100
+@@ -31,7 +31,7 @@
+
+ auto_home.c: \
+ auto-str conf-home
+- ./auto-str auto_home `head -1 conf-home` > auto_home.c
++ ./auto-str auto_home `head -n 1 conf-home` > auto_home.c
+
+ auto_home.o: \
+ compile auto_home.c
+@@ -205,14 +205,14 @@
+ choose: \
+ warn-auto.sh choose.sh conf-home
+ cat warn-auto.sh choose.sh \
+- | sed s}HOME}"`head -1 conf-home`"}g \
++ | sed s}HOME}"`head -n 1 conf-home`"}g \
+ > choose
+ chmod 755 choose
+
+ compile: \
+ warn-auto.sh conf-cc
+ ( cat warn-auto.sh; \
+- echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
++ echo exec "`head -n 1 conf-cc`" '-c $${1+"$$@"}' \
+ ) > compile
+ chmod 755 compile
+
+@@ -449,7 +449,7 @@
+ dnstracesort: \
+ warn-auto.sh dnstracesort.sh conf-home
+ cat warn-auto.sh dnstracesort.sh \
+- | sed s}HOME}"`head -1 conf-home`"}g \
++ | sed s}HOME}"`head -n 1 conf-home`"}g \
+ > dnstracesort
+ chmod 755 dnstracesort
+
+@@ -570,7 +570,7 @@
+ warn-auto.sh conf-ld
+ ( cat warn-auto.sh; \
+ echo 'main="$$1"; shift'; \
+- echo exec "`head -1 conf-ld`" \
++ echo exec "`head -n 1 conf-ld`" \
+ '-o "$$main" "$$main".o $${1+"$$@"}' \
+ ) > load
+ chmod 755 load
+@@ -758,7 +758,7 @@
+ rts: \
+ warn-auto.sh rts.sh conf-home
+ cat warn-auto.sh rts.sh \
+- | sed s}HOME}"`head -1 conf-home`"}g \
++ | sed s}HOME}"`head -n 1 conf-home`"}g \
+ > rts
+ chmod 755 rts
+
+@@ -901,8 +901,8 @@
+ systype: \
+ find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c
+ ( cat warn-auto.sh; \
+- echo CC=\'`head -1 conf-cc`\'; \
+- echo LD=\'`head -1 conf-ld`\'; \
++ echo CC=\'`head -n 1 conf-cc`\'; \
++ echo LD=\'`head -n 1 conf-ld`\'; \
+ cat find-systype.sh; \
+ ) | sh > systype
+
diff --git a/net-dns/djbdns/files/makefile-parallel-test25.patch b/net-dns/djbdns/files/makefile-parallel-test25.patch
new file mode 100644
index 00000000000..2754729acb9
--- /dev/null
+++ b/net-dns/djbdns/files/makefile-parallel-test25.patch
@@ -0,0 +1,91 @@
+diff --git a/Makefile b/Makefile
+index 9ebf4c8..fe5ed73 100644
+--- a/Makefile
++++ b/Makefile
+@@ -212,7 +212,7 @@ warn-auto.sh choose.sh conf-home
+ chmod 755 choose
+
+ clientloc.o: \
+-compile clientloc.c open.h byte.h cdb.h ip6.h
++compile clientloc.c open.h byte.h cdb.h uint32.h ip6.h
+ ./compile clientloc.c
+
+ compile: \
+@@ -336,7 +336,7 @@ taia.h tai.h uint64.h taia.h
+
+ dns_transmit.o: \
+ compile dns_transmit.c socket.h uint16.h alloc.h error.h byte.h \
+-uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
++uint32.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
+ taia.h
+ ./compile dns_transmit.c
+
+@@ -859,15 +859,15 @@ trylsock.c compile load
+ rm -f trylsock.o trylsock
+
+ socket_accept.o: \
+-compile socket_accept.c byte.h socket.h uint16.h
++compile socket_accept.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_accept.c
+
+ socket_accept6.o: \
+-compile socket_accept6.c byte.h socket.h uint16.h
++compile socket_accept6.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_accept6.c
+
+ socket_bind.o: \
+-compile socket_bind.c byte.h socket.h uint16.h
++compile socket_bind.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_bind.c
+
+ socket_bind6.o: \
+@@ -875,7 +875,7 @@ compile socket_bind6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32.
+ ./compile socket_bind6.c
+
+ socket_conn.o: \
+-compile socket_conn.c byte.h socket.h uint16.h
++compile socket_conn.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_conn.c
+
+ socket_connect6.o: \
+@@ -883,11 +883,11 @@ compile socket_connect6.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_connect6.c
+
+ socket_listen.o: \
+-compile socket_listen.c socket.h uint16.h
++compile socket_listen.c socket.h uint16.h uint32.h
+ ./compile socket_listen.c
+
+ socket_recv.o: \
+-compile socket_recv.c byte.h socket.h uint16.h
++compile socket_recv.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_recv.c
+
+ socket_recv6.o: \
+@@ -895,7 +895,7 @@ compile socket_recv6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32.
+ ./compile socket_recv6.c
+
+ socket_send.o: \
+-compile socket_send.c byte.h socket.h uint16.h
++compile socket_send.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_send.c
+
+ socket_send6.o: \
+@@ -903,7 +903,7 @@ compile socket_send6.c byte.h socket.h uint16.h uint32.h ip6.h haveip6.h error.h
+ ./compile socket_send6.c
+
+ socket_tcp.o: \
+-compile socket_tcp.c ndelay.h socket.h uint16.h
++compile socket_tcp.c ndelay.h socket.h uint16.h uint32.h
+ ./compile socket_tcp.c
+
+ socket_tcp6.o: \
+@@ -911,7 +911,7 @@ compile socket_tcp6.c ndelay.h socket.h uint16.h uint32.h haveip6.h
+ ./compile socket_tcp6.c
+
+ socket_udp.o: \
+-compile socket_udp.c ndelay.h socket.h uint16.h
++compile socket_udp.c ndelay.h socket.h uint16.h uint32.h
+ ./compile socket_udp.c
+
+ socket_udp6.o: \
diff --git a/net-dns/djbdns/files/srv_record_support.patch b/net-dns/djbdns/files/srv_record_support.patch
new file mode 100644
index 00000000000..73688420836
--- /dev/null
+++ b/net-dns/djbdns/files/srv_record_support.patch
@@ -0,0 +1,180 @@
+From: Michael Handler <handler@sub-rosa.com>
+To: dns@list.cr.yp.to
+Subject: tinydns-data SRV & axfr-get SRV/PTR patches
+Date: Thu, 14 Sep 2000 20:37:50 -0400
+
+Here's a combined patch that:
+
+a) adds a native SRV type to tinydns-data
+
+Sfqdn:ip:x:port:weight:priority:ttl:timestamp
+
+Standard rules for ip, x, ttl, and timestamp apply. Port, weight, and
+priority all range from 0-65535. Weight and priority are optional; they
+default to zero if not provided.
+
+Sconsole.zoinks.example.com:1.2.3.4:rack102-con1:2001:69:7:300:
+
+b) makes axfr-get decompose SRV and PTR records and write them out in
+native format, rather than opaque. Again, this is necessary because if the
+DNAME fields in the records reference the same zone as fqdn, they can have
+compression pointers that are bogus outside the context of that specific
+packet, and which can't be correctly loaded into data.cdb by tinydns-data.
+
+--michael
+
+Laurent G. Bercot <ska-djbdns@skarnet.org> updated it for
+djbdns-1.05. Documentation patch by Alex Efros.
+
+diff -rNU3 djbdns-1.05/axfr-get.c djbdns-1.05-srv/axfr-get.c
+--- djbdns-1.05/axfr-get.c Sun Feb 11 22:11:45 2001
++++ djbdns-1.05/axfr-get.c Thu Oct 18 14:46:56 2001
+@@ -209,6 +209,26 @@
+ if (!stralloc_cats(&line,".:")) return 0;
+ if (!stralloc_catulong0(&line,dist,0)) return 0;
+ }
++ else if (byte_equal(data,2,DNS_T_SRV)) {
++ uint16 dist, weight, port;
++ if (!stralloc_copys(&line,"S")) return 0;
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,"::")) return 0;
++ pos = x_copy(buf,len,pos,data,2);
++ uint16_unpack_big(data,&dist);
++ pos = x_copy(buf,len,pos,data,2);
++ uint16_unpack_big(data,&weight);
++ pos = x_copy(buf,len,pos,data,2);
++ uint16_unpack_big(data,&port);
++ x_getname(buf,len,pos,&d1);
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,".:")) return 0;
++ if (!stralloc_catulong0(&line,dist,0)) return 0;
++ if (!stralloc_cats(&line,":")) return 0;
++ if (!stralloc_catulong0(&line,weight,0)) return 0;
++ if (!stralloc_cats(&line,":")) return 0;
++ if (!stralloc_catulong0(&line,port,0)) return 0;
++ }
+ else if (byte_equal(data,2,DNS_T_A) && (dlen == 4)) {
+ char ipstr[IP4_FMT];
+ if (!stralloc_copys(&line,"+")) return 0;
+@@ -216,6 +236,14 @@
+ if (!stralloc_cats(&line,":")) return 0;
+ x_copy(buf,len,pos,data,4);
+ if (!stralloc_catb(&line,ipstr,ip4_fmt(ipstr,data))) return 0;
++ }
++ else if (byte_equal(data,2,DNS_T_PTR)) {
++ if (!stralloc_copys(&line,"^")) return 0;
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,":")) return 0;
++ x_getname(buf,len,pos,&d1);
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,".")) return 0;
+ }
+ else {
+ unsigned char ch;
+diff -rNU3 djbdns-1.05/dns.h djbdns-1.05-srv/dns.h
+--- djbdns-1.05/dns.h Sun Feb 11 22:11:45 2001
++++ djbdns-1.05/dns.h Thu Oct 18 14:46:56 2001
+@@ -20,6 +20,7 @@
+ #define DNS_T_SIG "\0\30"
+ #define DNS_T_KEY "\0\31"
+ #define DNS_T_AAAA "\0\34"
++#define DNS_T_SRV "\0\41"
+ #define DNS_T_AXFR "\0\374"
+ #define DNS_T_ANY "\0\377"
+
+diff -rNU3 djbdns-1.05/tinydns-data.c djbdns-1.05-srv/tinydns-data.c
+--- djbdns-1.05/tinydns-data.c Sun Feb 11 22:11:45 2001
++++ djbdns-1.05/tinydns-data.c Thu Oct 18 14:50:53 2001
+@@ -196,6 +196,7 @@
+ char type[2];
+ char soa[20];
+ char buf[4];
++ char srv[6];
+
+ umask(022);
+
+@@ -360,6 +361,43 @@
+ rr_start(DNS_T_MX,ttl,ttd,loc);
+ uint16_pack_big(buf,u);
+ rr_add(buf,2);
++ rr_addname(d2);
++ rr_finish(d1);
++
++ if (ip4_scan(f[1].s,ip)) {
++ rr_start(DNS_T_A,ttl,ttd,loc);
++ rr_add(ip,4);
++ rr_finish(d2);
++ }
++ break;
++
++ case 'S':
++ if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
++ if (!stralloc_0(&f[6])) nomem();
++ if (!scan_ulong(f[6].s,&ttl)) ttl = TTL_POSITIVE;
++ ttdparse(&f[7],ttd);
++ locparse(&f[8],loc);
++
++ if (!stralloc_0(&f[1])) nomem();
++
++ if (byte_chr(f[2].s,f[2].len,'.') >= f[2].len) {
++ if (!stralloc_cats(&f[2],".srv.")) nomem();
++ if (!stralloc_catb(&f[2],f[0].s,f[0].len)) nomem();
++ }
++ if (!dns_domain_fromdot(&d2,f[2].s,f[2].len)) nomem();
++
++ if (!stralloc_0(&f[4])) nomem();
++ if (!scan_ulong(f[4].s,&u)) u = 0;
++ uint16_pack_big(srv,u);
++ if (!stralloc_0(&f[5])) nomem();
++ if (!scan_ulong(f[5].s,&u)) u = 0;
++ uint16_pack_big(srv + 2,u);
++ if (!stralloc_0(&f[3])) nomem();
++ if (!scan_ulong(f[3].s,&u)) nomem();
++ uint16_pack_big(srv + 4,u);
++
++ rr_start(DNS_T_SRV,ttl,ttd,loc);
++ rr_add(srv,6);
+ rr_addname(d2);
+ rr_finish(d1);
+
+--- djbdns-1.05/man/tinydns-data.8 2003-10-23 10:47:32.000000000 +0300
++++ djbdns-1.05/man/tinydns-data.8 2014-09-26 02:51:59.861716505 +0300
+@@ -487,6 +487,38 @@
+ .RI \ 072
+ is a colon.
+
++.RI S fqdn\fR:\fIip\fR:\fIx\fR:\fIport\fR:\fIweight\fR:\fIpriority\fR:\fIttl\fR:\fItimestamp\fR:\fIlo\fR
++
++SRV record for
++.IR fqdn .
++
++.B tinydns-data
++creates
++.IP
++an SRV record
++showing
++.IR x\fR.srv.\fIfqdn\fR:\fIport\fR
++as a service for
++.IR fqdn
++with given \fIweight\fR and \fIpriority\fR
++(\fIport\fR, \fIweight\fR and \fIpriority\fR must be in range 0-65535;
++\fIweight\fR and \fIpriority\fR are optional;
++they default to zero if not provided)
++and
++.P
++.IP
++an A record showing
++.I ip
++as the IP address
++of
++.IR x\fR.srv.\fIfqdn .
++.P
++
++If
++.I x
++contains a dot
++then it is treated specially; see above.
++
+ .RI ^ fqdn\fR:\fIp\fR:\fIttl\fR:\fItimestamp\fR:\fIlo\fR
+
+ PTR record for
diff --git a/net-dns/djbdns/files/string_length_255.patch b/net-dns/djbdns/files/string_length_255.patch
new file mode 100644
index 00000000000..ad383b756bf
--- /dev/null
+++ b/net-dns/djbdns/files/string_length_255.patch
@@ -0,0 +1,11 @@
+--- a/tinydns-data.c 2001-02-11 16:11:45.000000000 -0500
++++ b/tinydns-data.c 2011-04-02 10:41:34.356302891 -0400
+@@ -399,7 +399,7 @@
+ i = 0;
+ while (i < f[1].len) {
+ k = f[1].len - i;
+- if (k > 127) k = 127;
++ if (k > 255) k = 255;
+ ch = k;
+ rr_add(&ch,1);
+ rr_add(f[1].s + i,k);
diff --git a/net-dns/djbdns/metadata.xml b/net-dns/djbdns/metadata.xml
new file mode 100644
index 00000000000..7e0a8fc27b5
--- /dev/null
+++ b/net-dns/djbdns/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnrd/Manifest b/net-dns/dnrd/Manifest
new file mode 100644
index 00000000000..3256f60c5c1
--- /dev/null
+++ b/net-dns/dnrd/Manifest
@@ -0,0 +1 @@
+DIST dnrd-2.20.3.tar.gz 161887 SHA256 aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015
diff --git a/net-dns/dnrd/dnrd-2.20.3-r1.ebuild b/net-dns/dnrd/dnrd-2.20.3-r1.ebuild
new file mode 100644
index 00000000000..4e628b7f635
--- /dev/null
+++ b/net-dns/dnrd/dnrd-2.20.3-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils user
+
+DESCRIPTION="A caching DNS proxy server"
+HOMEPAGE="http://dnrd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dnrd/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug"
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-docdir.patch
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ $(use_enable debug) \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ || die
+
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ keepdir /etc/dnrd
+ doinitd ${FILESDIR}/dnrd
+ newconfd ${FILESDIR}/dnrd.conf dnrd
+}
+
+pkg_postinst() {
+ enewgroup dnrd
+ enewuser dnrd -1 -1 /dev/null dnrd
+}
diff --git a/net-dns/dnrd/files/dnrd b/net-dns/dnrd/files/dnrd
new file mode 100644
index 00000000000..403073586e3
--- /dev/null
+++ b/net-dns/dnrd/files/dnrd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+PIDFILE="/var/run/dnrd.pid"
+
+depend() {
+ provide dns
+ need net
+}
+
+start() {
+ ebegin "Starting dnrd"
+ /usr/sbin/dnrd $DNRD_OPTS &> /dev/null &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnrd"
+ /usr/sbin/dnrd -k
+ eend $?
+}
+
diff --git a/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
new file mode 100644
index 00000000000..a3d1c8002d5
--- /dev/null
+++ b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
@@ -0,0 +1,21 @@
+Index: doc/Makefile.am
+===================================================================
+--- doc/Makefile.am (revision 247)
++++ doc/Makefile.am (revision 248)
+@@ -1,5 +1,4 @@
+ PACKAGE = @PACKAGE_TARNAME@
+-docdir = $(datadir)/doc/$(PACKAGE)
+ doc_DATA = README-cache README-master README-cygwin master.sample
+ man_MANS = dnrd.8
+ EXTRA_DIST = $(man_MANS) $(doc_DATA)
+Index: Makefile.am
+===================================================================
+--- Makefile.am (revision 247)
++++ Makefile.am (revision 248)
+@@ -1,6 +1,5 @@
+ PACKAGE = @PACKAGE_TARNAME@
+ SUBDIRS = src doc
+-docdir = $(datadir)/doc/$(PACKAGE)
+ doc_DATA = AUTHORS COPYING ChangeLog README NEWS
+
+ EXTRA_DIST = README cygwin_post_install.sh
diff --git a/net-dns/dnrd/files/dnrd.conf b/net-dns/dnrd/files/dnrd.conf
new file mode 100644
index 00000000000..96eea43a87d
--- /dev/null
+++ b/net-dns/dnrd/files/dnrd.conf
@@ -0,0 +1,11 @@
+# options to dnrd
+
+# example: 2 default dns servers and dns servers for mydomain.com. The
+# latter are load balanced (-b)
+
+# DNRD_OPTS="
+# -s 213.142.64.170
+# -s 213.142.64.171
+# -b
+# -s 192.168.65.250:mydomain.com
+# -s 192.168.65.254:mydomain.com"
diff --git a/net-dns/dnrd/metadata.xml b/net-dns/dnrd/metadata.xml
new file mode 100644
index 00000000000..0e1cbf4d448
--- /dev/null
+++ b/net-dns/dnrd/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>natanael.copa@gmail.com</email>
+ <name>Natanael Copa</name>
+ </maintainer>
+ <maintainer>
+ <email>armin76@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+Domain Name Relay Daemon is a caching, forwarding DNS proxy server. Most useful on vpn or dialup firewalls but it is also a nice DNS cache for minor networks and workstations.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">dnrd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/dnscap/Manifest b/net-dns/dnscap/Manifest
new file mode 100644
index 00000000000..51192062107
--- /dev/null
+++ b/net-dns/dnscap/Manifest
@@ -0,0 +1 @@
+DIST dnscap-20130814.tar.gz 99615 SHA256 17c367e6697d6e93eb4ebf0ac038e10eb6950c75a9890c914ba0f7a0f9c2500e SHA512 1969d8cc47c6206369a02b29064dbb7f663a2187203ab1f49d862082bfb6e44c9fccf90fb63d65a523c7a5cf4d24815a74b9dd18d81267b4447252d7a04f33dd WHIRLPOOL 888d7544525901974b5b501cf4feb842363da95b50ed48dda0276dc5c733de8510c65f9942b72ffb4d9c43ac8f0ca2cf12154525c2fd40561a4fec81a7aee598
diff --git a/net-dns/dnscap/dnscap-20130814.ebuild b/net-dns/dnscap/dnscap-20130814.ebuild
new file mode 100644
index 00000000000..b1a1dd7a476
--- /dev/null
+++ b/net-dns/dnscap/dnscap-20130814.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="dnscap is a network capture utility designed specifically for DNS traffic"
+HOMEPAGE="http://dnscap.dns-oarc.net/"
+
+## github commit tarball
+MY_GIT_COMMIT="727ed7d5e46625abc2c8d988689a300589e948b6"
+MY_P="verisign-${PN}-${MY_GIT_COMMIT:0:7}"
+SRC_URI="https://github.com/verisign/${PN}/tarball/${MY_GIT_COMMIT} -> ${PF}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="ISC"
+IUSE=""
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ ## adds DESTDIR to install target
+ epatch "${FILESDIR}/${P}.install.patch"
+}
diff --git a/net-dns/dnscap/files/dnscap-20130814.install.patch b/net-dns/dnscap/files/dnscap-20130814.install.patch
new file mode 100644
index 00000000000..b09c7cfdbfc
--- /dev/null
+++ b/net-dns/dnscap/files/dnscap-20130814.install.patch
@@ -0,0 +1,22 @@
+diff -urN verisign-dnscap-727ed7d.orig/Makefile.in verisign-dnscap-727ed7d/Makefile.in
+--- verisign-dnscap-727ed7d.orig/Makefile.in 2013-08-14 01:31:33.000000000 +0200
++++ verisign-dnscap-727ed7d/Makefile.in 2014-04-26 22:04:35.438580361 +0200
+@@ -45,13 +45,11 @@
+ all: ${prog} ${prog}.cat1
+
+ install: all
+- install -d -m 755 ${bindir}
+- if [ -f ${bindir}/${prog} ]; then \
+- mv -f ${bindir}/${prog} ${bindir}/${prog}.old; fi
+- install -m 755 ${prog} ${bindir}/
+- install -d -m 755 ${mandir}
+- install -d -m 755 ${mandir}/cat1
+- install -m 644 ${prog}.cat1 ${mandir}/cat1/${prog}.1
++ install -d -m 755 $(DESTDIR)${bindir}
++ install -m 755 ${prog} $(DESTDIR)${bindir}/
++ install -d -m 755 $(DESTDIR)${mandir}
++ install -d -m 755 $(DESTDIR)${mandir}/cat1
++ install -m 644 ${prog}.cat1 $(DESTDIR)${mandir}/cat1/${prog}.1
+
+ .c.o:
+ ${CC} ${CFLAGS} -c $<
diff --git a/net-dns/dnscap/metadata.xml b/net-dns/dnscap/metadata.xml
new file mode 100644
index 00000000000..68838f5ff96
--- /dev/null
+++ b/net-dns/dnscap/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">verisign/dnscap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest
new file mode 100644
index 00000000000..09b1a797ea6
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/Manifest
@@ -0,0 +1,2 @@
+DIST dnscrypt-proxy-1.4.2.tar.gz 1592962 SHA256 1d519068c30868bb60a151908f0e300a1754b234f7bc2ad1d749ad9d0d977076 SHA512 ecb81b5d20cf88a610421bb1266861a2f5dd34d0ce916c54507507ca5dbe5d9e49e95916f76fa7997b112860f2bc37793f075ed812c75b2904adf6cdf32cac17 WHIRLPOOL ddfa3da3de933f6cbb8721ccd6435e97b9e893d32311e1c3badbc23b6a0547b6cb0f8d6037baaf0027ca1eb972c4be167dc9ce56194f7f6fa54fac974ca0bd24
+DIST dnscrypt-proxy-1.4.3.tar.gz 1560345 SHA256 f10f10c18e25ced3c5ec5d0c4145d33270f9cfa991fd1b18d5d9af00e4d9b68e SHA512 3aae9f20bc06087b0860a24488bcda117010a34218d7aef3c68a0f155f8164ce06a88865a9caf1ce5c5eaa8588518ccc2c8a61a97cc39f527f7b2b14cdf8c118 WHIRLPOOL 49915b0f95d340828c79febc9b7d94c4f0c444e016b9f78d134e05f43945b446ab71bbc6a230d6e15d5f1f4c0b97d9f671b6001314cc157cdcd419b01bf23550
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild
new file mode 100644
index 00000000000..55528cae9c7
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd user
+
+DESCRIPTION="A tool for securing communications between a client and a DNS resolver"
+HOMEPAGE="http://dnscrypt.org/"
+SRC_URI="http://download.dnscrypt.org/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins ldns systemd"
+
+DEPEND="dev-libs/libsodium
+ ldns? ( net-libs/ldns )"
+RDEPEND="${DEPEND}
+ systemd? ( sys-apps/systemd )"
+
+DOCS=( AUTHORS ChangeLog COPYING NEWS README.markdown README-PLUGINS.markdown
+ TECHNOTES THANKS )
+
+pkg_setup() {
+ enewgroup dnscrypt
+ enewuser dnscrypt -1 -1 /var/empty dnscrypt
+}
+
+src_configure() {
+ econf \
+ $(use_enable plugins) \
+ $(use_with systemd )
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild
new file mode 100644
index 00000000000..1d7c5798b11
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.4.3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd user
+
+DESCRIPTION="A tool for securing communications between a client and a DNS resolver"
+HOMEPAGE="http://dnscrypt.org/"
+SRC_URI="http://download.dnscrypt.org/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins ldns systemd"
+
+DEPEND="dev-libs/libsodium
+ ldns? ( net-libs/ldns )"
+RDEPEND="${DEPEND}
+ systemd? ( sys-apps/systemd )"
+
+DOCS=( AUTHORS ChangeLog COPYING NEWS README.markdown README-PLUGINS.markdown
+ TECHNOTES THANKS )
+
+pkg_setup() {
+ enewgroup dnscrypt
+ enewuser dnscrypt -1 -1 /var/empty dnscrypt
+}
+
+src_configure() {
+ econf \
+ $(use_enable plugins) \
+ $(use_with systemd )
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd
new file mode 100644
index 00000000000..ceedd454b5f
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd
@@ -0,0 +1,7 @@
+DNSCRYPT_LOCALIP=127.0.0.1
+DNSCRYPT_LOCALPORT=53
+DNSCRYPT_USER=dnscrypt
+DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.opendns.com
+DNSCRYPT_PROVIDER_KEY=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79
+DNSCRYPT_RESOLVERIP=208.67.220.220
+DNSCRYPT_RESOLVERPORT=443
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
new file mode 100644
index 00000000000..3ef60f9ab8c
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DNSCRYPT_LOGFILE=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log}
+
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+pidfile=${pidfile:-${rundir}/dnscrypt-proxy.pid}
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+runas_user=${runas_user:-dnscrypt}
+runas_group=${runas_user:-dnscrypt}
+
+depend() {
+ use net
+ before dns
+ after logger
+}
+
+start() {
+ if [ ! -d "${rundir}" ]; then
+ mkdir "${rundir}"
+ if [ -n "${runas_user}" ]; then
+ touch ${DNSCRYPT_LOGFILE}
+ chown ${runas_user}:${runas_group} ${DNSCRYPT_LOGFILE}
+ chown -R ${runas_user}:${runas_group} "${rundir}"
+ fi
+ fi
+
+ ebegin "Starting dnscrypt-proxy"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dnscrypt-proxy \
+ -- \
+ --pidfile=${pidfile} \
+ --logfile=${DNSCRYPT_LOGFILE} \
+ --daemonize --user=${runas_user} \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
+ --provider-name=${DNSCRYPT_PROVIDER_NAME} \
+ --provider-key=${DNSCRYPT_PROVIDER_KEY}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnscrypt-proxy"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy
+ eend $?
+}
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service
new file mode 100644
index 00000000000..414c0b498c5
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=A tool for securing communications between a client and a DNS resolver
+
+[Service]
+Type=forking
+PIDFile=/var/run/dnscrypt-proxy.pid
+EnvironmentFile=/etc/conf.d/dnscrypt-proxy
+ExecStartPre=/bin/rm -f /var/run/dnscrypt-proxy.pid
+ExecStart=/usr/sbin/dnscrypt-proxy --daemonize \
+ --pidfile=/var/run/dnscrypt-proxy.pid \
+ --logfile=/var/log/dnscrypt-proxy.log \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
+ --provider-name=${DNSCRYPT_PROVIDER_NAME} \
+ --provider-key=${DNSCRYPT_PROVIDER_KEY} \
+ --user=${DNSCRYPT_USER}
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnscrypt-proxy/metadata.xml b/net-dns/dnscrypt-proxy/metadata.xml
new file mode 100644
index 00000000000..03ba21e513a
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>amesists@gmail.com</email>
+ <name>Jiajun Wang</name>
+ <description>Primary Maintainer, Assign bugs</description>
+</maintainer>
+<longdescription lang="en">
+dnscrypt-proxy provides local service which can be used directly as your local resolver
+or as a DNS forwarder, encrypting and authenticating requests using the DNSCrypt protocol
+and passing them to an upstream server.
+</longdescription>
+<use>
+ <flag name="ldns">Use <pkg>net-libs/ldns</pkg> for DNSSEC/SSHFP validation</flag>
+ <flag name="plugins">Enable plugin support to inspect and modify queries and responses</flag>
+ <flag name="systemd">Use systemd's socket activation instead of creating the sockets itself</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dns/dnshijacker/Manifest b/net-dns/dnshijacker/Manifest
new file mode 100644
index 00000000000..5016373a3ac
--- /dev/null
+++ b/net-dns/dnshijacker/Manifest
@@ -0,0 +1 @@
+DIST dnshijacker-1.3.tar.gz 23569 SHA256 4040cb211860bec4dd43af09e157da25ebd20189d35884c11639d281ef7cd16a SHA512 628d545f1b6345e641254519cbb696ae2a38e218a5129558dae404d0ef374afdabf06c63775d5bc5d2d020de3bf339342c7e1a1b10beed4beadb703ff63c693d WHIRLPOOL 94bfcaa8ecca3d60dc472d1615e49208127d4c9407d1c19bf1d20a31b7c2f2a80114906d06927bfbe775ccd3ee45c4d348bcf9009f0ab26d878a0f1c78102fb3
diff --git a/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild b/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild
new file mode 100644
index 00000000000..7a73ed63321
--- /dev/null
+++ b/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="a libnet/libpcap based packet sniffer and spoofer"
+HOMEPAGE="http://pedram.redhive.com/projects.php"
+SRC_URI="http://pedram.redhive.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.0.2a-r3:1.0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dosbin dnshijacker ask_dns answer_dns
+
+ insinto /etc/dnshijacker
+ doins ftable
+
+ dodoc README
+}
diff --git a/net-dns/dnshijacker/files/1.3-libnet-1.0.patch b/net-dns/dnshijacker/files/1.3-libnet-1.0.patch
new file mode 100644
index 00000000000..08337d5c828
--- /dev/null
+++ b/net-dns/dnshijacker/files/1.3-libnet-1.0.patch
@@ -0,0 +1,39 @@
+diff -U 0 -r dnshijacker-1.3.orig/Makefile dnshijacker-1.3/Makefile
+--- dnshijacker-1.3.orig/Makefile 2003-08-19 15:39:54.068117160 -0400
++++ dnshijacker-1.3/Makefile 2003-08-19 15:40:26.836135664 -0400
+@@ -4 +4 @@
+- gcc ask_dns.c -lnet `libnet-config --defines` -o ask_dns
++ gcc ask_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o ask_dns
+@@ -7 +7 @@
+- gcc answer_dns.c -lnet `libnet-config --defines` -o answer_dns
++ gcc answer_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o answer_dns
+@@ -10 +10 @@
+- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker
++ gcc dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker
+@@ -13 +13 @@
+- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker -DDEBUG -ggdb
++ gcc dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker -DDEBUG -ggdb
+diff -U 0 -r dnshijacker-1.3.orig/README dnshijacker-1.3/README
+--- dnshijacker-1.3.orig/README 2003-08-19 15:39:54.068117160 -0400
++++ dnshijacker-1.3/README 2003-08-19 15:40:26.840135056 -0400
+@@ -61 +61 @@
+- gcc dnshijacker.c -lpcap -lnet `libnet-config --defines` -o dnshijacker
++ gcc dnshijacker.c -lpcap -lnet-1.0 `libnet-1.0-config --defines` -o dnshijacker
+diff -U 0 -r dnshijacker-1.3.orig/answer_dns.c dnshijacker-1.3/answer_dns.c
+--- dnshijacker-1.3.orig/answer_dns.c 2003-08-19 15:39:54.069117008 -0400
++++ dnshijacker-1.3/answer_dns.c 2003-08-19 15:40:48.815794248 -0400
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -U 0 -r dnshijacker-1.3.orig/ask_dns.c dnshijacker-1.3/ask_dns.c
+--- dnshijacker-1.3.orig/ask_dns.c 2003-08-19 15:39:54.068117160 -0400
++++ dnshijacker-1.3/ask_dns.c 2003-08-19 15:40:48.816794096 -0400
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -U 0 -r dnshijacker-1.3.orig/dnshijacker.h dnshijacker-1.3/dnshijacker.h
+--- dnshijacker-1.3.orig/dnshijacker.h 2003-08-19 15:39:54.068117160 -0400
++++ dnshijacker-1.3/dnshijacker.h 2003-08-19 15:40:48.818793792 -0400
+@@ -10 +10 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch b/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch
new file mode 100644
index 00000000000..9af95206761
--- /dev/null
+++ b/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch
@@ -0,0 +1,37 @@
+--- a/answer_dns.c 2002-10-28 02:58:37.000000000 +0100
++++ b/answer_dns.c 2010-09-19 01:16:28.000000000 +0200
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/ask_dns.c 2002-10-28 02:58:34.000000000 +0100
++++ b/ask_dns.c 2010-09-19 01:16:28.000000000 +0200
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/dnshijacker.h 2002-11-18 05:21:48.000000000 +0100
++++ b/dnshijacker.h 2010-09-19 01:16:28.000000000 +0200
+@@ -10 +10 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+@@ -12 +12 @@
+-
++#include <resolv.h>
+--- a/Makefile 2002-12-02 01:51:09.000000000 +0100
++++ b/Makefile 2010-09-19 01:16:28.000000000 +0200
+@@ -4 +4 @@
+- gcc ask_dns.c -lnet `libnet-config --defines` -o ask_dns
++ $(CC) $(CFLAGS) $(LDFLAGS) ask_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o ask_dns
+@@ -7 +7 @@
+- gcc answer_dns.c -lnet `libnet-config --defines` -o answer_dns
++ $(CC) $(CFLAGS) $(LDFLAGS) answer_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o answer_dns
+@@ -10 +10 @@
+- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker
++ $(CC) $(CFLAGS) $(LDFLAGS) dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker
+@@ -13 +13 @@
+- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker -DDEBUG -ggdb
++ $(CC) $(CFLAGS) $(LDFLAGS) dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker -DDEBUG -ggdb
+--- a/README 2002-10-30 06:12:09.000000000 +0100
++++ b/README 2010-09-19 01:16:28.000000000 +0200
+@@ -61 +61 @@
+- gcc dnshijacker.c -lpcap -lnet `libnet-config --defines` -o dnshijacker
++ gcc dnshijacker.c -lpcap -lnet-1.0 `libnet-1.0-config --defines` -o dnshijacker
diff --git a/net-dns/dnshijacker/metadata.xml b/net-dns/dnshijacker/metadata.xml
new file mode 100644
index 00000000000..f9d50da18d3
--- /dev/null
+++ b/net-dns/dnshijacker/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnsimple-dyndns/Manifest b/net-dns/dnsimple-dyndns/Manifest
new file mode 100644
index 00000000000..5f02511ec94
--- /dev/null
+++ b/net-dns/dnsimple-dyndns/Manifest
@@ -0,0 +1 @@
+DIST dnsimple-dyndns-0.1.tar.gz 4453 SHA256 5290db4354f3f015e78d7d689f5c7fe876bb9f073f9a765ed3adc67aae8243d9 SHA512 1dc7cdb968cd9303b922f0537fb5e63e5f16ed86d53506b47311d11f554f8e8332b989206c4947be75a07d576c98f4766dc9350ffbb30a31fa3581ded8a2b64e WHIRLPOOL 5b82ec54123d78c133aa32e31b7017fd6c1dd11985a3d85c38b83bdbbbb5a6ef4e678a20047f24858086b19312336640309ed580faff6dfe87077f4ffc18453c
diff --git a/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild b/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild
new file mode 100644
index 00000000000..db7b7cff5b0
--- /dev/null
+++ b/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+GIT_ECLASS=
+if [[ ${PV} = *9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI="git://github.com/rafaelmartins/dnsimple-dyndns.git
+ https://github.com/rafaelmartins/dnsimple-dyndns.git"
+fi
+
+inherit distutils-r1 ${GIT_ECLASS}
+
+DESCRIPTION="Dynamic DNS implementation, that relies on DNSimple.com"
+HOMEPAGE="https://pypi.python.org/pypi/dnsimple-dyndns
+ https://github.com/rafaelmartins/dnsimple-dyndns"
+
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+if [[ ${PV} = *9999* ]]; then
+ SRC_URI=""
+ KEYWORDS=""
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=dev-python/requests-2.0.0"
+RDEPEND="${DEPEND}"
diff --git a/net-dns/dnsimple-dyndns/metadata.xml b/net-dns/dnsimple-dyndns/metadata.xml
new file mode 100644
index 00000000000..9991a3e7dbc
--- /dev/null
+++ b/net-dns/dnsimple-dyndns/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <longdescription lang="en">
+ Dynamic DNS implementation, that relies on DNSimple.com.
+ </longdescription>
+ <upstream>
+ <maintainer status="active">
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <remote-id type="pypi">dnsimple-dyndns</remote-id>
+ <remote-id type="github">rafaelmartins/dnsimple-dyndns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
new file mode 100644
index 00000000000..c917141c3a8
--- /dev/null
+++ b/net-dns/dnsmasq/Manifest
@@ -0,0 +1,3 @@
+DIST dnsmasq-2.66.tar.xz 401056 SHA256 5e143947527bcdc46a30f4b1bbdfbfa96333dd98bcecdac3b5b1d6cacfe06c75 SHA512 f0bde09f178ca15f4c28efb06901213af9a009b4476daa8a08bafc7682b9ffed13ac65c5c232acdf828382f321137de08b4a33108d22613b198fe30695b3362c WHIRLPOOL e749d24017c35fdbaaaf417decdf9316e235cf7f96f031caceee14d06b982c285b0e561f50597cd12b6a31ef554f7f2e22ca6234f44a6d8bb066dede99461166
+DIST dnsmasq-2.72.tar.xz 454048 SHA256 7d0bd23f5d74b3a6b26a75d5ffcf9db81d461b47cbe578cb65a83a98008600b1 SHA512 d84b89c987966a5f5880aa329833626b0a017628dd6aa667bdad880d1c5f101a386dddb439eb6983d58952a36f25670bf58df94281b89320f02895a3e6af4cec WHIRLPOOL 491eadb0060f372a0b7f5855fb57040c4baf37352732a2943fb4173aa28e875b91537f87085201f13e76ec5680e4ad681992829a5cef800833be0911298a793c
+DIST dnsmasq-2.75.tar.xz 472484 SHA256 640c4e1d4c298e42458419cd78cfc26acc549401b1a34d271cd3e0e4226941f1 SHA512 dc6f64e8f04179bba4ceea5acbda4da27398e3e7a87f07ed645c383b0cccef416c438a859decff7be25849e28db9e53912693cdbf7f01ddd9bbf1d5e6ae2a8ec WHIRLPOOL ff2d0c2cb51cae6f2db09321c116003cdc512940001a839424a6ba1ba47deadfe412d01a0e68285250f7dbd9bef454c99e302805defc91783f703863c344b182
diff --git a/net-dns/dnsmasq/dnsmasq-2.66.ebuild b/net-dns/dnsmasq/dnsmasq-2.66.ebuild
new file mode 100644
index 00000000000..74eef761c49
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.66.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools idn ipv6 lua nls script selinux tftp"
+DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
+for dm_lingua in ${DM_LINGUAS}; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua )
+ conntrack? ( !s390? ( net-libs/libnetfilter_conntrack ) )
+ nls? (
+ sys-devel/gettext
+ net-dns/libidn
+ )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ app-arch/xz-utils"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-dnsmasq )"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )
+ s390? ( !conntrack )"
+
+use_have() {
+ local NO_ONLY=""
+ if [ $1 == '-n' ]; then
+ NO_ONLY=1
+ shift
+ fi
+
+ local UWORD=${2:-$1}
+ UWORD=${UWORD^^*}
+
+ if ! use ${1}; then
+ echo " -DNO_${UWORD}"
+ elif [ -z "${NO_ONLY}" ]; then
+ echo " -DHAVE_${UWORD}"
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
+ epatch "${FILESDIR}/${P}-dhcp-option-zero.patch"
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have -n dhcp)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have -n ipv6)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use ipv6 && use dhcp || echo " -DNO_DHCP6")"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/wrt \
+ PREFIX=/usr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ local lingua
+ for lingua in ${DM_LINGUAS}; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ
+ dodoc -r logo
+
+ dodoc CHANGELOG FAQ
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 dnsmasq
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 dnsmasq
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/wrt/{dhcp_release,dhcp_lease_time}
+ doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1
+ fi
+
+ systemd_dounit "${FILESDIR}"/dnsmasq.service
+}
diff --git a/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild b/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild
new file mode 100644
index 00000000000..2f14c001a89
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn ipv6 lua nls script selinux static tftp"
+DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
+for dm_lingua in ${DM_LINGUAS}; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ lua? (
+ || (
+ dev-lang/lua:0
+ dev-lang/lua:5.1
+ )
+ )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? (
+ sys-devel/gettext
+ net-dns/libidn
+ )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? (
+ dev-libs/nettle[static-libs(+)]
+ )
+ )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword=${uword^^*}
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+
+ epatch "${FILESDIR}"/${P}-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch
+ epatch "${FILESDIR}"/${P}-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/wrt \
+ PREFIX=/usr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in ${DM_LINGUAS}; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ dodoc CHANGELOG FAQ
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/wrt/{dhcp_release,dhcp_lease_time}
+ doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/dnsmasq-2.75.ebuild b/net-dns/dnsmasq/dnsmasq-2.75.ebuild
new file mode 100644
index 00000000000..05bc1cd7314
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.75.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp"
+DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
+for dm_lingua in ${DM_LINGUAS}; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua:* )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? (
+ sys-devel/gettext
+ net-dns/libidn
+ )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? (
+ dev-libs/nettle[static-libs(+)]
+ )
+ )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword=${uword^^*}
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have -n inotify)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/wrt \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ COPTS="${COPTS}" \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in ${DM_LINGUAS}; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ dodoc CHANGELOG FAQ
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/wrt/{dhcp_release,dhcp_lease_time}
+ doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch
new file mode 100644
index 00000000000..38a3679bd24
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch
@@ -0,0 +1,16 @@
+diff -ur dnsmasq-2.47.orig/src/config.h dnsmasq-2.47/src/config.h
+--- dnsmasq-2.47.orig/src/config.h 2009-02-05 07:14:24.000000000 -0500
++++ dnsmasq-2.47/src/config.h 2009-03-30 00:04:52.000000000 -0400
+@@ -50,11 +50,7 @@
+ #endif
+
+ #ifndef CONFFILE
+-# if defined(__FreeBSD__)
+-# define CONFFILE "/usr/local/etc/dnsmasq.conf"
+-# else
+-# define CONFFILE "/etc/dnsmasq.conf"
+-# endif
++# define CONFFILE "/etc/dnsmasq.conf"
+ #endif
+
+ #define DEFLEASE 3600 /* default lease time, 1 hour */
diff --git a/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch b/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch
new file mode 100644
index 00000000000..6c52a533f1a
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch
@@ -0,0 +1,134 @@
+commit bd08ae67f9a0cae2ce15be885254cad9449d4551
+Author: Simon Kelley <simon@thekelleys.org.uk>
+Date: Fri Apr 19 10:22:06 2013 +0100
+
+ Allow option number zero in encapsulated DHCP options.
+
+diff --git a/src/dhcp-common.c b/src/dhcp-common.c
+index f4fd088..8de4268 100644
+--- a/src/dhcp-common.c
++++ b/src/dhcp-common.c
+@@ -512,7 +512,7 @@ void display_opts6(void)
+ }
+ #endif
+
+-u16 lookup_dhcp_opt(int prot, char *name)
++int lookup_dhcp_opt(int prot, char *name)
+ {
+ const struct opttab_t *t;
+ int i;
+@@ -528,10 +528,10 @@ u16 lookup_dhcp_opt(int prot, char *name)
+ if (strcasecmp(t[i].name, name) == 0)
+ return t[i].val;
+
+- return 0;
++ return -1;
+ }
+
+-u16 lookup_dhcp_len(int prot, u16 val)
++int lookup_dhcp_len(int prot, int val)
+ {
+ const struct opttab_t *t;
+ int i;
+diff --git a/src/dnsmasq.h b/src/dnsmasq.h
+index 69ae7a7..41e2798 100644
+--- a/src/dnsmasq.h
++++ b/src/dnsmasq.h
+@@ -1216,8 +1216,8 @@ void log_tags(struct dhcp_netid *netid, u32 xid);
+ int match_bytes(struct dhcp_opt *o, unsigned char *p, int len);
+ void dhcp_update_configs(struct dhcp_config *configs);
+ void display_opts(void);
+-u16 lookup_dhcp_opt(int prot, char *name);
+-u16 lookup_dhcp_len(int prot, u16 val);
++int lookup_dhcp_opt(int prot, char *name);
++int lookup_dhcp_len(int prot, int val);
+ char *option_string(int prot, unsigned int opt, unsigned char *val,
+ int opt_len, char *buf, int buf_len);
+ #ifdef HAVE_LINUX_NETWORK
+diff --git a/src/option.c b/src/option.c
+index b2596ec..2a61017 100644
+--- a/src/option.c
++++ b/src/option.c
+@@ -750,6 +750,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
+ struct dhcp_netid *np = NULL;
+ u16 opt_len = 0;
+ int is6 = 0;
++ int option_ok = 0;
+
+ new->len = 0;
+ new->flags = flags;
+@@ -769,16 +770,19 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
+ {
+ new->opt = atoi(arg);
+ opt_len = 0;
++ option_ok = 1;
+ break;
+ }
+
+ if (strstr(arg, "option:") == arg)
+ {
+- new->opt = lookup_dhcp_opt(AF_INET, arg+7);
+- opt_len = lookup_dhcp_len(AF_INET, new->opt);
+- /* option:<optname> must follow tag and vendor string. */
+- if ((opt_len & OT_INTERNAL) && flags != DHOPT_MATCH)
+- new->opt = 0;
++ if ((new->opt = lookup_dhcp_opt(AF_INET, arg+7)) != -1)
++ {
++ opt_len = lookup_dhcp_len(AF_INET, new->opt);
++ /* option:<optname> must follow tag and vendor string. */
++ if (!(opt_len & OT_INTERNAL) || flags == DHOPT_MATCH)
++ option_ok = 1;
++ }
+ break;
+ }
+ #ifdef HAVE_DHCP6
+@@ -792,13 +796,16 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
+ {
+ new->opt = atoi(arg+8);
+ opt_len = 0;
++ option_ok = 1;
+ }
+ else
+ {
+- new->opt = lookup_dhcp_opt(AF_INET6, arg+8);
+- opt_len = lookup_dhcp_len(AF_INET6, new->opt);
+- if ((opt_len & OT_INTERNAL) && flags != DHOPT_MATCH)
+- new->opt = 0;
++ if ((new->opt = lookup_dhcp_opt(AF_INET6, arg+8)) != -1)
++ {
++ opt_len = lookup_dhcp_len(AF_INET6, new->opt);
++ if (!(opt_len & OT_INTERNAL) || flags == DHOPT_MATCH)
++ option_ok = 1;
++ }
+ }
+ /* option6:<opt>|<optname> must follow tag and vendor string. */
+ is6 = 1;
+@@ -821,7 +828,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
+ new->flags |= DHOPT_RFC3925;
+ if (flags == DHOPT_MATCH)
+ {
+- new->opt = 1; /* avoid error below */
++ option_ok = 1;
+ break;
+ }
+ }
+@@ -848,16 +855,16 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
+
+ if (opt_len == 0 &&
+ !(new->flags & DHOPT_RFC3925))
+- opt_len = lookup_dhcp_len(AF_INET6 ,new->opt);
++ opt_len = lookup_dhcp_len(AF_INET6, new->opt);
+ }
+ else
+ #endif
+ if (opt_len == 0 &&
+ !(new->flags & (DHOPT_VENDOR | DHOPT_ENCAPSULATE | DHOPT_RFC3925)))
+- opt_len = lookup_dhcp_len(AF_INET ,new->opt);
++ opt_len = lookup_dhcp_len(AF_INET, new->opt);
+
+ /* option may be missing with rfc3925 match */
+- if (new->opt == 0)
++ if (!option_ok)
+ ret_err(_("bad dhcp-option"));
+
+ if (comma)
diff --git a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch
new file mode 100644
index 00000000000..57708b6f716
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch
@@ -0,0 +1,28 @@
+commit 04b0ac05377936d121a36873bb63d492cde292c9
+Author: Simon Kelley <simon@thekelleys.org.uk>
+Date: Mon Apr 6 17:19:13 2015 +0100
+
+ Fix crash caused by looking up servers.bind when many servers defined.
+
+diff --git a/src/cache.c b/src/cache.c
+index d7bea57..178d654 100644
+--- a/src/cache.c
++++ b/src/cache.c
+@@ -1367,7 +1367,7 @@ int cache_make_stat(struct txt_record *t)
+ }
+ port = prettyprint_addr(&serv->addr, daemon->addrbuff);
+ lenp = p++; /* length */
+- bytes_avail = (p - buff) + bufflen;
++ bytes_avail = bufflen - (p - buff );
+ bytes_needed = snprintf(p, bytes_avail, "%s#%d %u %u", daemon->addrbuff, port, queries, failed_queries);
+ if (bytes_needed >= bytes_avail)
+ {
+@@ -1381,7 +1381,7 @@ int cache_make_stat(struct txt_record *t)
+ lenp = p - 1;
+ buff = new;
+ bufflen = newlen;
+- bytes_avail = (p - buff) + bufflen;
++ bytes_avail = bufflen - (p - buff );
+ bytes_needed = snprintf(p, bytes_avail, "%s#%d %u %u", daemon->addrbuff, port, queries, failed_queries);
+ }
+ *lenp = bytes_needed;
diff --git a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch
new file mode 100644
index 00000000000..c6106db510d
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch
@@ -0,0 +1,40 @@
+commit ad4a8ff7d9097008d7623df8543df435bfddeac8
+Author: Simon Kelley <simon@thekelleys.org.uk>
+Date: Thu Apr 9 21:48:00 2015 +0100
+
+ Fix crash on receipt of certain malformed DNS requests.
+
+diff --git a/src/rfc1035.c b/src/rfc1035.c
+index 7a07b0c..a995ab5 100644
+--- a/src/rfc1035.c
++++ b/src/rfc1035.c
+@@ -1198,7 +1198,10 @@ unsigned int extract_request(struct dns_header *header, size_t qlen, char *name,
+ size_t setup_reply(struct dns_header *header, size_t qlen,
+ struct all_addr *addrp, unsigned int flags, unsigned long ttl)
+ {
+- unsigned char *p = skip_questions(header, qlen);
++ unsigned char *p;
++
++ if (!(p = skip_questions(header, qlen)))
++ return 0;
+
+ /* clear authoritative and truncated flags, set QR flag */
+ header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC)) | HB3_QR;
+@@ -1214,7 +1217,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen,
+ SET_RCODE(header, NOERROR); /* empty domain */
+ else if (flags == F_NXDOMAIN)
+ SET_RCODE(header, NXDOMAIN);
+- else if (p && flags == F_IPV4)
++ else if (flags == F_IPV4)
+ { /* we know the address */
+ SET_RCODE(header, NOERROR);
+ header->ancount = htons(1);
+@@ -1222,7 +1225,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen,
+ add_resource_record(header, NULL, NULL, sizeof(struct dns_header), &p, ttl, NULL, T_A, C_IN, "4", addrp);
+ }
+ #ifdef HAVE_IPV6
+- else if (p && flags == F_IPV6)
++ else if (flags == F_IPV6)
+ {
+ SET_RCODE(header, NOERROR);
+ header->ancount = htons(1);
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1
new file mode 100644
index 00000000000..07f0d2181d9
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+start_stop_daemon_args="--retry TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+start_pre() {
+ checkpath --owner dnsmasq:dnsmasq \
+ --mode 0644 \
+ --file /var/lib/misc/dnsmasq.leases
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ kill -HUP $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r2 b/net-dns/dnsmasq/files/dnsmasq-init-r2
new file mode 100644
index 00000000000..94627ef95b0
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-r2
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+start_stop_daemon_args="--retry TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ kill -HUP $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq.confd-r1 b/net-dns/dnsmasq/files/dnsmasq.confd-r1
new file mode 100644
index 00000000000..0e94463074c
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq.confd-r1
@@ -0,0 +1,4 @@
+# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq
+
+# See the dnsmasq(8) man page for possible options to put here.
+DNSMASQ_OPTS="--user=dnsmasq --group=dnsmasq"
diff --git a/net-dns/dnsmasq/files/dnsmasq.service b/net-dns/dnsmasq/files/dnsmasq.service
new file mode 100644
index 00000000000..8e313bcfd99
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=A lightweight DHCP and caching DNS server
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/sbin/dnsmasq --test
+ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnsmasq/files/dnsmasq.service-r1 b/net-dns/dnsmasq/files/dnsmasq.service-r1
new file mode 100644
index 00000000000..8e313bcfd99
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq.service-r1
@@ -0,0 +1,12 @@
+[Unit]
+Description=A lightweight DHCP and caching DNS server
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/sbin/dnsmasq --test
+ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml
new file mode 100644
index 00000000000..7d417df7940
--- /dev/null
+++ b/net-dns/dnsmasq/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>chutzpah@gentoo.org</email>
+<name>Patrick McLean</name>
+</maintainer>
+<use>
+ <flag name='auth-dns'>Add support for acting as an authorative DNS server.</flag>
+ <flag name='conntrack'>Add support for Linux conntrack connection marking.</flag>
+ <flag name='dhcp-tools'>Install extra command line tools for manually managing DHCP leases.</flag>
+ <flag name='dhcp'>Enable support for acting as a DHCP server.</flag>
+ <flag name='dnssec'>Enable support DNSSEC validation and caching.</flag>
+ <flag name='script'>Enable support for calling scripts when leases change.</flag>
+ <flag name='tftp'>Enables built in TFTP server for netbooting.</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:thekelleys:dnsmasq</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-dns/dnssec-check/Manifest b/net-dns/dnssec-check/Manifest
new file mode 100644
index 00000000000..d5e4bd1dbcf
--- /dev/null
+++ b/net-dns/dnssec-check/Manifest
@@ -0,0 +1,5 @@
+DIST dnssec-check-1.13.tar.gz 174175 SHA256 1c1d751aa39007736708930599b72236fc3abf2341e679cf1b44bf6a6395422b SHA512 452a312beba826a301800c678e00adb50188cba32008eb22fafd1044a922477ea2d399f4bf07057c839ffbd3057707081b5eec72eadbd1c41ced0c36168f24e6 WHIRLPOOL 5d4682ee59f4a203afaed7750bc1b98b6d627d5ad9ad5a5f771b818e0be1ba1f130853322e0fdd5686c21b44dd04272b1d3379e9f80297478d3bb67df31d549c
+DIST dnssec-check-1.14.0.1.tar.gz 174770 SHA256 28a02a7dd36eb49b8106520ab1ec3e14b8dddcccb3ed36e1d6a70fb12fe57418 SHA512 2902918f2452bc588332580c3cfa637854aa5791c9d72d8f928471a9baae7ad46b6b1d0b34099cca1ec43a5e7f426493a20df4414d8150f614775e245135dd9f WHIRLPOOL 6d59d0865c733065da2c600fde6275ecce1af0ccf245dd37e8622c5664cc35d9e0ab462aaf7c2d0ca9d666ec7f2ed2fb0a3e14f49d6de864cfd0e5527e217b87
+DIST dnssec-check-1.14.tar.gz 174645 SHA256 cb2d30484140105f745bc0fdb57d77408a419e9dd59ad5f721742eec36bf1566 SHA512 08ec062d8d24dfb602277279237ea8d591384c34c16617d11bdb512e948e08a851b4016bcc024bce8440038c116e8688de041d5a04ab92b054526a558a05601c WHIRLPOOL 51fad9a4a4b581e1f82e7f815c32317a8d5564c4f920459692199cf9dacba8ab870c9b4586bc7315368979bbee721435a6b755174f932602e261b642863d285e
+DIST dnssec-check-2.0.tar.gz 175161 SHA256 49ee6bf20ebcc555af14fb8fea02ec4b5e02a46324495aa3210aa942a1bfcf7e SHA512 9dfb4c05ffce6fd8e221c2c07e0214e5d8c822f4d03a2bbd723df4e32d6c5efba3ce810a0f941f6944314b028473e7916c0d32335406c8a8e8d6030ba7bb8878 WHIRLPOOL 36b8fbc0e25a7fa23f5146e889e2c7454337fc3dfe92f159c0dd8095f86b2e903b76890a3dbec2d91db97fb2fadaadd01ab30c742a21baa01f23c3cbd201c297
+DIST dnssec-check-2.1.tar.gz 174430 SHA256 f291b5e2b1e4016f903ece3ee46cccfe967980b92357ee57b960e9c68463d164 SHA512 0e42231680a62fc1c51f2df81ce874505581f65d8e27234d12132718a12069b922da744db43a1b91b81380c033aca527fb757b78ab85188ea7f04347211af479 WHIRLPOOL 03d976b74350323c8110cb066f0e4443d832dfe1622c2e85e86f5b86964cb124d6d3019e340db21862468ac17753ebbff8aa0866aea7ee9de79e21b0bf70a948
diff --git a/net-dns/dnssec-check/dnssec-check-1.13.ebuild b/net-dns/dnssec-check/dnssec-check-1.13.ebuild
new file mode 100644
index 00000000000..e9642827c7a
--- /dev/null
+++ b/net-dns/dnssec-check/dnssec-check-1.13.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+DESCRIPTION="tests local resolver for support of DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtdeclarative:4 "
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/installPrefix = /s: = .*: = /usr:' \
+ -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die
+ sed -e '/Exec=/s:/opt::' \
+ -i ${PN}.desktop || die
+}
+
+src_configure() {
+ eqmake4 ${PN}.pro
+}
diff --git a/net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild b/net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild
new file mode 100644
index 00000000000..384c2a6380f
--- /dev/null
+++ b/net-dns/dnssec-check/dnssec-check-1.14.0.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tests local resolver for support of DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtdeclarative:4 "
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/installPrefix = /s: = .*: = /usr:' \
+ -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die
+ sed -e '/Exec=/s:/opt::' \
+ -i ${PN}.desktop || die
+}
+
+src_configure() {
+ eqmake4 ${PN}.pro
+}
diff --git a/net-dns/dnssec-check/dnssec-check-1.14.ebuild b/net-dns/dnssec-check/dnssec-check-1.14.ebuild
new file mode 100644
index 00000000000..8d22113c9bc
--- /dev/null
+++ b/net-dns/dnssec-check/dnssec-check-1.14.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tests local resolver for support of DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtdeclarative:4 "
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-mainwindow.patch
+
+ sed -e '/installPrefix = /s: = .*: = /usr:' \
+ -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die
+ sed -e '/Exec=/s:/opt::' \
+ -i ${PN}.desktop || die
+}
+
+src_configure() {
+ eqmake4 ${PN}.pro
+}
diff --git a/net-dns/dnssec-check/dnssec-check-2.0.ebuild b/net-dns/dnssec-check/dnssec-check-2.0.ebuild
new file mode 100644
index 00000000000..384c2a6380f
--- /dev/null
+++ b/net-dns/dnssec-check/dnssec-check-2.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tests local resolver for support of DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtdeclarative:4 "
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/installPrefix = /s: = .*: = /usr:' \
+ -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die
+ sed -e '/Exec=/s:/opt::' \
+ -i ${PN}.desktop || die
+}
+
+src_configure() {
+ eqmake4 ${PN}.pro
+}
diff --git a/net-dns/dnssec-check/dnssec-check-2.1.ebuild b/net-dns/dnssec-check/dnssec-check-2.1.ebuild
new file mode 100644
index 00000000000..75aeb44ec02
--- /dev/null
+++ b/net-dns/dnssec-check/dnssec-check-2.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tests local resolver for support of DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtdeclarative:5"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/installPrefix = /s: = .*: = /usr:' \
+ -i qmlapplicationviewer/qmlapplicationviewer.pri deployment.pri || die
+ sed -e '/Exec=/s:/opt::' \
+ -i ${PN}.desktop || die
+}
+
+src_configure() {
+ eqmake4 ${PN}.pro
+}
diff --git a/net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch b/net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch
new file mode 100644
index 00000000000..98e959b8d74
--- /dev/null
+++ b/net-dns/dnssec-check/files/dnssec-check-1.14-mainwindow.patch
@@ -0,0 +1,11 @@
+--- dnssec-check-1.14/mainwindow.cpp
++++ dnssec-check-1.14/mainwindow.cpp
+@@ -372,7 +372,7 @@
+ }
+
+ accessURL.addQueryItem("locationDescription", locationDescription);
+- accessURL.addQueryItem("1.14");
++ accessURL.addQueryItem("DNSSECToolsVersion", "1.14");
+
+ if (!m_manager) {
+ m_manager = new QNetworkAccessManager();
diff --git a/net-dns/dnssec-check/metadata.xml b/net-dns/dnssec-check/metadata.xml
new file mode 100644
index 00000000000..59acc2cc580
--- /dev/null
+++ b/net-dns/dnssec-check/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-dns/dnssec-lookup/Manifest b/net-dns/dnssec-lookup/Manifest
new file mode 100644
index 00000000000..7e6c3661e0a
--- /dev/null
+++ b/net-dns/dnssec-lookup/Manifest
@@ -0,0 +1,4 @@
+DIST dnssec-lookup-1.14.tar.gz 37982 SHA256 9f046a3a81a74de16a28305b83274e1e9bf2529640e6a0f56bf673309b03e275 SHA512 3b81b5b5c2d0692e1b0bd6375655cb8c836df516404425064dffb562bdacd89c19be72f5bb2a1a09144ec483426b1803aef3dbb74945dc7fa8c0b693076bb230 WHIRLPOOL 3504ed6e76bd030c1ba920b4757b7d1bc965ddb3b4c530f23e184b93207b13f5d57bda331f5173b6c3e50064c428f743acd0a77fd1f2d11070fe48c913c55dfe
+DIST dnssec-lookup-2.0.tar.gz 38021 SHA256 9a0488338dcce708afc16497ecba8db2a3bc76f196f1b4d8a14c92b3c10ac768 SHA512 6662f1d4510d5025ed845028e3eaa0f13238c9a33e257abd3f45e8be9a52ae15538a79c618a28cd7182f7845bd23423e7dfebc16259fdde320c159e586e07854 WHIRLPOOL 535407af28c3d0326c447abb5dd3fe7746524ed91200db06c21874e86a9ebad66b610c176e5c0983d88a87176b6179854fe390afe2c8bfb2ac36b3bdb4ad7d3f
+DIST dnssec-lookup-2.1.tar.gz 36243 SHA256 b548ef509c2843c09aa32cab700286edac1718bf5583fdaef6e2811eb0a979ab SHA512 c1a90a354411904f5905cd343c30cccca215b60584fcd5ba0cf9643555b56bfb948a8f55a48dc7bc45bf14c1cc945694d308a684d71cc6b5ba8deae8716b7068 WHIRLPOOL 758901e1b992039f7d566a04fa4c510893bd72392c83e800c13bbf4079fc6aac932e04c82ed317fc9b4e2e9015d52ecf705a3e7f6999780a50323b8396d7d147
+DIST lookup-1.13.tar.gz 37986 SHA256 08f0777a79ec3c32e2db0026341c16509a798b6b89f1a49443b5e685ebfa51e3 SHA512 d16b611fc805a42b97e312b14bd7c8da1f099f9cfd8b9e946be7e2cdebffb92c527426d0c1f5fc53d3057635024b4a4c422080afdf3222fe8abbf76a05a23f68 WHIRLPOOL becd3c13adf84a89e6dc49699ada3910c06c8b5845c8771b2ed6e6ece939e837d63ca9d82bda0be05c388180fc66d0e255749ac1874e94e3dbd37532df811205
diff --git a/net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild
new file mode 100644
index 00000000000..ff7fbf85699
--- /dev/null
+++ b/net-dns/dnssec-lookup/dnssec-lookup-1.13.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+MY_PN=${PN/dnssec-/}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="DNS lookup utility that supports DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ eqmake4 ${MY_PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ newbin src/build/${MY_PN} ${PN}
+
+ newicon data/64x64/${MY_PN}.png ${PN}.png
+ newicon data/maemo/${MY_PN}.xpm ${PN}.xpm
+ make_desktop_entry ${PN}
+
+ newman man/${MY_PN}.1 ${PN}.1
+}
diff --git a/net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild
new file mode 100644
index 00000000000..3edac80270f
--- /dev/null
+++ b/net-dns/dnssec-lookup/dnssec-lookup-1.14.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+MY_PN=${PN/dnssec-/}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="DNS lookup utility that supports DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ eqmake4 ${MY_PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ newbin src/build/${MY_PN} ${PN}
+
+ newicon data/64x64/${MY_PN}.png ${PN}.png
+ newicon data/maemo/${MY_PN}.xpm ${PN}.xpm
+ make_desktop_entry ${PN}
+
+ newman man/${MY_PN}.1 ${PN}.1
+}
diff --git a/net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild
new file mode 100644
index 00000000000..4d2c93b9d30
--- /dev/null
+++ b/net-dns/dnssec-lookup/dnssec-lookup-2.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+MY_PN=${PN/dnssec-/}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="DNS lookup utility that supports DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ eqmake4 ${MY_PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ newbin src/build/${MY_PN} ${PN}
+
+ newicon data/64x64/${MY_PN}.png ${PN}.png
+ newicon data/maemo/${MY_PN}.xpm ${PN}.xpm
+ make_desktop_entry ${PN}
+
+ newman man/${MY_PN}.1 ${PN}.1
+}
diff --git a/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild
new file mode 100644
index 00000000000..16f0bc09503
--- /dev/null
+++ b/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+MY_PN=${PN/dnssec-/}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="DNS lookup utility that supports DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ eqmake4 ${MY_PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ newbin src/build/${MY_PN} ${PN}
+
+ newicon data/64x64/${MY_PN}.png ${PN}.png
+ newicon data/maemo/${MY_PN}.xpm ${PN}.xpm
+ make_desktop_entry ${PN}
+
+ newman man/${MY_PN}.1 ${PN}.1
+}
diff --git a/net-dns/dnssec-lookup/metadata.xml b/net-dns/dnssec-lookup/metadata.xml
new file mode 100644
index 00000000000..a3a94e23ba2
--- /dev/null
+++ b/net-dns/dnssec-lookup/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<longdescription lang="en">
+ Lookup is a simple graphical utility that can be used to query a network for domain name records.
+ The tool understands DNSSEC and color-codes the results based on whether
+ the record has been securely validated (green), is a 'trusted' answer but not validated (yellow),
+ or fails DNSSEC validation (red).
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-dns/dnssec-nodes/Manifest b/net-dns/dnssec-nodes/Manifest
new file mode 100644
index 00000000000..4665ad5968d
--- /dev/null
+++ b/net-dns/dnssec-nodes/Manifest
@@ -0,0 +1,4 @@
+DIST dnssec-nodes-1.13.tar.gz 72392 SHA256 8d3d2c92a9f66d18a46e8fba2d2a87f468b6dcfe7e9866d8df822e08ad910311 SHA512 df4c35d1e3956e81969184ebae802c5fa73687367607b6fd7b154a87e63268211740664c44593ef44abf0ade89b8f0314bca02e3f1694bc71eba7c2aa8ee9b8d WHIRLPOOL c32a00d78580a0214bf6e119125f0b86355fe9e76eee520e692b29c94605104998ffa7f47782c9096179bea60582621fb942bf77c308c2da304f8c8c7752489c
+DIST dnssec-nodes-1.14.tar.gz 88909 SHA256 5fc8e5603eac209ac7ffb47dab3b93adce71c17a7859002025e9f1535889ca68 SHA512 81cd727fd0620054dcf63f645405eef43362fe3874f8beab24303de8f8c4db94bd6441847da2cd264b66e991eb5d43e72e0db65664f137d1525af84aa8b2f298 WHIRLPOOL 46a4c64dc2a5aca5d43dfb67e578f2b096f9bf2d9d165dce4b352332f206c0e6623c27b44f223cd125013461d7d4f2f60f75c12891a8e251751ff2e68b966573
+DIST dnssec-nodes-2.0.tar.gz 96987 SHA256 d4948b6b997d64d171a793f90f8f5fcfd1f2865a49d3d2ac2212134140ecd70c SHA512 908de98a7b9709ec63b54876a2c8abe5744c83782eefde7c5cde1a39e18c86093dbb6271cb36e236d5ccec960c34262412737c620f23f0941f7dd64fbe8bcce5 WHIRLPOOL 10ac03c9a4527e1a4a7b62729a067dac0a6d89e7e5e1f5026f908872b1f9b04f3573324a7c06afae44a8d00ff266fea508a7c4aad385c9680481fb6d17636bca
+DIST dnssec-nodes-2.1.tar.gz 98582 SHA256 a6ba404635527ab519bea2317616b1b7f104eff12eefc41cc578a4e5ae0f66cc SHA512 2c532eccdfaedc2994e0edd529dfb6d550c40721053732e3e64d094c18ba3fd67f803151804996ece978f55dcfd443de08e0577d501074e57543dd630dc33d2c WHIRLPOOL f38ad0168933241614bb1dd4f4c36097f34a2a59798d8eecbba2dd9a9bc0934d8498644eb831110862c5cebc9221001da7ce164f35e8e58e4c3cf90c4bc90d9f
diff --git a/net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild
new file mode 100644
index 00000000000..3994e5a9ca2
--- /dev/null
+++ b/net-dns/dnssec-nodes/dnssec-nodes-1.13.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/dnssec-nodes.*
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild
new file mode 100644
index 00000000000..a6ad81f5c31
--- /dev/null
+++ b/net-dns/dnssec-nodes/dnssec-nodes-1.14.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/dnssec-nodes.*
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild
new file mode 100644
index 00000000000..a6ad81f5c31
--- /dev/null
+++ b/net-dns/dnssec-nodes/dnssec-nodes-2.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/dnssec-nodes.*
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild
new file mode 100644
index 00000000000..ed56c4754c1
--- /dev/null
+++ b/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/dnssec-nodes.*
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-nodes/metadata.xml b/net-dns/dnssec-nodes/metadata.xml
new file mode 100644
index 00000000000..59acc2cc580
--- /dev/null
+++ b/net-dns/dnssec-nodes/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-dns/dnssec-root/Manifest b/net-dns/dnssec-root/Manifest
new file mode 100644
index 00000000000..f611227c77c
--- /dev/null
+++ b/net-dns/dnssec-root/Manifest
@@ -0,0 +1,17 @@
+DIST Kjqmt7v-20100715.csr 765 SHA256 401120c1721ba100b2d9abf2d01332399535ba0f9c71dbd9f97232c5ebd608d2 SHA512 8e47be5054bbb801cb914d94a6f0d1e6b9b2eba387714f011f118bf8af6dacfe24a2dec80525ad005c545fa15fd8413cf90615e6d5c50d7925daa4aefff77112 WHIRLPOOL 26b495b38e6d04baea8f7ee5354fa3b68153cc25baa6657b9b74d04ae52fa43562f422eb8188c2538314a8f7de3bb79b34bf011db542b6cde877bc94501d5377
+DIST Kjqmt7v-20110630.crt 974 SHA256 17e0f21c31f811685388b14dcd7c97dcfc92e23b03896827bbc7ff2f0c54c252 SHA512 dd208ee38e7652cbd6796ca1574ada288cb950ec9f39d994e4f32161f1b9b281da1cd8820d7b4727caaeb54c8ae0adcdd130e55f75c48721e899ebfbbaefa3fa WHIRLPOOL 4206b6c21f6cac68f6db116d063ab0373cf4e3060ba19bd68e79f0f807acf41f7d27cdf7ef567daa5e3c383a4bee5fa7ca6ea40bfc13fde9eb481e0479c26678
+DIST Kjqmt7v-20150504.crt 974 SHA256 8b9c12c9e51d8a911d9527a58cc59da2f14286e064688b45ce4b6b74b55dccb9 SHA512 98adfc6a5d37c632eda9f642449ecd6c1bf1d49ebed2750cfe3bd99629b4935f51ecc4aafbd6ea69595b2f2cb15887bd9a1647aa255a564263f5c7b648c7adf1 WHIRLPOOL e22072d6415ae9e9ae0c031b2ed386a0971f92a92bbfe9213fe8b4dca24596c597df7f12d95131e6e4e76cddd350c39f868134d724dccedac4a4bfe21c6d5a3b
+DIST Kjqmt7v.crt 974 SHA256 ad068d18531618a9f1d0b68ffd84c87fbb5b8c2aea0288122a2eae8ad1190c2f SHA512 b0c85c17439b3a9323390217edf72f67a91a36b509a68470543b4dc1a3cce6a73065e989dee10ae070e5d2100e026af1d01ab8c000447ae4bbe64c21451d1081 WHIRLPOOL 5ce715f406d3682d50fa123f0846d94e3834b29012c406b5f96c2f908e480e35c3ad71a6c92d96a11350bfd3aea26084d55c6273ca24ba9816125bce3a661519
+DIST Kjqmt7v.csr 765 SHA256 401120c1721ba100b2d9abf2d01332399535ba0f9c71dbd9f97232c5ebd608d2 SHA512 8e47be5054bbb801cb914d94a6f0d1e6b9b2eba387714f011f118bf8af6dacfe24a2dec80525ad005c545fa15fd8413cf90615e6d5c50d7925daa4aefff77112 WHIRLPOOL 26b495b38e6d04baea8f7ee5354fa3b68153cc25baa6657b9b74d04ae52fa43562f422eb8188c2538314a8f7de3bb79b34bf011db542b6cde877bc94501d5377
+DIST icann-20110715.pgp 3401 SHA256 3e9beaaf9bbd1fe78a0d104230cbc04d544e833a2dc6b982992f74a4860a9ae8 SHA512 5fba8334850f2ae753f4f8a30d1e6c62abc341ece2dc83df4bc0f6db2b91ae68942c0d2a38eab3d33b5b91640cd1cf0970777225c15d5f961884c00077d539a2 WHIRLPOOL d2758930820d90077c8084e8c95e0bacc361d78b68d150d3b271ed32abeb2272f95f9a2d23ed5aaab25a31fe3fba66554622ef5c9a04002b595b5f2e66b732b0
+DIST icann.pgp 2097 SHA256 aaa2c7f6230c49b94af57931cfdd2452d24245b917a27110b28e952975b8c5be SHA512 db6c917bd5a6141beb8f6ce5d601541fe222446e330ab7c598d6e355315a354f14b117731213863fea28a0ca7d5b12a6b91ac32f5e55cc476a7d1dbb437abbab WHIRLPOOL 9983ea5949115a5011c5543f82798746ed5ec193bbac47f71229b7433964e699abef2998fbcb044b15814fbe82eb5edf017731f668a7cfdaf2a5c78505bddb86
+DIST icannbundle-20100715.pem 17699 SHA256 c4a91c4bea6763f4ef05ca92bf74fb41d5583594c04aa999c90a55d710a3e5da SHA512 36ce5025acc447f740222dd5f794fd848540731792441c6e50b0260411ea8d30b7d2b97a53a26d0469f3315d5881acb5e2b92a904413939db9a6b64ffd6e0f2b WHIRLPOOL e1bef240ce34051485d4046568445fc4ab32e4d0605b224d6dd3b8840218ebd00e903cc26cf0b15e99250d9667015479db20264a0e8cb7a1e17c3a24eea9cc86
+DIST icannbundle-20150504.pem 17435 SHA256 b405ff8320aa0eecd8eae98edfcdb106eec6077e0470cf5e1c21b1db6b346534 SHA512 f9b9e43ad71608921d1e79f25cd98ca8c712256d4e31b04035a9aac7b46f3ec951089ca23e84500c5901d53afb66991a30818b4cd6f6de6885a107f486f56994 WHIRLPOOL 1f2431a1b65829844e1d864936fc4c0bf1a8bbc22b4344db764772bec4f2d074a37f6f333ded78e9e277c298df7db13201324397cf924f142d039f0433bad105
+DIST icannbundle.pem 17699 SHA256 c4a91c4bea6763f4ef05ca92bf74fb41d5583594c04aa999c90a55d710a3e5da SHA512 36ce5025acc447f740222dd5f794fd848540731792441c6e50b0260411ea8d30b7d2b97a53a26d0469f3315d5881acb5e2b92a904413939db9a6b64ffd6e0f2b WHIRLPOOL e1bef240ce34051485d4046568445fc4ab32e4d0605b224d6dd3b8840218ebd00e903cc26cf0b15e99250d9667015479db20264a0e8cb7a1e17c3a24eea9cc86
+DIST root-anchors-20100715.asc 189 SHA256 5bffcac53f810c5fb1e1baf543e2de2f10ec99d7f7cddb5f1e47b1e58cf34cfa SHA512 e9c86b897d7e8edb979cba4bebe353b7c7f21b4061cd6f571c8671b02e73c2ea0b78a980169fa7d40987b9e962a0f1ba17dbb392b5ec6ad14fedce65a139c913 WHIRLPOOL a422b8c473aa4cfa61d6a22ea748b972acc3242da7bb90a5b44b5e291210e24ca16ce4876dcc17b71c3694e9f58da4355a5ec1cb1c2950496d87cbfadc7944c5
+DIST root-anchors-20100715.xml 418 SHA256 dfb281b771dc854c18d1cff9d2eecaf184cf7a9668606aaa33e8f01bf4b4d8e4 SHA512 bca506c852bc83aa9d04ed0b52bef6d0baec745e466292273d52f49fd73cec73db4c6d55a9921fe086c7edc618f3ab21dc03146b6d617644495b3926e262e572 WHIRLPOOL 952aa6ba26495859fc4bc4e9f689b728373cc9e62ae64f833d9b894f8902be858371c88619ed4e10fb2557181442bb5d97781a75c6866a83d7fc8b43899a1b70
+DIST root-anchors-20110630.p7s 5001 SHA256 d74ca12899a150ea75b537cb77b0e55046cdad495349422fe1d858cc89f21c5b SHA512 384080488923cd855b6c1f7aaa9021630ab2cce51f0aee3d0561940d2668ee15e612949fe8398e59b4274968f6116e033e8d88ffe8375852864d9dd5f6df4852 WHIRLPOOL 26fda6fc9f710fc9f9f200bdd2ffd94782cf844e5ae1dfb6511affaea62495ebd9ea7a5b009c07a1256050bbb343642da11d9d29130847e9b704441453a16597
+DIST root-anchors-20150504.p7s 5001 SHA256 bd42aa218a6ca09eb6c5f194aeb70dc95c56a0ad051f644b9772da32e65d5a61 SHA512 af188871f2ef7f9efb0d3f4822754e962fb921d62de925823f90a0c7dbe80b7a0188534adbdb324680ae981912968fcfa851eb72fb37694df8701fd749e7ff51 WHIRLPOOL 24cf2be6cf755ac6b5c3ebf267c0de02702a51db490849ec63c4e66ac27d57c0d337375b96e787d6b2a4f1eab5517b1f4ec10b76c42b293d2e529cb10af4cfb6
+DIST root-anchors.asc 189 SHA256 5bffcac53f810c5fb1e1baf543e2de2f10ec99d7f7cddb5f1e47b1e58cf34cfa SHA512 e9c86b897d7e8edb979cba4bebe353b7c7f21b4061cd6f571c8671b02e73c2ea0b78a980169fa7d40987b9e962a0f1ba17dbb392b5ec6ad14fedce65a139c913 WHIRLPOOL a422b8c473aa4cfa61d6a22ea748b972acc3242da7bb90a5b44b5e291210e24ca16ce4876dcc17b71c3694e9f58da4355a5ec1cb1c2950496d87cbfadc7944c5
+DIST root-anchors.p7s 5001 SHA256 62eba1622ebf8f87b3125f4f9e686cefd952f805696cab0fc24c96eccd7c6f49 SHA512 a9dda6e8785cb1675128f90b181f6100055894e5c8c7f8e7cbdcac82d4a0b3a2a00f57421b81a5093c4b283a75dc63e1e21e10f8c350e7404bba7c5e13fad28a WHIRLPOOL 55f3e2a9d53a0da773b2bdeb77649c44abf6e4d9dd52134e0cfd4165f50cdd9714d4ea88892cb47d1d9ce1ae8af9e9107f07c3b2d7770f9a0fa322b881a91e9f
+DIST root-anchors.xml 418 SHA256 dfb281b771dc854c18d1cff9d2eecaf184cf7a9668606aaa33e8f01bf4b4d8e4 SHA512 bca506c852bc83aa9d04ed0b52bef6d0baec745e466292273d52f49fd73cec73db4c6d55a9921fe086c7edc618f3ab21dc03146b6d617644495b3926e262e572 WHIRLPOOL 952aa6ba26495859fc4bc4e9f689b728373cc9e62ae64f833d9b894f8902be858371c88619ed4e10fb2557181442bb5d97781a75c6866a83d7fc8b43899a1b70
diff --git a/net-dns/dnssec-root/dnssec-root-20100715.ebuild b/net-dns/dnssec-root/dnssec-root-20100715.ebuild
new file mode 100644
index 00000000000..0b1ef1285b9
--- /dev/null
+++ b/net-dns/dnssec-root/dnssec-root-20100715.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="The DNSSEC root key(s)"
+HOMEPAGE="https://www.iana.org/dnssec/"
+SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml
+ http://data.iana.org/root-anchors/Kjqmt7v.csr
+ test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt
+ http://data.iana.org/root-anchors/root-anchors.p7s
+ http://data.iana.org/root-anchors/root-anchors.asc
+ http://data.iana.org/root-anchors/icannbundle.pem
+ http://data.iana.org/root-anchors/icann.pgp
+ )"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="test"
+
+DEPEND="dev-libs/libxslt
+ test? ( app-crypt/gnupg )"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+# xsl and checking as per:
+# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039
+
+src_unpack() { :; }
+
+src_compile() {
+ xsltproc -o "${S}"/root-anchors.txt "${FILESDIR}"/anchors2ds.xsl "${DISTDIR}"/root-anchors.xml || die 'xsl translation failed'
+}
+
+src_test()
+{
+ gpg --import "${DISTDIR}"/icann.pgp || die 'icann key import failed'
+ gpg --verify "${DISTDIR}"/root-anchors.asc "${DISTDIR}"/root-anchors.xml || \
+ die 'gpg verification of the root key failed'
+ openssl smime -verify -content "${DISTDIR}"/root-anchors.xml \
+ -in "${DISTDIR}"/root-anchors.p7s -inform der \
+ -CAfile "${DISTDIR}"/icannbundle.pem \
+ || die 'smime verification of the root key failed'
+}
+
+src_install() {
+ insinto /etc/dnssec
+ doins root-anchors.txt "${DISTDIR}"/root-anchors.xml "${DISTDIR}"/Kjqmt7v.csr || die
+}
diff --git a/net-dns/dnssec-root/dnssec-root-20110630.ebuild b/net-dns/dnssec-root/dnssec-root-20110630.ebuild
new file mode 100644
index 00000000000..9e76945581e
--- /dev/null
+++ b/net-dns/dnssec-root/dnssec-root-20110630.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="The DNSSEC root key(s)"
+HOMEPAGE="https://www.iana.org/dnssec/"
+SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-20100715.xml
+ http://data.iana.org/root-anchors/Kjqmt7v.csr -> Kjqmt7v-20100715.csr
+ test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt -> Kjqmt7v-20110630.crt
+ http://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-20110630.p7s
+ http://data.iana.org/root-anchors/root-anchors.asc -> root-anchors-20100715.asc
+ http://data.iana.org/root-anchors/icannbundle.pem -> icannbundle-20100715.pem
+ http://data.iana.org/root-anchors/icann.pgp -> icann-20110715.pgp
+ )"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x64-macos"
+IUSE="test"
+
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND="dev-libs/libxslt
+ test? ( app-crypt/gnupg
+ dev-libs/openssl )"
+
+S="${WORKDIR}"
+
+# xsl and checking as per:
+# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039
+
+src_unpack() {
+ return
+}
+
+src_compile() {
+ xsltproc -o root-anchors-20100715.txt "${FILESDIR}"/anchors2ds.xsl "${DISTDIR}"/root-anchors-20100715.xml || die 'xsl translation failed'
+}
+
+src_test() {
+ # icann.pgp contains an expired key
+ # gpg --import "${DISTDIR}"/icann.pgp || die 'icann key import failed'
+ gpg --import \
+ "${FILESDIR}"/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc || die
+ gpg --verify \
+ "${DISTDIR}"/root-anchors-20100715.asc \
+ "${DISTDIR}"/root-anchors-20100715.xml || die
+ openssl smime -verify \
+ -content "${DISTDIR}"/root-anchors-20100715.xml \
+ -in "${DISTDIR}"/root-anchors-20110630.p7s -inform der \
+ -CAfile "${DISTDIR}"/icannbundle-20100715.pem || die
+}
+
+src_install() {
+ insinto /etc/dnssec
+ newins root-anchors-20100715.txt root-anchors.txt
+ newins "${DISTDIR}"/root-anchors-20100715.xml root-anchors.xml
+ newins "${DISTDIR}"/Kjqmt7v-20100715.csr Kjqmt7v.csr
+}
diff --git a/net-dns/dnssec-root/dnssec-root-20150403.ebuild b/net-dns/dnssec-root/dnssec-root-20150403.ebuild
new file mode 100644
index 00000000000..fa75ecf2b17
--- /dev/null
+++ b/net-dns/dnssec-root/dnssec-root-20150403.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The DNSSEC root key(s)"
+HOMEPAGE="https://www.iana.org/dnssec/"
+DATE_ISSUE1=20100715 # Original root-anchor creation date
+DATE_ISSUE2=20110715 # ICANN PGP key updated
+DATE_ISSUE3=20150504 # Subordinate CAs updated
+ICANN_PGP_FINGERPRINT='2FBB91BCAAEE0ABE1F8031C7D1AFBCE00F6C91D2'
+# The naming of the files really needs some improvement upstream:
+# root-anchors.p7s despite it's name, is mostly the the same data as
+# icannbundle.pem
+SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-${DATE_ISSUE1}.xml
+ http://data.iana.org/root-anchors/Kjqmt7v.csr -> Kjqmt7v-${DATE_ISSUE1}.csr
+ test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt -> Kjqmt7v-${DATE_ISSUE3}.crt
+ http://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-${DATE_ISSUE3}.p7s
+ http://data.iana.org/root-anchors/root-anchors.asc -> root-anchors-${DATE_ISSUE1}.asc
+ http://data.iana.org/root-anchors/icannbundle.pem -> icannbundle-${DATE_ISSUE3}.pem
+ http://data.iana.org/root-anchors/icann.pgp -> icann-${DATE_ISSUE2}.pgp
+ )"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
+IUSE="test"
+
+RDEPEND=""
+DEPEND="dev-libs/libxslt
+ test? ( app-crypt/gnupg
+ dev-libs/openssl )"
+
+S="${WORKDIR}"
+
+# xsl and checking as per:
+# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039
+
+src_unpack() {
+ return
+}
+
+src_prepare() {
+ return
+}
+
+src_compile() {
+ xsltproc \
+ -o root-anchors-${DATE_ISSUE1}.txt \
+ "${FILESDIR}"/anchors2ds.xsl \
+ "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml \
+ || die 'xsl translation failed'
+}
+
+src_test() {
+ # This is a terrible catch-22 of security, since we get the ICANN key from the
+ # same site! We verify the fingerprint ourselves in case
+ gpg --import "${DISTDIR}"/icann-${DATE_ISSUE2}.pgp || die 'ICANN key import failed'
+ gpg --fingerprint --with-colon --list-keys \
+ | grep '^fpr:' | fgrep ":$ICANN_PGP_FINGERPRINT:" \
+ || die "ICANN key fingerprint mismatch!"
+ #gpg --import \
+ # "${FILESDIR}"/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc || die
+ gpg --verify \
+ "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.asc \
+ "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml || die "GPG verify failed"
+ openssl smime -verify \
+ -content "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml \
+ -in "${DISTDIR}"/root-anchors-${DATE_ISSUE3}.p7s -inform der \
+ -CAfile "${DISTDIR}"/icannbundle-${DATE_ISSUE3}.pem || die "OpenSSL smime verify failed"
+}
+
+src_install() {
+ insinto /etc/dnssec
+ newins root-anchors-${DATE_ISSUE1}.txt root-anchors.txt
+ newins "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml root-anchors.xml
+ # What actually uses the DER-format certificate request out of the box?
+ # Wouldn't icannbundle.pem or Kjqmt7v.crt (converted to PEM format) be more
+ # useful?
+ newins "${DISTDIR}"/Kjqmt7v-${DATE_ISSUE1}.csr Kjqmt7v.csr
+}
diff --git a/net-dns/dnssec-root/files/anchors2ds.xsl b/net-dns/dnssec-root/files/anchors2ds.xsl
new file mode 100644
index 00000000000..3df47e20759
--- /dev/null
+++ b/net-dns/dnssec-root/files/anchors2ds.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="text"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="/TrustAnchor">
+ <xsl:apply-templates select="Zone"/>
+ <xsl:apply-templates select="KeyDigest"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="KeyDigest">
+ <xsl:apply-templates select="KeyTag"/>
+ <xsl:apply-templates select="Algorithm"/>
+ <xsl:apply-templates select="DigestType"/>
+ <xsl:apply-templates select="Digest"/>
+ </xsl:template>
+
+ <xsl:template match="Zone">
+ <xsl:value-of select="text()"/><xsl:text> IN DS </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="*">
+ <xsl:value-of select="text()"/><xsl:text> </xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc b/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc
new file mode 100644
index 00000000000..0653a2bb0cf
--- /dev/null
+++ b/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc
@@ -0,0 +1,70 @@
+Downloaded from http://pgp.mit.edu:11371/pks/lookup?search=dnssec%40iana.org&op=index
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: SKS 1.1.0
+
+mQGiBEdQucgRBACuD4uIRQ9Or2yKfGZtqxSd7/yp20VoZaNafP85OlJfOs9yjgdNv8kSd3+2
+lBXGwJxgOzkssbgZ14O1U3au494WicvR0gF7cLRZBeqpdZetpm7gl5n2/WGRyKifoGCMZqFk
+sFrR7BZerkOSUIqrMhtJMwKUxe5sks0WSgwifRchOwCgoezH1Uo9pdbpsW+8EIDe22HRX4sD
+/ivbf1kX6QPE7VbMYQppM/jF7mRtZO9oXzMhg9hjycK8Ir04FfqpvPCfA1TNG/l8j/dbQaJP
+bHHyI9PQIeikuVAQDuY+acT34GkZQxBcqAyMeRqW17LlZwl1l7u5sDiWwJIR3TzjXhpSjd0q
+1HPTwcGDyHulCHFyuCVw7323qB3iBACLezRPBN4Nrz29AcQu0NQAlMwcr/HLq2QfMevCpDpF
+pM3WuiSV+NtpDt9C/OmxWaYiFFYDEOy8HLuEuVNaMb9Xi5D8QmtWwgAMW54gBuExByt2NwJz
+7kxFf6ve4wdH6/Uzgn8FdJIDaMjZYuY3au4XkkL8nKKI7nFxiu1xAnwy3bQgRE5TU0VDIE1h
+bmFnZXIgPGRuc3NlY0BpYW5hLm9yZz6IRgQQEQIABgUCR2lOYwAKCRDDn1I07Bb/s8jPAJ9G
+L7P+9noZ3ZssEp6Ak6+F5kxaaACdELBwHA9gyzbdopWM6aQWuCpm1vGIRgQQEQIABgUCR2rL
+VQAKCRAEgcOX5y1fMJThAJ9AudOvaZ8socdOVS6WD3udbl7KGwCg6s0bH8eFJZk0JZjcj7w0
+yJ2u59eIRgQQEQIABgUCR9kwrAAKCRC039xrdgkih/h1AJ9PhfT+vlasg1Bg8RiG7QufWYuI
+VQCgwmRRlbblIyWUMopceIuoc5BQtFeIRgQQEQIABgUCSQwilAAKCRDcB4+iybQoSPw2AJ4/
+p9ZbZ0NckpUTUD+kKDwRrOlOIgCfYb9ZgHgntqn2dfNsg9j4WUgBd6GIRgQQEQIABgUCTHt1
+6QAKCRBvVseiT09y3VANAKCCEsh3Aqb76bLM1taqf5E0eikbVgCfQVMCgg5bbSWXK3QDy67x
+hUltejOIRgQQEQIABgUCTRB61QAKCRDTb+kxkMzVxf6XAKCl5Z1NhOUWl0mCKwauwSaip24f
+xQCbBPzeQXzkkgO/CLh0+kVncyeolsCIYAQTEQIAIAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4B
+AheABQJOFzMgAAoJENGvvOAPbJHSEc8AnR2zvLg6Vq2X2GnU/pRMMxo1Z6gcAJ47rxPrKlC2
+5gchV6ON+1pxxVqvSohmBBMRAgAmAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AFAkdQvM0F
+CQJRRfkACgkQ0a+84A9skdJ3VACfehjhB59K5sFj8Td3jK70CrBqitgAn32RtmDQY1XDBB/7
+0JqJqN8jQ6lEiGYEExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCSa5MhwUJBh/5
+qQAKCRDRr7zgD2yR0u6cAJwLJY/HHnInhWEs8gthvEFb5HjhMQCfcDlaXb7zq44k08l7F69v
+12N69YOIZgQTEQIAJgIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJLDbx/BQkHf2muAAoJ
+ENGvvOAPbJHSXQ4AniPWf4jcO1BkPy3IODEMLjsRiTROAJ4wjB9pYcOYETm56q7UT82maCvk
+SIkBnAQTAQIABgUCThZ/jAAKCRDnlgTn1butoxbtC/wJltFxMtCH2Wm+SJrpZfhZKLB+0Zrg
+PRiNRHu7Z75lukX0ozpA7qd7N/M31P6cSdnQkWKjvznUc2XPb3Xb+DX4dapKm//9h7fwq3Rm
+h5FmAaorqbWVW3RqK4aO3E6pTdnw0wo/m4/oa2UGoM21g3Is2Kwl+/EeMP8pcqtznEJSEarR
+XUW1vdMFSQ/ZRkNshq5NnS5Auhf8uDGyntua+7kpE5fE0pRqOZzGGf2dhOesq6JcrsxD5U6i
+6rgkM6ZLVflvi9+z4iY78kapuE/dTag8vIlCPPxdcoBsX4aL0Pl++9948kFz5wB9ZFrK2JMj
+hTqRcayDwVKsbRXmh5sJOm07IRRS4QHVEUOM4USBVyi1aFL7CQ2Wx2BDIUzBD8vsMvt8eTwX
+R0HFZM//BM7eOF6HanPBlabQMVbqWg/psBx1LSUo+SbXROd2xlwWMQup+oBhaEtbXoSm9rNG
+Rz4/484U/wlT2PUFfG1M5vdkNdd+EzJ7tf/W/2YTNB6Ni5wN5M2JAhwEEAECAAYFAkw/NtIA
+CgkQUu5GRRsT94z9Og//dPvrI5ykvC6eSj07aAe+QMPapg0UEZpkol34rcS6cdSS1tPQXp36
+tHDmGG0kGZ80l0RTl/wF2iqJpOhunfeT32AUzjo6pnhPIJx4yXurboJ+yGOXb3mSmElhPk5p
+LDWBl4BGvBWJw7H5nFznIl1U6fCy4Aye4hedeyxuKnHY1gW/p6mMnpjg6aiNGpiRRQvGLmSU
+B2RxPvrP9qTTYc15Q0VFeePi3C+5fnPr6WO08sh9h3GVeU+UgIj2dbslUHY+qA/yk5Dcgl71
+wrUKqIBvSQAG5GrkTWdQe8NkN8WYrrzSQnePUtDD/bsQ/YOyFvbEAUNRRMrKcvnEMdA3kQva
++ekq1l3emjqYov3vLuGOdXKA9N0Bwzw083wNDmb8WXwhlyZ6swJ7qbSBHC8UyZLU3MHg9Q7m
+x1HxPQ/6Zz+zMoPv9N0Sh1fdwZNR4vwISKpI6c5REs/ZSbJucAZqHiVYW/VU5I3051KTUFCF
+u9E99WqkBS1ECt/XN+tYVGVtj8I3SHbhpjgkrKWNIs3QQZ1vrerKfkn3V0PiyqSi4zWX6xo/
+RAlYnSjWMfjMgO4Xznd6AhDL5B4oxH7VIfju/EExbXm3rswZaf/6Dyebt1qdJImAWXCSD/Na
+X6gYZA7/dOWcef0yOegitn85EjqDbJphLd/tQE2Ame73IoPBCTC1rAKJAhwEEAECAAYFAkx7
+c7EACgkQqSHyOYuTc5ICDw//Tm8X1gD3vjjukpJXX2JH+k41abPYPK/DWrfSzmIj8v1hF4Fb
+TJoGedk8thAavv3dm/9N1gPlN/HaQtHHe3886b6LgfG9el5eU3HJdt/9SEfi6QiWDxNioiB/
+HYCN6QavUcAkjK9YklptTZ5bNGjGjQFG0/hJQAYcIqATQXlBsxVqaj87Kjspzs5e/0uQOs/v
+dB6iFt2TCo7lmU1/WOOul9FeEfUD7GIugq4DlRmsCqnbq8BgdITRuq25gsNQtocwM+K5YJsm
+uXOr3hvILjs3yIuQUg+womZt2e1HSRgIVT2NCbmHhtt97NaYGzPzGmlkuVEuhK09iLLe9umD
+LSz9QG+F/QuP4w46kHc32NEt3UALDoafK5WJsTx6p5Z8tDoiFs44YNR1ZpE1NV5nU9Bnl5Gc
+7NJD6PJxu+jBWEor0jxCvUAwX1TI3Pd50H2vWuAiYXl5SNxogz/Kv1Kx/Nb/jGupaT4B5O2N
+ysokvd+44zC6gMIbCF69t3cTq5aju6dCw962ZNd+yCEwMwJT1rnwL1len0VIy6aI0E2LSfRf
+lLq3GH4QncuU6u58zsw/gOyMbsBXKT4j0SEfCDhOm10Lj8jl4fqbT/Yej3nG3T/56135/Son
+wV5eQEc4U7MTKsSyP3Li2ANf0O+/GhxpCQQXm9ej/4TwAA6LVrW844WiT3C5Ag0ER1C5yBAI
+AO+lHy/JBdvBMwvF6Xn/75CxeV0ehjJ2XAoGm9w3+h8mEmmpb7CCpHHSjmomz29YLdP5P17F
+rl4ThSEXJ6yWCYbPMA0j3BIhkhb8C56Vwb9SsZUpDSCw60uBw71CkK2DwSht6tCBt8/bNs8q
+QFPwnalKNt6KgU8cNAR5F5RxKKPATUw9icrqmeQKysHUhrneRqM3LO/HpnW1DDKvBk6eEwix
+I4XzGsqcThz3QfBOkCqPSUBBeb42wNjbPpelnAS08KBrVeYgn7xg+WQpdj/Dt+iFqOo/Vi8w
+1FpR5RHy//XF0DPnjEGa/f3Xaz9oaJ5k9XZiYMULf8CoHjtscp86Q0sAAwUIAKO4bNu7OJqP
+5NGwc9pm7IvmkYCeY6cltXzmcciw/LIU9etb+RBQQG6PpoeZNBNAu172L64wPkMsVRJGVUyk
+T35yXVASuBD1V0oOD4n0uVdqS+bij/DKQNVYqVAcwrPtkkrLeJQ8ZcmZhH/mbcmATWuziCnI
+4MROcYL9NLZ1iIT0PX8TvWEgyi9Jn6DVjXQ1UzIIv4oq6kBdsG3Rjd0yadugGKc/pSdYUu0S
+jeCCGDoY8hX67c5Y1jwaJ0+ntThC+kv2ImCSHx9OT5jMwN+JyXCe4MZJd+y5/VDhgd3hTowT
+QtqHQRYK4oTb0LsDLBs5xoE/zuF8AgzabO+JcTQZPOqISQQYEQIACQUCR1C5yAIbDAAKCRDR
+r7zgD2yR0q76AJsHHW4ywmyeZxKsei6V3bvt1OUQugCfStqiEgjFAA6psDMMinAV4VCh3D4=
+=0v7K
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/net-dns/dnssec-root/metadata.xml b/net-dns/dnssec-root/metadata.xml
new file mode 100644
index 00000000000..c66840b2cde
--- /dev/null
+++ b/net-dns/dnssec-root/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<longdescription>This package distributes the ICANN DNSSEC root key</longdescription>
+</pkgmetadata>
diff --git a/net-dns/dnssec-system-tray/Manifest b/net-dns/dnssec-system-tray/Manifest
new file mode 100644
index 00000000000..21614f728ad
--- /dev/null
+++ b/net-dns/dnssec-system-tray/Manifest
@@ -0,0 +1,4 @@
+DIST dnssec-system-tray-1.13.tar.gz 15101 SHA256 8f1c88cb7f52d04e1e2df44f5d4aa15143c16bc7f3ee5c2a3d7df7b557ae39d6 SHA512 addad2f1ef9f164b69685f05716ad434d085ca80861b002a4b29aadca60672dba2f3c5235bc177df90859ae27370d237c6c6bb7c78a85e84e6b371cc9f537a6c WHIRLPOOL fc65563f476e8238e48d2fd4200f73584d923bc76fc8ab5158443aa805cfacebea8e2030d8b380173926ec9a6d58ab06a14344c8c8995734decd03cd4f904256
+DIST dnssec-system-tray-1.14.tar.gz 15103 SHA256 9d8b4c10be6ad729d82e6cc16a81de4b4b8cb624822b9db387805497745ee4bb SHA512 b35b23872185b3cf70ee50cf3bd87598e39b655f6025e3861e763d5ab8ca4987930bfb3c956f30a6ab2356c928846f393f6d107e4c53d62701f6752efbfc7211 WHIRLPOOL 65fff55e13c2362a6797ac5c6d6375bbfc2851d03887b4f62052d32a5c12968b29e024503ff07774e7e539acd818108aba13766371d44efafb261b7b6f86aa64
+DIST dnssec-system-tray-2.0.tar.gz 15138 SHA256 92ff455901e72a35e81656c02814abd47e8641f17d1b47a3593794b75ca42c85 SHA512 34a25a1a8483c4bed23be0abaeb15d0882dfef6a0652750836c68f916409a066981df51875c9336deaeb6081adcae1590f7569ab9f62cc25d550f3f81932a19b WHIRLPOOL 854895db847e9ba07a6761108a3e090813c3803c74a6814a8abe8f6cbe76ab974e488a1a245e68cb60654800440388ebb6d777b4881933249f20b8a7fd0a7efe
+DIST dnssec-system-tray-2.1.tar.gz 15397 SHA256 331bf4c4c347f269aa768b98a7a744b9fbbc6d34031de5244abd687c3c959ac8 SHA512 bd4a17e8eed65a6d96dc4c19c316746da6da698d1d48a412aad70a8c2db5bebb2bcefc1d3f1b6e39d6c9b275936cc218add75e07acaa87fbd53df35013ea5e60 WHIRLPOOL a0502ece82ac3400c327761d4cecf6889aafd1a783caf841c2a2e9d8944b28a7e8a78726a1d7cb9e676318b419119bd5942fe29ef8471dd7cf8d12a6f4b2a7c3
diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild
new file mode 100644
index 00000000000..797af0f3717
--- /dev/null
+++ b/net-dns/dnssec-system-tray/dnssec-system-tray-1.13.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="display DNSSEC resolver logs in system tray"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ newicon images/justlock.png ${PN}.png
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild
new file mode 100644
index 00000000000..797af0f3717
--- /dev/null
+++ b/net-dns/dnssec-system-tray/dnssec-system-tray-1.14.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="display DNSSEC resolver logs in system tray"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ newicon images/justlock.png ${PN}.png
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild
new file mode 100644
index 00000000000..3d6bb82a51d
--- /dev/null
+++ b/net-dns/dnssec-system-tray/dnssec-system-tray-2.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="display DNSSEC resolver logs in system tray"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ newicon images/justlock.png ${PN}.png
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild
new file mode 100644
index 00000000000..3d6bb82a51d
--- /dev/null
+++ b/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="display DNSSEC resolver logs in system tray"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ newicon images/justlock.png ${PN}.png
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-system-tray/metadata.xml b/net-dns/dnssec-system-tray/metadata.xml
new file mode 100644
index 00000000000..59acc2cc580
--- /dev/null
+++ b/net-dns/dnssec-system-tray/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-dns/dnssec-tools/Manifest b/net-dns/dnssec-tools/Manifest
new file mode 100644
index 00000000000..f67a1de2308
--- /dev/null
+++ b/net-dns/dnssec-tools/Manifest
@@ -0,0 +1,4 @@
+DIST dnssec-tools-1.13.tar.gz 3299592 SHA256 ac2caba324f96170406c202724344315371c3ef83815236e95b48a6021b2be91 SHA512 ef9e5e2652d4673ba8f74bed8055fd108aa8e43bd3aab4e1527385ab189a63f9fa989bfa6c574252dad9e5997f72a29f4d12cca2a2d9ff950207046c08bece18 WHIRLPOOL 354e072584dab9458224ff0ca8f303d35026686688f8dcaf3a0d43a9c12e628430dd7877f776f2f8c1b8460c4f2eb7cc1061e10f304bd02538130bcd40d6b03b
+DIST dnssec-tools-1.14.tar.gz 3337126 SHA256 10c387879cb1cc9e26c239a6dc99a4cba23e8b336c4231d0a9eb204369bbdbeb SHA512 398a59e30a88516881dd4252c735b5a8320e3bc30087cceb5cbc707ba0c7d7e82455047b4f38b655b993bfb738880b42c3c0df24fe23fe70feccc0c83e991bba WHIRLPOOL d490f153a949ec3637401ccf6cb93edc8479d5c7479295dea16b7a1326a0a56c3e485bfbdc7cbd89769bc825d2dc913ac48d31ead06f6c7be1b350e01775ff61
+DIST dnssec-tools-2.0.tar.gz 4271431 SHA256 7fd5d483c7a4b25277f17d9010b8de79a21948884368e6d870bec0194d007445 SHA512 48d05b9deb34b964cb5040c411ecf8347c129025bfd1d1f568ce9394c3580b87932ad71ee187736fbf2bd372bc44d0f26f2423a1a6f9c05419f6030aaecc4df5 WHIRLPOOL 47b795a785faf23ef1401e0f53294fbb5b706ba3ede14191bac9763eae9fbb9637c7a250a5c08256c415574620272de6adf66b916db9b5556d6847097dd946de
+DIST dnssec-tools-2.1.tar.gz 4430320 SHA256 64eebfd1213714b530e501f22b5ff9786db9b982897c432fecba75740ddcda52 SHA512 61119837320bf9a7c2d64a593fc3ed6b84ee7683b7e4ba5de380b0fd1be70e44bf73825ea5395cc1d3ddc729eaef17823a230b44b68fbc5fca988f8fb080f66b WHIRLPOOL 9fb992b0b544c7abf10c78c72bccd5f3d4c8ba6c1c05d48348b9ff6a349f8026f84d35906d7887ba1b74136190c404d224e5e9efee98a05cc755c34c02468ec6
diff --git a/net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild b/net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild
new file mode 100644
index 00000000000..b0c0d9c06ba
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-1.13-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${P}-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please run 'dtinitconf' in order to set up the required"
+ elog "/etc/dnssec-tools/dnssec-tools.conf file"
+ einfo
+ elog "DNSSEC Validator has been split into net-dns/dnsval"
+ einfo
+}
diff --git a/net-dns/dnssec-tools/dnssec-tools-1.14.ebuild b/net-dns/dnssec-tools/dnssec-tools-1.14.ebuild
new file mode 100644
index 00000000000..1d5ae25ea50
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-1.14.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${PN}-1.13-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please run 'dtinitconf' in order to set up the required"
+ elog "/etc/dnssec-tools/dnssec-tools.conf file"
+ einfo
+ elog "DNSSEC Validator has been split into net-dns/dnsval"
+ einfo
+}
diff --git a/net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild
new file mode 100644
index 00000000000..fa9700e5db7
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-2.0-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2 systemd
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+ systemd_dounit "${FILESDIR}"/rollerd.service
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+ systemd_dounit "${FILESDIR}"/donutsd.service
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please run 'dtinitconf' in order to set up the required"
+ elog "/etc/dnssec-tools/dnssec-tools.conf file"
+ einfo
+ elog "DNSSEC Validator has been split into net-dns/dnsval"
+ einfo
+}
diff --git a/net-dns/dnssec-tools/dnssec-tools-2.0.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.0.ebuild
new file mode 100644
index 00000000000..069e0c95229
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-2.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please run 'dtinitconf' in order to set up the required"
+ elog "/etc/dnssec-tools/dnssec-tools.conf file"
+ einfo
+ elog "DNSSEC Validator has been split into net-dns/dnsval"
+ einfo
+}
diff --git a/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild
new file mode 100644
index 00000000000..38a082ad2df
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2 systemd readme.gentoo
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+ systemd_dounit "${FILESDIR}"/rollerd.service
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+ systemd_dounit "${FILESDIR}"/donutsd.service
+
+ prune_libtool_files
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please run 'dtinitconf' in order to set up the required
+/etc/dnssec-tools/dnssec-tools.conf file
+
+DNSSEC Validator has been split into net-dns/dnssec-validator
+"
diff --git a/net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch b/net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch
new file mode 100644
index 00000000000..9432771406c
--- /dev/null
+++ b/net-dns/dnssec-tools/files/dnssec-tools-1.13-dtinitconf.patch
@@ -0,0 +1,23 @@
+--- dnssec-tools-1.13/tools/scripts/dtinitconf
++++ dnssec-tools-1.13/tools/scripts/dtinitconf
+@@ -59,7 +59,9 @@
+ my @COMMON_BINDLOCS =
+ (
+ "/usr/local/sbin",
++ "/usr/local/bin",
+ "/usr/sbin",
++ "/usr/bin",
+ );
+
+ #
+@@ -421,8 +423,8 @@
+
+ $admin = $opts{'admin'} || dnssec_tools_default("admin");
+
+- $binddir = $opts{'binddir'};
+- $dtdir = $opts{'dtdir'};
++ $binddir = $opts{'binddir'} || 'path';
++ $dtdir = $opts{'dtdir'} || 'path';
+ # $viewimg = $opts{'viewimage'} || dnssec_tools_default("viewimage");
+
+ $outfile = $opts{'outfile'} || getconffile();
diff --git a/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch b/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch
new file mode 100644
index 00000000000..ee6adf7031d
--- /dev/null
+++ b/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch
@@ -0,0 +1,24 @@
+--- dnssec-tools-2.0/tools/scripts/dtinitconf
++++ dnssec-tools-2.0/tools/scripts/dtinitconf
+@@ -58,8 +58,8 @@
+ #
+ my @COMMON_BINDLOCS =
+ (
+- "/usr/local/sbin",
+- "/usr/sbin",
++ "/usr/local/bin",
++ "/usr/bin",
+ );
+
+ #
+@@ -424,8 +424,8 @@
+ $admin = $opts{'admin'} || dnssec_tools_default("admin");
+ $zoneparser = $opts{'zoneparser'} || dnssec_tools_default("zoneparser");
+
+- $binddir = $opts{'binddir'};
+- $dtdir = $opts{'dtdir'};
++ $binddir = $opts{'binddir'} || 'path';
++ $dtdir = $opts{'dtdir'} || 'path';
+
+ $outfile = $opts{'outfile'} || getconffile();
+ $overwrite = $opts{'overwrite'};
diff --git a/net-dns/dnssec-tools/files/donutsd.confd b/net-dns/dnssec-tools/files/donutsd.confd
new file mode 100644
index 00000000000..a147ba2ecad
--- /dev/null
+++ b/net-dns/dnssec-tools/files/donutsd.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DONUTSD_CMD="donutsd"
+DONUTSD_CONFPATH="/etc/dnssec-tools/donutsd.db"
+DONUTSD_PID="/var/run/donutsd.pid"
+DONUTSD_OPTS=""
+
diff --git a/net-dns/dnssec-tools/files/donutsd.initd b/net-dns/dnssec-tools/files/donutsd.initd
new file mode 100644
index 00000000000..4dd65dbcfd1
--- /dev/null
+++ b/net-dns/dnssec-tools/files/donutsd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need mta
+}
+
+start() {
+ ebegin "Starting the DNSSEC monitoring daemon"
+ start-stop-daemon --start --pidfile ${DONUTSD_PIDFILE} --make-pidfile --background --exec ${DONUTSD_CMD} -- -i ${DONUTSD_CONFPATH} ${DONUTSD_OPTS}
+ eend $? "failed to start donutsd"
+}
+
+stop() {
+ ebegin "Stopping donutsd"
+ start-stop-daemon --stop --pidfile ${DONUTSD_PIDFILE}
+ eend $? "Failed to stop donutsd"
+}
diff --git a/net-dns/dnssec-tools/files/donutsd.service b/net-dns/dnssec-tools/files/donutsd.service
new file mode 100644
index 00000000000..b7ddbb8c0f0
--- /dev/null
+++ b/net-dns/dnssec-tools/files/donutsd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=DNSSEC monitoring daemon
+
+[Service]
+ExecStart=/usr/bin/donutsd -i /etc/dnssec-tools/donutsd.db
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnssec-tools/files/rollerd.confd b/net-dns/dnssec-tools/files/rollerd.confd
new file mode 100644
index 00000000000..287c47ed2a2
--- /dev/null
+++ b/net-dns/dnssec-tools/files/rollerd.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ROLLERD_CMD="rollerd"
+ROLLERD_RRFILE="/etc/dnssec-tools/dnssec-tools.rollrec"
+ROLLERD_KRFDIR="/var/bind/pri"
+ROLLERD_OPTS=""
+
diff --git a/net-dns/dnssec-tools/files/rollerd.initd b/net-dns/dnssec-tools/files/rollerd.initd
new file mode 100644
index 00000000000..59f28ea0aff
--- /dev/null
+++ b/net-dns/dnssec-tools/files/rollerd.initd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+start() {
+ ebegin "Starting DNSSEC control daemon"
+ "${ROLLERD_CMD}" --rrfile "${ROLLERD_RRFILE}" \
+ -directory "${ROLLERD_KRFDIR}" ${ROLLERD_OPTS}
+ eend $? "failed to start rollerd"
+}
+
+stop() {
+ ebegin "stoping rollerd"
+ /usr/bin/rollctl -halt
+ eend $? "failed to stop rollerd"
+}
diff --git a/net-dns/dnssec-tools/files/rollerd.service b/net-dns/dnssec-tools/files/rollerd.service
new file mode 100644
index 00000000000..2e4aef87b56
--- /dev/null
+++ b/net-dns/dnssec-tools/files/rollerd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=DNSSEC control daemon
+
+[Service]
+ExecStart=/usr/bin/rollerd -foreground --rrfile /etc/dnssec-tools/dnssec-tools.rollrec -directory /var/bind/pri
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnssec-tools/metadata.xml b/net-dns/dnssec-tools/metadata.xml
new file mode 100644
index 00000000000..59acc2cc580
--- /dev/null
+++ b/net-dns/dnssec-tools/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-dns/dnssec-validator/Manifest b/net-dns/dnssec-validator/Manifest
new file mode 100644
index 00000000000..2c009758e98
--- /dev/null
+++ b/net-dns/dnssec-validator/Manifest
@@ -0,0 +1,4 @@
+DIST dnsval-1.13.tar.gz 986029 SHA256 84477a5bb92f4ab5d0ef45d301d1eb908561f24fa5f047196b3067a3880fd698 SHA512 a4e01d19b60793a9757c9fc016d5031b89010d10d0bd82f7bb0acf53446a6baeb44c2ac7de2901db07e29bb26d3c60f0e5e53c121283916acb4c2b6ee33eeb9d WHIRLPOOL 8a652163effcd885f2270dc7b9af61c4324f7c6b3139736d7ce3469d9c7bb373761fe3b0f1bc7fb7cf047fa48e1ac7c69fdec9f0b53f2c6c27cc742667f9df78
+DIST dnsval-1.14.tar.gz 1008882 SHA256 786b86e0ac170dfa2dcb7785566c73a9ba068ea97cd870c9d74fe574d6b2252e SHA512 b722832b38bfad487c942c66847314091ee6b333e1cd2c6a4e6a8b7bf6777de20b1871bb8dcfd449f7183e0e8868585a984e2d11153d5bdc10cd9f5c30679b6f WHIRLPOOL 85eeec1b17882d94eb897c1631940147f0cebb2f6ef85cd48f6244f6cc0560951a604f7d12ce8fae0de0c981637925575e5ee5cfa66cc8ead4b503488347d67f
+DIST dnsval-2.0.tar.gz 1022829 SHA256 45835b0391548e4a4f1bf33db4be25fb0f8820f2fc64fca7e63b14822e0bfe48 SHA512 e0162b79206d8957e0f387ee9d2661378f0274d16bcd88ebe9dc6700e0498b89d33ae1ec9d90db0d62b6bb7f86922aecb42e561b0b86d519bc1f8fe920879b50 WHIRLPOOL 4c83305e91a4fc6811d666fbddff89dc290ff19292923b72079d4856bc78ff97ecfd3de01457f8e58dd2a97ddc67696882719309bea8b5a8e3a341224007e619
+DIST dnsval-2.1.tar.gz 1059451 SHA256 f438e34f52e8e0a02c854bcaff4eb9d1018d203a13fd1094594b015a0da73e50 SHA512 14de6fa86ff30aabcd77d14cbd3e058507f5963f91deadc39dc1a7022f27239010d509f46d392dc7086b6444e068ce66e576f579342ca87a04d7fc776962cd6d WHIRLPOOL 7b1faead29775df288c45006fb170af4f63de45cae58a216f9521ae8ba45eae2fe275646f308b6b6eab7c87bd06e7087cd198cf48bd10b6f6f86ae35b1df4476
diff --git a/net-dns/dnssec-validator/dnssec-validator-1.13.ebuild b/net-dns/dnssec-validator/dnssec-validator-1.13.ebuild
new file mode 100644
index 00000000000..595c4d454db
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-1.13.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="DNSSEC validator (dnsval)"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs +threads"
+
+RDEPEND="dev-libs/openssl
+ !<net-dns/dnssec-tools-1.13"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/dnsval-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-respect-LDFLAGS.patch
+}
+
+src_configure() {
+ econf \
+ --with-nsec3 \
+ --with-dlv \
+ $(use_with ipv6) \
+ $(use_with threads)
+}
+
+src_install() {
+ dodir /usr/bin /usr/include/validator
+ default
+
+ insinto /etc/dnssec-tools
+ doins etc/{dnsval.conf,root.hints}
+ elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
+ dosym ../resolv.conf /etc/dnssec-tools/resolv.conf
+
+ use static-libs || find "${D}" -name "*.a" -delete
+ prune_libtool_files
+}
diff --git a/net-dns/dnssec-validator/dnssec-validator-1.14.ebuild b/net-dns/dnssec-validator/dnssec-validator-1.14.ebuild
new file mode 100644
index 00000000000..e410963650a
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-1.14.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="DNSSEC validator (dnsval)"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs +threads"
+
+RDEPEND="dev-libs/openssl
+ !<net-dns/dnssec-tools-1.13"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/dnsval-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.13-respect-LDFLAGS.patch
+}
+
+src_configure() {
+ econf \
+ --with-nsec3 \
+ --with-dlv \
+ $(use_with ipv6) \
+ $(use_with threads)
+}
+
+src_install() {
+ dodir /usr/bin /usr/include/validator
+ default
+
+ insinto /etc/dnssec-tools
+ doins etc/{dnsval.conf,root.hints}
+ elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
+ dosym ../resolv.conf /etc/dnssec-tools/resolv.conf
+
+ use static-libs || find "${D}" -name "*.a" -delete
+ prune_libtool_files
+}
diff --git a/net-dns/dnssec-validator/dnssec-validator-2.0.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.0.ebuild
new file mode 100644
index 00000000000..e410963650a
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-2.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="DNSSEC validator (dnsval)"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs +threads"
+
+RDEPEND="dev-libs/openssl
+ !<net-dns/dnssec-tools-1.13"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/dnsval-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.13-respect-LDFLAGS.patch
+}
+
+src_configure() {
+ econf \
+ --with-nsec3 \
+ --with-dlv \
+ $(use_with ipv6) \
+ $(use_with threads)
+}
+
+src_install() {
+ dodir /usr/bin /usr/include/validator
+ default
+
+ insinto /etc/dnssec-tools
+ doins etc/{dnsval.conf,root.hints}
+ elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
+ dosym ../resolv.conf /etc/dnssec-tools/resolv.conf
+
+ use static-libs || find "${D}" -name "*.a" -delete
+ prune_libtool_files
+}
diff --git a/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild
new file mode 100644
index 00000000000..9d575f36778
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="DNSSEC validator (dnsval)"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs +threads"
+
+RDEPEND="dev-libs/openssl
+ !<net-dns/dnssec-tools-1.13"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/dnsval-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-respect-LDFLAGS.patch
+}
+
+src_configure() {
+ econf \
+ --with-nsec3 \
+ --with-dlv \
+ $(use_with ipv6) \
+ $(use_with threads)
+}
+
+src_install() {
+ dodir /usr/bin /usr/include/validator
+ default
+
+ insinto /etc/dnssec-tools
+ doins etc/{dnsval.conf,root.hints}
+ elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
+ dosym ../resolv.conf /etc/dnssec-tools/resolv.conf
+
+ use static-libs || find "${D}" -name "*.a" -delete
+ prune_libtool_files
+}
diff --git a/net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch b/net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch
new file mode 100644
index 00000000000..00492dd4883
--- /dev/null
+++ b/net-dns/dnssec-validator/files/dnssec-validator-1.13-respect-LDFLAGS.patch
@@ -0,0 +1,22 @@
+--- dnsval-1.13/libsres/Makefile.in
++++ dnsval-1.13/libsres/Makefile.in
+@@ -63,7 +63,7 @@
+ $(RM) -rf $(LT_DIR)
+
+ $(LIBRES): $(LOBJ)
+- $(LIBTOOLLD) -o $@ $(LOBJ)
++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl
+
+ install:
+ $(MKPATH) $(DESTDIR)$(libdir)
+--- dnsval-1.13/libval/Makefile.in
++++ dnsval-1.13/libval/Makefile.in
+@@ -60,7 +60,7 @@
+ $(RM) -rf $(LT_DIR)
+
+ $(LIBVAL): $(LOBJ)
+- $(LIBTOOLLD) -o $@ $(LOBJ)
++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl -lpthread
+
+ install:
+ $(MKPATH) $(DESTDIR)$(libdir)
diff --git a/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch b/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch
new file mode 100644
index 00000000000..05660275de9
--- /dev/null
+++ b/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch
@@ -0,0 +1,22 @@
+--- dnsval-2.1/libsres/Makefile.in
++++ dnsval-2.1/libsres/Makefile.in
+@@ -63,7 +63,7 @@
+ $(RM) -rf $(LT_DIR)
+
+ $(LIBRES): $(LOBJ)
+- $(LIBTOOLLD) -o $@ $(LOBJ)
++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl
+
+ install:
+ $(MKPATH) $(DESTDIR)$(libdir)
+--- dnsval-2.1/libval/Makefile.in
++++ dnsval-2.1/libval/Makefile.in
+@@ -65,7 +65,7 @@
+ $(RM) -rf $(LT_DIR)
+
+ $(LIBVAL): $(LOBJ)
+- $(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES)
++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES) $(LDFLAGS) -lssl -lpthread
+
+ install:
+ $(MKPATH) $(DESTDIR)$(libdir)
diff --git a/net-dns/dnssec-validator/metadata.xml b/net-dns/dnssec-validator/metadata.xml
new file mode 100644
index 00000000000..59acc2cc580
--- /dev/null
+++ b/net-dns/dnssec-validator/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-dns/dnstop/Manifest b/net-dns/dnstop/Manifest
new file mode 100644
index 00000000000..1fe503fee80
--- /dev/null
+++ b/net-dns/dnstop/Manifest
@@ -0,0 +1,2 @@
+DIST dnstop-20121017.tar.gz 74559 SHA256 6aed2d6037ab94244c4b802a412f902034be3448431b2118cd0e6afe1bf959f6 SHA512 efe0abdd87d14aa8bdc74dad4a5a4d613110e0a78ee7034ecf6d4a7e2037f1895c776761d70127c021ba207dffbc7e1cb551ec55f62b54f93babcd38f21cd44a WHIRLPOOL 30539e7bc5967bc4a67743d4c8b610776e119bd33208d2925f9615926dae5f4233269d35732404e0e1f4078c4b16fe88bcb89fa3bdb7486ce7287608f526b69d
+DIST dnstop-20140915.tar.gz 77917 SHA256 b4b03d02005b16e98d923fa79957ea947e3aa6638bb267403102d12290d0c57a SHA512 902cf96f7366983cae4bf684e44fbe12f6e982cee8ff489329e25e1a13de60870d356906a99fee56c6da2258c4a39074a504389549c6c2e239a4ea94d8b9a65d WHIRLPOOL dbdb56039bf9eaa3463edd77f01fc5a500cd3b5d68337491791c63b1e212c0a8eaebcf9cea8d7cbf918f98fbbf92e14c7e1a665715a915f68e84b1b77e48c616
diff --git a/net-dns/dnstop/dnstop-20121017.ebuild b/net-dns/dnstop/dnstop-20121017.ebuild
new file mode 100644
index 00000000000..0f1d2d1acd1
--- /dev/null
+++ b/net-dns/dnstop/dnstop-20121017.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Displays various tables of DNS traffic on your network"
+HOMEPAGE="http://dnstop.measurement-factory.com/"
+SRC_URI="http://dnstop.measurement-factory.com/src/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc x86"
+IUSE="ipv6"
+
+RDEPEND="sys-libs/ncurses
+ net-libs/libpcap[ipv6?]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6)
+}
+
+src_install() {
+ dobin dnstop
+ doman dnstop.8
+ dodoc CHANGES
+}
diff --git a/net-dns/dnstop/dnstop-20140915.ebuild b/net-dns/dnstop/dnstop-20140915.ebuild
new file mode 100644
index 00000000000..9bea45bcb38
--- /dev/null
+++ b/net-dns/dnstop/dnstop-20140915.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Displays various tables of DNS traffic on your network"
+HOMEPAGE="http://dnstop.measurement-factory.com/"
+SRC_URI="http://dnstop.measurement-factory.com/src/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86"
+IUSE="ipv6"
+
+RDEPEND="sys-libs/ncurses
+ net-libs/libpcap[ipv6?]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6)
+}
+
+src_install() {
+ dobin dnstop
+ doman dnstop.8
+ dodoc CHANGES
+}
diff --git a/net-dns/dnstop/metadata.xml b/net-dns/dnstop/metadata.xml
new file mode 100644
index 00000000000..14b05fb0dd8
--- /dev/null
+++ b/net-dns/dnstop/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven</name>
+</maintainer>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<upstream>
+ <changelog>http://dns.measurement-factory.com/tools/dnstop/src/CHANGES</changelog>
+ <doc>http://dns.measurement-factory.com/tools/dnstop/dnstop.8.html</doc>
+</upstream>
+</pkgmetadata>
diff --git a/net-dns/dnswalk/Manifest b/net-dns/dnswalk/Manifest
new file mode 100644
index 00000000000..0004bfcdba9
--- /dev/null
+++ b/net-dns/dnswalk/Manifest
@@ -0,0 +1 @@
+DIST dnswalk-2.0.2.tar.gz 27015 SHA256 b49ea147a00e95e80330534d43f8737c2367ae862050e9a8009a607c49f0ea6b SHA512 23e5408149ae65f69dbb6d0ecaf5b10233e2279a502f6e19f0dacde0e270ed4eed0aea72f8c12dd636228e99b0b115a335bb8327a0628ad1f36dae5f5572712c WHIRLPOOL 81a08ac16ebb2876a4b2ec557aee4a87a7699db2366cda2c3a9e3b850489e807ae1511c13d9946d47826a24ce93a231deddc5948074afcf1fbc3efb717d06972
diff --git a/net-dns/dnswalk/dnswalk-2.0.2.ebuild b/net-dns/dnswalk/dnswalk-2.0.2.ebuild
new file mode 100644
index 00000000000..b399c719cf4
--- /dev/null
+++ b/net-dns/dnswalk/dnswalk-2.0.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="dnswalk is a DNS database debugger"
+HOMEPAGE="http://sourceforge.net/projects/dnswalk/"
+SRC_URI="mirror://sourceforge/dnswalk/${P}.tar.gz"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND=">=dev-perl/Net-DNS-0.12"
+
+S=${WORKDIR}
+
+src_prepare() {
+ sed -i 's:#!/usr/contrib/bin/perl:#!'"${EPREFIX}"'/usr/bin/perl:' dnswalk
+}
+
+src_install () {
+ dobin dnswalk
+
+ dodoc CHANGES README TODO \
+ do-dnswalk makereports sendreports rfc1912.txt dnswalk.errors
+ doman dnswalk.1
+}
diff --git a/net-dns/dnswalk/metadata.xml b/net-dns/dnswalk/metadata.xml
new file mode 100644
index 00000000000..f02292e8b0e
--- /dev/null
+++ b/net-dns/dnswalk/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dnswalk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/ez-ipupdate/Manifest b/net-dns/ez-ipupdate/Manifest
new file mode 100644
index 00000000000..e84f07a9392
--- /dev/null
+++ b/net-dns/ez-ipupdate/Manifest
@@ -0,0 +1,2 @@
+DIST ez-ipupdate_3.0.11b8-13.3.diff.gz 154094 SHA256 2c058941f8b172c8564d841d4413b7fa7a5c4dbd53d7d5574c2ff58f41cf39b3 SHA512 bef3c344a3c16f224cc3c6e662213713bb1123b4e47347d83d01d632c5ca0b09e7f0e5a989b3987655759ac901307c8dd6768fab3056c8878c0adcf78b0d5fb9 WHIRLPOOL f213674b871bdf950fe3f1a1131561954c77f0c79a2e4a70752f8a1a88f86e221ad269d92839c30a49544c636ccad77f9e096687a381209cb86367329eafd4ca
+DIST ez-ipupdate_3.0.11b8.orig.tar.gz 81975 SHA256 bf5b8d11ffe055c5891d0ab64bbfa86e99cbda645d40f346146b939fec8d962d SHA512 85de91cde25d176374ade7128e8932a4e015cd04beb8d5b71bf540e2f59b6c409d1c8bd0ff7c50734b87ecc19a74a7b1da3e646a8c8787badcae4feb9dba7864 WHIRLPOOL ce279c1d8f1ae404c936b959b9273bce1c37404d7ecf0d7262468bb4b71f6aee75797a2448ea7a0191c9f8a01ffef92107f71727e2c7d445469ec61f0be8f162
diff --git a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild
new file mode 100644
index 00000000000..a0294124d61
--- /dev/null
+++ b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils readme.gentoo systemd user versionator
+
+MY_BETA="$(get_version_component_range 6)"
+MY_PATCH="$(get_version_component_range 4-5)"
+MY_PV="$(get_version_component_range 1-3)${MY_BETA/beta/b}"
+
+DESCRIPTION="Dynamic DNS client for lots of dynamic dns services"
+HOMEPAGE="http://ez-ipupdate.com/"
+SRC_URI="mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}-${MY_PATCH}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Please create one or more config files in
+/etc/ez-ipupdate/. A bunch of samples can
+be found in the doc directory.
+
+All config files must have a '.conf' extension.
+
+If you are using openRC you need to:
+- Please do not use the 'run-as-user', 'run-as-euser',
+'cache-file' and 'pidfile' options, since these are
+handled internally by the init-script.
+
+-If you want to use ez-ipupdate in daemon mode,
+please add 'daemon' to the config file(s) and
+add the ez-ipupdate init-script to the default runlevel.
+Without the 'daemon' option, you can run the
+init-script with the 'update' parameter inside
+your PPP ip-up script.
+"
+
+src_prepare() {
+ # apply debian patches
+ epatch "${WORKDIR}/${PN}_${MY_PV}-${MY_PATCH}.diff"
+
+ # repair/apply additional debian patches
+ sed -i -e "s|^\(---\s*\)\.\./|\1|g" debian/patches/*.diff
+ EPATCH_SOURCE="${S}/debian/patches" EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch
+
+ # adding members.3322.org support
+ epatch "${FILESDIR}/${P}-3322.diff"
+
+ # adding www.dnsexit.com support
+ epatch "${FILESDIR}/${P}-dnsexit.diff"
+
+ # make ez-ipupdate work with iproute2/dhcpcd under linux (bug #318905)
+ epatch "${FILESDIR}/${P}-linux.diff"
+
+ # allows to set IPv6 via -a option, (bug #432764)
+ epatch "${FILESDIR}/${P}-ipv6.diff"
+
+ # repair format mask issues
+ sed -i -e "s|\(\s*\)\(strlen(putbuf)\)|\1(int)\2|g" ez-ipupdate.c || die
+
+ # comment out obsolete options
+ sed -i -e "s:^\(run-as-user.*\):#\1:g" \
+ -e "s:^\(cache-file.*\):#\1:g" ex*conf || die
+
+ # make 'missing' executable (bug #103480)
+ chmod +x missing
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newinitd "${FILESDIR}/ez-ipupdate.initd" ez-ipupdate
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ keepdir /etc/ez-ipupdate
+
+ # install docs
+ dodoc README
+ newdoc debian/README.Debian README.debian
+ newdoc debian/changelog ChangeLog.debian
+ newdoc CHANGELOG ChangeLog
+ doman debian/ez-ipupdate.8
+
+ # install example configs
+ docinto examples
+ dodoc ex*conf
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ enewgroup ez-ipupd
+ enewuser ez-ipupd -1 -1 /var/cache/ez-ipupdate ez-ipupd
+}
+
+pkg_postinst() {
+ chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate
+ chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate
+
+ readme.gentoo_print_elog
+
+ if [ -f /etc/ez-ipupdate.conf ]; then
+ elog "!!! IMPORTANT UPDATE NOTICE !!!"
+ elog
+ elog "The ez-ipupdate init-script can now handle more"
+ elog "than one config file. New config file location is"
+ elog "/etc/ez-ipupdate/*.conf"
+ elog
+ if [ ! -f /etc/ez-ipupdate/default.conf ]; then
+ mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf
+ elog "Your old configuration has been moved to"
+ elog "/etc/ez-ipupdate/default.conf"
+ elog
+ fi
+ fi
+}
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff
new file mode 100644
index 00000000000..d6bf0152a09
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff
@@ -0,0 +1,65 @@
+diff -Naur ez-ipupdate-3.0.11b8.orig/example-3322.conf ez-ipupdate-3.0.11b8/example-3322.conf
+--- ez-ipupdate-3.0.11b8.orig/example-3322.conf 1970-01-01 01:00:00.000000000 +0100
++++ ez-ipupdate-3.0.11b8/example-3322.conf 2011-01-23 19:30:43.785652588 +0100
+@@ -0,0 +1,19 @@
++#!/usr/local/bin/ez-ipupdate -c
++#
++# example config file for ez-ipupdate
++#
++# this file is actually executable!
++#
++
++service-type=qdns
++#service-type=qdns-static
++user=myuserid:mypassword
++host=mydomain.whatever.com
++interface=eth1
++max-interval=2073600
++
++# uncomment this once you have everything working how you want and you are
++# ready to have ez-ipupdate running in the background all the time. to stop it
++# you can use "killall -QUIT ez-ipupdate" under linux.
++#daemon
++
+diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
+--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:29:17.698793394 +0100
++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:29:17.799792055 +0100
+@@ -103,6 +103,11 @@
+ #define HEIPV6TB_DEFAULT_PORT "80"
+ #define HEIPV6TB_REQUEST "/index.cgi"
+
++#define QDNS_DEFAULT_SERVER "members.3322.org"
++#define QDNS_DEFAULT_PORT "80"
++#define QDNS_REQUEST "/dyndns/update"
++#define QDNS_STAT_REQUEST "/dyndns/update"
++
+ #define DEFAULT_TIMEOUT 120
+ #define DEFAULT_UPDATE_PERIOD 120
+ #define DEFAULT_RESOLV_PERIOD 30
+@@ -514,6 +519,26 @@
+ HEIPV6TB_DEFAULT_PORT,
+ HEIPV6TB_REQUEST
+ },
++ { "qdns",
++ { "qdns", 0, 0, },
++ DYNDNS_init,
++ DYNDNS_update_entry,
++ DYNDNS_check_info,
++ DYNDNS_fields_used,
++ QDNS_DEFAULT_SERVER,
++ QDNS_DEFAULT_PORT,
++ QDNS_REQUEST
++ },
++ { "qdns-static",
++ { "qdns-static", "qdns-stat", "statdns", },
++ DYNDNS_init,
++ DYNDNS_update_entry,
++ DYNDNS_check_info,
++ DYNDNS_STAT_fields_used,
++ QDNS_DEFAULT_SERVER,
++ QDNS_DEFAULT_PORT,
++ QDNS_STAT_REQUEST
++ },
+ };
+
+ static struct service_t *service = NULL;
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff
new file mode 100644
index 00000000000..fd80485f0f4
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff
@@ -0,0 +1,262 @@
+diff -Naur ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf ez-ipupdate-3.0.11b8/example-dnsexit.conf
+--- ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf 1970-01-01 01:00:00.000000000 +0100
++++ ez-ipupdate-3.0.11b8/example-dnsexit.conf 2011-01-23 19:32:53.181937517 +0100
+@@ -0,0 +1,19 @@
++#!/usr/sbin/ez-ipupdate -c
++#
++# example config file for ez-ipupdate
++#
++# this file is actually executable!
++#
++
++service-type=dnsexit
++user=loginname:password
++host=www.yourdomain.com
++interface=eth1
++
++run-as-user=ez-ipupd
++cache-file=/var/cache/ez-ipupdate/default-cache
++
++# uncomment this once you have everything working how you want and you are
++# ready to have ez-ipupdate running in the background all the time. to stop it
++# you can use "killall -QUIT ez-ipupdate" under linux.
++#daemon
+diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
+--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:32:53.074938936 +0100
++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:32:53.182937505 +0100
+@@ -103,6 +103,10 @@
+ #define HEIPV6TB_DEFAULT_PORT "80"
+ #define HEIPV6TB_REQUEST "/index.cgi"
+
++#define DNSEXIT_DEFAULT_SERVER "www.dnsexit.com"
++#define DNSEXIT_DEFAULT_PORT "80"
++#define DNSEXIT_REQUEST "/RemoteUpdate.sv"
++
+ #define DEFAULT_TIMEOUT 120
+ #define DEFAULT_UPDATE_PERIOD 120
+ #define DEFAULT_RESOLV_PERIOD 30
+@@ -341,6 +345,11 @@
+ int HEIPV6TB_check_info(void);
+ static char *HEIPV6TB_fields_used[] = { "server", "user", NULL };
+
++int DNSEXIT_update_entry(void);
++int DNSEXIT_check_info(void);
++static char *DNSEXIT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL };
++
++
+ struct service_t services[] = {
+ { "NULL",
+ { "null", "NULL", 0, },
+@@ -514,6 +523,16 @@
+ HEIPV6TB_DEFAULT_PORT,
+ HEIPV6TB_REQUEST
+ },
++ { "dnsexit",
++ { "dnsexit", 0, 0, },
++ NULL,
++ DNSEXIT_update_entry,
++ DNSEXIT_check_info,
++ DNSEXIT_fields_used,
++ DNSEXIT_DEFAULT_SERVER,
++ DNSEXIT_DEFAULT_PORT,
++ DNSEXIT_REQUEST
++ },
+ };
+
+ static struct service_t *service = NULL;
+@@ -4241,6 +4260,195 @@
+ }
+ return(UPDATERES_ERROR);
+ break;
++ }
++
++ return(UPDATERES_OK);
++}
++
++int DNSEXIT_check_info(void)
++{
++ char buf[BUFSIZ+1];
++
++ if((host == NULL) || (*host == '\0'))
++ {
++ if(options & OPT_DAEMON)
++ {
++ return(-1);
++ }
++ if(host) { free(host); }
++ printf("host: ");
++ *buf = '\0';
++ fgets(buf, BUFSIZ, stdin);
++ host = strdup(buf);
++ chomp(host);
++ }
++
++ if(interface == NULL && address == NULL)
++ {
++ if(options & OPT_DAEMON)
++ {
++ fprintf(stderr, "you must provide either an interface or an address\n");
++ return(-1);
++ }
++ if(interface) { free(interface); }
++ printf("interface: ");
++ *buf = '\0';
++ fgets(buf, BUFSIZ, stdin);
++ chomp(buf);
++ option_handler(CMD_interface, buf);
++ }
++
++ warn_fields(service->fields_used);
++
++ return 0;
++}
++
++int DNSEXIT_update_entry(void)
++{
++ char buf[BUFFER_SIZE+1];
++ char *bp = buf;
++ int bytes;
++ int btot;
++ int ret;
++
++ buf[BUFFER_SIZE] = '\0';
++
++ if(do_connect((int*)&client_sockfd, server, port) != 0)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ show_message("error connecting to %s:%s\n", server, port);
++ }
++ return(UPDATERES_ERROR);
++ }
++
++ snprintf(buf, BUFFER_SIZE, "GET %s?action=edit&", request);
++ output(buf);
++ if(address != NULL && *address != '\0')
++ {
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address);
++ output(buf);
++ }
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", *mx == '\0' ? "NO" : "YES");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "login", user_name);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012",
++ "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "\015\012");
++ output(buf);
++
++ bp = buf;
++ bytes = 0;
++ btot = 0;
++ while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0)
++ {
++ bp += bytes;
++ btot += bytes;
++ dprintf((stderr, "btot: %d\n", btot));
++ }
++ close(client_sockfd);
++ buf[btot] = '\0';
++
++ dprintf((stderr, "server output: %s\n", buf));
++
++ if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1)
++ {
++ ret = -1;
++ }
++
++ switch(ret)
++ {
++ case -1:
++ if(!(options & OPT_QUIET))
++ {
++ show_message("strange server response, are you connecting to the right server?\n");
++ }
++ return(UPDATERES_ERROR);
++ break;
++
++ case 200:
++
++ if(strstr(buf, "0=Success") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Request successful\n");
++ }
++ }
++ else if(strstr(buf, "1=IP is the same as the IP on the system") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Request successful but the IP is the same as previous update\n");
++ }
++ }
++ else if(strstr(buf, "2=Invalid passwords") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Invalid Password\n");
++ }
++ }
++ else if(strstr(buf, "3=User not found") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Username not found\n");
++ }
++ }
++ else if(strstr(buf, "4=Update too often") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Updatting too often\n");
++ }
++ }
++ else
++ {
++ show_message("Errors return from server\n");
++ if(!(options & OPT_QUIET))
++ {
++ fprintf(stderr, "server output: %s\n", buf);
++ }
++ return(UPDATERES_ERROR);
++ }
++ break;
++
++ case 401:
++ if(!(options & OPT_QUIET))
++ {
++ show_message("authentication failure\n");
++ }
++ return(UPDATERES_SHUTDOWN);
++ break;
++
++ default:
++ if(!(options & OPT_QUIET))
++ {
++ // reuse the auth buffer
++ *auth = '\0';
++ sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth);
++ show_message("unknown return code: %d\n", ret);
++ show_message("server response: %s\n", auth);
++ }
++ return(UPDATERES_ERROR);
++ break;
+ }
+
+ return(UPDATERES_OK);
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
new file mode 100644
index 00000000000..ec41647e066
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
@@ -0,0 +1,41 @@
+diff --git a/ez-ipupdate.c b/ez-ipupdate.c
+index ff093a9..eea7624 100644
+--- a/ez-ipupdate.c
++++ b/ez-ipupdate.c
+@@ -849,6 +849,27 @@ int is_dotted_quad(char *addr)
+ return(1);
+ }
+
++int is_ip_addr(char *addr)
++{
++#if HAVE_ARPA_INET_H
++ char dst[16];
++
++ if(inet_pton(AF_INET,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ if(inet_pton(AF_INET6,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ return(0);
++#else
++ return is_dotted_quad(addr);
++#endif
++}
++
+ void parse_service(char *str)
+ {
+ int i;
+@@ -1859,7 +1880,7 @@ int DYNDNS_check_info(void)
+ chomp(host);
+ }
+
+- if(address != NULL && !is_dotted_quad(address))
++ if(address != NULL && !is_ip_addr(address))
+ {
+ fprintf(stderr, "the IP address \"%s\" is invalid\n", address);
+ return(-1);
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff
new file mode 100644
index 00000000000..8a282bb58c3
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff
@@ -0,0 +1,213 @@
+diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
+--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:35:10.885111914 +0100
++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:35:10.979110667 +0100
+@@ -172,6 +172,17 @@
+ # ifdef HAVE_SYS_SOCKIO_H
+ # include <sys/sockio.h>
+ # endif
++# ifdef __linux__
++/*# include <linux/if.h> */
++# include <linux/netlink.h>
++# include <linux/rtnetlink.h>
++/* Under Linux, we reopen socket in get_if_addr() every time */
++# define socketopen(sock)
++# define socketclose(sock)
++# else
++# define socketopen(sock) sock = socket(AF_INET, SOCK_STREAM, 0)
++# define socketclose(sock) close(sock)
++# endif
+ #endif
+
+ #include <dprintf.h>
+@@ -1605,6 +1616,114 @@
+ int get_if_addr(int sock, char *name, struct sockaddr_in *sin)
+ {
+ #ifdef IF_LOOKUP
++#ifdef __linux__
++ struct {
++ struct nlmsghdr nlmsg_info;
++ struct ifaddrmsg ifaddrmsg_info;
++ char buffer[2048];
++ } req;
++ struct nlmsghdr *curr;
++ int len;
++ char buf[8192];
++
++ /* open a socket and bind it.
++ Under non-linux, the socket can be kept open, but it seems under
++ linux we cannot use the same socket for several requests reliable
++ [although sometimes it works...] */
++ static struct sockaddr_nl local;
++ sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
++ if(sock < 0) {
++ perror("socket");
++ return -1;
++ }
++ local.nl_family = AF_NETLINK;
++ local.nl_pad = 0;
++ local.nl_pid = getpid();
++ local.nl_groups = 0;
++ if(bind(sock, (struct sockaddr*) &local, sizeof(local)) < 0) {
++ perror("bind");
++ close(sock);
++ return -1;
++ }
++
++ memset(&req, 0, sizeof(req));
++ req.nlmsg_info.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
++ req.nlmsg_info.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
++ req.nlmsg_info.nlmsg_type = RTM_GETADDR;
++ req.nlmsg_info.nlmsg_pid = getpid();
++ req.ifaddrmsg_info.ifa_family = AF_INET;
++ if(send(sock, &req, req.nlmsg_info.nlmsg_len, 0) < 0) {
++ perror("sendmsg(sock)");
++ close(sock);
++ return -1;
++ }
++
++ len = recv(sock, buf, sizeof(buf), 0);
++ close(sock);
++ if(len < 0) {
++ perror("recv");
++ return -1;
++ } else if(len == 0) {
++ dprintf((stderr, "No interfaces found"));
++ return -1;
++ }
++
++ /* Initialize sin except for address */
++ bzero(sin, sizeof(struct sockaddr_in));
++ sin->sin_family = AF_INET;
++
++ /* We take the last non-private IP with matching name */
++ int found = 0;
++ curr = (struct nlmsghdr *) buf;
++ for(; NLMSG_OK(curr, len); curr = NLMSG_NEXT(curr, len)) {
++ struct ifaddrmsg *curraddr = (struct ifaddrmsg *) NLMSG_DATA(curr);
++ struct rtattr *datalist = (struct rtattr *) IFA_RTA(curraddr);
++ int datalen = IFA_PAYLOAD(curr);
++ int mystat = 0;
++ struct in_addr sin_addr;
++ in_addr_t addr;
++ for(; RTA_OK(datalist, datalen); datalist = RTA_NEXT(datalist, datalen)) {
++ switch(datalist->rta_type) {
++ case IFA_LABEL:
++ if(strcmp((char *)RTA_DATA(datalist), name) != 0)
++ mystat = -1;
++ break;
++ case IFA_LOCAL:
++ addr = ((struct in_addr *)RTA_DATA(datalist))->s_addr;
++ /* addr: 192.168.0.0/16 || 172.16.0.0/12 || 10.0.0.0/8 */
++ if(((addr & 0xFFFF) == 0xA8C0)
++ || ((addr & 0xF0FF) == 0x10AC)
++ || ((addr & 0xFF) == 0x0A)) {
++ mystat = -1;
++ }
++ else {
++ /* We must not store yet sin->sin_addr, since name might not match */
++ sin_addr = *((struct in_addr *)RTA_DATA(datalist));
++ mystat = 1;
++ }
++ break;
++ default:
++ break;
++ }
++ if(mystat < 0)
++ break;
++ }
++ if(mystat > 0) {
++ sin->sin_addr = sin_addr;
++ found = 1;
++ /* If you want to take the first non-private IP with matching name
++ uncomment the next break command:
++ break; */
++ }
++ }
++ if(found) {
++ dprintf((stderr, "%s: %s\n", name, inet_ntoa(sin->sin_addr)));
++ return 0;
++ }
++ dprintf((stderr, "%s: %s\n", name, "has no non-private address"));
++ return -1;
++#else
++/* ifndef __linux__ */
+ struct ifreq ifr;
+
+ memset(&ifr, 0, sizeof(ifr));
+@@ -1638,7 +1757,10 @@
+ return -1;
+ }
+ return -1;
++#endif
++/* endif __linux__ */
+ #else
++/* ifndef IF_LOOKUP */
+ return -1;
+ #endif
+ }
+@@ -4490,7 +4612,7 @@
+ #ifdef IF_LOOKUP
+ if(options & OPT_DAEMON)
+ {
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ }
+ #endif
+
+@@ -4745,12 +4867,12 @@
+ struct sockaddr_in sin;
+ int sock;
+
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ if(get_if_addr(sock, interface, &sin) != 0)
+ {
+ exit(1);
+ }
+- close(sock);
++ socketclose(sock);
+ snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr));
+ #else
+ fprintf(stderr, "interface lookup not enabled at compile time\n");
+@@ -4791,7 +4913,7 @@
+ struct sockaddr_in sin;
+ int sock;
+
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ if(get_if_addr(sock, interface, &sin) == 0)
+ {
+ if(address) { free(address); }
+@@ -4802,7 +4924,7 @@
+ show_message("could not resolve ip address for %s.\n", interface);
+ exit(1);
+ }
+- close(sock);
++ socketclose(sock);
+ }
+
+ for(i=0; i<ntrys; i++)
+@@ -4846,12 +4968,12 @@
+ struct sockaddr_in sin;
+ int sock;
+
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ if(get_if_addr(sock, interface, &sin) != 0)
+ {
+ exit(1);
+ }
+- close(sock);
++ socketclose(sock);
+ snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr));
+ #else
+ fprintf(stderr, "interface lookup not enabled at compile time\n");
+@@ -4878,7 +5000,7 @@
+ }
+
+ #ifdef IF_LOOKUP
+- if(sock > 0) { close(sock); }
++ if(sock > 0) { socketclose(sock); }
+ #endif
+
+ if(address) { free(address); }
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.initd b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
new file mode 100644
index 00000000000..4bba7230fdb
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
@@ -0,0 +1,94 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="update"
+
+depend() {
+ need net
+ after rp-pppoe
+}
+
+getconfig() { # 0: no daemon / 1: daemon
+ local CONF NAME LIST=""
+ for CONF in /etc/ez-ipupdate/*.conf; do
+ if [ -f "${CONF}" ]; then
+ # Don't run configurations that are (not) daemons
+ grep -q '^[[:space:]]*daemon' "${CONF}"; [ $? -eq $1 ] && continue
+ # Don't run configurations that run in the foreground
+ grep -q '^[[:space:]]*foreground' "${CONF}" && continue
+ # add config to list
+ NAME="${CONF##*/}"
+ LIST="${LIST} ${NAME%.*}"
+ fi
+ done
+ echo ${LIST}
+}
+
+start() {
+ local NAME LIST=$(getconfig 1)
+
+ if [ -z "${LIST}" ]; then
+ eerror "You need at least one config file in /etc/ez-ipupdate"
+ eerror "containing the 'daemon' keyword and no 'foreground' keyword."
+ return 1
+ fi
+
+ for dir in /var/run/ez-ipupdate /var/cache/ez-ipupdate; do
+ checkpath -q -d -m 0750 -o ez-ipupd:ez-ipupd ${dir}
+ done
+
+ for NAME in ${LIST}; do
+ local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
+ local PIDFILE="/var/run/ez-ipupdate/${NAME}.pid"
+ local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
+ ebegin "Starting ez-ipupdate (${NAME})"
+ start-stop-daemon -p "${PIDFILE}" --start --quiet --exec /usr/sbin/ez-ipupdate \
+ --user ez-ipupd:ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
+ eend $?
+ done
+ return 0 # do not fail
+}
+
+stop() {
+ local PIDFILE NAME
+ for PIDFILE in /var/run/ez-ipupdate/*.pid; do
+ if [ -f "${PIDFILE}" ]; then
+ NAME="${PIDFILE##*/}"
+ ebegin "Stopping ez-ipupdate (${NAME%.*})"
+ start-stop-daemon --stop --signal QUIT --quiet --pidfile "${PIDFILE}"
+ eend $? || rm -f "${PIDFILE}"
+ else
+ eerror "No running ez-ipupdate process"
+ fi
+ done
+ return 0 # do not fail
+}
+
+update() {
+ local NAME TEXT LIST=$(getconfig 0)
+
+ if [ -z "${LIST}" ]; then
+ eerror "You need at least one config file in /etc/ez-ipupdate"
+ eerror "containing no 'daemon' and 'foreground' keyword."
+ return 1
+ fi
+
+ for NAME in ${LIST}; do
+ local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
+ local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
+ ebegin "Running ez-ipupdate (${NAME})"
+ TEXT=$(/usr/sbin/ez-ipupdate -q -R ez-ipupd -c "${CONFIG}" -b "${CACHEFILE}" 2>&1)
+ if eend $?; then
+ if [ -n "${TEXT}" ]; then
+ echo "${TEXT}" | while read line; do einfo " $line"; done
+ fi
+ else
+ if [ -n "${TEXT}" ]; then
+ echo "${TEXT}" | while read line; do eerror " $line"; done
+ fi
+ fi
+ done
+ return 0 # do not fail
+}
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.service b/net-dns/ez-ipupdate/files/ez-ipupdate.service
new file mode 100644
index 00000000000..2f3d79b13dc
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ez-ipupdate: Check and update your IP to dynamic DNS Server
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+ExecStart=/usr/sbin/ez-ipupdate -f -R ez-ipupd -c /etc/ez-ipupdate/defaults.conf -b /var/cache/ez-ipupdate/defaults.cache
+ExecReload=/bin/kill -HUP $MAINPID
+KillSignal=SIGQUIT
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/ez-ipupdate/metadata.xml b/net-dns/ez-ipupdate/metadata.xml
new file mode 100644
index 00000000000..b63524a497a
--- /dev/null
+++ b/net-dns/ez-ipupdate/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Ez-ipupdate is a client for the dynamic IP service offered by
+ http://www.ez-ip.net. It has several options and is quite complete.
+ It is written in pure C and supports a daemon mode.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/fpdns/Manifest b/net-dns/fpdns/Manifest
new file mode 100644
index 00000000000..42b7c338325
--- /dev/null
+++ b/net-dns/fpdns/Manifest
@@ -0,0 +1 @@
+DIST fpdns-0.10.0_pre20130404.tar.gz 931723 SHA256 fe81de9c5d2d077cd974c9fd862f52a02cc1bb29c58944ea968a21853cc8ea15 SHA512 1a4d9c1cb666efa3f48dcca2b5cd04793e92727359652095572b17479f5343479c57d2937f1fff8070c071a2698eda5c4dff981caf86436f184f0b076b0fa0b3 WHIRLPOOL 09b0588fdba51313787b17e1093a91d948aff1a203880943b3e16cf3c8c2a9296b679f13de24862b75d9f8e3c17b0598b12066932f3c07c2c47d793b84b30827
diff --git a/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch b/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch
new file mode 100644
index 00000000000..17eadbe4a13
--- /dev/null
+++ b/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch
@@ -0,0 +1,33 @@
+From ca0391377ad7150e61ff300cb5195c97a154233b Mon Sep 17 00:00:00 2001
+From: Jakob Schlyter <jakob@kirei.se>
+Date: Wed, 28 Aug 2013 10:24:11 +0200
+Subject: [PATCH] do not set header counters unless changed
+
+---
+ lib/Net/DNS/Fingerprint.pm | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Net/DNS/Fingerprint.pm b/lib/Net/DNS/Fingerprint.pm
+index d4a2e5a..e096d42 100644
+--- a/lib/Net/DNS/Fingerprint.pm
++++ b/lib/Net/DNS/Fingerprint.pm
+@@ -2171,10 +2171,12 @@ sub fp2header {
+ $header->ad(shift @list);
+ $header->cd(shift @list);
+ $header->rcode(shift @list);
+- $header->qdcount(shift @list);
+- $header->ancount(shift @list);
+- $header->nscount(shift @list);
+- $header->arcount(shift @list);
++
++ my ($qdcount, $ancount, $nscount, $arcount) = @list;
++ $header->qdcount($qdcount) unless $qdcount == $header->qdcount;
++ $header->qdcount($ancount) unless $ancount == $header->ancount;
++ $header->qdcount($nscount) unless $nscount == $header->nscount;
++ $header->qdcount($arcount) unless $arcount == $header->arcount;
+ }
+
+ sub probe {
+--
+1.9.1
+
diff --git a/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild b/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild
new file mode 100644
index 00000000000..08b4fa0c439
--- /dev/null
+++ b/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils perl-module
+
+DESCRIPTION="Fingerprinting DNS servers"
+HOMEPAGE="https://github.com/kirei/fpdns/"
+
+MY_P="${PN}-${PV##*_pre}"
+SRC_URI="https://github.com/kirei/fpdns/archive/20130404.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-perl/Net-DNS-0.74"
+
+S="${WORKDIR}"/"${MY_P}"
+
+src_prepare() {
+ ## fixes https://github.com/kirei/fpdns/issues/6
+ epatch "${FILESDIR}/${P}.ro-header.patch"
+}
+
+src_install() {
+ newbin apps/fpdns fpdns
+ insinto "${VENDOR_LIB}"/Net/DNS/
+ doins lib/Net/DNS/Fingerprint.pm
+}
diff --git a/net-dns/fpdns/metadata.xml b/net-dns/fpdns/metadata.xml
new file mode 100644
index 00000000000..dab638cf573
--- /dev/null
+++ b/net-dns/fpdns/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+A nameserver basically responds to a query. Interoperability is an obvious
+requirement here. The standard protocol behaviour of different DNS
+implementations is expected to be the same.
+
+Requirements for protocol behaviour of DNS implementations is widely documented
+in the case of 'common' dns messages. The DNS protocol is over 20 years old and
+since its inception, there have been over 40 independent DNS implementations,
+while some implementations have over 20 versions.
+
+The methodology used to identify individual nameserver implementations is based
+on "borderline" protocol behaviour. The DNS protocol offers a multitude of
+message bits, response types, opcodes, classes, query types and label types in a
+fashion that makes some mutually exclusive while some are not used in a query
+messages at all. Not every implementation offers the full set of features the
+DNS protocol set currently has. Some implementations offer features outside the
+protocol set, and there are implementations that do not conform to standards.
+
+Also, new features added to - or bugs removed allow for differentiations between
+versions of an implementation.
+</longdescription>
+ <upstream>
+ <remote-id type="github">kirei/fpdns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/hash-slinger/Manifest b/net-dns/hash-slinger/Manifest
new file mode 100644
index 00000000000..0b3d97f69bc
--- /dev/null
+++ b/net-dns/hash-slinger/Manifest
@@ -0,0 +1 @@
+DIST hash-slinger-2.6.tar.gz 34864 SHA256 121143efea136958ad6a42cb0a8fa80d95b1e4fc45632019d8f07a534d6efab2 SHA512 1e5d67ed2ef8eae910927fbd7419928d87ba31a91ca43a1c163b05f725da96a50d30e1539c4c55a68a22f0e2c9a2f7c7101fbdcfb5fc903e87fe4c22e20f33af WHIRLPOOL 7ff36bad9db31e6d8769a525fc60691cb6af3bd6970b9bbf55d56f7e3c08a6a97a35fd1363dbed012239432b7dfd2594d616dc4d0a80ae47c82b724e17183f41
diff --git a/net-dns/hash-slinger/hash-slinger-2.6.ebuild b/net-dns/hash-slinger/hash-slinger-2.6.ebuild
new file mode 100644
index 00000000000..0d9d838037c
--- /dev/null
+++ b/net-dns/hash-slinger/hash-slinger-2.6.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit python-r1
+
+DESCRIPTION="Various tools to generate special DNS records like SSHFP, TLSA, OPENPGPKEY, IPSECKEY"
+HOMEPAGE="http://people.redhat.com/pwouters/hash-slinger/"
+SRC_URI="http://people.redhat.com/pwouters/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipsec +openpgp +ssh"
+
+DEPEND=""
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-python/dnspython[$PYTHON_USEDEP]
+ dev-python/ipaddr[$PYTHON_USEDEP]
+ dev-python/m2crypto[$PYTHON_USEDEP]
+ net-dns/unbound[python,$PYTHON_USEDEP]
+ ipsec? ( net-misc/libreswan[dnssec] )
+ openpgp? ( dev-python/python-gnupg[$PYTHON_USEDEP] )
+ ssh? ( net-misc/openssh )
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_install() {
+ local tools
+ tools="tlsa"
+ use ssh && tools+=" sshfp"
+ use openpgp && tools+=" openpgpkey"
+ use ipsec && tools+=" ipseckey"
+ for tool in $tools ; do
+ doman ${tool}.1
+ python_foreach_impl python_doscript ${tool}
+ done
+ dodoc BUGS CHANGES README
+}
diff --git a/net-dns/hash-slinger/metadata.xml b/net-dns/hash-slinger/metadata.xml
new file mode 100644
index 00000000000..4b0698ebfd3
--- /dev/null
+++ b/net-dns/hash-slinger/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <use>
+ <flag name='ipsec'>Enable support for IPSECKEY records (ipseckey)</flag>
+ <flag name='openpgp'>Enable support for OPENPGPKEY records (openpgpkey)</flag>
+ <flag name='ssh'>Enable support for SSHFP records (sshfp)</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/hesinfo/Manifest b/net-dns/hesinfo/Manifest
new file mode 100644
index 00000000000..285636ad540
--- /dev/null
+++ b/net-dns/hesinfo/Manifest
@@ -0,0 +1 @@
+DIST hesinfo-3.1.0.tar.gz 137487 RMD160 b7ac55b67992748cbc7b9cd64b0c6b4b4e4cb6bf SHA1 30a92f80f0e8754a5dfc377c71b50f517b168d3a SHA256 2d3e34a8aa5c703a438b26a93b0662f5fbb58bd08b00f806244c6d01d1ccb91f
diff --git a/net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch b/net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch
new file mode 100644
index 00000000000..7e611c042be
--- /dev/null
+++ b/net-dns/hesinfo/files/hesinfo-3.1.0-autotools.patch
@@ -0,0 +1,58 @@
+--- Makefile.in 2006-03-30 18:22:39.000000000 +0200
++++ Makefile.in 2010-03-12 21:34:34.000000000 +0100
+@@ -22,7 +22,7 @@
+ all: hesinfo
+
+ hesinfo: hesinfo.o
+- ${CC} ${LDFLAGS} -o $@ hesinfo.o -lhesiod ${LIBS}
++ ${CC} ${LDFLAGS} -o $@ hesinfo.o -lhesiod ${LIBS} ${LDFLAGS}
+
+ .c.o:
+ ${CC} -c ${ALL_CFLAGS} $<
+--- configure.in 2006-03-30 18:22:39.000000000 +0200
++++ configure.in 2010-03-12 21:42:05.000000000 +0100
+@@ -7,6 +7,43 @@
+ AC_PROG_CC
+ AC_PROG_INSTALL
+
+-ATHENA_HESIOD_REQUIRED
++dnl This file provides local macros for packages which use specific
++dnl external libraries. The public macros are:
++dnl
++dnl ATHENA_HESIOD_REQUIRED
++dnl Generates error if Hesiod not found.
++dnl Specify desired AFS libraries as a parameter.
++dnl ----- Hesiod -----
++
++AC_DEFUN(ATHENA_HESIOD_CHECK,
++[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
++if test "$hesiod" != yes; then
++ CPPFLAGS="$CPPFLAGS -I$hesiod/include"
++ LDFLAGS="$LDFLAGS -L$hesiod/lib"
++fi
++AC_CHECK_LIB(hesiod, hes_resolve, :,
++ [AC_MSG_ERROR(Hesiod library not found)])])
++
++AC_DEFUN(ATHENA_HESIOD,
++[AC_ARG_WITH(hesiod,
++ [ --with-hesiod=PREFIX Use Hesiod],
++ [hesiod="$withval"], [hesiod=no])
++if test "$hesiod" != no; then
++ ATHENA_HESIOD_CHECK
++ HESIOD_LIBS="-lhesiod"
++ AC_DEFINE(HAVE_HESIOD)
++fi
++AC_SUBST(HESIOD_LIBS)])
+
++AC_DEFUN(ATHENA_HESIOD_REQUIRED,
++[AC_ARG_WITH(hesiod,
++ [ --with-hesiod=PREFIX Specify location of Hesiod],
++ [hesiod="$withval"], [hesiod=yes])
++if test "$hesiod" != no; then
++ ATHENA_HESIOD_CHECK
++else
++ AC_MSG_ERROR(This package requires Hesiod.)
++fi])
++
++ATHENA_HESIOD_REQUIRED
+ AC_OUTPUT(Makefile)
diff --git a/net-dns/hesinfo/hesinfo-3.1.0.ebuild b/net-dns/hesinfo/hesinfo-3.1.0.ebuild
new file mode 100644
index 00000000000..06f9834c735
--- /dev/null
+++ b/net-dns/hesinfo/hesinfo-3.1.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit flag-o-matic eutils autotools
+
+DESCRIPTION="A simple command-line interface to the net-dns/hesiod service library"
+HOMEPAGE="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod"
+SRC_URI="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=">=net-dns/hesiod-${PV}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ rm -f aclocal.m4 || die "rm failed"
+ epatch "${FILESDIR}/${P}-autotools.patch"
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ dodoc NEWS README || die
+}
diff --git a/net-dns/hesinfo/metadata.xml b/net-dns/hesinfo/metadata.xml
new file mode 100644
index 00000000000..e8b6c80fb34
--- /dev/null
+++ b/net-dns/hesinfo/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-dns/hesiod/Manifest b/net-dns/hesiod/Manifest
new file mode 100644
index 00000000000..db4e13c7b4a
--- /dev/null
+++ b/net-dns/hesiod/Manifest
@@ -0,0 +1,2 @@
+DIST hesiod-3.1.0-patches.tgz 2389 SHA256 0b3d1c6854f7ab4394e116beadacbd4d5d2925aa2d364a50d14c605e97aab055
+DIST hesiod-3.1.0.tar.gz 224294 SHA256 57b288ea736614d630677da7b6fa3f46c6b07a0ec7e798860f318e887e2602b6
diff --git a/net-dns/hesiod/hesiod-3.1.0.ebuild b/net-dns/hesiod/hesiod-3.1.0.ebuild
new file mode 100644
index 00000000000..50b113ffd39
--- /dev/null
+++ b/net-dns/hesiod/hesiod-3.1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit flag-o-matic eutils autotools
+
+DESCRIPTION="Use DNS functionality to provide access to databases of information that changes infrequently"
+HOMEPAGE="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod"
+SRC_URI="ftp://athena-dist.mit.edu/pub/ATHENA/${PN}/${P}.tar.gz
+ mirror://gentoo/${P}-patches.tgz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+src_prepare() {
+ # Bug #26332
+ filter-flags -fstack-protector
+
+ # Patches stolen from Fedora hesiod-3.1.0-19.fc14.src.rpm
+ rm -f aclocal.m4 || die "rm failed"
+ EPATCH_SOURCE="${WORKDIR}/files/${PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ dodoc NEWS README || die
+}
+
+pkg_postinst() {
+ elog "hesinfo tools are no longer part of hesiod. Use net-dns/hesinfo
+ instead"
+}
diff --git a/net-dns/hesiod/metadata.xml b/net-dns/hesiod/metadata.xml
new file mode 100644
index 00000000000..91f4e72fb54
--- /dev/null
+++ b/net-dns/hesiod/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/host/Manifest b/net-dns/host/Manifest
new file mode 100644
index 00000000000..44d34daa540
--- /dev/null
+++ b/net-dns/host/Manifest
@@ -0,0 +1 @@
+DIST host-20070128.tar.gz 152347 SHA256 a2a56ab236f9e8549366175a3055e0dc7758dafd46658ed8bea58d87de39bd9f SHA512 80f4d4878af40c93f33cc6c43d19b01415e66b3939b157544b4921b9f0b83ef1baa9ce0e151d951417be92973c4b038df80efae974be4bca2bbce43299db65fc WHIRLPOOL 7072f75f1f39b25375f38387625ced95469f7baeeed069429718a5cb438ee0751a612e3ac0f76e91af9ca653ebe97487476dac2cdaeb1d1fc21a49d67ba62527
diff --git a/net-dns/host/files/host-20070128-Makefile.patch b/net-dns/host/files/host-20070128-Makefile.patch
new file mode 100644
index 00000000000..931c4389db1
--- /dev/null
+++ b/net-dns/host/files/host-20070128-Makefile.patch
@@ -0,0 +1,62 @@
+--- Makefile.orig 2003-06-05 03:01:45.000000000 +0200
++++ Makefile 2010-03-12 18:53:17.000000000 +0100
+@@ -117,16 +117,11 @@
+ # Compilation definitions.
+ # ----------------------------------------------------------------------
+
+-DEBUGDEFS = -DDEBUG
+
+ DEFS = $(CONFIGDEFS) $(DEBUGDEFS) $(SYSDEFS) $(INCLUDES)
+
+-COPTS = -pipe
+
+-COPTIM = -O2
+-COPTIM = -O
+
+-CDEBUG = -g
+
+ # GCC lint-like warnings -- any warnings are likely bugs in the
+ # platform headers or in gcc itself....
+@@ -139,7 +134,6 @@
+ -Wswitch \
+ -Wcomment \
+ -Wcast-qual \
+- -Wid-clash-30 \
+ -Wpointer-arith \
+ -Wshadow
+ #endif
+@@ -147,7 +141,6 @@
+ #if $(__GNULD__) >= 1
+ GNULDWARNFLAGS = -W \
+ -Wall \
+- -Wid-clash-30
+ #endif
+
+ #if $(__GNUC__) >= 2
+@@ -169,7 +162,7 @@
+ #endif
+
+ CPPFLAGS = $(DEFS)
+-CFLAGS = $(COPTS) $(CDEBUG) $(COPTIM) $(GCCWARNFLAGS) $(GCC2WARNFLAGS) $(GCC3WARNFLAGS)
++CFLAGS += $(GCCWARNFLAGS) $(GCC2WARNFLAGS) $(GCC3WARNFLAGS)
+
+ # Select your favorite compiler if make doesn't already know it...
+ #if defined(next)
+@@ -250,7 +243,7 @@
+ # Unfortunately SunOS-5.9 has only libresolv.so !!!
+ #
+ #if defined(NEED_LIBRESOLV) && !defined(sunos5.x) && !(BIND-8.4.x)
+-LDFLAGS = -static $(GNULDWARNFLAGS)
++LDFLAGS += $(GNULDWARNFLAGS)
+ #else
+ #LDFLAGS = $(GNULDWARNFLAGS)
+ #endif
+@@ -294,7 +287,7 @@
+ # ----------------------------------------------------------------------
+
+ BINOWN = root
+-BINGRP = staff
++BINGRP = root
+ BINMODE = 755
+ #STRIPFLAG = -s
+
diff --git a/net-dns/host/host-20070128-r1.ebuild b/net-dns/host/host-20070128-r1.ebuild
new file mode 100644
index 00000000000..8673e8e0381
--- /dev/null
+++ b/net-dns/host/host-20070128-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="A powerful command-line DNS query and test tool implementing many additional protocols"
+HOMEPAGE="http://www.weird.com/~woods/projects/host.html"
+SRC_URI="ftp://ftp.weird.com/pub/Planix/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86"
+IUSE="debug"
+
+# Bug 91515
+RESTRICT="test"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+ sed -i -e "s:^\(# if defined(__alpha).*\):\1 || defined(__x86_64__):" \
+ port.h || die "sed failed"
+}
+
+src_compile() {
+ use debug && export DEBUGDEFS="-DDEBUG"
+ emake CC="$(tc-getCC)" RES_LIB=/usr/$(get_libdir)/libresolv.a || die "emake failed"
+}
+
+src_install () {
+ # This tool has slightly different format of output from "standard" host.
+ # Renaming it to host-woods, hopefully this does not conflict with anything.
+
+ newbin host host-woods || die "newbin failed"
+ newman host.1 host-woods.1 || die "newman failed"
+ dodoc RELEASE_NOTES ToDo || die "dodoc failed"
+}
diff --git a/net-dns/host/metadata.xml b/net-dns/host/metadata.xml
new file mode 100644
index 00000000000..681873710b6
--- /dev/null
+++ b/net-dns/host/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>george@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/idnkit/Manifest b/net-dns/idnkit/Manifest
new file mode 100644
index 00000000000..52bd1542c12
--- /dev/null
+++ b/net-dns/idnkit/Manifest
@@ -0,0 +1 @@
+DIST idnkit-1.0-src.tar.gz 432823 SHA256 16cd5fce81a5180d6a2c61cf20572668b3dc59f5c39c272b75fa98edab3391fc SHA512 74f2db007a1991610f62a7a060d534f724f08395a16a7d76fda0824e9017aa47ffe4e251c90d0481218b70534fcd2b32724a66223042f59c1e16c1ff39f3be19 WHIRLPOOL 739206c47acacb32a7858f10665bdf7259b747291769da917a68f92dd200fbd31340eb2af22e281bd55c1b976e1cf264faa7d2110a9ee6b5a3a0ead6d1947dad
diff --git a/net-dns/idnkit/files/idnkit-1.0-autotools.patch b/net-dns/idnkit/files/idnkit-1.0-autotools.patch
new file mode 100644
index 00000000000..d0918bc9184
--- /dev/null
+++ b/net-dns/idnkit/files/idnkit-1.0-autotools.patch
@@ -0,0 +1,64 @@
+--- a/configure.in 2003-03-11 00:53:20.000000000 +0100
++++ b/configure.in 2010-03-12 14:15:24.000000000 +0100
+@@ -629,6 +629,41 @@
+ fi
+ fi
+
++AC_DEFUN(AC_FIND_SYSTEM_SHOBJ,[
++AC_MSG_CHECKING(for $1 shared object)
++shobj_name=$1
++shobj_path=
++case "$host" in
++*-hpux*)
++ SOEXT=sl
++ ;;
++*)
++ SOEXT=so
++ ;;
++esac
++for shobj_libdir in /lib /usr/lib; do
++ if test -f $shobj_libdir/$shobj_name.$SOEXT; then
++ shobj_path=$shobj_libdir/$shobj_name.$SOEXT
++ else
++ shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1`
++ if test "$shobj_path" != "" -a -f "$shobj_path"; then
++ :
++ else
++ shobj_path=
++ fi
++ fi
++ if test "$shobj_path" != ""; then
++ AC_MSG_RESULT($shobj_path)
++ shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
++ AC_DEFINE_UNQUOTED($shobj_pathsymbol, "$shobj_path")
++ break
++ fi
++done
++if test "$shobj_path" = ""; then
++ AC_MSG_RESULT(no)
++fi
++])dnl
++
+ dnl Find system shared object paths.
+ AC_FIND_SYSTEM_SHOBJ(libc)
+ if test "$install_runidn" = yes ; then
+--- a/lib/Makefile.in 2003-03-12 17:14:41.000000000 +0100
++++ b/lib/Makefile.in 2010-03-12 15:54:35.000000000 +0100
+@@ -241,7 +241,7 @@
+
+ install-common:
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+- $(LIBTOOL) $(INSTALL_DATA) $(LITELIB).la \
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LITELIB).la \
+ $(DESTDIR)$(libdir)/$(LITELIB).la
+ -[ -f $(DESTDIR)$(libdir)/$(LITELIB).a ] \
+ && $(RANLIB) $(DESTDIR)$(libdir)/$(LITELIB).a
+@@ -262,7 +262,7 @@
+
+ install-nolite:
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+- $(LIBTOOL) $(INSTALL_DATA) $(LIB).la \
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIB).la \
+ $(DESTDIR)$(libdir)/$(LIB).la
+ -[ -f $(DESTDIR)$(libdir)/$(LIB).a ] \
+ && $(RANLIB) $(DESTDIR)$(libdir)/$(LIB).a
diff --git a/net-dns/idnkit/idnkit-1.0-r2.ebuild b/net-dns/idnkit/idnkit-1.0-r2.ebuild
new file mode 100644
index 00000000000..961c3bb054f
--- /dev/null
+++ b/net-dns/idnkit/idnkit-1.0-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="Toolkit for Internationalized Domain Names (IDN)"
+HOMEPAGE="http://www.nic.ad.jp/ja/idn/idnkit/download/"
+SRC_URI="http://www.nic.ad.jp/ja/idn/idnkit/download/sources/${P}-src.tar.gz"
+
+LICENSE="JNIC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+DEPEND="virtual/libiconv"
+
+S=${WORKDIR}/${P}-src
+
+src_prepare() {
+ # Bug 263135, old broken libtool bundled
+ rm -f aclocal.m4 || die "rm failed"
+ epatch "${FILESDIR}/${P}-autotools.patch"
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+ if has_version dev-libs/libiconv; then
+ myconf="--with-iconv"
+ fi
+ econf $(use_enable static-libs static) ${myconf}
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name 'lib*.la' -delete
+ dodoc ChangeLog DISTFILES NEWS README README.ja
+}
diff --git a/net-dns/idnkit/metadata.xml b/net-dns/idnkit/metadata.xml
new file mode 100644
index 00000000000..52363bff0cb
--- /dev/null
+++ b/net-dns/idnkit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/knot/Manifest b/net-dns/knot/Manifest
new file mode 100644
index 00000000000..c3751167f72
--- /dev/null
+++ b/net-dns/knot/Manifest
@@ -0,0 +1,3 @@
+DIST knot-1.5.3.tar.gz 1175445 SHA256 8d82ad5b2c7162750dc40c57d45dcae2665171a862767a350379fe1c4e0afcdd SHA512 4426ed136e5bcdb0d2b1729ab838418c880728a045dc1a40a6b6fc2a3b77ddcd7a375c8ec160efb6d009fc12eaf55587cf00af141f84d0bd1eb9cdac888fd445 WHIRLPOOL dbc1f59e2f2801f61dfbff4f2fcdc33e72647226e300adc85e9b0febd996aaad9615da33e21ebe22f83c6bf4c52cbcb7ca3a60fef8b66a9339d08f255909f16d
+DIST knot-1.6.3.tar.xz 785052 SHA256 48da608e29c2c1ef5937eb692f8ef0462ebb50fa7d128478a23e0a9788533e86 SHA512 c39f74ec49ec13d845705a11cf4b5474f101687db5cc44be0c2c8347faacf2fe4436d684a3e96d99afedd8408da1c7b3ad39fa5dc7bc3e52dafc899ac3a04958 WHIRLPOOL 4d6ae6b05be05c5a0c11f707a2c438801e9e7570d1aa2e946f659d9ccec25728c972cfa6caf96ccedb34f95fa28f4e904179cc123f34a78889961902333ce0f5
+DIST knot-2.0.0-beta.tar.xz 939468 SHA256 7ed997d15b523abcaede51d7ce3670a687d7658b96eb742b9dd87ac5d3e0e9af SHA512 98c872eea28b00b5da52ff8c74c6cf1c88b11e3d68038126a76de99ae2b39c60430294382b14a530fc2912cad419a7d509386deb78b7faa64320cdec21a1bc36 WHIRLPOOL 3b505d757a7591d32e33a07e9a46cb210e886a566bed705b326ce4d5be18d62865fdf165a97e21c8ad756631a5a448ef9ded67bae0002047ad209d7dad2ab5b6
diff --git a/net-dns/knot/files/1.6.3-dont-create-extra-directories.patch b/net-dns/knot/files/1.6.3-dont-create-extra-directories.patch
new file mode 100644
index 00000000000..e8d84a18859
--- /dev/null
+++ b/net-dns/knot/files/1.6.3-dont-create-extra-directories.patch
@@ -0,0 +1,15 @@
+--- src/Makefile.in.orig 2015-05-03 16:34:53.177934984 +0200
++++ src/Makefile.in 2015-05-03 16:35:11.481325329 +0200
+@@ -2712,12 +2712,6 @@
+ uninstall-sbinPROGRAMS
+
+
+-# Create storage and run-time directories
+-install-data-hook:
+- $(INSTALL) -d $(DESTDIR)/@config_dir@
+- $(INSTALL) -d $(DESTDIR)/@run_dir@
+- $(INSTALL) -d $(DESTDIR)/@storage_dir@
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch b/net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch
new file mode 100644
index 00000000000..538afecc5f6
--- /dev/null
+++ b/net-dns/knot/files/2.0.0_beta-dont-create-extra-directories.patch
@@ -0,0 +1,15 @@
+--- src/Makefile.in.orig 2015-05-10 20:59:26.854079700 +0200
++++ src/Makefile.in 2015-05-10 21:00:01.870857369 +0200
+@@ -3401,12 +3401,6 @@
+ uninstall-pkgconfigDATA uninstall-sbinPROGRAMS
+
+
+-# Create storage and run-time directories
+-@HAVE_DAEMON_TRUE@install-data-hook:
+-@HAVE_DAEMON_TRUE@ $(INSTALL) -d $(DESTDIR)/@config_dir@
+-@HAVE_DAEMON_TRUE@ $(INSTALL) -d $(DESTDIR)/@run_dir@
+-@HAVE_DAEMON_TRUE@ $(INSTALL) -d $(DESTDIR)/@storage_dir@
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch b/net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch
new file mode 100644
index 00000000000..5861ee5841c
--- /dev/null
+++ b/net-dns/knot/files/2.0.0_beta-spell-enable-vars-correctly.patch
@@ -0,0 +1,11 @@
+--- configure.orig 2015-05-10 19:25:43.365929384 +0200
++++ configure 2015-05-10 19:26:00.452648532 +0200
+@@ -12833,7 +12833,7 @@
+ if test "$enable_daemon" = "yes"; then :
+
+
+-if test "$enable_system" != "no"; then :
++if test "$enable_systemd" != "no"; then :
+
+ case $enable_systemd in #(
+ auto) :
diff --git a/net-dns/knot/files/knot.init b/net-dns/knot/files/knot.init
new file mode 100644
index 00000000000..0894c2080da
--- /dev/null
+++ b/net-dns/knot/files/knot.init
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command=/usr/sbin/knotd
+command_args="-d"
+pidfile=/var/run/knot/knot.pid
+required_files=/etc/knot/knot.conf
+extra_started_commands="reload"
+description_reload="Reload configuration and changed zones."
+
+depend() {
+ need net
+}
+
+start() {
+ checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/
+
+ ebegin "Starting knot"
+ start-stop-daemon --start \
+ --pidfile $pidfile --exec $command -- $command_args
+ eend $?
+}
+
+stop() {
+ ebegin "Stoping knot"
+ /usr/sbin/knotc stop >/dev/null 2>&1
+ # In case remote control is not working
+ if [ "$?" != 0 ]; then
+ if [ -f $pidfile ]; then
+ start-stop-daemon --stop --pidfile $pidfile
+ fi
+ fi
+ ewend $?
+}
+
+reload() {
+ ebegin "Reloading knot"
+ /usr/sbin/knotc reload >/dev/null
+ eend $?
+}
diff --git a/net-dns/knot/knot-1.5.3.ebuild b/net-dns/knot/knot-1.5.3.ebuild
new file mode 100644
index 00000000000..77b523f6389
--- /dev/null
+++ b/net-dns/knot/knot-1.5.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="https://gitlab.labs.nic.cz/labs/${PN}.git"
+[[ ${PV} == 9999 ]] && inherit autotools git-r3
+inherit eutils user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="http://www.knot-dns.cz/"
+[[ ${PV} == 9999 ]] || SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="debug caps +fastparser idn"
+
+RDEPEND="
+ dev-libs/openssl
+ dev-libs/userspace-rcu
+ caps? ( sys-libs/libcap-ng )
+ idn? ( net-dns/libidn )
+"
+# sys-libs/glibc
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ virtual/yacc
+ fastparser? ( dev-util/ragel )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_prepare() {
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ --disable-lto \
+ --enable-recvmmsg \
+ $(use_enable fastparser) \
+ $(use_enable debug debug server,zones,xfr,packet,dname,rr,ns,hash,compiler) \
+ $(use_enable debug debuglevel details) \
+ $(use_with idn libidn)
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}/knot.init" knot
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/knot-1.6.3.ebuild b/net-dns/knot/knot-1.6.3.ebuild
new file mode 100644
index 00000000000..9b45a0ef695
--- /dev/null
+++ b/net-dns/knot/knot-1.6.3.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="http://www.knot-dns.cz/"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug dnstap doc caps +fastparser idn lmdb systemd"
+
+RDEPEND="
+ >=dev-libs/openssl-1.0.1
+ >=dev-libs/userspace-rcu-0.5.4
+ caps? ( >=sys-libs/libcap-ng-0.6.4 )
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
+ idn? ( net-dns/libidn )
+ lmdb? ( dev-db/lmdb )
+ systemd? ( sys-apps/systemd )
+"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/bison
+ doc? ( dev-python/sphinx app-text/texlive-core sys-apps/texinfo )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-dont-create-extra-directories.patch"
+}
+
+src_configure() {
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ $(use_enable fastparser) \
+ $(use_enable debug debug server,zones,xfr,packet,rr,ns,loader,dnssec) \
+ $(use_enable debug debuglevel details) \
+ $(use_enable dnstap) \
+ $(use_enable lmdb) \
+ $(use_with idn libidn) \
+ $(usex systemd --enable-systemd=yes --enable-systemd=no)
+}
+
+src_compile() {
+ default
+ use doc && emake -C doc html-local singlehtml pdf-local info-local
+}
+
+# Portage's automatic test code runs "make -n check" to see if there
+# is a "check" target, but that fails here because the test
+# infrastructure hasn't been built yet. Just run "make check", which
+# will build it and then run the tests.
+src_test() {
+ emake -j1 check
+}
+
+src_install() {
+ default
+ keepdir /var/lib/${PN}
+
+ if use doc; then
+ dodoc doc/_build/latex/KnotDNS.pdf
+
+ docinto html
+ dodoc doc/_build/html/*.html doc/_build/html/*.js
+ docinto html/_sources
+ dodoc doc/_build/html/_sources/*
+ docinto html/_static
+ dodoc doc/_build/html/_static/*
+
+ docinto singlehtml
+ dodoc doc/_build/singlehtml/index.html
+ docinto singlehtml/_static/
+ dodoc doc/_build/singlehtml/_static/*
+
+ doinfo doc/_build/texinfo/KnotDNS.info
+ fi
+
+ newinitd "${FILESDIR}/knot.init" knot
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/knot-2.0.0_beta.ebuild b/net-dns/knot/knot-2.0.0_beta.ebuild
new file mode 100644
index 00000000000..0ed9ae00494
--- /dev/null
+++ b/net-dns/knot/knot-2.0.0_beta.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="http://www.knot-dns.cz/"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug dnstap doc caps +fastparser idn systemd"
+
+RDEPEND="
+ >=net-libs/gnutls-3.0
+ >=dev-libs/jansson-2.3
+ dev-db/lmdb
+ >=dev-libs/userspace-rcu-0.5.4
+ caps? ( >=sys-libs/libcap-ng-0.6.4 )
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
+ idn? ( net-dns/libidn )
+ systemd? ( sys-apps/systemd )
+"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx app-text/texlive-core sys-apps/texinfo )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-spell-enable-vars-correctly.patch"
+ epatch "${FILESDIR}/${PV}-dont-create-extra-directories.patch"
+}
+
+src_configure() {
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ --with-lmdb \
+ $(use_enable fastparser) \
+ $(use_enable debug debug server,zones,ns,loader,dnssec) \
+ $(use_enable debug debuglevel details) \
+ $(use_enable dnstap) \
+ $(use_enable doc documentation) \
+ $(use_with idn libidn) \
+ $(usex systemd --enable-systemd=yes --enable-systemd=no)
+}
+
+src_compile() {
+ default
+ use doc && emake -C doc html-local singlehtml pdf-local info-local
+}
+
+# Portage's automatic test code runs "make -n check" to see if there
+# is a "check" target, but that fails here because the test
+# infrastructure hasn't been built yet. Just run "make check", which
+# will build it and then run the tests.
+src_test() {
+ emake -j1 check
+}
+
+src_install() {
+ default
+ keepdir /var/lib/${PN}
+
+ if use doc; then
+ dodoc doc/_build/latex/KnotDNS.pdf
+
+ docinto html
+ dodoc doc/_build/html/*.html doc/_build/html/*.js
+ docinto html/_sources
+ dodoc doc/_build/html/_sources/*
+ docinto html/_static
+ dodoc doc/_build/html/_static/*
+
+ docinto singlehtml
+ dodoc doc/_build/singlehtml/index.html
+ docinto singlehtml/_static/
+ dodoc doc/_build/singlehtml/_static/*
+
+ doinfo doc/_build/texinfo/KnotDNS.info
+ fi
+
+ newinitd "${FILESDIR}/knot.init" knot
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/metadata.xml b/net-dns/knot/metadata.xml
new file mode 100644
index 00000000000..29256af3d08
--- /dev/null
+++ b/net-dns/knot/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>ondrej@sury.org</email>
+ <name>Ondřej Surý</name>
+ </maintainer>
+ <maintainer>
+ <email>scarabeus@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="dnstap">Include support for the dnstap
+ binary log format (http://dnstap.info/).
+ </flag>
+ <flag name="fastparser">Use a zone file parser that is
+ faster, but requires more memory and CPU time to
+ compile.
+ </flag>
+ <flag name="lmdb">Use the LMDB database to store
+ timers for slave zones on disk, making the timers
+ persist across server restarts.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/ldns-utils/Manifest b/net-dns/ldns-utils/Manifest
new file mode 100644
index 00000000000..1c53a2a1a0a
--- /dev/null
+++ b/net-dns/ldns-utils/Manifest
@@ -0,0 +1,2 @@
+DIST ldns-1.6.12.tar.gz 1057607 SHA256 b966787510a169ca0ed78f9a8a5de01fb309909575e721ead92095d4677aa51c SHA512 f928be35a5c0bc2b918f005dd592cc531451f373ed9d77a54d5207a2a80b9d525faabf75bba75483d3476cfeff75a66ad4d9527a84a983216dae4fac30213773 WHIRLPOOL 0e8cf513991850b065144568ec1ea3188ddb6bbf6b3cf08490186552884b2b2dd42ae8ab8995f54c183a989976ab292772411f2582a5bd595d4d54d25e2b4096
+DIST ldns-1.6.17.tar.gz 1315403 SHA256 8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd SHA512 5de42b4b8622591db51efb0956735deee9cd5e0bee12249a03b65c5b45d7c51bf9c2edb310ef9d7431af49aef77d968bfa2455a7dedfa80cde3d433436c83785 WHIRLPOOL 08c8a13df3dbeccd5dc5ceeb52730a61ab231e70a85524e826f9275bbcde6e09d6e2fc5234303a6bceb431d2b91f510140ce61a2b59d77afbb2759a0627c7cb7
diff --git a/net-dns/ldns-utils/files/1.6.12-cflags.patch b/net-dns/ldns-utils/files/1.6.12-cflags.patch
new file mode 100644
index 00000000000..5e14a20ad37
--- /dev/null
+++ b/net-dns/ldns-utils/files/1.6.12-cflags.patch
@@ -0,0 +1,22 @@
+diff -Naur ldns-1.6.12.orig/drill/configure.ac ldns-1.6.12/drill/configure.ac
+--- ldns-1.6.12.orig/drill/configure.ac 2011-11-17 00:48:16.000000000 +0900
++++ ldns-1.6.12/drill/configure.ac 2012-01-12 00:20:51.944503474 +0900
+@@ -33,7 +33,6 @@
+ ACX_CHECK_COMPILER_FLAG(xc99, [C99FLAG="-xc99"])
+
+ AC_TYPE_SIZE_T
+-ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
+
+ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600,
+ [
+diff -Naur ldns-1.6.12.orig/examples/configure.ac ldns-1.6.12/examples/configure.ac
+--- ldns-1.6.12.orig/examples/configure.ac 2011-09-29 22:04:19.000000000 +0900
++++ ldns-1.6.12/examples/configure.ac 2012-01-12 00:21:03.191504702 +0900
+@@ -31,7 +31,6 @@
+
+
+ AC_TYPE_SIZE_T
+-ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
+
+ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600,
+ [
diff --git a/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild b/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild
new file mode 100644
index 00000000000..22a507be91b
--- /dev/null
+++ b/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+inherit autotools eutils
+
+MY_P="${P/-utils}"
+DESCRIPTION="Set of utilities to simplify various dns(sec) tasks"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="examples gost ssl"
+
+DEPEND=">=net-libs/ldns-${PV}[gost?,ssl?]
+ examples? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # bug #369339
+ epatch "${FILESDIR}/1.6.12-cflags.patch"
+
+ ( cd drill && eautoreconf )
+ ( cd examples && eautoreconf )
+}
+
+src_configure() {
+ cd "${S}"/drill
+ econf $(use_with ssl) || die
+
+ if use examples; then
+ cd "${S}"/examples
+ econf \
+ $(use_enable gost) \
+ $(use_enable ssl sha2) \
+ $(use_with ssl) || die
+ fi
+}
+
+src_compile() {
+ emake -C drill || die "emake for drill failed"
+ if use examples; then
+ emake -C examples || die "emake for examples failed"
+ fi
+}
+
+src_install() {
+ cd "${S}"/drill
+ emake DESTDIR="${D}" install || die "emake install for drill failed"
+ dodoc ChangeLog.22-nov-2005 README REGRESSIONS || die
+
+ if use examples; then
+ cd "${S}"/examples
+ emake DESTDIR="${D}" install || die "emake install for examples failed"
+ newdoc README README.examples || die
+ fi
+}
diff --git a/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild b/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild
new file mode 100644
index 00000000000..1893881d698
--- /dev/null
+++ b/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P=${P/-utils}
+
+DESCRIPTION="Set of utilities to simplify various dns(sec) tasks"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="dane ecdsa examples gost ssl"
+
+DEPEND=">=net-libs/ldns-${PV}[dane?,ecdsa?,gost?,ssl?]
+ examples? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ cd "${S}"/drill
+ econf $(use_with ssl)
+
+ if use examples; then
+ cd "${S}"/examples
+ econf \
+ $(use_enable dane) \
+ $(use_enable ecdsa) \
+ $(use_enable gost) \
+ $(use_enable ssl sha2) \
+ $(use_with ssl)
+ fi
+}
+
+src_compile() {
+ emake -C drill
+ if use examples; then
+ emake -C examples
+ fi
+}
+
+src_install() {
+ cd "${S}"/drill
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog.22-nov-2005 README REGRESSIONS
+
+ if use examples; then
+ cd "${S}"/examples
+ emake DESTDIR="${D}" install
+ newdoc README README.examples
+ fi
+}
diff --git a/net-dns/ldns-utils/metadata.xml b/net-dns/ldns-utils/metadata.xml
new file mode 100644
index 00000000000..b2c0747cedc
--- /dev/null
+++ b/net-dns/ldns-utils/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <longdescription lang="en">
+ ldns is a library with the aim to simplify DNS programing in C. All
+ lowlevel DNS/DNSSEC operations are supported. We also define a higher
+ level API which allows a programmer to (for instance) create or sign
+ packets.
+ </longdescription>
+ <use>
+ <flag name='dane'>Enable DNS-based Authentication of Named Entities (DANE) support</flag>
+ <flag name='ecdsa'>Enable ECDSA support</flag>
+ <flag name='gost'>Enable GOST support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/libidn/Manifest b/net-dns/libidn/Manifest
new file mode 100644
index 00000000000..287bbf2c7b5
--- /dev/null
+++ b/net-dns/libidn/Manifest
@@ -0,0 +1,2 @@
+DIST libidn-1.30.tar.gz 3474545 SHA256 39b9fc94d74081c185757b12e0891ce5a22db55268e7d1bb24533ff4432eb053 SHA512 066b3bd098f2ef39361ee42ec0abfcc69ba695b1565a81905e2047fa453c328a2d674703ac873a4e5a349632151ce5d6d56328b93fae42ca5e658190949a26a9 WHIRLPOOL a6fff4c283e0a556d8d5772f496468761030200935aa649d31e7e305cc1c215e578d13c518470f062b5cf54fb893c6c259023d88aa209216039a2319e7ed5dce
+DIST libidn-1.32.tar.gz 3483155 SHA256 ba5d5afee2beff703a34ee094668da5c6ea5afa38784cebba8924105e185c4f5 SHA512 fd48665b65f88210ea504675fc1cd667bd4042b1df3e386847070a465d6753efcec735e6e8572f45f9432235e813c61ef7df09596274935467fdc6f12f80b9bd WHIRLPOOL 1ea67bc1cf1dc9887c6721d5ed15a9227424bdb88f5a915b5854a2ba747228849acaf1a71e9869972cff1887742b031cc57f66c6a1aafac10e65b42dbee9a2f6
diff --git a/net-dns/libidn/files/50libidn-gentoo.el b/net-dns/libidn/files/50libidn-gentoo.el
new file mode 100644
index 00000000000..6ab280c64eb
--- /dev/null
+++ b/net-dns/libidn/files/50libidn-gentoo.el
@@ -0,0 +1,12 @@
+
+;;; libidn site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'idna-to-ascii "idna"
+ "Returns an ASCII Compatible Encoding (ACE) of STR.")
+(autoload 'idna-to-unicode "idna"
+ "Returns a possibly multibyte string after decoding STR.")
+(autoload 'punycode-encode "punycode"
+ "Returns a Punycode encoding of STR.")
+(autoload 'punycode-decode "punycode"
+ "Returns a possibly multibyte string which is the punycode decoding of STR.")
diff --git a/net-dns/libidn/libidn-1.30.ebuild b/net-dns/libidn/libidn-1.30.ebuild
new file mode 100644
index 00000000000..718675dc550
--- /dev/null
+++ b/net-dns/libidn/libidn-1.30.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal
+
+DESCRIPTION="Internationalized Domain Names (IDN) implementation"
+HOMEPAGE="http://www.gnu.org/software/libidn/"
+SRC_URI="mirror://gnu/libidn/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc emacs java mono nls static-libs"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO )
+COMMON_DEPEND="
+ emacs? ( virtual/emacs )
+ mono? ( >=dev-lang/mono-0.95 )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? ( >=sys-devel/gettext-0.17 )
+ java? (
+ >=virtual/jdk-1.5
+ doc? ( dev-java/gjdoc )
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ # bundled, with wrong bytecode
+ rm "${S}/java/${P}.jar" || die
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable mono csharp mono) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ --disable-silent-rules \
+ --disable-valgrind-tests \
+ --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org" \
+ --with-packager-version="r${PR}" \
+ --with-packager="Gentoo"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use emacs; then
+ elisp-compile "${S}"/src/*.el || die
+ fi
+}
+
+multilib_src_test() {
+ # only run libidn specific tests and not gnulib tests (bug #539356)
+ emake -C tests check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_newjar java/${P}.jar ${PN}.jar || die
+ rm -r "${ED}"/usr/share/java || die
+
+ if use doc ; then
+ java-pkg_dojavadoc doc/java
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ if use emacs; then
+ # *.el are installed by the build system
+ elisp-install ${PN} "${S}"/src/*.elc
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ else
+ rm -r "${ED}/usr/share/emacs" || die
+ fi
+
+ einstalldocs
+ if use doc ; then
+ dohtml -r doc/reference/html/.
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/net-dns/libidn/libidn-1.32.ebuild b/net-dns/libidn/libidn-1.32.ebuild
new file mode 100644
index 00000000000..dfcda6f7b35
--- /dev/null
+++ b/net-dns/libidn/libidn-1.32.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal
+
+DESCRIPTION="Internationalized Domain Names (IDN) implementation"
+HOMEPAGE="http://www.gnu.org/software/libidn/"
+SRC_URI="mirror://gnu/libidn/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc emacs java mono nls static-libs"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO )
+COMMON_DEPEND="
+ emacs? ( virtual/emacs )
+ mono? ( >=dev-lang/mono-0.95 )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? ( >=sys-devel/gettext-0.17 )
+ java? (
+ >=virtual/jdk-1.5
+ doc? ( dev-java/gjdoc )
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ # bundled, with wrong bytecode
+ rm "${S}/java/${P}.jar" || die
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable mono csharp mono) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ --disable-silent-rules \
+ --disable-valgrind-tests \
+ --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org" \
+ --with-packager-version="r${PR}" \
+ --with-packager="Gentoo"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use emacs; then
+ elisp-compile "${S}"/src/*.el || die
+ fi
+}
+
+multilib_src_test() {
+ # only run libidn specific tests and not gnulib tests (bug #539356)
+ emake -C tests check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_newjar java/${P}.jar ${PN}.jar || die
+ rm -r "${ED}"/usr/share/java || die
+
+ if use doc ; then
+ java-pkg_dojavadoc doc/java
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ if use emacs; then
+ # *.el are installed by the build system
+ elisp-install ${PN} "${S}"/src/*.elc
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ else
+ rm -r "${ED}/usr/share/emacs" || die
+ fi
+
+ einstalldocs
+ if use doc ; then
+ dohtml -r doc/reference/html/.
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/net-dns/libidn/metadata.xml b/net-dns/libidn/metadata.xml
new file mode 100644
index 00000000000..52363bff0cb
--- /dev/null
+++ b/net-dns/libidn/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/libidn2/Manifest b/net-dns/libidn2/Manifest
new file mode 100644
index 00000000000..2e14bdd2ce0
--- /dev/null
+++ b/net-dns/libidn2/Manifest
@@ -0,0 +1 @@
+DIST libidn2-0.10.tar.gz 1580496 SHA256 3d301890bdbb137424f5ea495f82730a4b85b6a2549e47de3a34afebeac3e0e3 SHA512 a1830ddb50d6c03056bf18c460b05a816988f16dd25c81b85571002b432c96230115b73ecb839a12703ea5c33b44bd844f48ef7a7c97b93d97d1d101ab3e875f WHIRLPOOL 39b37e78ce7b94af9e3170a76852505b364d37ea949bead96eefdd855d480d918a29387ca50d9bcb7f0209f2e831124450315044c2ba8a14d926b1a8e8a2124e
diff --git a/net-dns/libidn2/files/libidn2-0.10-Werror.patch b/net-dns/libidn2/files/libidn2-0.10-Werror.patch
new file mode 100644
index 00000000000..64b7597b521
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-0.10-Werror.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_MACRO_DIR([m4])
+-AM_INIT_AUTOMAKE([-Wall -Werror])
++AM_INIT_AUTOMAKE([-Wall])
+
+ AC_PROG_CC
+ gl_EARLY
diff --git a/net-dns/libidn2/files/libidn2-0.10-examples.patch b/net-dns/libidn2/files/libidn2-0.10-examples.patch
new file mode 100644
index 00000000000..755f192e828
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-0.10-examples.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -15,7 +15,7 @@
+
+ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+
+-SUBDIRS = gl . src doc examples tests
++SUBDIRS = gl . src doc tests
+ ACLOCAL_AMFLAGS = -I m4 -I gl/m4
+ EXTRA_DIST = gl/m4/gnulib-cache.m4
+
diff --git a/net-dns/libidn2/libidn2-0.10.ebuild b/net-dns/libidn2/libidn2-0.10.ebuild
new file mode 100644
index 00000000000..f33f7e4c71e
--- /dev/null
+++ b/net-dns/libidn2/libidn2-0.10.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="An implementation of the IDNA2008 specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893)"
+HOMEPAGE="http://www.gnu.org/software/libidn/#libidn2"
+SRC_URI="mirror://gnu-alpha/libidn/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-examples.patch
+ epatch "${FILESDIR}"/${P}-Werror.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
diff --git a/net-dns/libidn2/metadata.xml b/net-dns/libidn2/metadata.xml
new file mode 100644
index 00000000000..3fcf9a077c2
--- /dev/null
+++ b/net-dns/libidn2/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>jer@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/maradns/Manifest b/net-dns/maradns/Manifest
new file mode 100644
index 00000000000..fa432eb341b
--- /dev/null
+++ b/net-dns/maradns/Manifest
@@ -0,0 +1 @@
+DIST maradns-2.0.09.tar.bz2 1139409 SHA256 e1ee80836f0fbc47b9b94ec839e112ea19c40bed0b70d672d231849a4dea1083 SHA512 42bfcafaf4e465d8d566b4d9ea8383b5d0f553486b86dd807b35a07358987227e5dc8187de0e8192fba5b53098d61f91091cec112ef7cc80c5d5e73d8acff3bf WHIRLPOOL 6f3e55d8c6633a465c0e9de576921d833c67332cf0cbc8c01e7bc7d70c46102c32566d0ee867cdbf11c8b2b1d5cdc40d18ee4791bd0a4e045ad0e0bc590e61d6
diff --git a/net-dns/maradns/files/deadwood b/net-dns/maradns/files/deadwood
new file mode 100644
index 00000000000..d9e8175ad5e
--- /dev/null
+++ b/net-dns/maradns/files/deadwood
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting deadwood"
+ start-stop-daemon --start --quiet --name deadwood --wait 1000 \
+ --exec /usr/bin/duende /usr/sbin/Deadwood -- -f /etc/maradns/dwood3rc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping deadwood"
+ start-stop-daemon --stop --quiet --name deadwood --wait 1000 \
+ --exec /usr/bin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch b/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch
new file mode 100644
index 00000000000..107097159c8
--- /dev/null
+++ b/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch
@@ -0,0 +1,251 @@
+Author: Nicholas Bamber <nicholas@periapt.co.uk>
+Subject: askmara-tcp lazily copies askmara usage and man page
+Last-Updated: 2011-09-21
+Forwarded: no
+--- a/tools/askmara_labels_en.h
++++ b/tools/askmara_labels_en.h
+@@ -1,11 +1,12 @@
+ /* Placed in the public domain 2001 by Sam Trenholme */
+
+-/* All of the labels for replies used in askmara */
++/* All of the labels for replies used in askmara(-tcp) */
+
+ #define L_NEWLINE "\n"
+ #define L_HARD_ERROR "Hard Error: "
+ #define L_QUERYING "Querying the server with the IP "
+ #define L_USAGE "Usage: askmara [-n] [-v | -t timeout] Query [server]\n#Example: askmara Ayahoo.com."
++#define L_USAGE_TCP "Usage: askmara-tcp [-n] [-v | -t timeout] Query [server]\n#Example: askmara-tcp Ayahoo.com."
+ #define L_JS_CREATE_INDATA "js_create with indata"
+ #define L_JS_CREATE_UINDATA "js_create with uindata"
+ #define L_JS_CREATE_OUTDATA "js_create with outdata"
+--- a/tools/askmara-tcp.c
++++ b/tools/askmara-tcp.c
+@@ -190,7 +190,7 @@
+ nrd = 1;
+ else if(argv[0][0] == '-' && argv[0][1] == 'p') {
+ if(argc < 2) {
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+ }
+ argc--;
+ argv++;
+@@ -201,7 +201,7 @@
+ }
+ else if(argv[0][0] == '-' && argv[0][1] == 't') {
+ if(argc < 2) {
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+ }
+ argc--;
+ argv++;
+@@ -213,14 +213,14 @@
+ else if (argv[0][0] != '-')
+ break;
+ else
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+ argc--;
+ argv++;
+ }
+
+ /* we expect now the query string and possibly the server */
+ if(argc<1)
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+
+ /* Determine what IP address to connect to */
+ if(argc>1)
+--- /dev/null
++++ b/doc/en/man/askmara-tcp.1
+@@ -0,0 +1,191 @@
++.\" Do *not* edit this file; it was automatically generated by ej2man
++.\" Look for a name.ej file with the same name as this filename
++.\"
++.\" Process this file with the following
++.\" nroff -man -Tutf8 maradns.8 | tr '\020' ' '
++.\"
++.\" Last updated Mon Sep 27 15:36:06 2010
++.\"
++.TH ASKMARA-TCP 1 "askmara-tcp" "January 2002" "askmara-tcp"
++.\" We don't want hyphenation (it's too ugly)
++.\" We also disable justification when using nroff
++.\" Due to the way the -mandoc macro works, this needs to be placed
++.\" after the .TH heading
++.hy 0
++.if n .na
++.\"
++.\" We need the following stuff so that we can have single quotes
++.\" In both groff and other UNIX *roff processors
++.if \n(.g .mso www.tmac
++.ds aq \(aq
++.if !\n(.g .if '\(aq'' .ds aq \'
++
++.SH "NAME"
++.PP
++askmara-tcp \- do simple dns queries over TCP
++.SH "DESCRIPTION"
++.PP
++.B "askmara-tcp"
++queries the user-specified dns server for records, and
++outputs the reply in a csv2-compatible format (csv2 is the format of
++zone
++files that
++.B "maradns"
++uses). However unlike
++.B "askmara"
++it uses TCP rather than UDP.
++.SH "USAGE"
++.PP
++.B "askmara-tcp"
++.RB [ -n ]
++.RB [ -v | -t
++.IR timeout ]
++.I query
++.RI [ server ]
++.SH "OPTIONS"
++.PP
++.TP 4
++.BI -t
++If this is present, the following argument is the askmara-tcp
++.IR timeout ,
++in seconds. Note that
++.B "askmara-tcp"
++can not both have a user-defined
++timeout and verbose output.
++.TP 4
++.BI -v
++If this is set,
++.B "askmara-tcp"
++will verbosely output the complete reply that the server sent. Note
++that this verbose output is not csv2-compatible.
++.TP 4
++.BI -n
++If this is set,
++.BR "askmara-tcp" ","
++when sending out a query, will not
++request DNS recursion; in other words, askmara-tcp will request that the
++remote DNS server not contact other DNS servers to answer the query in
++question.
++.TP 4
++.I query
++dns record to be queried. The query has two sections:
++The type of record we desire, and the hostname we want this record for.
++.PP
++The type of query can have two forms: A one-letter mnemonic, or a
++numeric rtype followed by a colon. This is immediately concatenated by
++the full name of the host name we wish to look up.
++.PP
++For example, to ask for the IP of \(aqexample.com.\(aq, we can use the
++one-letter
++mnemonic, in the form \(aqAexample.com.\(aq, or we can use the numeric
++RR followed
++by a colon, giving the query \(aq1:example.com.\(aq (since A has the
++record type
++of one). Note that the query name needs the trailing dot at the end.
++.PP
++Askmara supports a handful one-letter mnemonics, as follows:
++.PP
++.B "A"
++signifies a request for an A (ipv4 address) RR
++.PP
++.B "N"
++signifies a NS RR
++.PP
++.B "C"
++signifies that we are asking for a CNAME RR
++.PP
++.B "S"
++signifies that we want a SOA RR
++.PP
++.B "P"
++signifies that we want a PTR RR
++.PP
++.B "@"
++signifies that we mant a MX RR
++.PP
++.B "T"
++signifies that we want a TXT RR
++.PP
++.B "Z"
++signifies that we want to ask for all RRs.
++.TP 4
++.I server
++IP address of the dns server to be queried. If no server is given,
++askmara-tcp will query 127.0.0.1.
++.PP
++.SH "EXAMPLES"
++.PP
++Asking the server with the ip 127.0.0.1 for the IP address of
++example.com:
++
++.nf
++askmara-tcp Aexample.com.
++.fi
++
++Asking the server with the ip 198.41.0.4 for the IP address of
++example.com:
++
++.nf
++askmara-tcp Aexample.com. 198.41.0.4
++.fi
++
++Asking the server with the ip address 127.0.0.1 for the IP address of
++example.com, using the rr_number:query format:
++
++.nf
++askmara-tcp 1:example.com.
++.fi
++
++Asking the server with the ip address 127.0.0.1 for a SRV record. In
++particular, we ask for the "http over tcp" service for example.net.
++Since askmara-tcp doesn\(aqt have a mnemonic for SRV record types, we
++use the numeric code (33 for SRV):
++
++.nf
++askmara-tcp 33:_http._tcp.example.net.
++.fi
++
++Asking the server with the ip address 127.0.0.1 for the AAAA (ipv6 ip)
++record for example.net:
++
++.nf
++askmara-tcp 28:example.net.
++.fi
++
++Note that the output will be a raw DNS packet in both the SRV
++and AAAA examples.
++.SH "BUGS"
++.PP
++When askmara-tcp is asked for an SOA record, the output of
++.B "askmara-tcp"
++closely resembles the format of a csv2 file, but can not be parsed as a
++csv2 file without modification.
++.PP
++askmara-tcp outputs multi-chunk ("character-string") TXT
++records incorrectly (it only outputs the first chunk).
++.SH "SEE ALSO"
++.PP
++.B maradns(8),
++.B askmara(1)
++
++.br
++http://www.maradns.org
++.SH "LEGAL DISCLAIMER"
++.PP
++THIS SOFTWARE IS PROVIDED BY THE AUTHORS \(aq\(aqAS IS\(aq\(aq AND ANY
++EXPRESS
++OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
++LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
++BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
++WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
++OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
++EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++.SH "AUTHOR"
++.PP
++MaraDNS is written by Sam Trenholme. Jaakko Niemi used 5 minutes
++to roll this manpage together, which Sam has subsequently revised.
++
diff --git a/net-dns/maradns/files/maradns-2.0.06-duende-man.patch b/net-dns/maradns/files/maradns-2.0.06-duende-man.patch
new file mode 100644
index 00000000000..8e9283bc080
--- /dev/null
+++ b/net-dns/maradns/files/maradns-2.0.06-duende-man.patch
@@ -0,0 +1,109 @@
+Author: Nicholas Bamber <nicholas@periapt.co.uk>
+Subject: Duende man page
+ We have made various changes to the duende executable and these need to
+ be reflected in the Debian man page.
+Forwarded: yes
+Last-Update: 2011-07-18
+--- a/doc/en/man/duende.8
++++ b/doc/en/man/duende.8
+@@ -29,11 +29,12 @@
+ makes a given child process a daemon. The standard output
+ and standard error
+ of the child process is logged via syslog() with a priority of
+-LOG_INFO.
++LOG_ALERT.
+ .SH "USAGE"
+ .PP
+ .B "duende"
+-child_process [ all subsequent arguments passed on to child ]
++.RB [ options ]
++child_process [ arguments passed onto child ]
+ .SH "DETAILS"
+ .PP
+ When
+@@ -76,48 +77,52 @@
+ duende uses a setuid() call to change the user ID of the logging
+ process
+ to the user with ID 66.
++.SH "OPTIONS"
++.PP
++Most of the above behaviour can be configured by command line arguments.
++.TP 4
++.BI -c | --chroot " directory"
++The log helper process will change its directory and root to this location.
++This defaults to
++.B /etc/maradns/logger "."
++.TP 4
++.BI -i | --ident " string"
++The log helper process will use this string to identify the process when
++sending messages to syslog.
++This defaults to
++.B log-help "."
++.TP 4
++.BI -p | --pid " filename"
++If this argument is present, the duende parent process will store its pid in
++this file.
++.TP 4
++.BI -u | --uid " integer"
++The log helper process will drop its user id to this. This value defaults to
++66.
++.TP 4
++.BI -g | --gid " integer"
++The log helper process will drop its group id to this. This value defaults to
++66.
++.TP 4
++.BI -r | --restart_on " integer"
++The log helper process will restart the child process if it exists with this
++status code. This defaults to 8.
+ .SH "LOGGING"
+ .PP
+ .B "duende"
+ uses the syslog() facility to log the standard output of the
+ program that it invokes. The name of the program (in other words, the
+-"ident" given to openlog()) is the full path of the first argument
+-given
+-to
+-.BR "duende" "."
++"ident" given to openlog()) defaults to
++.BR "log-helper"
++but can be overridden with the
++.RB "--ident"
++argument.
+ All messages created by the child process are sent
+-to syslog() with a priority of LOG_INFO and a "facility"
+-of LOG_DAEMON (daemon.info in /etc/syslog.conf); since daemon.info
+-messages are not logged by default in FreeBSD, on FreeBSD systems
+-messages generated by the child process are logged with a priority of
+-LOG_ALERT and a "facility" of LOG_DAEMON (daemon.alert in
+-/etc/syslog.conf).
++to syslog() with a priority of LOG_ALERT and a "facility"
++of LOG_DAEMON (daemon.info in /etc/syslog.conf).
+ Should duende itself encounter an error, it will send
+ messages to syslog() with a priority of LOG_ALERT.
+ .PP
+-For example, suppose one invokes duende thusly:
+-
+-.nf
+- duende /usr/local/sbin/maradns
+-.fi
+-
+-If invoked thusly, duende will log all messages with the "ident"
+-(program
+-name) of "/usr/local/sbin/maradns". If this is not desired, invoke
+-duende
+-with something like:
+-
+-.nf
+- export PATH=$PATH:/usr/local/sbin
+- duende maradns
+-.fi
+-
+-This will log messages with a (more sensible) "ident" of maradns.
+-.PP
+-Note: If a non-POSIX Bourne shell (such as csh, es, rc, or fish) is
+-used to
+-invoke MaraDNS, the above syntax needs to be changed.
+-.PP
+ Also, the directory /etc/maradns/logger, while used by duende, is not
+ used
+ to store any log messages. That is unless, for some reason, one
diff --git a/net-dns/maradns/files/maradns-2.0.09-build.patch b/net-dns/maradns/files/maradns-2.0.09-build.patch
new file mode 100644
index 00000000000..33622b9bc87
--- /dev/null
+++ b/net-dns/maradns/files/maradns-2.0.09-build.patch
@@ -0,0 +1,43 @@
+Index: maradns-2.0.09/build/Makefile.linux
+===================================================================
+--- maradns-2.0.09.orig/build/Makefile.linux
++++ maradns-2.0.09/build/Makefile.linux
+@@ -10,7 +10,7 @@ POBJECTS=parse/ParseMaraRc.o parse/Parse
+ DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o
+ # Secure random number generator objects
+ ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o
+-OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS)
++OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS) -lrt
+ EXECS=server/maradns
+
+ # Uncomment the following three lines to get this to compile on Solaris
+@@ -28,19 +28,21 @@ Q="DEFINES=-DSELECT_PROBLEM"
+
+ # Debug
+
+-FLAGS = -O2 -Wall -DSELECT_PROBLEM
++FLAGS=$(CFLAGS) $(LDFLAGS) -Wall -DSELECT_PROBLEM
+ M="CC=$(CC) $(FLAGS)"
+ D="CC=$(CC) $(FLAGS) -DDEBUG -DTHREADS"
+ #FLAGS = -g
+
+ all:
+- cd libs ; make $(M) ; cd ../dns ; make $(M) ; \
+- cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \
+- cd ../qual ; make $(M) ; cd ../server ; \
+- make $(M) $(V) COMPILED=\"$(COMPILED)\" ; \
+- cd ../tools ; make $(M) ; \
+- cd ../deadwood-*/src/ ; make FLAGS=-O2 ; \
+- cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST
++ $(MAKE) -C libs $(M)
++ $(MAKE) -C dns $(M)
++ $(MAKE) -C rng $(M)
++ $(MAKE) -C parse $(M)
++ $(MAKE_ -C qual $(M)
++ $(MAKE) -C server $(M) $(V) COMPILED=\"$(COMPILED)\"
++ $(MAKE) -C tools $(M)
++ $(MAKE) -C deadwood-*/src $(M)
++ $(MAKE) -C tcp $(M) $(V)
+
+ debug:
+ cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \
diff --git a/net-dns/maradns/files/maradns.rc6 b/net-dns/maradns/files/maradns.rc6
new file mode 100644
index 00000000000..32db2e41927
--- /dev/null
+++ b/net-dns/maradns/files/maradns.rc6
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ provide dns
+}
+
+start() {
+ ebegin "Starting maradns"
+ start-stop-daemon --start --quiet --name maradns \
+ --exec /usr/bin/duende /usr/sbin/maradns
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping maradns"
+ start-stop-daemon --stop --quiet --name maradns \
+ --exec /usr/sbin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/files/maradns.service.in b/net-dns/maradns/files/maradns.service.in
new file mode 100644
index 00000000000..f27d9465340
--- /dev/null
+++ b/net-dns/maradns/files/maradns.service.in
@@ -0,0 +1,9 @@
+[Unit]
+Description=maradns DNS server
+After=network.target
+
+[Service]
+ExecStart=@bindir@/maradns -cf @sysconfdir@/mararc
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/maradns/files/maradns2 b/net-dns/maradns/files/maradns2
new file mode 100644
index 00000000000..cc6915f5b8e
--- /dev/null
+++ b/net-dns/maradns/files/maradns2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ provide dns
+}
+
+start() {
+ ebegin "Starting maradns"
+ start-stop-daemon --start --quiet --name maradns --wait 1000 \
+ --exec /usr/bin/duende /usr/sbin/maradns -- -f /etc/maradns/mararc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping maradns"
+ start-stop-daemon --stop --quiet --name maradns --wait 1000 \
+ --exec /usr/bin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/files/zoneserver.rc6 b/net-dns/maradns/files/zoneserver.rc6
new file mode 100644
index 00000000000..9d175a6320a
--- /dev/null
+++ b/net-dns/maradns/files/zoneserver.rc6
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting zoneserver"
+ start-stop-daemon --start --quiet --name zoneserver \
+ --exec /usr/bin/duende /usr/sbin/zoneserver
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping zoneserver"
+ start-stop-daemon --stop --quiet --name zoneserver
+ eend $?
+}
diff --git a/net-dns/maradns/files/zoneserver2 b/net-dns/maradns/files/zoneserver2
new file mode 100644
index 00000000000..6c6486d5e9b
--- /dev/null
+++ b/net-dns/maradns/files/zoneserver2
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting zoneserver"
+ start-stop-daemon --start --quiet --name zoneserver --wait 1000 \
+ --exec /usr/bin/duende /usr/sbin/zoneserver -- -f /etc/maradns/mararc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping zoneserver"
+ start-stop-daemon --stop --quiet --name zoneserver --wait 1000 \
+ --exec /usr/bin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/maradns-2.0.09.ebuild b/net-dns/maradns/maradns-2.0.09.ebuild
new file mode 100644
index 00000000000..189839f8446
--- /dev/null
+++ b/net-dns/maradns/maradns-2.0.09.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils systemd toolchain-funcs user
+
+DEADWOOD_VER="3.2.05"
+
+DESCRIPTION="A security-aware DNS server"
+HOMEPAGE="http://www.maradns.org/"
+SRC_URI="http://www.maradns.org/download/${PV%.*}/${PV}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE="authonly ipv6"
+
+DEPEND=""
+RDEPEND=""
+
+pkg_setup() {
+ ebegin "Creating group and users"
+ enewgroup maradns 99
+ enewuser duende 66 -1 -1 maradns
+ enewuser maradns 99 -1 -1 maradns
+ eend ${?}
+}
+
+src_prepare() {
+ # Apply some minor patches from Debian. Last one - from Gentoo
+ epatch "${FILESDIR}/${PN}-2.0.06-askmara-tcp.patch" \
+ "${FILESDIR}/${PN}-2.0.06-duende-man.patch" \
+ "${FILESDIR}/${P}-build.patch"
+ epatch_user
+}
+
+src_configure() {
+ # Use duende-ng.c.
+ cp "${S}/tools/duende-ng.c" "${S}/tools/duende.c" || die
+
+ tc-export CC
+ ./configure $(use ipv6 && echo "--ipv6") || die "Failed to configure ${PN}"
+}
+
+src_install() {
+ # Install the MaraDNS binaries.
+ dosbin server/maradns
+ dosbin tcp/zoneserver
+ dobin tcp/getzone tcp/fetchzone
+ dobin tools/askmara tools/askmara-tcp tools/duende
+ dobin tools/bind2csv2.py tools/csv1tocsv2.pl
+
+ # MaraDNS docs, manpages, misc.
+ dodoc doc/en/{QuickStart,README,*.txt}
+ dodoc doc/en/text/*.txt
+ doman doc/en/man/*.[1-9]
+ dodoc maradns.gpg.key
+ dohtml doc/en/*.html
+ dohtml -r doc/en/webpage
+ dohtml -r doc/en/tutorial
+ docinto examples
+ dodoc doc/en/examples/example_*
+
+ # Deadwood binary, docs, manpages, etc.
+ if ! use authonly; then
+ dosbin deadwood-${DEADWOOD_VER}/src/Deadwood
+ doman deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende}.1
+ docinto deadwood
+ dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende,FAQ}.txt
+ dohtml deadwood-${DEADWOOD_VER}/doc/{Deadwood,FAQ}.html
+ docinto deadwood/internals
+ dodoc deadwood-${DEADWOOD_VER}/doc/internals/*
+ insinto /etc/maradns
+ newins deadwood-${DEADWOOD_VER}/doc/dwood3rc-all dwood3rc_all.dist
+ fi
+
+ # Example configurations.
+ insinto /etc/maradns
+ newins doc/en/examples/example_full_mararc mararc_full.dist
+ newins doc/en/examples/example_csv2 example_csv2.dist
+ keepdir /etc/maradns/logger
+
+ # Init scripts.
+ newinitd "${FILESDIR}"/maradns2 maradns
+ newinitd "${FILESDIR}"/zoneserver2 zoneserver
+ if ! use authonly; then
+ newinitd "${FILESDIR}"/deadwood deadwood
+ fi
+
+ # systemd unit
+ # please keep paths in sync!
+ sed -e "s^@bindir@^${EPREFIX}/usr/sbin^" \
+ -e "s^@sysconfdir@^${EPREFIX}/etc/maradns^" \
+ "${FILESDIR}"/maradns.service.in > "${T}"/maradns.service
+ systemd_dounit "${T}"/maradns.service
+}
diff --git a/net-dns/maradns/metadata.xml b/net-dns/maradns/metadata.xml
new file mode 100644
index 00000000000..0057a2e30e3
--- /dev/null
+++ b/net-dns/maradns/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name='authonly'>Allows one to build only authoritative DNS server</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dns/metadata.xml b/net-dns/metadata.xml
new file mode 100644
index 00000000000..18ee426a854
--- /dev/null
+++ b/net-dns/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-dns category contains DNS (Domain Name Service) related
+ software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-dns enthült Software zum Thema DNS (Domain Name Service).
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-dns contiene programas relacionados con el DNS, el
+ sistema de resolución de nombres de dominio.
+ </longdescription>
+ <longdescription lang="ja">
+ net-dnsカテゴリーにはドメイン・ネーム・サービスに関連したソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-dns categorie bevat DNS (Domain Name Service) applicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-dns chứa các phần mềm liên quan đến DNS.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-dns contiene programmi per DNS (Domain Name Service).
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-dns contém programas relacionados a DNS (Domain
+ Name Service).
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-dns zawiera pakiety związane z DNS (Domain Name Service).
+ </longdescription>
+</catmetadata>
+
diff --git a/net-dns/mydns/Manifest b/net-dns/mydns/Manifest
new file mode 100644
index 00000000000..2f4337b6e3b
--- /dev/null
+++ b/net-dns/mydns/Manifest
@@ -0,0 +1 @@
+DIST mydns-1.2.8.31.tar.gz 958701 SHA256 cb10de11ccd948d3b86296c03c6fb692489945d58b0aaee5d17be083f3263629 SHA512 471dfed9b4f38b446fd5896939faa4c58f4e1b3a3e6928fa84eddf769eba8f3406ef08c77ab39ee79d2ac85c1e72a499b283c7404a0cae9830ffe0faee9e2737 WHIRLPOOL 615e8e129b4d3d7b426b58446f9fef7aaf78d025d1454ba46266d15030dff4a223a033bf6bbc4e6401159a99e1b2eae3d60b6bd76378a3d9e86e2dfd1d06e84f
diff --git a/net-dns/mydns/files/mydns-1.2.8.27-m4.patch b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch
new file mode 100644
index 00000000000..c32e7613b46
--- /dev/null
+++ b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch
@@ -0,0 +1,53 @@
+--- mydns-1.1.0/m4/mydns.m4.orig 2010-12-01 21:57:52.000000000 +0100
++++ mydns-1.1.0/m4/mydns.m4 2010-12-01 22:07:24.000000000 +0100
+@@ -542,46 +542,10 @@
+ ##
+ AC_DEFUN([AC_LIB_MYSQLCLIENT],
+ [
+- libmysqlclient_dirs="/usr/local/mysql/lib /usr/local/lib/mysql /usr/local/lib /usr/lib/mysql /usr/lib /lib"
+- AC_ARG_WITH(mysql-lib,
+- AC_HELP_STRING([--with-mysql-lib=DIR], [look for the MySQL client library in DIR]),
+- libmysqlclient_dirs="$withval $libmysqlclient_dirs")
+- libmysqlclient_found=no, libmysqlclient_ok=no
+- for libmysqlclient_dir in $libmysqlclient_dirs; do
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient_r.so, libmysqlclient_found=yes, libmysqlclient_found=no)
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.so, libmysqlclient_found=yes, libmysqlclient_found=no)
+- fi
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.a, libmysqlclient_found=yes, libmysqlclient_found=no)
+- fi
+- if test "$libmysqlclient_found" = yes; then
+- ## libmysqlclient depends on libz
+- if ! test -n "$LIBZ"; then
+- AC_LIB_Z
+- fi
+- if ! test -n "$LIBZ"; then
+- ## No zlib
+- AC_MSG_ERROR([
+-
+-][ ###
+-][ ### zlib compression library (libz.a) not found.
+-][ ###
+-][ ### Please download and install the zlib compression
+-][ ### library from the following URL:
+-][ ###
+-][ ### http://www.gzip.org/zlib/
+-][ ###
+-][ ### (Error detail might be available in `config.log')
+-][ ###
+-])
+- fi
+- LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
+- libmysqlclient_found=yes
+- fi
+- fi
+- done
++ AC_CHECK_PROG(LIBMYSQLCLIENT,mysql_config,`mysql_config --libs`)
++ if test -z "$LIBMYSQLCLIENT"; then
++ AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
++ fi
+ AC_SUBST(LIBMYSQLCLIENT)
+ ]
+ )
diff --git a/net-dns/mydns/files/mydns.confd b/net-dns/mydns/files/mydns.confd
new file mode 100644
index 00000000000..1040f4b93c1
--- /dev/null
+++ b/net-dns/mydns/files/mydns.confd
@@ -0,0 +1,4 @@
+MYDNS_CONFFILE="/etc/mydns.conf"
+
+#MYDNS_EXTRA_OPTS="--verbose"
+MYDNS_EXTRA_OPTS=""
diff --git a/net-dns/mydns/files/mydns.initd b/net-dns/mydns/files/mydns.initd
new file mode 100644
index 00000000000..97087619173
--- /dev/null
+++ b/net-dns/mydns/files/mydns.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MYDNS_CHECKCONF="/usr/bin/mydnscheck"
+MYDNS_CONFFILE="${MYDNS_CONFFILE:-/etc/mydns.conf}"
+
+command="/usr/sbin/mydns"
+command_args="--background --conf=${MYDNS_CONFFILE} ${MYDNS_EXTRA_OPTS}"
+extra_commands="configtest"
+extra_started_commands="reload"
+pidfile="$(grep '^pidfile' ${MYDNS_CONFFILE} | sed -e 's/^pidfile\s*=\s*\([^# ]\+\?\)\s*\(#.*\)\?$/\1/')"
+pidfile="${pidfile:-/var/run/mydns.pid}"
+
+depend() {
+ need net
+ use logger mysql postgresql
+}
+
+checkconfig() {
+ "${MYDNS_CHECKCONF}" --conf="${MYDNS_CONFFILE}"
+ return $?
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/mydns/metadata.xml b/net-dns/mydns/metadata.xml
new file mode 100644
index 00000000000..64ae6d97c0f
--- /dev/null
+++ b/net-dns/mydns/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='alias'>Enable David Phillips aliasing</flag>
+ <flag name='status'>Enable the STATUS opcode to check server status</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mydns-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/mydns/mydns-1.2.8.31.ebuild b/net-dns/mydns/mydns-1.2.8.31.ebuild
new file mode 100644
index 00000000000..f415cff53f8
--- /dev/null
+++ b/net-dns/mydns/mydns-1.2.8.31.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database"
+HOMEPAGE="http://www.mydns.pl/"
+SRC_URI="mirror://sourceforge/mydns-ng/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ~ppc sparc x86"
+IUSE="alias debug nls mysql postgres ssl static status"
+
+RDEPEND="mysql? ( virtual/mysql )
+ nls? ( virtual/libintl )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.12 )
+ sys-devel/bison"
+
+REQUIRED_USE="^^ ( mysql postgres )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.8.27-m4.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable alias) \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_enable static) \
+ $(use_enable static static-build) \
+ $(use_enable status) \
+ $(use_with ssl openssl) \
+ --without-included-gettext
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS BUGS ChangeLog QUICKSTART* NEWS README* TODO
+ docinto contrib
+ dodoc contrib/*.php contrib/*.pl contrib/*.pm contrib/README*
+
+ newinitd "${FILESDIR}/mydns.initd" mydns
+ newconfd "${FILESDIR}/mydns.confd" mydns
+
+ ## Avoid file collision
+ rm -f "${ED}/usr/share/locale/locale.alias"
+
+ # Install config file
+ insinto /etc
+ newins mydns.conf mydns.conf
+ fowners root:root /etc/mydns.conf
+ fperms 0600 /etc/mydns.conf
+}
+
+pkg_postinst() {
+ if use postgres; then
+ elog "# createdb mydns"
+ elog "# /usr/sbin/mydns --create-tables | psql mydns"
+ elog
+ elog "to create the tables in the PostgreSQL-Database."
+ elog "For more info see QUICKSTART.postgres."
+ fi
+ if use mysql; then
+ elog "# mysqladmin -u <useruname> -p create mydns"
+ elog "# /usr/sbin/mydns --create-tables | mysql -u <username> -p mydns"
+ elog
+ elog "to create the tables in the MySQL-Database."
+ elog "For more info see QUICKSTART.mysql."
+ fi
+ elog
+}
diff --git a/net-dns/namecoin-qt/Manifest b/net-dns/namecoin-qt/Manifest
new file mode 100644
index 00000000000..13ae953fa3d
--- /dev/null
+++ b/net-dns/namecoin-qt/Manifest
@@ -0,0 +1 @@
+DIST namecoin-qt-0.3.72.tar.gz 1453901 SHA256 74d088f96735b3397b9a71bc10bbbe1211cd2594baf593c4b9062457c1d4b869 SHA512 63d42fb1a982f725f22d35992fadb192116b7ee73a418cba52285325df5a56d41b47d3de7d1b9b53b816c160d1909ecff70117de94edead0eab343da6809e417 WHIRLPOOL bd2385a3118406a9076bf3587e3cc8f4e25ddac350ec62901e1d577d92fc113de58fa59f9138dac2e82efcb1553d4dba657cd2092f23800e995756fe98c3f012
diff --git a/net-dns/namecoin-qt/metadata.xml b/net-dns/namecoin-qt/metadata.xml
new file mode 100644
index 00000000000..1e7587374fd
--- /dev/null
+++ b/net-dns/namecoin-qt/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild b/net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild
new file mode 100644
index 00000000000..29f3a47aed6
--- /dev/null
+++ b/net-dns/namecoin-qt/namecoin-qt-0.3.72.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="af_ZA ar bg ca_ES cs da de el_GR en es_CL es et eu_ES fa_IR fa fi fr_CA fr gu_IN he hi_IN hr hu it ja lt nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW"
+
+inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+DESCRIPTION="A P2P network based domain name system"
+HOMEPAGE="https://dot-bit.org/"
+SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT ISC cryptopp GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+#upnp is broken
+#IUSE="dbus ipv6 upnp"
+IUSE="dbus ipv6"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/crypto++
+ dev-libs/openssl:0[-bindist]
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ dev-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+"
+# Add this when upnp is fixed
+# upnp? ( net-libs/miniupnpc)
+
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/namecoinq-v${PV/0/Q}"
+
+src_prepare() {
+ cd src || die
+
+ local filt= yeslang= nolang=
+
+ for lan in $LANGS; do
+ if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
+ ewarn "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in $(ls qt/locale/*.ts)
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts"
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'qt/bitcoin.qrc'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+}
+
+src_configure() {
+ OPTS=()
+
+ use dbus && OPTS+=("USE_DBUS=1")
+
+#Upnp is broken
+# if use upnp; then
+# OPTS+=("USE_UPNP=1")
+# else
+# OPTS+=("USE_UPNP=-")
+# fi
+
+ OPTS+=("USE_UPNP=-")
+
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX")
+ fi
+
+ eqmake4 namecoin-qt.pro "${OPTS[@]}"
+}
+
+#Tests are broken
+#src_test() {
+# cd src || die
+# emake -f makefile.unix "${OPTS[@]}" test_namecoin
+# ./test_namecoin || die 'Tests failed'
+#}
+
+src_install() {
+ qt4-r2_src_install
+
+ dobin ${PN}
+
+ insinto /usr/share/pixmaps
+ newins "src/qt/res/icons/bitcoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "Namecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;DNS;" "MimeType=x-scheme-handler/namecoin;\nTerminal=false"
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild b/net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild
new file mode 100644
index 00000000000..c61e7d74326
--- /dev/null
+++ b/net-dns/namecoin-qt/namecoin-qt-0.3.80.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="af_ZA ar bg ca_ES cs da de el_GR en es_CL es et eu_ES fa_IR fa fi fr_CA fr gu_IN he hi_IN hr hu it ja lt nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW"
+
+inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2 git-r3
+
+DESCRIPTION="A P2P network based domain name system"
+HOMEPAGE="https://dot-bit.org/"
+#SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz"
+# Try to use github
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/namecoin/namecoin.git"
+EGIT_BRANCH="namecoinq-release"
+EGIT_COMMIT="nc${PV}"
+
+LICENSE="MIT ISC cryptopp GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+#upnp is broken
+#IUSE="dbus ipv6 upnp"
+IUSE="dbus ipv6"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/crypto++
+ dev-libs/openssl:0[-bindist]
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ dev-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+"
+# Add this when upnp is fixed
+# upnp? ( net-libs/miniupnpc)
+
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/${PN}-${PV}"
+
+src_prepare() {
+ cd src || die
+
+ local filt= yeslang= nolang=
+
+ for lan in $LANGS; do
+ if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
+ ewarn "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in $(ls qt/locale/*.ts)
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts"
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'qt/bitcoin.qrc'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+}
+
+src_configure() {
+ OPTS=()
+
+ use dbus && OPTS+=("USE_DBUS=1")
+
+#Upnp is broken
+# if use upnp; then
+# OPTS+=("USE_UPNP=1")
+# else
+# OPTS+=("USE_UPNP=-")
+# fi
+
+ OPTS+=("USE_UPNP=-")
+
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX")
+ fi
+
+ eqmake4 namecoin-qt.pro "${OPTS[@]}"
+}
+
+#Tests are broken
+#src_test() {
+# cd src || die
+# emake -f makefile.unix "${OPTS[@]}" test_namecoin
+# ./test_namecoin || die 'Tests failed'
+#}
+
+src_install() {
+ qt4-r2_src_install
+
+ dobin ${PN}
+
+ insinto /usr/share/pixmaps
+ newins "src/qt/res/icons/bitcoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "Namecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;DNS;" "MimeType=x-scheme-handler/namecoin;\nTerminal=false"
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-dns/namecoind/Manifest b/net-dns/namecoind/Manifest
new file mode 100644
index 00000000000..4619a47e630
--- /dev/null
+++ b/net-dns/namecoind/Manifest
@@ -0,0 +1 @@
+DIST namecoind-0.3.72.tar.gz 1453901 SHA256 74d088f96735b3397b9a71bc10bbbe1211cd2594baf593c4b9062457c1d4b869 SHA512 63d42fb1a982f725f22d35992fadb192116b7ee73a418cba52285325df5a56d41b47d3de7d1b9b53b816c160d1909ecff70117de94edead0eab343da6809e417 WHIRLPOOL bd2385a3118406a9076bf3587e3cc8f4e25ddac350ec62901e1d577d92fc113de58fa59f9138dac2e82efcb1553d4dba657cd2092f23800e995756fe98c3f012
diff --git a/net-dns/namecoind/files/namecoin.conf b/net-dns/namecoind/files/namecoin.conf
new file mode 100644
index 00000000000..c6a55f3d913
--- /dev/null
+++ b/net-dns/namecoind/files/namecoin.conf
@@ -0,0 +1,8 @@
+# http://www.bitcoin.org/smf/index.php?topic=644.0
+#rpcuser=
+#rpcpassword=
+
+
+
+
+
diff --git a/net-dns/namecoind/files/namecoin.confd b/net-dns/namecoind/files/namecoin.confd
new file mode 100644
index 00000000000..0120a560b64
--- /dev/null
+++ b/net-dns/namecoind/files/namecoin.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/namecoin
+
+# owner of namecoind process (don't change, must be existing)
+NAMECOIN_USER="namecoin"
+
+# See http://www.bitcoin.org/smf/index.php?topic=1063
+NAMECOIN_OPTS="${NAMECOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-dns/namecoind/files/namecoin.initd b/net-dns/namecoind/files/namecoin.initd
new file mode 100644
index 00000000000..4330c918e44
--- /dev/null
+++ b/net-dns/namecoind/files/namecoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+VARDIR="/var/lib/namecoin"
+CONFFILE="${VARDIR}/.namecoin/bitcoin.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [[ "${NAMECOIN_USER}" == "" ]] ; then
+ eerror "Please edit /etc/conf.d/namecoind"
+ eerror "A user must be specified to run namecoind as that user."
+ eerror "Modify USER to your needs (you may also add a group after a colon)"
+ return 1
+ fi
+ if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/namecoind"
+ eerror "Specified user must exist!"
+ return 1
+ fi
+ if `echo "${NAMECOIN_USER}" | grep ':' -sq` ; then
+ if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/namecoind"
+ eerror "Specified group must exist!"
+ return 1
+ fi
+ fi
+ if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
+ eerror "Please edit `readlink -f ${CONFFILE}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+ if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
+ eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Namecoind daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ start_openrc
+ else
+ start_baselayout
+ fi
+}
+
+stop() {
+ ebegin "Stopping Namecoin daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ stop_openrc
+ else
+ stop_baselayout
+ fi
+}
+
+start_openrc() {
+ start-stop-daemon \
+ --start --user "${NAMECOIN_USER}" --name namecoind \
+ --pidfile /var/run/namecoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/namecoind \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ --wait 2000 \
+ -- ${NAMECOIN_OPTS}
+ eend $?
+}
+
+stop_openrc() {
+ start-stop-daemon --stop --user "${NAMECOIN_USER}" \
+ --name namecoind --pidfile /var/run/namecoind.pid \
+ --wait 30000 \
+ --progress
+ eend $?
+}
+
+start_baselayout() {
+ start-stop-daemon \
+ --start --user "${NAMECOIN_USER}" --name namecoind \
+ --pidfile /var/run/namecoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/namecoind \
+ --chuid "${NAMECOIN_USER}" \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ -- ${NAMECOIN_OPTS}
+ eend $?
+}
+
+stop_baselayout() {
+ start-stop-daemon \
+ --stop \
+ --user "${NAMECOIN_USER}" \
+ --name namecoind \
+ --pidfile /var/run/namecoind.pid
+ eend $?
+}
diff --git a/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch b/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch
new file mode 100644
index 00000000000..f8996944e13
--- /dev/null
+++ b/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch
@@ -0,0 +1,52 @@
+diff -Naur namecoinq-vQ.3.72.orig/src/Makefile namecoinq-vQ.3.72/src/Makefile
+--- namecoinq-vQ.3.72.orig/src/Makefile 2013-10-29 09:38:10.000000000 -0400
++++ namecoinq-vQ.3.72/src/Makefile 2013-11-30 18:43:25.016028725 -0500
+@@ -1,6 +1,6 @@
+-CXX=g++
++CXX?=g++
+
+-DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
++DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
+
+ # Detect MinGW
+ MINGW=$(shell uname -s|grep -i mingw32)
+@@ -8,20 +8,10 @@
+ # Link boost statically
+ DEFS += -DBOOST_THREAD_USE_LIB
+
+-INCLUDEPATHS= \
+- -I../libs/openssl-1.0.1e/include \
+- -I../libs/db-4.7.25.NC/build_unix \
+- -I../libs/boost_1_50_0
+-
+-LIBPATHS= \
+- -L../libs/openssl-1.0.1e \
+- -L../libs/db-4.7.25.NC/build_unix \
+- -L../libs/boost_1_50_0/stage/lib
+-
+ LIBBOOST_SUFFIX=
+
+ LIBS= \
+- -Wl,-Bstatic \
++ -Wl,-Bdynamic \
+ -l boost_system$(LIBBOOST_SUFFIX) \
+ -l boost_filesystem$(LIBBOOST_SUFFIX) \
+ -l boost_program_options$(LIBBOOST_SUFFIX) \
+@@ -70,7 +60,7 @@
+ -l pthread
+ endif
+
+-CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
++#CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
+ HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h allocators.h db.h walletdb.h crypter.h net.h irc.h keystore.h main.h wallet.h bitcoinrpc.h uibase.h ui.h noui.h init.h auxpow.h
+
+@@ -110,7 +100,7 @@
+ obj/nogui/namecoin.o: namecoin.h
+
+ namecoind: $(OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o
+- $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
++ $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+ clean:
+ -rm -f namecoin namecoind
diff --git a/net-dns/namecoind/files/namecoind-0.3.80-makefile.patch b/net-dns/namecoind/files/namecoind-0.3.80-makefile.patch
new file mode 100644
index 00000000000..2dce6b5a4f8
--- /dev/null
+++ b/net-dns/namecoind/files/namecoind-0.3.80-makefile.patch
@@ -0,0 +1,30 @@
+--- Makefile.github 2015-01-01 10:05:04.000000000 +0000
++++ Makefile 2015-01-01 10:15:05.000000000 +0000
+@@ -1,4 +1,4 @@
+-CXX=g++
++CXX?=g++
+
+ DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
+
+@@ -8,20 +8,10 @@
+ # Link boost statically
+ DEFS += -DBOOST_THREAD_USE_LIB
+
+-INCLUDEPATHS= \
+- -I../libs/openssl-1.0.1i/include \
+- -I../libs/db-4.7.25.NC/build_unix \
+- -I../libs/boost_1_50_0
+-
+-LIBPATHS= \
+- -L../libs/openssl-1.0.1i \
+- -L../libs/db-4.7.25.NC/build_unix \
+- -L../libs/boost_1_50_0/stage/lib
+-
+ LIBBOOST_SUFFIX=
+
+ LIBS= \
+- -Wl,-Bstatic \
++ -Wl,-Bdynamic \
+ -l boost_system$(LIBBOOST_SUFFIX) \
+ -l boost_filesystem$(LIBBOOST_SUFFIX) \
+ -l boost_program_options$(LIBBOOST_SUFFIX) \
diff --git a/net-dns/namecoind/metadata.xml b/net-dns/namecoind/metadata.xml
new file mode 100644
index 00000000000..1e7587374fd
--- /dev/null
+++ b/net-dns/namecoind/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/namecoind/namecoind-0.3.72.ebuild b/net-dns/namecoind/namecoind-0.3.72.ebuild
new file mode 100644
index 00000000000..552cf4aea74
--- /dev/null
+++ b/net-dns/namecoind/namecoind-0.3.72.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DB_VER="4.8"
+
+inherit db-use eutils toolchain-funcs user
+
+DESCRIPTION="A P2P network based domain name system"
+HOMEPAGE="https://dot-bit.org/"
+SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT ISC cryptopp"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/glib:2
+ dev-libs/crypto++
+ dev-libs/openssl[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/namecoinq-v${PV/0/Q}"
+
+pkg_setup() {
+ local UG='namecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/namecoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/namecoind-0.3.72-makefile.patch
+}
+
+src_compile() {
+ local OPTS=()
+
+ OPTS+=("CXXFLAGS=${CXXFLAGS} -I$(db_includedir "${DB_VER}")")
+ OPTS+=("LDFLAGS=${LDFLAGS} -ldb_cxx-${DB_VER}")
+
+ use ssl && OPTS+=(USE_SSL=1)
+ use upnp && OPTS+=(USE_UPNP=1)
+
+ cd src || die
+ emake CXX="$(tc-getCXX)" "${OPTS[@]}" ${PN}
+}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/namecoin
+ doins "${FILESDIR}/namecoin.conf"
+ fowners namecoin:namecoin /etc/namecoin/namecoin.conf
+ fperms 600 /etc/namecoin/namecoin.conf
+
+ newconfd "${FILESDIR}/namecoin.confd" ${PN}
+ newinitd "${FILESDIR}/namecoin.initd" ${PN}
+
+ keepdir /var/lib/namecoin/.namecoin
+ fperms 700 /var/lib/namecoin
+ fowners namecoin:namecoin /var/lib/namecoin/
+ fowners namecoin:namecoin /var/lib/namecoin/.namecoin
+ dosym /etc/namecoin/namecoin.conf /var/lib/namecoin/.namecoin/bitcoin.conf
+
+ dodoc doc/README
+ dodoc DESIGN-namecoin.md FAQ.md doc/README_merged-mining.md
+}
diff --git a/net-dns/namecoind/namecoind-0.3.80.ebuild b/net-dns/namecoind/namecoind-0.3.80.ebuild
new file mode 100644
index 00000000000..230c2cb4915
--- /dev/null
+++ b/net-dns/namecoind/namecoind-0.3.80.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DB_VER="4.8"
+
+inherit db-use eutils toolchain-funcs user git-r3
+
+DESCRIPTION="A P2P network based domain name system"
+HOMEPAGE="https://dot-bit.org/"
+#SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.tar.gz -> ${P}.tar.gz"
+# Try to use github
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/namecoin/namecoin.git"
+EGIT_BRANCH="namecoinq-release"
+EGIT_COMMIT="nc${PV}"
+
+LICENSE="MIT ISC cryptopp"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/glib:2
+ dev-libs/crypto++
+ dev-libs/openssl[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/${PN}-${PV}"
+
+pkg_setup() {
+ local UG='namecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/namecoin "${UG}"
+}
+
+src_prepare() {
+ cd src || die
+ epatch "${FILESDIR}"/namecoind-0.3.80-makefile.patch
+}
+
+src_compile() {
+ local OPTS=()
+
+ OPTS+=("CXXFLAGS=${CXXFLAGS} -I$(db_includedir "${DB_VER}")")
+ OPTS+=("LDFLAGS=${LDFLAGS} -ldb_cxx-${DB_VER}")
+
+ use ssl && OPTS+=(USE_SSL=1)
+ use upnp && OPTS+=(USE_UPNP=1)
+
+ cd src || die
+ emake CXX="$(tc-getCXX)" "${OPTS[@]}" ${PN}
+}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/namecoin
+ doins "${FILESDIR}/namecoin.conf"
+ fowners namecoin:namecoin /etc/namecoin/namecoin.conf
+ fperms 600 /etc/namecoin/namecoin.conf
+
+ newconfd "${FILESDIR}/namecoin.confd" ${PN}
+ newinitd "${FILESDIR}/namecoin.initd" ${PN}
+
+ keepdir /var/lib/namecoin/.namecoin
+ fperms 700 /var/lib/namecoin
+ fowners namecoin:namecoin /var/lib/namecoin/
+ fowners namecoin:namecoin /var/lib/namecoin/.namecoin
+ dosym /etc/namecoin/namecoin.conf /var/lib/namecoin/.namecoin/bitcoin.conf
+
+ dodoc doc/README
+ dodoc DESIGN-namecoin.md FAQ.md doc/README_merged-mining.md
+}
diff --git a/net-dns/ndu/Manifest b/net-dns/ndu/Manifest
new file mode 100644
index 00000000000..c07a3bb490d
--- /dev/null
+++ b/net-dns/ndu/Manifest
@@ -0,0 +1 @@
+DIST ndu-0.4.tar.gz 16118 RMD160 f9273a4428dd30a0bca3416cfcab15aa5fb04aa3 SHA1 10719a426e16291e351ad057784474a0b606078f SHA256 27a2f523cee765db142b5582087866a90050fa00f1b365c800305204fc0c6d40
diff --git a/net-dns/ndu/files/ndu-0.4-binary-locations.patch b/net-dns/ndu/files/ndu-0.4-binary-locations.patch
new file mode 100644
index 00000000000..4007b4dc421
--- /dev/null
+++ b/net-dns/ndu/files/ndu-0.4-binary-locations.patch
@@ -0,0 +1,14 @@
+diff -Nuar --exclude '*~' ndu-0.4.orig/src/dnsedit ndu-0.4/src/dnsedit
+--- ndu-0.4.orig/src/dnsedit 2006-05-22 16:16:47.000000000 -0700
++++ ndu-0.4/src/dnsedit 2006-05-22 16:20:45.107741010 -0700
+@@ -19,8 +19,8 @@
+ if /usr/bin/diff $1 $tempfile >> /dev/null ; then
+ echo No changed made
+ else
+- /usr/sbin/dnstouch $1
+- /usr/sbin/ndu
++ /usr/bin/dnstouch $1
++ /usr/bin/ndu
+ # /usr/sbin/ndc reload
+ echo updated
+ fi
diff --git a/net-dns/ndu/metadata.xml b/net-dns/ndu/metadata.xml
new file mode 100644
index 00000000000..a732fd8b2f0
--- /dev/null
+++ b/net-dns/ndu/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/ndu/ndu-0.4-r4.ebuild b/net-dns/ndu/ndu-0.4-r4.ebuild
new file mode 100644
index 00000000000..7ae42140425
--- /dev/null
+++ b/net-dns/ndu/ndu-0.4-r4.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="DNS serial number incrementer and reverse zone builder"
+SRC_URI="http://uranus.it.swin.edu.au/~jn/linux/${P}.tar.gz"
+HOMEPAGE="http://uranus.it.swin.edu.au/~jn/linux/dns.htm"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+DEPEND="sys-apps/sed"
+RDEPEND="sys-apps/ed" # dnstouch calls ed to do the dirty work
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-binary-locations.patch
+
+ cd "${S}"/src
+ # use the correct compiler
+ sed -e 's|gcc|$(CXX)|g' -i Makefile
+ # set correct config pathes
+ sed -e 's|#define CONFIG_PATH "/etc/"|#define CONFIG_PATH "/etc/bind/"|g' -i ndu.cpp
+ sed -e 's|"/etc/ndu.conf"|"/etc/bind/ndu.conf"|g' -i dnstouch.cpp
+ # hack up something to work around bug #73858
+ sed -e 's|execlp("ed", "ed", filename, 0);|execlp("ed", "ed", "-s", filename, 0);|g' -i dnstouch.cpp
+ # use the correct editor
+ sed -e 's|VISUAL|EDITOR|g' -i dnsedit
+
+ cd "${S}"
+ # match our bind config
+ sed -e 's|0.0.127.in-addr.arpa|127.in-addr.arpa|g' -i ndu.conf
+ # document the support for the chrooted BIND setup
+ echo '// if you use a chrooted setup, then you need to uncomment these lines:' >>ndu.conf
+ echo '//process "/chroot/dns/named.conf"' >>ndu.conf
+ echo '//chroot "/chroot/dns"' >>ndu.conf
+}
+
+src_compile() {
+ cd "${S}"/src
+ emake CFLAGS="${CFLAGS}" CXX="$(tc-getCXX)"
+}
+
+src_install () {
+ into /usr
+ dobin src/{dnsedit,ndu,dnstouch}
+ into /
+ insinto /etc/bind
+ doins ndu.conf
+ dodoc README INSTALL
+}
+
+pkg_postinst() {
+ elog "The ndu binary expects to read your configuration"
+ elog "from /etc/bind/named.conf, however the other binaries"
+ elog "are useful with BIND locally installed."
+}
diff --git a/net-dns/noip-updater/Manifest b/net-dns/noip-updater/Manifest
new file mode 100644
index 00000000000..5c266764e1d
--- /dev/null
+++ b/net-dns/noip-updater/Manifest
@@ -0,0 +1 @@
+DIST noip-2.1.9.tar.gz 152995 SHA256 86ad0a6362263a33f59a658d1b1ce428e255556ddad0d062aa0ee4b7f412f98a SHA512 3e76d39e22383dc3eceee10f8bdf791fc5ed253c756cd2d345fdd8fb9c9ab3bac6a1a6ca123a26cebbf6e615bb8f236c58d4ecf6254fcaf6b92da17f42f0dd6f WHIRLPOOL 4a737490fdf8be0bc6f708c7f73d2025f62a8e7c043e6259ee34738a5ed1b78d34c4243b58f7f61bb7afcf05d9e786b7f80b16bb641be59f5a5a5bd0929adee3
diff --git a/net-dns/noip-updater/files/noip-2.1.9-daemon.patch b/net-dns/noip-updater/files/noip-2.1.9-daemon.patch
new file mode 100644
index 00000000000..b2fb4e66d0c
--- /dev/null
+++ b/net-dns/noip-updater/files/noip-2.1.9-daemon.patch
@@ -0,0 +1,21 @@
+diff -ur a/noip2.c b/noip2.c
+--- a/noip2.c 2004-01-09 14:18:39.000000000 +0000
++++ b/noip2.c 2007-07-20 14:02:41.100377515 +0100
+@@ -895,16 +895,13 @@
+ char *err_string;
+ static int startup = 1;
+
+- x = fork();
++ x = daemon (0, 0);
+ switch (x) {
+ case -1: // error
+ err_string = strerror(errno);
+ Msg( "Can't fork!! (%s) Ending!\n", err_string);
+ return FATALERR;
+- default: // parent
+- exit(0);
+ case 0: //child
+- setsid();
+ if (get_shm_info() == FATALERR)
+ return FATALERR;
+ log2syslog++;
diff --git a/net-dns/noip-updater/files/noip-2.1.9-flags.patch b/net-dns/noip-updater/files/noip-2.1.9-flags.patch
new file mode 100644
index 00000000000..9fe05f36ac2
--- /dev/null
+++ b/net-dns/noip-updater/files/noip-2.1.9-flags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile 2006-09-07 09:52:55.000000000 +0200
++++ b/Makefile 2006-09-07 09:54:54.000000000 +0200
+@@ -21,7 +21,7 @@
+ # ARCH=sun
+
+ ${TGT}: Makefile ${TGT}.c
+- ${CC} -Wall -g -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS}
++ ${CC} ${CFLAGS} -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS} ${LDFLAGS}
+
+ install: ${TGT}
+ if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi
diff --git a/net-dns/noip-updater/files/noip.service b/net-dns/noip-updater/files/noip.service
new file mode 100644
index 00000000000..b4834e843dd
--- /dev/null
+++ b/net-dns/noip-updater/files/noip.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=No-IP Dynamic DNS Update Client
+Require=network-online.target
+After=network-online.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/noip2 -c /etc/no-ip2.conf
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-dns/noip-updater/files/noip2.start b/net-dns/noip-updater/files/noip2.start
new file mode 100644
index 00000000000..2330ee66918
--- /dev/null
+++ b/net-dns/noip-updater/files/noip2.start
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+
+depend() {
+ need localmount
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f /etc/no-ip2.conf ]
+ then
+ einfo "Answer the following questions about your no-ip account."
+ noip2 -C || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting noip"
+ start-stop-daemon --quiet --start -x /usr/sbin/noip2 -- -c /etc/no-ip2.conf
+ eend $? "noip did not start, error code $?"
+}
+
+stop() {
+ ebegin "Stopping noip"
+ start-stop-daemon --quiet --stop -x /usr/sbin/noip2
+ noip_ecode=$?
+ eend $noip_ecode "Error stopping the noip daemon, error $noip_ecode"
+ checkconfig || return 1
+ ebegin "Setting noip addresses to 0.0.0.0"
+ noip2 -c /etc/no-ip2.conf -i 0.0.0.0 >& /dev/null
+ eend $? "Failed to set noip addresses to 0.0.0.0, error $?"
+ return $noip_ecode
+}
diff --git a/net-dns/noip-updater/metadata.xml b/net-dns/noip-updater/metadata.xml
new file mode 100644
index 00000000000..e8f5cc43b3f
--- /dev/null
+++ b/net-dns/noip-updater/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>influencedchaos@gmail.com</email>
+ <name>Francis Booth</name>
+ <description>Active Maintainer, Assign bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ no-ip.com dynamic DNS updater
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild b/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild
new file mode 100644
index 00000000000..493e086f9ad
--- /dev/null
+++ b/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils readme.gentoo systemd toolchain-funcs
+
+MY_P=${P/-updater/}
+DESCRIPTION="no-ip.com dynamic DNS updater"
+HOMEPAGE="http://www.no-ip.com"
+SRC_URI="http://www.no-ip.com/client/linux/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-devel/gcc"
+
+S=${WORKDIR}/${MY_P}
+
+DOC_CONTENTS="
+ Configuration can be done manually via /usr/sbin/noip2 -C or
+ by using this ebuild's config option.
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/noip-2.1.9-flags.patch
+ epatch "${FILESDIR}"/noip-2.1.9-daemon.patch
+ sed -i \
+ -e "s:\(#define CONFIG_FILEPATH\).*:\1 \"/etc\":" \
+ -e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \
+ noip2.c || die "sed failed"
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ PREFIX=/usr \
+ CONFDIR=/etc
+}
+
+src_install() {
+ dosbin noip2
+ dodoc README.FIRST
+ newinitd "${FILESDIR}"/noip2.start noip
+ systemd_dounit "${FILESDIR}"/noip.service
+ readme.gentoo_create_doc
+}
+
+pkg_config() {
+ cd /tmp
+ einfo "Answer the following questions."
+ noip2 -C || die
+}
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
new file mode 100644
index 00000000000..806cd1e290a
--- /dev/null
+++ b/net-dns/nsd/Manifest
@@ -0,0 +1,2 @@
+DIST nsd-3.2.18.tar.gz 924566 SHA256 541047c2114466d6fa7d7b9f397f632e542750475f1fcef5339da86a1ebdfcdb SHA512 888618b51f8ec85413a95a9733198a5affc420b1a8c3b00ed18c8f73f1a0d0654b334ff22076adab23bac56ccb3684cb551ebec426d3d0df939eee24ae66044f WHIRLPOOL 0d4ea8d6e26fc517404e6ebc427774a9c1f4ec7c7c096f7adc5ba51f3fa218215f666dd848a48650bba502ceb4d2795ecb264014f5f31409290937b089b4f062
+DIST nsd-4.1.0.tar.gz 1056649 SHA256 ec3f6902f6f26a6b9248dcd7e9f42472fa52755740b4ba6b9d3bd08910b39b62 SHA512 1e49c14108b201ff8f14f58a9aae8ee4a69fba2e9494bdffc20ac079bff437ce91b069852d0aac639ec860a258b0b222b72269e62ad7b433c3df8d06afea8f03 WHIRLPOOL 6041ed2292412c91d3a7828727b5cf5f85cc6a0088e51cb791d2f56cfab2b8358627e1af7517091c3f119ce83218763dbd54279c88137c509bcf9e48c3049f94
diff --git a/net-dns/nsd/files/nsd.initd b/net-dns/nsd/files/nsd.initd
new file mode 100644
index 00000000000..b6eced79e54
--- /dev/null
+++ b/net-dns/nsd/files/nsd.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="NSD is an authoritative-only, high performance, open source name server"
+extra_commands="configtest"
+
+# these can be overridden in /etc/conf.d/nsd if necessary
+NSD_CONFIG="${NSD_CONFIG:-/etc/nsd/nsd.conf}"
+NSD_BINARY="${NSD_BINARY:-/usr/sbin/nsd}"
+NSD_CHECKCONF="${NSD_CHECKCONF:-/usr/sbin/nsd-checkconf}"
+
+depend() {
+ need net
+ use logger
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+checkconfig() {
+ if ! test -e "${NSD_CONFIG}"; then
+ eerror "You need to create an appropriate config file."
+ eerror "An example can be found in /etc/nsd/nsd.conf.sample"
+ return 1
+ elif ! "${NSD_CHECKCONF}" "${NSD_CONFIG}"; then
+ eerror "You have errors in your configfile (${NSD_CONFIG})"
+ return $?
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting NSD"
+ checkconfig || return $?
+ local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}")
+ checkpath --directory --owner nsd:nsd $(dirname "${pidfile}")
+ start-stop-daemon --start --pidfile "${pidfile}" \
+ --exec "${NSD_BINARY}" -- -c "${NSD_CONFIG}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NSD"
+ checkconfig || return $?
+ local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}")
+ start-stop-daemon --stop --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/nsd/files/nsd.munin-conf b/net-dns/nsd/files/nsd.munin-conf
new file mode 100644
index 00000000000..2fbec370f33
--- /dev/null
+++ b/net-dns/nsd/files/nsd.munin-conf
@@ -0,0 +1,2 @@
+[nsd_munin*]
+user root
diff --git a/net-dns/nsd/files/nsd.service b/net-dns/nsd/files/nsd.service
new file mode 100644
index 00000000000..8337557faee
--- /dev/null
+++ b/net-dns/nsd/files/nsd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=NSD authoritative DNS server
+Wants=network.target
+After=network.target
+
+[Service]
+Type=forking
+ExecStartPre=/usr/bin/install -d -o nsd -g nsd /run/nsd
+ExecStart=/usr/sbin/nsd
+KillMode=mixed
+PIDFile=/run/nsd/nsd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/nsd/files/nsd3-patch.cron b/net-dns/nsd/files/nsd3-patch.cron
new file mode 100644
index 00000000000..ec27e4e95d4
--- /dev/null
+++ b/net-dns/nsd/files/nsd3-patch.cron
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Cron job: merge zone transfer changes back to zone files
+# Needed for nsd3 only
+
+/etc/init.d/nsd --quiet status && /etc/init.d/nsd patch >/dev/null
diff --git a/net-dns/nsd/files/nsd3.initd-r1 b/net-dns/nsd/files/nsd3.initd-r1
new file mode 100644
index 00000000000..46a71489fd2
--- /dev/null
+++ b/net-dns/nsd/files/nsd3.initd-r1
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="NSD is an authoritative-only, high performance, open source name server"
+extra_commands="configtest patch"
+
+# these can be overridden in /etc/conf.d/nsd if necessary
+NSD_CONFIG="${NSD_CONFIG:-/etc/nsd/nsd.conf}"
+NSD_BINARY="${NSD_BINARY:-/usr/sbin/nsd}"
+NSD_CHECKCONF="${NSD_CHECKCONF:-/usr/sbin/nsd-checkconf}"
+NSDC_BINARY="${NSDC_BINARY:-/usr/sbin/nsdc}"
+
+depend() {
+ need net
+ use logger
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+checkconfig() {
+ if ! test -e "${NSD_CONFIG}"; then
+ eerror "You need to create an appropriate config file."
+ eerror "An example can be found in /etc/nsd/nsd.conf.sample"
+ return 1
+ elif ! "${NSD_CHECKCONF}" "${NSD_CONFIG}"; then
+ eerror "You have errors in your configfile (${NSD_CONFIG})"
+ return $?
+ fi
+ return 0
+}
+
+patch() {
+ local difffile=$(${NSD_CHECKCONF} -o difffile "${NSD_CONFIG}")
+ if ! test -s "${difffile}"; then
+ # no difffile found or difffile empty, so no patching required
+ return 0
+ fi
+ ebegin "Patching NSD zone files"
+ "${NSDC_BINARY}" patch >/dev/null
+ eend $?
+}
+
+start() {
+ ebegin "Starting NSD"
+ checkconfig || return $?
+ local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}")
+ checkpath --directory --owner nsd:nsd $(dirname "${pidfile}")
+ start-stop-daemon --start --pidfile "${pidfile}" \
+ --exec "${NSD_BINARY}" -- -c "${NSD_CONFIG}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NSD"
+ checkconfig || return $?
+ local pidfile=$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}")
+ patch || return $?
+ start-stop-daemon --stop --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/nsd/files/nsd_munin_.patch b/net-dns/nsd/files/nsd_munin_.patch
new file mode 100644
index 00000000000..96902f4ed19
--- /dev/null
+++ b/net-dns/nsd/files/nsd_munin_.patch
@@ -0,0 +1,17 @@
+--- contrib/nsd_munin_.orig 2013-08-08 23:14:27.000000000 +0200
++++ contrib/nsd_munin_ 2013-08-08 23:41:24.000000000 +0200
+@@ -87,10 +87,10 @@
+
+ =cut
+
+-state=${statefile:-/usr/local/var/munin/plugin-state/nsd-state}
+-conf=${nsd_conf:-/usr/local/etc/nsd.conf}
+-ctrl=${nsd_control:-/usr/local/sbin/nsd-control}
+-chkconf=${nsd_checkconf:-/usr/local/sbin/nsd-checkconf}
++state=${statefile:-$MUNIN_PLUGSTATE/nsd-state}
++conf=${nsd_conf:-/etc/nsd/nsd.conf}
++ctrl=${nsd_control:-/usr/sbin/nsd-control}
++chkconf=${nsd_checkconf:-/usr/sbin/nsd-checkconf}
+ lock=$state.lock
+
+ # number of seconds between polling attempts.
diff --git a/net-dns/nsd/metadata.xml b/net-dns/nsd/metadata.xml
new file mode 100644
index 00000000000..7a19ab55dfe
--- /dev/null
+++ b/net-dns/nsd/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>tom@whyscream.net</email>
+ <name>Tom Hendrikx</name>
+ <description>Please assign bugs</description>
+ </maintainer>
+ <maintainer>
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>proxy-maintainer, please CC on bugs</description>
+ </maintainer>
+ <use>
+ <flag name='bind8-stats'>Enables BIND8 like NSTATS and XSTATS</flag>
+ <flag name='libevent'>Use libevent or libev, useful when zone
+ count is high</flag>
+ <flag name='minimal-responses'>If minimal responses are disabled,
+ responses are more likely to get truncated, resulting in TCP
+ fallback</flag>
+ <flag name='nsec3'>Enable NSEC3 support</flag>
+ <flag name='ratelimit'>Enables ratelimiting, based on query name,
+ type and source</flag>
+ <flag name='root-server'>Configure NSD as a root server</flag>
+ <flag name='runtime-checks'>Enable runtime checks, this could lead
+ to a reduced service level</flag>
+ <flag name='munin'>
+ Install a plugin for <pkg>net-analyzer/munin</pkg> to graph
+ statistical data from nsd.</flag>
+ <flag name='zone-stats'>Enable per-zone statistics logging, this
+ could lead to a reduced service level</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/nsd/nsd-3.2.18.ebuild b/net-dns/nsd/nsd-3.2.18.ebuild
new file mode 100644
index 00000000000..5636fdeafa6
--- /dev/null
+++ b/net-dns/nsd/nsd-3.2.18.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit user
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+MY_PV=${PV/_rc/rc}
+MY_PV=${MY_PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bind8-stats ipv6 minimal-responses mmap +nsec3 ratelimit root-server runtime-checks zone-stats"
+
+RDEPEND="
+ dev-libs/openssl
+ virtual/yacc
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+"
+
+src_configure() {
+ # ebuild.sh sets localstatedir to /var/lib, but nsd expects /var in several locations
+ # some of these cannot be changed by arguments to econf/configure, f.i. logfile
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-pidfile="${EPREFIX}/var/run/nsd/nsd.pid" \
+ --with-zonesdir="${EPREFIX}/var/lib/nsd" \
+ --enable-largefile \
+ $(use_enable bind8-stats) \
+ $(use_enable ipv6) \
+ $(use_enable minimal-responses) \
+ $(use_enable mmap) \
+ $(use_enable nsec3) \
+ $(use_enable ratelimit) \
+ $(use_enable root-server) \
+ $(use_enable runtime-checks checking) \
+ $(use_enable zone-stats)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ insinto /usr/share/nsd
+ doins contrib/nsd.zones2nsd.conf
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/nsd3-patch.cron nsd-patch.cron
+
+ newinitd "${FILESDIR}"/nsd3.initd-r1 nsd
+
+ # remove /var/run data created by Makefile, handled by initd script
+ rm -r "${D}"/var/run || die "could not remove /var/run/ directory"
+
+}
+
+pkg_postinst() {
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+
+ # database directory, writable by nsd for database updates and zone transfers
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd
+
+ # zones directory, writable by root for 'nsdc patch'
+ install -d -m 750 -o root -g nsd "${EROOT%/}"/var//nsd
+}
diff --git a/net-dns/nsd/nsd-4.1.0.ebuild b/net-dns/nsd/nsd-4.1.0.ebuild
new file mode 100644
index 00000000000..1fb9ee291d0
--- /dev/null
+++ b/net-dns/nsd/nsd-4.1.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit user eutils systemd
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+# version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1
+MY_PV=${PV/_rc/rc}
+MY_PV=${MY_PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bind8-stats ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl"
+
+RDEPEND="
+ dev-libs/openssl
+ virtual/yacc
+ libevent? ( dev-libs/libevent )
+ ssl? ( dev-libs/openssl )
+ munin? ( net-analyzer/munin )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+"
+
+src_prepare() {
+ # Fix the paths in the munin plugin to match our install
+ epatch "${FILESDIR}"/nsd_munin_.patch
+}
+
+src_configure() {
+ econf \
+ --enable-largefile \
+ --with-logfile="${EPREFIX}"/var/log/nsd.log \
+ --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid \
+ --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db \
+ --with-xfrdir="${EPREFIX}"/var/db/nsd \
+ --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state \
+ --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list \
+ --with-zonesdir="${EPREFIX}"/var/lib/nsd \
+ $(use_enable bind8-stats) \
+ $(use_enable ipv6) \
+ $(use_enable minimal-responses) \
+ $(use_enable mmap) \
+ $(use_enable nsec3) \
+ $(use_enable ratelimit) \
+ $(use_enable root-server) \
+ $(use_enable runtime-checks checking) \
+ $(use_with libevent) \
+ $(use_with ssl)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ newinitd "${FILESDIR}"/nsd.initd nsd
+
+ # install munin plugin and config
+ if use munin; then
+ exeinto /usr/libexec/munin/plugins
+ doexe contrib/nsd_munin_
+ insinto /etc/munin/plugin-conf.d
+ newins "${FILESDIR}"/nsd.munin-conf nsd_munin
+ fi
+
+ systemd_dounit "${FILESDIR}"/nsd.service
+
+ # remove the /run directory that usually resides on tmpfs and is
+ # being taken care of by the nsd init script anyway (checkpath)
+ rm -rf "${D}"/run || die "Failed to remove /run"
+}
+
+pkg_postinst() {
+ # Do this in postinst to ensure the uid/gid is consistent for binpkgs
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+
+ # database directory, writable by nsd for database updates and zone transfers
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd
+
+ # zones directory, writable by nsd for zone file updates (nsd-control write)
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/lib/nsd
+}
diff --git a/net-dns/odsclient/Manifest b/net-dns/odsclient/Manifest
new file mode 100644
index 00000000000..affdf3fb054
--- /dev/null
+++ b/net-dns/odsclient/Manifest
@@ -0,0 +1 @@
+DIST odsclient-1.03.tar.gz 4263 SHA256 4c55c88e2aebce736f2a85fb750da0292d047bfc3bd7a042535cbd9545ecc384 SHA512 12cc8b734314ec23432fc7ca980e099eee04be84134740460b7ab3edcff1abfb116794504653ef0af72b27fdc2b074633b96196e1894092152e1bd0e8300ab11 WHIRLPOOL 8d924616fa70bb90c227b9c67ef93bb5712f97d821023a9aeac96cd2fd7347c2dfab050c75a9450317c4662e52eaf6b4364e29e5686ca6f80e49e0565f8b5d0b
diff --git a/net-dns/odsclient/files/1.03-gentoo.patch b/net-dns/odsclient/files/1.03-gentoo.patch
new file mode 100644
index 00000000000..76f93016a01
--- /dev/null
+++ b/net-dns/odsclient/files/1.03-gentoo.patch
@@ -0,0 +1,21 @@
+--- a/client.c
++++ b/client.c
+@@ -40,7 +40,8 @@
+ ret = getret(s);
+ if(ret == 795 || ret == 796)
+ {
+- fprintf(stderr, "Updated successfully\n");
++ fprintf(stderr, "Updated %s to %s successfully\n",
++ argv[3], ipaddress);
+ mydprintf(s, "QUIT\n");
+ close(s);
+ exit(0);
+@@ -50,7 +51,7 @@
+
+ }
+ }
+- fprintf(stderr, "Unable to update host\n");
++ fprintf(stderr, "Unable to update %s\n", argv[3]);
+ return 1;
+ }
+
diff --git a/net-dns/odsclient/metadata.xml b/net-dns/odsclient/metadata.xml
new file mode 100644
index 00000000000..91f4e72fb54
--- /dev/null
+++ b/net-dns/odsclient/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/odsclient/odsclient-1.03-r1.ebuild b/net-dns/odsclient/odsclient-1.03-r1.ebuild
new file mode 100644
index 00000000000..b0d0f82c4ec
--- /dev/null
+++ b/net-dns/odsclient/odsclient-1.03-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Client for the Open Domain Server's dynamic dns"
+HOMEPAGE="http://www.ods.org/"
+SRC_URI="http://www.ods.org/dl/${P}.tar.gz"
+LICENSE="LGPL-2.1"
+
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+src_prepare() {
+ sed -i Makefile -e 's| -o | $(LDFLAGS)&|g' || die "sed failed"
+
+ epatch "${FILESDIR}"/${PV}-gentoo.patch
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ || die
+}
+
+src_install() {
+ dosbin odsclient
+ dodoc README
+}
diff --git a/net-dns/opendnssec/Manifest b/net-dns/opendnssec/Manifest
new file mode 100644
index 00000000000..e16f1786646
--- /dev/null
+++ b/net-dns/opendnssec/Manifest
@@ -0,0 +1,4 @@
+DIST opendnssec-1.3.17.tar.gz 1140751 SHA256 9f0dcfb53a3e10255b2d85e6a30663548eca1ec2e900b7cd5db9329f1710e323 SHA512 6d3172cf5dc1bee1dbd14a5b9a8ada4ce3ebd954e2cd7adde664ac4b5e0cab81ed1cba2e2efeceacedf16f56d40a0874b73d7c844bbbbb6e1be1f8235a4c99f7 WHIRLPOOL 80e3a99dedb2ea1cc6a1d109bcf4e874cc9cc18abfaa233a2533f7a05b7129543cf2fbeaf6c6cde343755cacbca3125a4426c421805425204725f9ddcb156657
+DIST opendnssec-1.3.18.tar.gz 1143889 SHA256 e61d23ae0cc57b6e09d408bade6872fe5241896c61a03e8bc5ceeb65df13a676 SHA512 5df39ba778c9b1245e88b81df7aa491bca0aad2943845284c4f8b4dd729fa69014d45f07bdf99a048ccf668a1c9675a8dd99efcec1abdbd4e06e9738fec6ab6d WHIRLPOOL 7213b8f2f86651114449bc4734452d6065960e26ee289051949ca27ae3b23280cea45ff707f71942eef91c9009200272c0985ef3d3de43c9343ad2e1e54303ce
+DIST opendnssec-1.4.4.tar.gz 1009728 SHA256 71f930d871e3526f930ac57925f5d5b934988e0b2e9e858926bfc73d9ba9d00e SHA512 aa88049cdd9275b7167e8a135beaa0ea6b9b2030818ec9d7815dbceb906cb0ac19d9a8e6e8571b6c37db452bbf9ab2a615785bad8ffb0a8eb21c50de42cd99b1 WHIRLPOOL 0ce1536aa69c394595105c1803761697d8450bc42e84c6a9e80568ade61fc6e0060f8b4d9bdb9547ff0cd17e27671a4c5fa3576c9d58a47188c7ff87043ccfb1
+DIST opendnssec-1.4.6.tar.gz 1014314 SHA256 53f9c454f331822925d76c9d9e5e7cb3fe2dfb03e3c467f67f9412f10d0fd5ec SHA512 c01e6e46e2007d0ae4035253484590d9a892be8284b179b6d3cdb0f8481789a67a79f9043d04de0aecc165fb44d88dac0eb02444f48e0ccd366f118a2bbb5c18 WHIRLPOOL 4535fb49879b27698b0ba88f05b2fd963c69829446a7d5eb8419c19768059347e0adfd1b59efe50b2acd5550758f499290e02ee52b1b92695e8f9061ad465bf0
diff --git a/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch
new file mode 100644
index 00000000000..7c9f72355d2
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch
@@ -0,0 +1,43 @@
+Index: conf/conf.xml.in
+===================================================================
+--- conf/conf.xml.in (revision 3022)
++++ conf/conf.xml.in (working copy)
+@@ -38,12 +38,10 @@
+ </Common>
+
+ <Enforcer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <Datastore><SQLite>@OPENDNSSEC_STATE_DIR@/kasp.db</SQLite></Datastore>
+ <Interval>PT3600S</Interval>
+@@ -56,12 +54,10 @@
+ </Enforcer>
+
+ <Signer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory>
+ <WorkerThreads>8</WorkerThreads>
+@@ -80,12 +76,10 @@
+ </Signer>
+
+ <Auditor>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory>
+ </Auditor>
diff --git a/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch b/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch
new file mode 100644
index 00000000000..39678408264
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch
@@ -0,0 +1,21 @@
+diff -urN opendnssec-1.3.0rc3.old/conf/Makefile.am opendnssec-1.3.0rc3/conf/Makefile.am
+--- opendnssec-1.3.0rc3.old/conf/Makefile.am 2011-07-01 21:15:25.000000000 +0200
++++ opendnssec-1.3.0rc3/conf/Makefile.am 2011-07-01 21:17:00.000000000 +0200
+@@ -7,7 +7,7 @@
+ XML = conf.xml kasp.xml zonelist.xml signconf.xml zonefetch.xml
+ XSL= kasp2html.xsl
+
+-TRANG= $(srcdir)/trang/trang.jar
++TRANG= /usr/bin/trang
+
+ sysconfdir = @sysconfdir@/opendnssec
+ datadir = @datadir@/opendnssec
+@@ -25,7 +25,7 @@
+ .rnc.rng:
+ @test -x "${JAVA}" || \
+ (echo "java is required for converting RelaxNG Compact to RelaxNG"; false)
+- ${JAVA} -jar ${TRANG} $< $@
++ ${TRANG} $< $@
+
+ regress: $(RNG)
+ @test -x "${XMLLINT}" || \
diff --git a/net-dns/opendnssec/files/opendnssec-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch
new file mode 100644
index 00000000000..c1972bbc3d1
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch
@@ -0,0 +1,28 @@
+--- conf/conf.xml.in.orig 2013-05-12 22:36:47.530988182 +0200
++++ conf/conf.xml.in 2013-05-12 22:37:56.459817918 +0200
+@@ -38,12 +38,10 @@
+ </Common>
+
+ <Enforcer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+ <!-- NOTE: Enforcer worker threads are not used; this option is ignored -->
+ <!--
+ <WorkerThreads>4</WorkerThreads>
+@@ -60,12 +58,10 @@
+ </Enforcer>
+
+ <Signer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory>
+ <WorkerThreads>4</WorkerThreads>
diff --git a/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch
new file mode 100644
index 00000000000..3958c6c70cc
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch
@@ -0,0 +1,32 @@
+diff -urN opendnssec-1.3.0rc2.old/Makefile.am opendnssec-1.3.0rc2/Makefile.am
+--- opendnssec-1.3.0rc2.old/Makefile.am 2011-06-02 13:48:56.000000000 +0200
++++ opendnssec-1.3.0rc2/Makefile.am 2011-06-02 13:49:19.000000000 +0200
+@@ -31,11 +31,11 @@
+
+ install-data-hook:
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/tmp
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signconf
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/unsigned
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signed
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/tmp
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+
+diff -urN opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 opendnssec-1.3.0rc2/m4/opendnssec_common.m4
+--- opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 2011-06-02 13:48:56.000000000 +0200
++++ opendnssec-1.3.0rc2/m4/opendnssec_common.m4 2011-06-02 13:49:36.000000000 +0200
+@@ -18,7 +18,7 @@
+ OPENDNSSEC_LIBEXEC_DIR=$full_libexecdir/opendnssec
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+-OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec"
++OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec"
+ OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
diff --git a/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch
new file mode 100644
index 00000000000..fe5b504344c
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch
@@ -0,0 +1,26 @@
+diff -ur opendnssec-1.3.12.orig/m4/opendnssec_common.m4 opendnssec-1.3.12/m4/opendnssec_common.m4
+--- opendnssec-1.3.12.orig/m4/opendnssec_common.m4 2013-01-31 13:46:01.122201232 +0100
++++ opendnssec-1.3.12/m4/opendnssec_common.m4 2013-01-31 13:54:47.648861211 +0100
+@@ -19,7 +19,7 @@
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+ OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec"
+-OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
++OPENDNSSEC_PID_DIR="${destdir}/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
+ AC_SUBST([OPENDNSSEC_SBIN_DIR])
+diff -ur opendnssec-1.3.12.orig/Makefile.am opendnssec-1.3.12/Makefile.am
+--- opendnssec-1.3.12.orig/Makefile.am 2013-01-31 13:46:01.122201232 +0100
++++ opendnssec-1.3.12/Makefile.am 2013-01-31 13:47:08.569951675 +0100
+@@ -37,8 +37,8 @@
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
++
++
+
+ docs:
+ (cd libhsm; $(MAKE) doxygen)
diff --git a/net-dns/opendnssec/files/opendnssec-use-system-trang.patch b/net-dns/opendnssec/files/opendnssec-use-system-trang.patch
new file mode 100644
index 00000000000..745b277e133
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-use-system-trang.patch
@@ -0,0 +1,20 @@
+--- conf/Makefile.am.orig 2013-05-12 22:45:26.514768943 +0200
++++ conf/Makefile.am 2013-05-12 22:46:33.399545628 +0200
+@@ -7,7 +7,7 @@
+ XML = addns.xml conf.xml kasp.xml zonelist.xml signconf.xml enforcerstate.xml
+ XSL= kasp2html.xsl
+
+-TRANG= $(srcdir)/trang/trang.jar
++TRANG= /usr/bin/trang
+ TRANG_URL "https://code.google.com/p/jing-trang/"
+
+ sysconfdir = @sysconfdir@/opendnssec
+@@ -31,7 +31,7 @@
+ .rnc.rng:
+ @test -x "${JAVA}" || \
+ (echo "java is required for converting RelaxNG Compact to RelaxNG"; false)
+- ${JAVA} -jar ${TRANG} $< $@
++ ${TRANG} $< $@
+
+ regress: $(RNG)
+ @test -x "${XMLLINT}" || \
diff --git a/net-dns/opendnssec/files/opendnssec.confd b/net-dns/opendnssec/files/opendnssec.confd
new file mode 100644
index 00000000000..bebe7e0b9d6
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.confd
@@ -0,0 +1,12 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Variables containing default binaries used in the opendnssec
+# initscript. You can alter them to another applications/paths
+# if required.
+
+CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck
+CONTROL_BIN=/usr/sbin/ods-control
+ENFORCER_BIN=/usr/sbin/ods-enforcerd
+SIGNER_BIN=/usr/sbin/ods-signerd
diff --git a/net-dns/opendnssec/files/opendnssec.confd-1.3.x b/net-dns/opendnssec/files/opendnssec.confd-1.3.x
new file mode 100644
index 00000000000..a6c2a280870
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.confd-1.3.x
@@ -0,0 +1,14 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Variables containing default binaries used in the opendnssec
+# initscript. You can alter them to another applications/paths
+# if required.
+
+CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck
+CONTROL_BIN=/usr/sbin/ods-control
+ENFORCER_BIN=/usr/sbin/ods-enforcerd
+SIGNER_BIN=/usr/sbin/ods-signerd
+EPPCLIENT_BIN=/usr/sbin/eppclientd
+EPPCLIENT_PIDFILE=/run/opendnssec/eppclientd.pid
diff --git a/net-dns/opendnssec/files/opendnssec.initd b/net-dns/opendnssec/files/opendnssec.initd
new file mode 100644
index 00000000000..eebf0114803
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.initd
@@ -0,0 +1,86 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="An open-source turn-key solution for DNSSEC"
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ if [ -x "${CHECKCONFIG_BIN}" ]; then
+ output=$(${CHECKCONFIG_BIN} 2>&1| grep -v -E "^/etc/opendnssec/(conf|kasp).xml validates")
+ if [ -n "$output" ]; then
+ echo $output
+ fi
+
+ errors=$(echo $output | grep ERROR | wc -l)
+ if [ $errors -gt 0 ]; then
+ ewarn "$errors error(s) found in OpenDNSSEC configuration."
+ fi
+ return $errors
+ fi
+ eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}"
+ # can't validate config, just die
+ return 1
+}
+
+
+start_enforcer() {
+ if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer start > /dev/null
+ eend $?
+ else
+ if [ -n "${ENFORCER_BIN}" ]; then
+ eerror "OpenDNSSEC Enforcer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Enforcer not used."
+ fi
+}
+
+stop_enforcer() {
+ if [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer stop > /dev/null
+ eend $?
+ fi
+}
+
+start_signer() {
+ if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer start > /dev/null 2>&1
+ eend $?
+ else
+ if [ -n "${SIGNER_BIN}" ]; then
+ eerror "OpenDNSSEC Signer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Signer not used."
+ fi
+}
+
+stop_signer() {
+ if [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer stop > /dev/null 2>&1
+ eend $?
+ fi
+}
+
+start() {
+ checkconfig || return $?
+ checkpath -d -m 0755 -o opendnssec:opendnssec /run/opendnssec
+ start_enforcer || return $?
+ start_signer || return $?
+}
+
+stop() {
+ stop_signer
+ stop_enforcer
+ sleep 5
+}
diff --git a/net-dns/opendnssec/files/opendnssec.initd-1.3.x b/net-dns/opendnssec/files/opendnssec.initd-1.3.x
new file mode 100644
index 00000000000..d0e256b13d9
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.initd-1.3.x
@@ -0,0 +1,124 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="An open-source turn-key solution for DNSSEC"
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ if [ -z "${CHECKCONFIG_BIN}" ]; then
+ # no config checker configured, skip config check
+ return 0
+ fi
+ if [ -x "${CHECKCONFIG_BIN}" ]; then
+ output=$(${CHECKCONFIG_BIN} 2>&1| grep -v -E "^/etc/opendnssec/(conf|kasp).xml validates")
+ if [ -n "$output" ]; then
+ echo $output
+ fi
+
+ errors=$(echo $output | grep ERROR | wc -l)
+ if [ $errors -gt 0 ]; then
+ ewarn "$errors error(s) found in OpenDNSSEC configuration."
+ fi
+ return $errors
+ fi
+ eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}"
+ # can't validate config, just die
+ return 1
+}
+
+start_enforcer() {
+ if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer start > /dev/null
+ eend $?
+ else
+ if [ -n "${ENFORCER_BIN}" ]; then
+ eerror "OpenDNSSEC Enforcer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Enforcer not used."
+ fi
+}
+
+stop_enforcer() {
+ if [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer stop > /dev/null
+ eend $?
+ fi
+}
+
+start_signer() {
+ if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer start > /dev/null 2>&1
+ eend $?
+ else
+ if [ -n "${SIGNER_BIN}" ]; then
+ eerror "OpenDNSSEC Signer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Signer not used."
+ fi
+}
+
+stop_signer() {
+ if [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer stop > /dev/null 2>&1
+ eend $?
+ fi
+}
+
+start_eppclient() {
+ if [ -n "${EPPCLIENT_BIN}" ] && [ -x "${EPPCLIENT_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Eppclient"
+ start-stop-daemon \
+ --start \
+ --user opendnssec --group opendnssec \
+ --exec "${EPPCLIENT_BIN}" \
+ --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
+ eend $?
+ else
+ # eppclient is ofptional so if we use the default binary and it
+ # is not used we won't die
+ if [ -n "${EPPCLIENT_BIN}" ] && \
+ [ "${EPPCLIENT_BIN}" != "/usr/sbin/eppclientd" ]; then
+ eerror "OpenDNSSEC Eppclient binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Eppclient not used."
+ fi
+}
+
+stop_eppclient() {
+ if [ -x "${EPPCLIENT_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Eppclient"
+ start-stop-daemon \
+ --stop \
+ --exec "${EPPCLIENT_BIN}" \
+ --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
+ eend $?
+ fi
+}
+
+start() {
+ checkconfig || return $?
+ test -d /run/opendnssec || mkdir -p /run/opendnssec
+ chown opendnssec:opendnssec /run/opendnssec
+ start_enforcer || return $?
+ start_signer || return $?
+ start_eppclient || return $?
+}
+
+stop() {
+ stop_eppclient
+ stop_signer
+ stop_enforcer
+ sleep 5
+}
diff --git a/net-dns/opendnssec/metadata.xml b/net-dns/opendnssec/metadata.xml
new file mode 100644
index 00000000000..90d860ca709
--- /dev/null
+++ b/net-dns/opendnssec/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='auditor'>Enables auditing capabilities for OpenDNSSEC</flag>
+ <flag name='eppclient'>Enables support for automatic submission of DNSSEC keys to an upstream epp server</flag>
+ <flag name='signer'>Enables signing capabilities for OpenDNSSEC</flag>
+ <flag name='opensc'>Enables support for storing DNSSEC keys through a <pkg>dev-libs/opensc</pkg> PKCS#11 interface</flag>
+ <flag name='softhsm'>Enables support for storing DNSSEC keys in a <pkg>dev-libs/softhsm</pkg> PKCS#11 object</flag>
+ <flag name='external-hsm'>Enables support for storing DNSSEC keys through an arbitrary non-portage PKCS#11 interface, specified through an environment variable</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-dns/opendnssec/opendnssec-1.3.17.ebuild b/net-dns/opendnssec/opendnssec-1.3.17.ebuild
new file mode 100644
index 00000000000..eddc1ddcc14
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-1.3.17.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit base autotools multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="-auditor +curl debug doc eppclient mysql +signer +sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ curl? ( net-misc/curl )
+ mysql? (
+ virtual/mysql
+ dev-perl/DBD-mysql
+ )
+ opensc? ( dev-libs/opensc )
+ softhsm? ( dev-libs/softhsm )
+ sqlite? (
+ dev-db/sqlite:3
+ dev-perl/DBD-SQLite
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ app-text/trang
+ )
+"
+# test? dev-util/cunit # Requires running test DB
+
+REQUIRED_USE="
+ ^^ ( mysql sqlite )
+ ^^ ( softhsm opensc external-hsm )
+ eppclient? ( curl )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-localstatedir.patch"
+ "${FILESDIR}/${PN}-fix-run-dir.patch"
+ "${FILESDIR}/${PN}-1.3.14-drop-privileges.patch"
+ "${FILESDIR}/${PN}-1.3.14-use-system-trang.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( MIGRATION NEWS )
+
+check_pkcs11_setup() {
+ # PKCS#11 HSM's are often only available with proprietary drivers not
+ # available in portage tree.
+
+ if use softhsm; then
+ PKCS11_LIB=softhsm
+ if has_version ">=dev-libs/softhsm-1.3.1"; then
+ PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so
+ else
+ PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so
+ fi
+ elog "Building with SoftHSM PKCS#11 library support."
+ fi
+ if use opensc; then
+ PKCS11_LIB=opensc
+ PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so
+ elog "Building with OpenSC PKCS#11 library support."
+ fi
+ if use external-hsm; then
+ if [[ -n ${PKCS11_SCA6000} ]]; then
+ PKCS11_LIB=sca6000
+ PKCS11_PATH=${PKCS11_SCA6000}
+ elif [[ -n ${PKCS11_ETOKEN} ]]; then
+ PKCS11_LIB=etoken
+ PKCS11_PATH=${PKCS11_ETOKEN}
+ elif [[ -n ${PKCS11_NCIPHER} ]]; then
+ PKCS11_LIB=ncipher
+ PKCS11_PATH=${PKCS11_NCIPHER}
+ elif [[ -n ${PKCS11_AEPKEYPER} ]]; then
+ PKCS11_LIB=aepkeyper
+ PKCS11_PATH=${PKCS11_AEPKEYPER}
+ else
+ ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11"
+ ewarn "library. To set a path, set one of the following environment variables:"
+ ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/make.conf"
+ die "USE flag 'external-hsm' set but no PKCS#11 library path specified."
+ fi
+ elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}"
+ fi
+}
+
+pkg_pretend() {
+ local i
+
+ for i in eppclient mysql; do
+ if use ${i}; then
+ ewarn
+ ewarn "Usage of ${i} is considered experimental."
+ ewarn "Do not report bugs against this feature."
+ ewarn
+ fi
+ done
+
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec