Diff binwalk-2.4.3 with a binwalk-9999

/usr/portage/app-misc/binwalk/binwalk-9999.ebuild 2024-12-25 14:59:47.107270040 +0300
1
# Copyright 1999-2025 Gentoo Authors
1
# Copyright 2024 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
# Autogenerated by pycargoebuild 0.13.3
5

  
4 6
EAPI=8
5 7

  
6
DISTUTILS_USE_PEP517=setuptools
7
PYTHON_COMPAT=( pypy3 pypy3_11 python3_{10..13})
8
inherit cargo
8 9

  
9
inherit distutils-r1 optfeature
10
DESCRIPTION="Analyzes data for embedded file types"
11
HOMEPAGE="https://github.com/ReFirmLabs/binwalk"
10 12

  
11 13
if [[ ${PV} == 9999 ]] ; then
12
	EGIT_REPO_URI="https://github.com/OSPG/binwalk.git"
13 14
	inherit git-r3
15
	EGIT_REPO_URI="https://github.com/ReFirmLabs/binwalk.git"
14 16
else
15
	SRC_URI="https://github.com/OSPG/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16
	KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86 ~x64-macos"
17
	SRC_URI="
18
		https://github.com/ReFirmLabs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
19
		${CARGO_CRATE_URIS}
20
	"
21
	KEYWORDS="~amd64"
17 22
fi
18 23

  
19
DESCRIPTION="A tool for identifying files embedded inside firmware images"
20
HOMEPAGE="https://github.com/OSPG/binwalk"
21

  
22 24
LICENSE="MIT"
23
SLOT="0"
24

  
25
distutils_enable_tests pytest
26

  
27
python_install_all() {
28
	local DOCS=( API.md INSTALL.md README.md )
29
	distutils-r1_python_install_all
25
# Dependent crate licenses
26
LICENSE+=" Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016"
27
SLOT="3"
28

  
29
src_unpack() {
30
	if [[ "${PV}" == *9999* ]]; then
31
		git-r3_src_unpack
32
		cargo_live_src_unpack
33
	else
34
		cargo_src_unpack
35
	fi
30 36
}
31 37

  
32
pkg_postinst() {
33
	optfeature "entropy graph" dev-python/matplotlib
34
	optfeature "disassembly" dev-libs/capstone[python]
35

  
36
	if [[ -z ${REPLACING_VERSIONS} ]]; then
37
		elog "binwalk has many more optional dependencies to automatically"
38
		elog "extract/decompress data, see INSTALL.md for more details."
39
	fi
38
src_install() {
39
	newbin "$(cargo_target_dir)/binwalk" binwalk3
40 40
}
Thank you!