diff options
author | Alexander Puck Neuwirth <alexander@neuwirth-informatik.de> | 2024-11-29 17:31:47 +0100 |
---|---|---|
committer | Nowa Ammerlaan <nowa@gentoo.org> | 2024-12-03 09:33:59 +0100 |
commit | 1a00632e3ab01fa20c783354e0f1eb76fd58b4d8 (patch) | |
tree | 7524cb32bbdf87f97c29646ad9956592c4416224 /sci-physics | |
parent | net-misc/seafile-client: Stabilize 9.0.3 amd64, #944588 (diff) | |
download | gentoo-1a00632e3ab01fa20c783354e0f1eb76fd58b4d8.tar.gz gentoo-1a00632e3ab01fa20c783354e0f1eb76fd58b4d8.tar.bz2 gentoo-1a00632e3ab01fa20c783354e0f1eb76fd58b4d8.zip |
sci-physics/hepmc: Fix python and add static-libs flag
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
Closes: https://github.com/gentoo/gentoo/pull/39524
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/hepmc/hepmc-3.3.0-r1.ebuild | 81 | ||||
-rw-r--r-- | sci-physics/hepmc/hepmc-9999.ebuild | 19 |
2 files changed, 99 insertions, 1 deletions
diff --git a/sci-physics/hepmc/hepmc-3.3.0-r1.ebuild b/sci-physics/hepmc/hepmc-3.3.0-r1.ebuild new file mode 100644 index 000000000000..0f34ec376a72 --- /dev/null +++ b/sci-physics/hepmc/hepmc-3.3.0-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit fortran-2 cmake flag-o-matic python-single-r1 + +MYP=HepMC3-${PV} + +DESCRIPTION="Event Record for Monte Carlo Generators" +HOMEPAGE="https://hepmc.web.cern.ch/hepmc/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.cern.ch/hepmc/HepMC3" +else + SRC_URI="https://hepmc.web.cern.ch/hepmc/releases/${MYP}.tar.gz" + S="${WORKDIR}/${MYP}" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3+" +SLOT="3" +IUSE="doc test examples python root static-libs" +RESTRICT="!test? ( test )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ') + ) +" +DEPEND="${RDEPEND}" +# Automagic compression dependencies in test and example. +# https://gitlab.cern.ch/hepmc/HepMC3/-/issues/99 +# For now we install all of them... +BDEPEND=" + root? ( sci-physics/root:= ) + doc? ( + app-text/doxygen[dot] + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + dev-texlive/texlive-latexrecommended + ) + test? ( + sys-libs/zlib + app-arch/xz-utils + app-arch/bzip2 + app-arch/zstd + ) + examples? ( + sys-libs/zlib + app-arch/xz-utils + app-arch/bzip2 + app-arch/zstd + ) +" + +src_configure() { + filter-lto # 941937 941936 + local mycmakeargs=( + -DHEPMC3_PYTHON_VERSIONS="${EPYTHON/python/}" + -DHEPMC3_ENABLE_ROOTIO=$(usex root ON OFF) + -DHEPMC3_ENABLE_PYTHON=$(usex python ON OFF) + -DHEPMC3_ENABLE_TEST=$(usex test ON OFF) + -DHEPMC3_BUILD_DOCS=$(usex doc ON OFF) + -DHEPMC3_BUILD_EXAMPLES=$(usex examples ON OFF) + -DHEPMC3_BUILD_STATIC_LIBS=$(usex static-libs ON OFF) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + use examples && docompress -x /usr/share/doc/${PF}/examples + use python && python_optimize +} diff --git a/sci-physics/hepmc/hepmc-9999.ebuild b/sci-physics/hepmc/hepmc-9999.ebuild index c5cb24ef7a3f..0f34ec376a72 100644 --- a/sci-physics/hepmc/hepmc-9999.ebuild +++ b/sci-physics/hepmc/hepmc-9999.ebuild @@ -22,7 +22,7 @@ fi LICENSE="GPL-3+" SLOT="3" -IUSE="doc test examples python root" +IUSE="doc test examples python root static-libs" RESTRICT="!test? ( test )" REQUIRED_USE="${PYTHON_REQUIRED_USE}" @@ -35,6 +35,9 @@ RDEPEND=" ) " DEPEND="${RDEPEND}" +# Automagic compression dependencies in test and example. +# https://gitlab.cern.ch/hepmc/HepMC3/-/issues/99 +# For now we install all of them... BDEPEND=" root? ( sci-physics/root:= ) doc? ( @@ -43,16 +46,30 @@ BDEPEND=" dev-texlive/texlive-latexextra dev-texlive/texlive-latexrecommended ) + test? ( + sys-libs/zlib + app-arch/xz-utils + app-arch/bzip2 + app-arch/zstd + ) + examples? ( + sys-libs/zlib + app-arch/xz-utils + app-arch/bzip2 + app-arch/zstd + ) " src_configure() { filter-lto # 941937 941936 local mycmakeargs=( + -DHEPMC3_PYTHON_VERSIONS="${EPYTHON/python/}" -DHEPMC3_ENABLE_ROOTIO=$(usex root ON OFF) -DHEPMC3_ENABLE_PYTHON=$(usex python ON OFF) -DHEPMC3_ENABLE_TEST=$(usex test ON OFF) -DHEPMC3_BUILD_DOCS=$(usex doc ON OFF) -DHEPMC3_BUILD_EXAMPLES=$(usex examples ON OFF) + -DHEPMC3_BUILD_STATIC_LIBS=$(usex static-libs ON OFF) ) cmake_src_configure } |