From 95513fef437a6bc42c196885f3d4a45ff6b11947 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 28 Dec 2019 09:03:27 +0100 Subject: [PATCH] net-vpn/wireguard-tools: make wg-quick(8) optional Closes: https://bugs.gentoo.org/671894 Suggested-by: Aaron Jones Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Jason A. Donenfeld --- net-vpn/wireguard-tools/metadata.xml | 3 +++ .../wireguard-tools/wireguard-tools-1.0.20191226.ebuild | 9 +++++++-- net-vpn/wireguard-tools/wireguard-tools-9999.ebuild | 9 +++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/net-vpn/wireguard-tools/metadata.xml b/net-vpn/wireguard-tools/metadata.xml index 915f00227065..652da2d16d0c 100644 --- a/net-vpn/wireguard-tools/metadata.xml +++ b/net-vpn/wireguard-tools/metadata.xml @@ -5,4 +5,7 @@ zx2c4@gentoo.org Jason A. Donenfeld + + Install the wg-quick(8) helper tool. Most users want to use this. + diff --git a/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild b/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild index 5c75ad1f60b7..8a3241a03556 100644 --- a/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild +++ b/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild @@ -19,11 +19,15 @@ fi LICENSE="GPL-2" SLOT="0" +IUSE="+wg-quick" BDEPEND="virtual/pkgconfig" DEPEND="net-libs/libmnl" RDEPEND="${DEPEND} - || ( net-firewall/nftables net-firewall/iptables ) + wg-quick? ( + || ( net-firewall/nftables net-firewall/iptables ) + virtual/resolvconf + ) !<=net-vpn/wireguard-0.0.20191219 " @@ -33,6 +37,7 @@ wg_quick_optional_config_nob() { } pkg_setup() { + use wg-quick || return 0 wg_quick_optional_config_nob IP_ADVANCED_ROUTER wg_quick_optional_config_nob IP_MULTIPLE_TABLES wg_quick_optional_config_nob IPV6_MULTIPLE_TABLES @@ -67,7 +72,7 @@ src_install() { emake \ WITH_BASHCOMPLETION=yes \ WITH_SYSTEMDUNITS=yes \ - WITH_WGQUICK=yes \ + WITH_WGQUICK=$(usex wg-quick) \ DESTDIR="${D}" \ BASHCOMPDIR="$(get_bashcompdir)" \ SYSTEMDUNITDIR="$(systemd_get_systemunitdir)" \ diff --git a/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild b/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild index 5c75ad1f60b7..8a3241a03556 100644 --- a/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild +++ b/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild @@ -19,11 +19,15 @@ fi LICENSE="GPL-2" SLOT="0" +IUSE="+wg-quick" BDEPEND="virtual/pkgconfig" DEPEND="net-libs/libmnl" RDEPEND="${DEPEND} - || ( net-firewall/nftables net-firewall/iptables ) + wg-quick? ( + || ( net-firewall/nftables net-firewall/iptables ) + virtual/resolvconf + ) !<=net-vpn/wireguard-0.0.20191219 " @@ -33,6 +37,7 @@ wg_quick_optional_config_nob() { } pkg_setup() { + use wg-quick || return 0 wg_quick_optional_config_nob IP_ADVANCED_ROUTER wg_quick_optional_config_nob IP_MULTIPLE_TABLES wg_quick_optional_config_nob IPV6_MULTIPLE_TABLES @@ -67,7 +72,7 @@ src_install() { emake \ WITH_BASHCOMPLETION=yes \ WITH_SYSTEMDUNITS=yes \ - WITH_WGQUICK=yes \ + WITH_WGQUICK=$(usex wg-quick) \ DESTDIR="${D}" \ BASHCOMPDIR="$(get_bashcompdir)" \ SYSTEMDUNITDIR="$(systemd_get_systemunitdir)" \ -- 2.26.2