Install this version:
emerge -a =sys-apps/capa-9.4.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =sys-apps/capa-9.4.0
Or alternatively:
emerge --autounmask-write -a =sys-apps/capa-9.4.0
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 9.4.0 | 8 | 0 |
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_1{2,3,4} )
inherit distutils-r1
DESCRIPTION="The FLARE team's open-source tool to identify capabilities in executable files."
HOMEPAGE="https://github.com/mandiant/capa"
SRC_URI="https://github.com/mandiant/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/mandiant/${PN}-rules/archive/refs/tags/v${PV}.tar.gz -> ${PN}-rules-${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
# KEYWORDS="~amd64"
RDEPEND="dev-python/colorama[${PYTHON_USEDEP}]
dev-python/dncil[${PYTHON_USEDEP}]
dev-python/dnfile[${PYTHON_USEDEP}]
dev-python/halo[${PYTHON_USEDEP}]
dev-python/ida-settings[${PYTHON_USEDEP}]
dev-python/msgspec[${PYTHON_USEDEP}]
dev-python/networkx[${PYTHON_USEDEP}]
dev-python/pefile[${PYTHON_USEDEP}]
dev-python/protobuf[${PYTHON_USEDEP}]
dev-python/pydantic[${PYTHON_USEDEP}]
dev-python/pyelftools[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
dev-python/tabulate[${PYTHON_USEDEP}]
dev-python/termcolor[${PYTHON_USEDEP}]
dev-python/tqdm[${PYTHON_USEDEP}]
dev-python/viv-utils[${PYTHON_USEDEP}]
dev-util/vivisect[${PYTHON_USEDEP}]
dev-python/wcwidth[${PYTHON_USEDEP}]"
python_prepare_all() {
sed -r \
-e 's|^packages = .*|packages = ["capa", "capa.features", "capa.features.extractors", "capa.features.extractors.binja", "capa.features.extractors.dnfile", "capa.features.extractors.ida", "capa.features.extractors.viv", "capa.features.freeze", "capa.ida.plugin", "capa.ida", "capa.render", "capa.render.proto", "capa.rules"]|' \
-i pyproject.toml || die
sed -re "s|return Path\(__file__\).resolve\(\).parent.parent|return Path('${EPREFIX}/usr/share/${PN}')|" \
-i capa/main.py || die
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
insinto "/usr/share/${PN}/rules"
doins -r "${WORKDIR}/${PN}-rules-${PV}/"*
insinto "/usr/share/${PN}/sigs"
doins sigs/*.sig
}
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
dev-python/colorama[] dev-python/dncil[] dev-python/dnfile[] dev-python/halo[] dev-python/ida-settings[] dev-python/msgspec[] dev-python/networkx[] dev-python/pefile[] dev-python/protobuf[] dev-python/pydantic[] dev-python/pyelftools[] dev-python/pyyaml[] dev-python/ruamel-yaml[] dev-python/tabulate[] dev-python/termcolor[] dev-python/tqdm[] dev-python/viv-utils[] dev-util/vivisect[] dev-python/wcwidth[]
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | capa-9.4.0.tar.gz | 21221368 bytes | https://github.com/mandiant/capa/archive/refs/tags/v9.4.0.tar.gz |
| DIST | capa-rules-9.4.0.tar.gz | 239040 bytes | https://github.com/mandiant/capa-rules/archive/refs/tags/v9.4.0.tar.gz |