commit: 80039afe6bbfad18679f40871b878ea9b4393c48 Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de> AuthorDate: Wed Nov 5 17:42:39 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Dec 24 17:21:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80039afe
app-forensics/yara-x: add 1.10.0 Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de> Part-of: https://github.com/gentoo/gentoo/pull/44496 Closes: https://github.com/gentoo/gentoo/pull/44496 Signed-off-by: Sam James <sam <AT> gentoo.org> app-forensics/yara-x/Manifest | 2 + app-forensics/yara-x/yara-x-1.10.0.ebuild | 92 +++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/app-forensics/yara-x/Manifest b/app-forensics/yara-x/Manifest index 0dd59982ce7d..94d96c4138fd 100644 --- a/app-forensics/yara-x/Manifest +++ b/app-forensics/yara-x/Manifest @@ -1,3 +1,5 @@ +DIST yara-x-1.10.0-crates.tar.xz 43548196 BLAKE2B f64ea1a947236012599776e8f831037603c552e2b5760ad10425afa8fd4431fb000a67049e969ea3cd98bab095b2fb32f1a96e45f75e1683136796dbdadea5fb SHA512 bfcb9faee50e9e350776c7435244acb5a0726e140a6f101aa53a6bfc52f813a912b2f0504b358b8ee05f5afc5a600fb74d633b70b0966736d5777d741929c181 +DIST yara-x-1.10.0.tar.gz 45731985 BLAKE2B e90af37b52841f6c16c2f27213f370f23bf69a8af9f79ebbdf5e32f77bbe7d7abb60586c5be236d32e4f203b093cb94e34749d9311ad822c701e983aa2229757 SHA512 f82e1d8caf6c51074bea0761fe15954ed7fa6e1437532c7615d40f077bc465ef10f14a75fb4c38d896978d7d193605c4a584442049f54ff01df3e0d17f0083d1 DIST yara-x-1.4.0-crates.tar.xz 45877576 BLAKE2B f620fbb99531e78d4626dbe55067024e5fcd506800d1d1a37ce0c5506781e9cbc7892a4c5faf31666f3f4091c08fa826afe9d43a2614f20f9c634db60938a958 SHA512 2fe6b7a9143d542cce92f0ae8ea92214b23865995f75a872e24221c061f4f8eeb72b3aa4400f531d89a9be439cf8b02cb62502749bafa5174cc99bf7410542de DIST yara-x-1.4.0.tar.gz 44550390 BLAKE2B feb6d275ee46478328f981c1ac4f085e01a5c484f063eeadb8523a9b6e831398f6deb839d70469432af00627f0fb0d766facdfb400bd3e0572248214d38cae5f SHA512 258cac3ca9de1f3b61f86253ea83776b294d6f3c10af27b2c18f654de3b7c85660bb6e59628762e7a177c43c739086e76c0e7b4802da611d043afe94680ada39 DIST yara-x-1.6.0-crates.tar.xz 45679348 BLAKE2B c38efdb7753d9507d02b0251337e476c8bf04dcd01de4baba5ef08aae4fe1f12beebfa534e0253f17848f0a7ee873c569b2885df3a8b42767acad16fc89af03c SHA512 556259b0c64cf9aa731adc7c5065a8de9e356ef823551ff9eb7a29b2ee5a62e14198fd346318403856da4264ad594474f8abe06c2c09491329a4b6da760a371e diff --git a/app-forensics/yara-x/yara-x-1.10.0.ebuild b/app-forensics/yara-x/yara-x-1.10.0.ebuild new file mode 100644 index 000000000000..931862cb3782 --- /dev/null +++ b/app-forensics/yara-x/yara-x-1.10.0.ebuild @@ -0,0 +1,92 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=maturin +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..13} ) +RUST_MIN_VER="1.87.0" + +CRATES="" + +inherit cargo distutils-r1 + +DESCRIPTION="A malware identification and classification tool" +HOMEPAGE="https://virustotal.github.io/yara-x/" +SRC_URI="https://github.com/VirusTotal/yara-x/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz" + +LICENSE="BSD" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 EPL-2.0 ISC + MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 WTFPL-2 ZLIB +" + +SLOT="0" +# Note: cranelift dependency only supports amd64, arm64, s390, and riscv64 as of 2025 +KEYWORDS="~amd64" +IUSE="python" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + python? ( ${PYTHON_DEPS} ) +" +BDEPEND=" + python? ( + ${PYTHON_DEPS} + ${DISTUTILS_DEPS} + ) +" + +wrap_python() { + local phase=$1 + shift + + if use python; then + pushd py >/dev/null || die + distutils-r1_${phase} "$@" + popd >/dev/null || die + fi +} + +# https://bugs.gentoo.org/933231, https://bugs.gentoo.org/933232 +QA_FLAGS_IGNORED="usr/bin/yr" + +pkg_setup() { + # https://bugs.gentoo.org/933233 + QA_SONAME="usr/$(get_libdir)/libyara_x.*\\.so usr/lib.*/py.*/site-packages/yara_x/yara_x.*\\.so" + + rust_pkg_setup +} + +src_prepare() { + default + wrap_python ${FUNCNAME} +} + +src_compile() { + cargo_src_compile --workspace + wrap_python ${FUNCNAME} +} + +python_test() { + epytest +} + +src_test() { + export RUST_BACKTRACE=full + cargo_src_test + wrap_python ${FUNCNAME} +} + +src_install() { + dobin "$(cargo_target_dir)"/yr + dolib.so "$(cargo_target_dir)"/*.so + + wrap_python ${FUNCNAME} +}
