mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
net-firewall/bpfilter: add 0.5.2
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
This commit is contained in:
parent
84e0377ba4
commit
43af24f955
@ -1,2 +1,3 @@
|
||||
DIST bpfilter-0.4.0.tar.gz 2501443 BLAKE2B d945b08b048b88bfc96367785649b5a688e4b629f8d1533555149f8477ac6d8a2c47e4c157c3a55287fdcb2f4eb3584613cad525e773fa933dfd0a4812ffe6d1 SHA512 04b41baa3cd64a38728f051d849e70ffe430f93daca50dd2c2f6a37fcc0fc7394d36c3ff60c01cfce8ead23b582347b042c0e37a1d1cb7dc8491ee24574d88b4
|
||||
DIST bpfilter-0.5.0.tar.gz 2548151 BLAKE2B c7a09bfaa494276eab0a83c3c7fdc3b51ee547f53088cd1ed4a0ec9bbad22a086b9cedeb9779263a3ff3ca066929d8dbba671078387f8b15d64b385d124975f2 SHA512 6da49c322b8731277815237f0280ed0ddf96527ffb110d72594374f275a5ac8bc97ead2091d56afed8ac4a8b86e05b30997a6bc92c81b8acac6f533350f9d40d
|
||||
DIST bpfilter-0.5.2.tar.gz 2548282 BLAKE2B 5e91dffd89f6bd4c336a2862b4842563190a4362473e27ed5835c1f81163e9c9af8af991c831f6878ebae6cf47313a872d280506a6000dc0251209644611239b SHA512 4e841f8df6ab77fc9e199c0828018f4dfb89923aab429b7b9854b4abf04fa540b4fabf26fe7b40b53af737d9c72d8e115ad6bb283eabcade7a4a381fce3694f2
|
||||
|
||||
113
net-firewall/bpfilter/bpfilter-0.5.2.ebuild
Normal file
113
net-firewall/bpfilter/bpfilter-0.5.2.ebuild
Normal file
@ -0,0 +1,113 @@
|
||||
# Copyright 2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_1{1..3} )
|
||||
inherit python-any-r1 cmake
|
||||
|
||||
DESCRIPTION="BPF-based packet filtering framework"
|
||||
HOMEPAGE="
|
||||
https://bpfilter.io/
|
||||
https://github.com/facebook/bpfilter
|
||||
"
|
||||
SRC_URI="https://github.com/facebook/bpfilter/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0/0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="doc test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# tests need root access
|
||||
RESTRICT+=" test"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/libbpf:=
|
||||
dev-libs/libnl:3=
|
||||
test? (
|
||||
dev-util/cmocka
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
doc? (
|
||||
app-text/doxygen
|
||||
$(python_gen_any_dep '
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/linuxdoc[${PYTHON_USEDEP}]
|
||||
dev-python/breathe[${PYTHON_USEDEP}]
|
||||
dev-python/furo[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
test? (
|
||||
$(python_gen_any_dep '
|
||||
net-analyzer/scapy[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/bpfilter-0.5.0-no-coverage.patch"
|
||||
)
|
||||
|
||||
DOCS=(
|
||||
CONTRIBUTING.md
|
||||
README.md
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
(use test || use doc) && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
local -a atoms
|
||||
if use doc; then
|
||||
python_has_version \
|
||||
"dev-python/sphinx[${PYTHON_USEDEP}]" \
|
||||
"dev-python/breathe[${PYTHON_USEDEP}]" \
|
||||
"dev-python/linuxdoc[${PYTHON_USEDEP}]" \
|
||||
"dev-python/furo[${PYTHON_USEDEP}]" \
|
||||
|| return
|
||||
fi
|
||||
if use test; then
|
||||
python_has_version \
|
||||
"net-analyzer/scapy[${PYTHON_USEDEP}]" \
|
||||
|| return
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -e '/get_version_from_git/ d' -i CMakeLists.txt || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local CMAKE_BUILD_TYPE=release
|
||||
local -a mycmakeargs=(
|
||||
-DNO_CHECKS=ON
|
||||
-DNO_BENCHMARKS=ON
|
||||
-DDEFAULT_PROJECT_VERSION="${PV}"
|
||||
-DNO_DOCS=$(usex doc 'OFF' 'ON')
|
||||
-DNO_TESTS=$(usex test 'OFF' 'ON')
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
use doc && cmake_build doc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cmake_src_test
|
||||
cmake_build e2e || die "tests failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use doc && dodoc -r "${BUILD_DIR}/doc/"{ht,x}ml
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user