commit: 1dbad1c22043a39e1ea7e9f7e187ed48b1df5cb7 Author: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de> AuthorDate: Mon May 12 12:50:20 2025 +0000 Commit: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org> CommitDate: Wed May 14 12:09:25 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dbad1c2
sci-physics/yoda: include cstdint patch Closes: https://bugs.gentoo.org/948090 Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de> Part-of: https://github.com/gentoo/gentoo/pull/42053 Closes: https://github.com/gentoo/gentoo/pull/42053 Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org> sci-physics/yoda/files/yoda-2.0.2-zstr.patch | 24 +++++++ sci-physics/yoda/yoda-2.0.2-r1.ebuild | 101 +++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) diff --git a/sci-physics/yoda/files/yoda-2.0.2-zstr.patch b/sci-physics/yoda/files/yoda-2.0.2-zstr.patch new file mode 100644 index 000000000000..1f33e46e2ee6 --- /dev/null +++ b/sci-physics/yoda/files/yoda-2.0.2-zstr.patch @@ -0,0 +1,24 @@ +From 31c9ad99ac3dbd34ad8c4285a689c5028490f776 Mon Sep 17 00:00:00 2001 +From: Christian Gutschow <[email protected]> +Date: Wed, 5 Feb 2025 19:02:38 +0000 +Subject: [PATCH] add missing header + +--- + src/zstr/zstr.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/zstr/zstr.hpp b/src/zstr/zstr.hpp +index 66c21f847..61c587345 100644 +--- a/src/zstr/zstr.hpp ++++ b/src/zstr/zstr.hpp +@@ -9,6 +9,7 @@ + #pragma once + + #include <cassert> ++#include <cstdint> + #include <fstream> + #include <sstream> + #include <zlib.h> +-- +GitLab + diff --git a/sci-physics/yoda/yoda-2.0.2-r1.ebuild b/sci-physics/yoda/yoda-2.0.2-r1.ebuild new file mode 100644 index 000000000000..d1eb9b025d7d --- /dev/null +++ b/sci-physics/yoda/yoda-2.0.2-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) + +inherit bash-completion-r1 python-single-r1 optfeature + +DESCRIPTION="Yet more Objects for (High Energy Physics) Data Analysis" +HOMEPAGE="https://yoda.hepforge.org/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/hepcedar/yoda" +else + SRC_URI="https://yoda.hepforge.org/downloads?f=${P^^}.tar.bz2 -> ${P^^}.tar.bz2" + S="${WORKDIR}/${P^^}" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0/${PV}" +IUSE="root test +python +zlib" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) root? ( python )" + +RDEPEND=" + root? ( sci-physics/root:=[${PYTHON_SINGLE_USEDEP}] ) + python? ( ${PYTHON_DEPS} ) + zlib? ( sys-libs/zlib ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + python? ( + $(python_gen_cond_dep ' + >=dev-python/cython-0.29.24[${PYTHON_USEDEP}] + ') + test? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + ') + ) + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-yamlcpp.patch # 937405 + # https://gitlab.com/hepcedar/yoda/-/merge_requests/287 + "${FILESDIR}"/${P}-zstr.patch # 948090 +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + # we need to use the prefix cython here + econf --disable-static \ + $(use_enable root) \ + $(use_enable python pyext) \ + $(use_with zlib zlib "${ESYSROOT}/usr") \ + $(usex python CYTHON="${ESYSROOT}/usr/bin/cython") +} + +src_test() { + # PYTESTS and SHTESTS both require python tools + if use python; then + emake check + else + emake check PYTESTS= SHTESTS= NO_PYTHON=1 + fi +} + +src_install() { + default + + if use python ; then + newbashcomp "${ED}"/etc/bash_completion.d/${PN}-completion ${PN}-config + bashcomp_alias ${PN}-config \ + ${PN}ls \ + ${PN}diff \ + ${PN}merge \ + ${PN}stack \ + ${PN}scale \ + ${PN}plot \ + ${PN}envelope \ + ${PN}cnv \ + ${PN}2root + rm "${ED}"/etc/bash_completion.d/${PN}-completion || die + python_optimize + fi + + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + optfeature "latex plotting support" virtual/latex-base + optfeature "python plotting support" dev-python/matplotlib +}
