summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Puck Neuwirth <alexander@neuwirth-informatik.de>2023-01-17 14:16:30 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-01-18 15:48:13 +0100
commit57d0a4169bd81e66205745e35dd8277593cef898 (patch)
tree2759f6aafe4506597e48f63d8f2664891ba4e992 /sci-physics
parentsys-kernel/linux-firmware: add 20230117 (diff)
downloadgentoo-57d0a4169bd81e66205745e35dd8277593cef898.tar.gz
gentoo-57d0a4169bd81e66205745e35dd8277593cef898.tar.bz2
gentoo-57d0a4169bd81e66205745e35dd8277593cef898.zip
sci-physics/lhapdf: Use single python
Bug: https://bugs.gentoo.org/870139 Closes: https://github.com/gentoo/gentoo/pull/29143 Co-authored-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> 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/lhapdf/lhapdf-6.3.0-r1.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild b/sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild
new file mode 100644
index 000000000000..a26dcc0d2f80
--- /dev/null
+++ b/sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+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
+"
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-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/"
+SRC_URI="https://www.hepforge.org/downloads/lhapdf/${MY_PF}.tar.gz"
+S="${WORKDIR}/${MY_PF}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+BDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/cython-0.19[${PYTHON_USEDEP}]
+ ')
+"
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ # Let cython reproduce this for more recent python versions
+ rm wrappers/python/lhapdf.cpp || die
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --enable-python
+
+ cd "${S}"/wrappers/python || die
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ emake all $(use doc && echo doxy)
+
+ cd "${S}"/wrappers/python || die
+ distutils-r1_src_compile
+}
+
+src_test() {
+ emake -C tests
+}
+
+src_install() {
+ default
+ use doc && dodoc -r doc/doxygen/.
+ use examples && dodoc examples/*.cc
+
+ cd "${S}"/wrappers/python || die
+ distutils-r1_src_install
+
+ find "${ED}" -name '*.la' -delete || die
+}