From ff2f0f1980193043ba39f47599d4cae15be6649c Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Mon, 20 Oct 2025 01:34:08 +0200 Subject: [PATCH] sci-physics/lhapdf: expose USE static-libs This is needed by sci-physics/madgraph5::sci See-also: https://github.com/gentoo/sci/pull/1380 Part-of: https://github.com/gentoo/gentoo/pull/44219 Closes: https://github.com/gentoo/gentoo/pull/44219 Signed-off-by: Alexander Puck Neuwirth --- sci-physics/lhapdf/lhapdf-6.5.5-r2.ebuild | 78 +++++++++++++++++++++++ sci-physics/lhapdf/lhapdf-9999.ebuild | 6 +- 2 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 sci-physics/lhapdf/lhapdf-6.5.5-r2.ebuild diff --git a/sci-physics/lhapdf/lhapdf-6.5.5-r2.ebuild b/sci-physics/lhapdf/lhapdf-6.5.5-r2.ebuild new file mode 100644 index 0000000000000..c3fe15c88745e --- /dev/null +++ b/sci-physics/lhapdf/lhapdf-6.5.5-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +DOCS_BUILDER="doxygen" +DOCS_DEPEND=" + dev-texlive/texlive-bibtexextra + dev-texlive/texlive-fontsextra + dev-texlive/texlive-fontutils + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra +" +inherit python-single-r1 docs + +MY_PV=$(ver_cut 1-3) +MY_PF=LHAPDF-${MY_PV} + +DESCRIPTION="Les Houches Parton Density Function unified library" +HOMEPAGE="https://lhapdf.hepforge.org/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/hepcedar/lhapdf" +else + SRC_URI="https://www.hepforge.org/downloads/lhapdf/${MY_PF}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_PF}" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="examples static-libs +python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + dev-cpp/yaml-cpp + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + python? ( + $(python_gen_cond_dep ' + >=dev-python/cython-0.19[${PYTHON_USEDEP}] + ') + ) +" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local -x CONFIG_SHELL="${BROOT}/bin/bash" + econf \ + $(use_enable static-libs static) \ + --with-yaml-cpp="${ESYSROOT}/usr" \ + $(use_enable python) \ + $(use_enable doc doxygen) +} + +src_compile() { + emake all +} + +src_test() { + emake -C tests +} + +src_install() { + default + use examples && dodoc examples/*.cc + + use python && python_optimize + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sci-physics/lhapdf/lhapdf-9999.ebuild b/sci-physics/lhapdf/lhapdf-9999.ebuild index d8b9005b0cc58..35937c2df0290 100644 --- a/sci-physics/lhapdf/lhapdf-9999.ebuild +++ b/sci-physics/lhapdf/lhapdf-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -31,7 +31,7 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="examples +python" +IUSE="examples static-libs +python" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RDEPEND=" @@ -60,7 +60,7 @@ src_prepare() { src_configure() { local -x CONFIG_SHELL="${BROOT}/bin/bash" econf \ - --disable-static \ + $(use_enable static-libs static) \ --with-yaml-cpp="${ESYSROOT}/usr" \ $(use_enable python) \ $(use_enable doc doxygen)