summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Puck Neuwirth <alexander@neuwirth-informatik.de>2024-11-04 15:43:49 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-11-05 15:59:59 +0100
commit4975636b55f9ad367094a328fbcf781373870a4e (patch)
treea580f76503c621472895d4f3514726dc79fba6aa /sci-physics
parentdev-libs/nss: add an upstream patch file to fix tests on 3.106 (diff)
downloadgentoo-4975636b55f9ad367094a328fbcf781373870a4e.tar.gz
gentoo-4975636b55f9ad367094a328fbcf781373870a4e.tar.bz2
gentoo-4975636b55f9ad367094a328fbcf781373870a4e.zip
sci-physics/yoda: add 2.0.2
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/yoda/Manifest1
-rw-r--r--sci-physics/yoda/yoda-2.0.2.ebuild95
2 files changed, 96 insertions, 0 deletions
diff --git a/sci-physics/yoda/Manifest b/sci-physics/yoda/Manifest
index 9b5c7478eab5..d895ce91e722 100644
--- a/sci-physics/yoda/Manifest
+++ b/sci-physics/yoda/Manifest
@@ -1,3 +1,4 @@
DIST YODA-1.9.10.tar.bz2 1278729 BLAKE2B f6ae9b579d79b6be62e9644e327f0b449882c0f1a0efaac09ac97eae90a2ced10bf2b13447d75390552b3e4d8c128e7a33184bf8b2d308236f828e611df6d7a4 SHA512 54a455a1b2772ea3201477d4dddcf0c92c85bfee8825d8726d62331ebacb37fc8d1f6e02cdfe592722f2a747a46786d2bdb3c36cc982794a30b25e718d32e998
DIST YODA-1.9.5.tar.bz2 1077442 BLAKE2B 010ab725c57dfab8160e0304d461dc44c140d1ce234f3b70834ee58b8f269159529122095a94e6b79ef752612a6659a17e1874fda2941cfbcec1f53802916b6a SHA512 46e30b33d369f5d28ec228b71eaa298f3010cc06fe568785c74bbaf3d7468c26738cc2ee40da9bcc54d978f394187a2ee9289197283c86a3358583a3c0ecd247
DIST YODA-2.0.1.tar.bz2 1842004 BLAKE2B 56c2de8acad92510a49abab0d19568f19de3442f1f941784b85c9bded9c14f82fc2cf0eb555721cedcab81e024a9d89ffcf200b54598ed87c1d6de4c7bc59824 SHA512 abd2728e4dc76474d3bf4d478143f4b2b15a596259c49080be37269386f8353cb3f961cc850718ff8fec5d73f96377d6a9103b5bf3cc7f7c703f47c91d929549
+DIST YODA-2.0.2.tar.bz2 1869694 BLAKE2B cb5628bbfe0ecdd59073ff49496cd79ff6df95d94bbb36463c9de2cd6f576d0a8b8b4c1373f7f06354bb1ceb190a461cf61b4367085c44c44c5fb3982061a3ba SHA512 214f2caa2610a959588b1440fc66e238023829ca2fe7cf0e2f818891dd8db62fc0db288ac03c885c26c8de2a8813cd08deb53cefa0fb7d659b9b129d94d707c7
diff --git a/sci-physics/yoda/yoda-2.0.2.ebuild b/sci-physics/yoda/yoda-2.0.2.ebuild
new file mode 100644
index 000000000000..14b1bcbf85a9
--- /dev/null
+++ b/sci-physics/yoda/yoda-2.0.2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+
+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}]
+ ')
+ )
+ )
+"
+
+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() {
+ emake install DESTDIR="${ED}"
+
+ 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
+}