summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2019-12-27 16:20:54 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2019-12-27 16:25:10 +0100
commitbda5207741e4e1ae4513f51b7fc1162b39cb4101 (patch)
tree8045a5822ba10513d52550bb7f755f8d683f4bc2 /net-vpn
parentnet-misc/r8168: Drop to maintainer-needed (diff)
downloadgentoo-bda5207741e4e1ae4513f51b7fc1162b39cb4101.tar.gz
gentoo-bda5207741e4e1ae4513f51b7fc1162b39cb4101.tar.bz2
gentoo-bda5207741e4e1ae4513f51b7fc1162b39cb4101.zip
net-vpn/wireguard-modules: allow out of tree kernel builds
We also update the version situation description. Package-Manager: Portage-2.3.83, Repoman-2.3.20 Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild13
-rw-r--r--net-vpn/wireguard-modules/wireguard-modules-9999.ebuild13
2 files changed, 20 insertions, 6 deletions
diff --git a/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild b/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild
index 2fe86edba28e..dd0ff73d4958 100644
--- a/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild
+++ b/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild
@@ -33,14 +33,21 @@ CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI"
pkg_setup() {
if use module; then
linux-mod_pkg_setup
- if kernel_is -lt 3 10 0 || kernel_is -ge 5 6 0; then
- die "This version of ${PN} requires 3.10 <= Linux <= 5.5.y"
+ if kernel_is -ge 5 6 0; then
+ eerror
+ eerror "WireGuard has been merged upstream in Linux 5.6. Therefore,"
+ eerror "you no longer need this compatibility ebuild. Instead, simply"
+ eerror "enable CONFIG_WIREGUARD=y in your kernel configuration."
+ eerror
+ die "Use CONFIG_WIREGUARD=y for kernels >= 5.6, and do not use this package."
+ elif kernel_is -lt 3 10 0; then
+ die "This version of ${PN} requires Linux >= 3.10."
fi
fi
}
src_compile() {
- BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}"
+ BUILD_PARAMS="KERNELDIR=${KV_OUT_DIR}"
use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}"
use module && linux-mod_src_compile
}
diff --git a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild
index 2fe86edba28e..dd0ff73d4958 100644
--- a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild
+++ b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild
@@ -33,14 +33,21 @@ CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI"
pkg_setup() {
if use module; then
linux-mod_pkg_setup
- if kernel_is -lt 3 10 0 || kernel_is -ge 5 6 0; then
- die "This version of ${PN} requires 3.10 <= Linux <= 5.5.y"
+ if kernel_is -ge 5 6 0; then
+ eerror
+ eerror "WireGuard has been merged upstream in Linux 5.6. Therefore,"
+ eerror "you no longer need this compatibility ebuild. Instead, simply"
+ eerror "enable CONFIG_WIREGUARD=y in your kernel configuration."
+ eerror
+ die "Use CONFIG_WIREGUARD=y for kernels >= 5.6, and do not use this package."
+ elif kernel_is -lt 3 10 0; then
+ die "This version of ${PN} requires Linux >= 3.10."
fi
fi
}
src_compile() {
- BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}"
+ BUILD_PARAMS="KERNELDIR=${KV_OUT_DIR}"
use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}"
use module && linux-mod_src_compile
}