# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

CRATES="
	aho-corasick@1.1.4
	anyhow@1.0.100
	arrayvec@0.7.6
	autocfg@1.5.0
	bitflags@1.2.1
	bitflags@2.10.0
	block2@0.6.2
	bytes@1.11.0
	cc@1.2.52
	cfg-if@1.0.4
	cfg_aliases@0.2.1
	ctrlc@3.5.1
	dispatch2@0.3.0
	etherparse@0.13.0
	etherparse@0.18.2
	find-msvc-tools@0.1.7
	iptables@0.4.3
	itoa@1.0.17
	lazy_static@1.5.0
	libc@0.2.180
	memchr@2.7.6
	memoffset@0.6.5
	nfq-updated@0.2.6
	nix@0.20.2
	nix@0.27.1
	nix@0.30.1
	objc2-encode@4.1.0
	objc2@0.6.3
	proc-macro2@1.0.105
	quote@1.0.43
	regex-automata@0.4.13
	regex-syntax@0.8.8
	regex@1.12.2
	serde@1.0.228
	serde_core@1.0.228
	serde_derive@1.0.228
	serde_json@1.0.149
	shlex@1.3.0
	socket2@0.6.1
	syn@2.0.114
	thiserror-impl@1.0.69
	thiserror@1.0.69
	toml@0.5.11
	unicode-ident@1.0.22
	windivert-sys@0.10.0
	windivert@0.6.0
	windows-link@0.2.1
	windows-sys@0.60.2
	windows-sys@0.61.2
	windows-targets@0.48.5
	windows-targets@0.53.5
	windows@0.48.0
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.53.1
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.53.1
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.53.1
	windows_i686_gnullvm@0.53.1
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.53.1
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.53.1
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.53.1
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.53.1
	winres@0.1.12
	zerocopy-derive@0.8.33
	zerocopy@0.8.33
	zmij@1.0.14
"

RUST_MIN_VER="1.85.0"

inherit cargo

DESCRIPTION="Simple and efficient DPI circumvention tool in Rust."
HOMEPAGE="https://github.com/dilluti0n/dpibreak"
SRC_URI="
	https://github.com/dilluti0n/dpibreak/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+=" LGPL-3+ MIT Unicode-3.0"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	|| ( net-firewall/nftables net-firewall/iptables )
"

DEPEND="
	net-libs/libnetfilter_queue
	net-libs/libnfnetlink
"

IUSE="doc"

src_install() {
	cargo_src_install
	doman dpibreak.1

	if use doc; then
		dodoc README.md CHANGELOG
	fi
}