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
}
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
}