From 517e3ddd92b4826e7a713007030177ebffc41464 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Fri, 2 Jul 2021 09:17:53 +0200 Subject: [PATCH] app-forensics/yara: initial import Signed-off-by: Alessandro Barbieri --- app-forensics/yara/Manifest | 1 + app-forensics/yara/metadata.xml | 24 ++++++++++ app-forensics/yara/yara-4.1.1.ebuild | 72 ++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 app-forensics/yara/Manifest create mode 100644 app-forensics/yara/metadata.xml create mode 100644 app-forensics/yara/yara-4.1.1.ebuild diff --git a/app-forensics/yara/Manifest b/app-forensics/yara/Manifest new file mode 100644 index 0000000000..7bdea3d1b8 --- /dev/null +++ b/app-forensics/yara/Manifest @@ -0,0 +1 @@ +DIST yara-4.1.1.tar.gz 936115 BLAKE2B 6edf277702fb40513097195c730002875eef75502e92d672597ca09fefc054c14a082076877e8bea3daaeb05148a9116e2c302ea90a6ce6270e460fce31db658 SHA512 e4474254249d5b3fbb7231fdec5f4e080be042098e1b2bc953aa93513ce0b4742e34acac2911687e75055ecd589d942f71b79c58ca47eee243626ab3ec8add71 diff --git a/app-forensics/yara/metadata.xml b/app-forensics/yara/metadata.xml new file mode 100644 index 0000000000..875695e984 --- /dev/null +++ b/app-forensics/yara/metadata.xml @@ -0,0 +1,24 @@ + + + + + co-maintainers welcome + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + https://github.com/VirusTotal/yara/issues + + + compile with CPU profiling support + enable cuckoo module + enable dex module debugging + enable dex module + enable dotnet module + use jemalloc to debug heap-related issues + enable macho module + enable magic module + enable rules profiling support + use tcmalloc as the default heap allocator + + diff --git a/app-forensics/yara/yara-4.1.1.ebuild b/app-forensics/yara/yara-4.1.1.ebuild new file mode 100644 index 0000000000..f47cce0ccc --- /dev/null +++ b/app-forensics/yara/yara-4.1.1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DOCS_AUTODOC=0 +DOCS_BUILDER="sphinx" +DOCS_DIR="docs" +PYTHON_COMPAT=( python3_{8..10} pypy3 ) + +inherit autotools python-any-r1 docs + +DESCRIPTION="A malware identification and classification tool" +HOMEPAGE=" + http://virustotal.github.io/yara + https://github.com/virustotal/yara +" +SRC_URI="https://github.com/virustotal/yara/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="cpu-profiler cuckoo +dex debug-dex dotnet jemalloc macho magic profile tcmalloc" +#TODO: test https://github.com/VirusTotal/yara/issues/1524 + +REQUIRED_USE="?? ( jemalloc tcmalloc )" +DEPEND=" + dev-libs/openssl:0= + + cpu-profiler? ( dev-util/google-perftools ) + cuckoo? ( dev-libs/jansson ) + jemalloc? ( dev-libs/jemalloc ) + magic? ( sys-apps/file ) + tcmalloc? ( dev-util/google-perftools ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myconf=( + $(use_enable cuckoo) + $(use_enable debug-dex) + $(use_enable dex) + $(use_enable dotnet) + $(use_enable macho) + $(use_enable magic) + $(use_enable profile profiling) + + $(use_with cpu-profiler) + $(use_with jemalloc) + $(use_with tcmalloc) + ) + econf "${myconf[@]}" +} + +src_compile() { + default + docs_compile +} + + +src_install() { + default + einstalldocs + dodoc CONTRIBUTORS sample.{file,rules} + find "${ED}" -name '*.la' -delete || die + find "${ED}" -name '*.a' -delete || die +}