net-vpn/fastd: add 23

Signed-off-by: Artemis Everfree <artemis@artemis.sh>
This commit is contained in:
Artemis Everfree 2025-01-29 20:57:29 -08:00
parent 7c5facd285
commit fcef76f029
No known key found for this signature in database
GPG Key ID: C38F1795B0716FEF
2 changed files with 74 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST fastd-22.tar.xz 161288 BLAKE2B 25c741a0fe1ff4d8f02ee932301cc0bf58ff65cb95d4f53a49b2ef691d8531a917c1fea5b93f796dc0151ebeea3edd2b0c97e1ea5649ef2dfa4043b489c945eb SHA512 66196fa13c93b87b78b9e31bc267cf616dcfb4a964387c4a3f0f3176fa1529be335a6fac91379038d6a8b1a1be4fea547659551a8a9fa8d6939589d5f8a9a7aa
DIST fastd-23.tar.xz 166916 BLAKE2B 97387c5675df47d5392dc215ff43ec46cd7a143c09c131688760acf150000eae8b8bd38572ad3a3f1af2b012ec5f0d83272541fb35ff71991597078e58407cb3 SHA512 41aae32e1fcc2e2ba6c45d9a901eaefcacdde0d03a8b5844023e6ffbef69345004b622f975eea95fc1d6864ad20f67739054e33a75fc27f4bf70d2f4147854d5

View File

@ -0,0 +1,73 @@
# Copyright 1999-2023 Gentoo Authors
#
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-info meson systemd
DESCRIPTION="A very small VPN daemon which tunnels IP packets and Ethernet frames over UDP."
HOMEPAGE="https://fastd.readthedocs.io/"
SRC_URI="https://github.com/neocturne/fastd/releases/download/v${PV}/${P}.tar.xz"
# while source COPYRIGHT also mentions LGPLv2.1+, that only applies to
# vendored libmnl. we are using system libmnl.
LICENSE="BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="+caps doc offload-l2tp systemd test"
RESTRICT="!test? ( test )"
RDEPEND="
>=net-libs/libuecc-6
dev-libs/json-c
dev-libs/libsodium
dev-libs/openssl
offload-l2tp? ( net-libs/libmnl )
caps? ( sys-libs/libcap )
test? ( dev-util/cmocka )
"
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/bison
doc? ( dev-python/sphinx )
"
pkg_setup() {
if use offload-l2tp; then
CONFIG_CHECK="~L2TP ~L2TP_V3 ~L2TP_ETH"
declare -g ERROR_L2TP="CONFIG_L2TP isn't set. Offloading L2TP to kernel will not work."
declare -g ERROR_L2TP_V3="CONFIG_L2TP_V3 isn't set. Offloading L2TP to kernel will not work."
declare -g ERROR_L2TP_ETH="CONFIG_L2TP_ETH isn't set. Offloading L2TP to kernel will not work."
linux-info_pkg_setup
fi
}
src_configure() {
local emesonargs=(
$(meson_feature caps capabilities)
$(meson_feature offload-l2tp offload_l2tp)
$(meson_feature systemd)
$(meson_use test build_tests)
-Dlibmnl_builtin=false
)
meson_src_configure
}
src_compile() {
meson_src_compile
if use doc; then
einfo "Building documentation ..."
local doc_dir="${S}/doc"
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
emake man || die "Building documentation failed!"
fi
}
src_install() {
meson_src_install
systemd_dounit "doc/examples/fastd@.service"
newinitd "${FILESDIR}/fastd.init" fastd
use doc && doman doc/build/man/*
keepdir /etc/fastd
}