Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: app-forensics/yara/
Date: Sat, 03 Jul 2021 09:59:15
Message-Id: 1625210614.517e3ddd92b4826e7a713007030177ebffc41464.andrewammerlaan@gentoo
1 commit: 517e3ddd92b4826e7a713007030177ebffc41464
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Fri Jul 2 07:17:53 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 2 07:23:34 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=517e3ddd
7
8 app-forensics/yara: initial import
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 app-forensics/yara/Manifest | 1 +
13 app-forensics/yara/metadata.xml | 24 ++++++++++++
14 app-forensics/yara/yara-4.1.1.ebuild | 72 ++++++++++++++++++++++++++++++++++++
15 3 files changed, 97 insertions(+)
16
17 diff --git a/app-forensics/yara/Manifest b/app-forensics/yara/Manifest
18 new file mode 100644
19 index 000000000..7bdea3d1b
20 --- /dev/null
21 +++ b/app-forensics/yara/Manifest
22 @@ -0,0 +1 @@
23 +DIST yara-4.1.1.tar.gz 936115 BLAKE2B 6edf277702fb40513097195c730002875eef75502e92d672597ca09fefc054c14a082076877e8bea3daaeb05148a9116e2c302ea90a6ce6270e460fce31db658 SHA512 e4474254249d5b3fbb7231fdec5f4e080be042098e1b2bc953aa93513ce0b4742e34acac2911687e75055ecd589d942f71b79c58ca47eee243626ab3ec8add71
24
25 diff --git a/app-forensics/yara/metadata.xml b/app-forensics/yara/metadata.xml
26 new file mode 100644
27 index 000000000..875695e98
28 --- /dev/null
29 +++ b/app-forensics/yara/metadata.xml
30 @@ -0,0 +1,24 @@
31 +<?xml version="1.0" encoding="UTF-8"?>
32 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
33 +<pkgmetadata>
34 + <maintainer type="person">
35 + <description>co-maintainers welcome</description>
36 + <email>lssndrbarbieri@×××××.com</email>
37 + <name>Alessandro Barbieri</name>
38 + </maintainer>
39 + <upstream>
40 + <bugs-to>https://github.com/VirusTotal/yara/issues</bugs-to>
41 + </upstream>
42 + <use>
43 + <flag name="cpu-profiler">compile with CPU profiling support</flag>
44 + <flag name="cuckoo">enable cuckoo module</flag>
45 + <flag name="debug-dex">enable dex module debugging</flag>
46 + <flag name="dex">enable dex module</flag>
47 + <flag name="dotnet">enable dotnet module</flag>
48 + <flag name="jemalloc">use jemalloc to debug heap-related issues</flag>
49 + <flag name="macho">enable macho module</flag>
50 + <flag name="magic">enable magic module</flag>
51 + <flag name="profile">enable rules profiling support</flag>
52 + <flag name="tcmalloc">use tcmalloc as the default heap allocator</flag>
53 + </use>
54 +</pkgmetadata>
55
56 diff --git a/app-forensics/yara/yara-4.1.1.ebuild b/app-forensics/yara/yara-4.1.1.ebuild
57 new file mode 100644
58 index 000000000..f47cce0cc
59 --- /dev/null
60 +++ b/app-forensics/yara/yara-4.1.1.ebuild
61 @@ -0,0 +1,72 @@
62 +# Copyright 1999-2021 Gentoo Authors
63 +# Distributed under the terms of the GNU General Public License v2
64 +
65 +EAPI=7
66 +
67 +DOCS_AUTODOC=0
68 +DOCS_BUILDER="sphinx"
69 +DOCS_DIR="docs"
70 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
71 +
72 +inherit autotools python-any-r1 docs
73 +
74 +DESCRIPTION="A malware identification and classification tool"
75 +HOMEPAGE="
76 + http://virustotal.github.io/yara
77 + https://github.com/virustotal/yara
78 +"
79 +SRC_URI="https://github.com/virustotal/yara/archive/v${PV}.tar.gz -> ${P}.tar.gz"
80 +
81 +LICENSE="BSD"
82 +SLOT="0"
83 +KEYWORDS="~amd64"
84 +IUSE="cpu-profiler cuckoo +dex debug-dex dotnet jemalloc macho magic profile tcmalloc"
85 +#TODO: test https://github.com/VirusTotal/yara/issues/1524
86 +
87 +REQUIRED_USE="?? ( jemalloc tcmalloc )"
88 +DEPEND="
89 + dev-libs/openssl:0=
90 +
91 + cpu-profiler? ( dev-util/google-perftools )
92 + cuckoo? ( dev-libs/jansson )
93 + jemalloc? ( dev-libs/jemalloc )
94 + magic? ( sys-apps/file )
95 + tcmalloc? ( dev-util/google-perftools )
96 +"
97 +RDEPEND="${DEPEND}"
98 +
99 +src_prepare() {
100 + default
101 + eautoreconf
102 +}
103 +
104 +src_configure() {
105 + local myconf=(
106 + $(use_enable cuckoo)
107 + $(use_enable debug-dex)
108 + $(use_enable dex)
109 + $(use_enable dotnet)
110 + $(use_enable macho)
111 + $(use_enable magic)
112 + $(use_enable profile profiling)
113 +
114 + $(use_with cpu-profiler)
115 + $(use_with jemalloc)
116 + $(use_with tcmalloc)
117 + )
118 + econf "${myconf[@]}"
119 +}
120 +
121 +src_compile() {
122 + default
123 + docs_compile
124 +}
125 +
126 +
127 +src_install() {
128 + default
129 + einstalldocs
130 + dodoc CONTRIBUTORS sample.{file,rules}
131 + find "${ED}" -name '*.la' -delete || die
132 + find "${ED}" -name '*.a' -delete || die
133 +}