From 3e3c7d01664a47ae626abb734747ce1f98e1c2dd Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 28 Jan 2022 04:30:14 +0000 Subject: app-forensics/yara: run tests; misc. other changes - Run tests (needs static linked lib for now, but we delete it anyway) - Use more generic dependency - Define subslot Closes: https://bugs.gentoo.org/576956 See: https://github.com/gentoo/gentoo/pull/23800 Signed-off-by: Sam James --- app-forensics/yara/yara-4.1.3.ebuild | 26 +++++++++++++++++++------ app-forensics/yara/yara-4.2.0_rc1.ebuild | 33 +++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 15 deletions(-) (limited to 'app-forensics/yara') diff --git a/app-forensics/yara/yara-4.1.3.ebuild b/app-forensics/yara/yara-4.1.3.ebuild index 0e064fd15d7b..e11e07efff40 100644 --- a/app-forensics/yara/yara-4.1.3.ebuild +++ b/app-forensics/yara/yara-4.1.3.ebuild @@ -10,17 +10,18 @@ HOMEPAGE="http://virustotal.github.io/yara/" SRC_URI="https://github.com/virustotal/yara/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="Apache-2.0" -SLOT="0" +SLOT="0/8" KEYWORDS="~amd64 ~x86" -IUSE="+dex +dotnet +cuckoo +macho +magic profiling python" +IUSE="+dex +dotnet +cuckoo +macho +magic profiling python test" +RESTRICT="!test? ( test )" DEPEND=" - dev-libs/openssl:0= + dev-libs/openssl:= cuckoo? ( dev-libs/jansson:= ) - magic? ( sys-apps/file:0= ) + magic? ( sys-apps/file:= ) " RDEPEND="${DEPEND}" -PDEPEND="python? ( =dev-python/yara-python-4* )" +PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )" src_prepare() { default @@ -34,5 +35,18 @@ src_configure() { $(use_enable magic) \ $(use_enable dotnet) \ $(use_enable macho) \ - $(use_enable dex) + $(use_enable dex) \ + $(use_enable test static) +} + +src_test() { + emake check +} + +src_install() { + default + + # TODO: Allow tests to work against dyn. lib rather than building + # statically just for tests. + find "${ED}" -name '*.a' -delete || die } diff --git a/app-forensics/yara/yara-4.2.0_rc1.ebuild b/app-forensics/yara/yara-4.2.0_rc1.ebuild index a514ff8e4690..8bac51561719 100644 --- a/app-forensics/yara/yara-4.2.0_rc1.ebuild +++ b/app-forensics/yara/yara-4.2.0_rc1.ebuild @@ -8,21 +8,23 @@ inherit autotools DESCRIPTION="A malware identification and classification tool" HOMEPAGE="http://virustotal.github.io/yara/" SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${PV/_/-}" LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="" -IUSE="+dex +dotnet +cuckoo +macho +magic profiling python" +SLOT="0/8" +if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~x86" +fi +IUSE="+dex +dotnet +cuckoo +macho +magic profiling python test" +RESTRICT="!test? ( test )" DEPEND=" - dev-libs/openssl:0= + dev-libs/openssl:= cuckoo? ( dev-libs/jansson:= ) - magic? ( sys-apps/file:0= ) + magic? ( sys-apps/file:= ) " RDEPEND="${DEPEND}" -PDEPEND="python? ( =dev-python/yara-python-4* )" - -S="${WORKDIR}/${PN}-${PV/_/-}" +PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )" src_prepare() { default @@ -36,5 +38,18 @@ src_configure() { $(use_enable magic) \ $(use_enable dotnet) \ $(use_enable macho) \ - $(use_enable dex) + $(use_enable dex) \ + $(use_enable test static) +} + +src_test() { + emake check +} + +src_install() { + default + + # TODO: Allow tests to work against dyn. lib rather than building + # statically just for tests. + find "${ED}" -name '*.a' -delete || die } -- cgit v1.2.3-65-gdbad