dev-ruby/shotgun: add ruby26
[gentoo.git] / app-misc / binwalk / binwalk-2.1.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_5,3_6} )
6
7 inherit distutils-r1
8
9 if [[ ${PV} == "9999" ]] ; then
10         EGIT_REPO_URI="https://github.com/devttys0/binwalk.git"
11         inherit git-r3
12 else
13         SRC_URI="https://github.com/devttys0/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14         KEYWORDS="amd64 x86 ~x64-macos"
15 fi
16
17 DESCRIPTION="A tool for identifying files embedded inside firmware images"
18 HOMEPAGE="https://github.com/devttys0/binwalk"
19
20 LICENSE="MIT"
21 SLOT="0"
22 IUSE="graph"
23
24 RDEPEND="
25         $(python_gen_cond_dep 'dev-python/backports-lzma[${PYTHON_USEDEP}]' python2_7)
26         graph? ( dev-python/pyqtgraph[opengl,${PYTHON_USEDEP}] )
27 "
28
29 PATCHES=( "${FILESDIR}"/0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch )
30
31 python_install_all() {
32         local DOCS=( API.md INSTALL.md README.md )
33         distutils-r1_python_install_all
34 }
35
36 pkg_postinst() {
37         if [[ -z ${REPLACING_VERSIONS} ]]; then
38                 elog "binwalk has many optional dependencies to automatically"
39                 elog "extract/decompress data, see INSTALL.md for more details."
40         fi
41 }