Diff binwalk-2.4.3 with a binwalk-9999

/usr/portage/app-misc/binwalk/binwalk-9999.ebuild 2024-12-25 15:56:33.283644898 +0300
1
# Copyright 1999-2026 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_{12..14})
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
EPYTEST_PLUGINS=()
26
distutils_enable_tests pytest
27

  
28
python_install_all() {
29
	local DOCS=( API.md INSTALL.md README.md )
30
	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
31 36
}
32 37

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

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