1 |
commit: bda5207741e4e1ae4513f51b7fc1162b39cb4101 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 27 15:20:54 2019 +0000 |
4 |
Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 27 15:25:10 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bda52077 |
7 |
|
8 |
net-vpn/wireguard-modules: allow out of tree kernel builds |
9 |
|
10 |
We also update the version situation description. |
11 |
|
12 |
Package-Manager: Portage-2.3.83, Repoman-2.3.20 |
13 |
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org> |
14 |
|
15 |
.../wireguard-modules/wireguard-modules-0.0.20191226.ebuild | 13 ++++++++++--- |
16 |
net-vpn/wireguard-modules/wireguard-modules-9999.ebuild | 13 ++++++++++--- |
17 |
2 files changed, 20 insertions(+), 6 deletions(-) |
18 |
|
19 |
diff --git a/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild b/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild |
20 |
index 2fe86edba28..dd0ff73d495 100644 |
21 |
--- a/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild |
22 |
+++ b/net-vpn/wireguard-modules/wireguard-modules-0.0.20191226.ebuild |
23 |
@@ -33,14 +33,21 @@ CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
24 |
pkg_setup() { |
25 |
if use module; then |
26 |
linux-mod_pkg_setup |
27 |
- if kernel_is -lt 3 10 0 || kernel_is -ge 5 6 0; then |
28 |
- die "This version of ${PN} requires 3.10 <= Linux <= 5.5.y" |
29 |
+ if kernel_is -ge 5 6 0; then |
30 |
+ eerror |
31 |
+ eerror "WireGuard has been merged upstream in Linux 5.6. Therefore," |
32 |
+ eerror "you no longer need this compatibility ebuild. Instead, simply" |
33 |
+ eerror "enable CONFIG_WIREGUARD=y in your kernel configuration." |
34 |
+ eerror |
35 |
+ die "Use CONFIG_WIREGUARD=y for kernels >= 5.6, and do not use this package." |
36 |
+ elif kernel_is -lt 3 10 0; then |
37 |
+ die "This version of ${PN} requires Linux >= 3.10." |
38 |
fi |
39 |
fi |
40 |
} |
41 |
|
42 |
src_compile() { |
43 |
- BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}" |
44 |
+ BUILD_PARAMS="KERNELDIR=${KV_OUT_DIR}" |
45 |
use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" |
46 |
use module && linux-mod_src_compile |
47 |
} |
48 |
|
49 |
diff --git a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
50 |
index 2fe86edba28..dd0ff73d495 100644 |
51 |
--- a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
52 |
+++ b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
53 |
@@ -33,14 +33,21 @@ CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
54 |
pkg_setup() { |
55 |
if use module; then |
56 |
linux-mod_pkg_setup |
57 |
- if kernel_is -lt 3 10 0 || kernel_is -ge 5 6 0; then |
58 |
- die "This version of ${PN} requires 3.10 <= Linux <= 5.5.y" |
59 |
+ if kernel_is -ge 5 6 0; then |
60 |
+ eerror |
61 |
+ eerror "WireGuard has been merged upstream in Linux 5.6. Therefore," |
62 |
+ eerror "you no longer need this compatibility ebuild. Instead, simply" |
63 |
+ eerror "enable CONFIG_WIREGUARD=y in your kernel configuration." |
64 |
+ eerror |
65 |
+ die "Use CONFIG_WIREGUARD=y for kernels >= 5.6, and do not use this package." |
66 |
+ elif kernel_is -lt 3 10 0; then |
67 |
+ die "This version of ${PN} requires Linux >= 3.10." |
68 |
fi |
69 |
fi |
70 |
} |
71 |
|
72 |
src_compile() { |
73 |
- BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}" |
74 |
+ BUILD_PARAMS="KERNELDIR=${KV_OUT_DIR}" |
75 |
use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" |
76 |
use module && linux-mod_src_compile |
77 |
} |