From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CC6E7139694 for ; Tue, 1 Aug 2017 22:45:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16C041FC070; Tue, 1 Aug 2017 22:45:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DA7421FC070 for ; Tue, 1 Aug 2017 22:45:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61D5A341805 for ; Tue, 1 Aug 2017 22:45:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D478575DC for ; Tue, 1 Aug 2017 22:45:22 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1501627516.06cd85532dc39498e24c0a3364e0fcf689219e3e.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild X-VCS-Directories: net-dns/dnsmasq/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 06cd85532dc39498e24c0a3364e0fcf689219e3e X-VCS-Branch: master Date: Tue, 1 Aug 2017 22:45:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b51ee4cf-1b7f-4d49-9ca9-132f4d73f6f5 X-Archives-Hash: 0d4082aa7b281dde32cfcde7bd03b80e commit: 06cd85532dc39498e24c0a3364e0fcf689219e3e Author: Patrick McLean gentoo org> AuthorDate: Tue Aug 1 22:44:58 2017 +0000 Commit: Patrick McLean gentoo org> CommitDate: Tue Aug 1 22:45:16 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06cd8553 net-dns/dnsmasq: Revision bump on 2.77, unify idn/libidn2 USE semantics Make the "libidn2" USE flag a sub-flag of "idn", as described in the bug. Gentoo-Bug: 625616 Package-Manager: Portage-2.3.6, Repoman-2.3.3 net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild | 198 +++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) diff --git a/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild new file mode 100644 index 00000000000..17e3d67699d --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit 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 +id idn libidn2 +inotify" +IUSE+=" 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? ( + !libidn2? ( net-dns/libidn ) + libidn2? ( >=net-dns/libidn2-2.0 ) + ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( sys-devel/gettext ) +" + +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 ) + libidn2? ( idn )" + +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() { + default + + 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 libidn2 || $(use_have idn))" + COPTS+="$(use_have libidn2)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have -n id id)" + 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)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/lease-tools \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + 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 + + docinto html/ + dodoc *.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/lease-tools/{dhcp_release,dhcp_lease_time} + doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 + if use ipv6; then + dosbin contrib/lease-tools/dhcp_release6 + doman contrib/lease-tools/dhcp_release6.1 + fi + 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 +}