summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Puck Neuwirth <alexander@neuwirth-informatik.de>2024-09-24 12:04:10 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-09-25 12:22:33 +0200
commit905627a0d2ef61d53bc990a71831e3438a69496e (patch)
tree08a7f78acedc6d9f6906ff62cb2822ca900dfb2e /sci-physics
parentsci-chemistry/chemical-mime-data: drop 0.1.94-r4 and it's patches (diff)
downloadgentoo-905627a0d2ef61d53bc990a71831e3438a69496e.tar.gz
gentoo-905627a0d2ef61d53bc990a71831e3438a69496e.tar.bz2
gentoo-905627a0d2ef61d53bc990a71831e3438a69496e.zip
sci-physics/lhapdf: Only install cython with python
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.5.4-r2.ebuild85
-rw-r--r--sci-physics/lhapdf/lhapdf-9999.ebuild8
2 files changed, 90 insertions, 3 deletions
diff --git a/sci-physics/lhapdf/lhapdf-6.5.4-r2.ebuild b/sci-physics/lhapdf/lhapdf-6.5.4-r2.ebuild
new file mode 100644
index 000000000000..fe5288384d06
--- /dev/null
+++ b/sci-physics/lhapdf/lhapdf-6.5.4-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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 autotools
+
+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"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="examples +python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ python? (
+ $(python_gen_cond_dep '
+ >=dev-python/cython-0.19[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.5.4-include-cstdint.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+ # Let cython reproduce this for more recent python versions
+ rm wrappers/python/lhapdf.cpp || die
+ eautoreconf
+}
+
+src_configure() {
+ local -x CONFIG_SHELL="${EPREFIX}/bin/bash"
+ econf \
+ --disable-static \
+ $(use_enable python)
+}
+
+src_compile() {
+ emake all $(use doc && echo doxy)
+}
+
+src_test() {
+ emake -C tests
+}
+
+src_install() {
+ default
+ use doc && dodoc -r doc/doxygen/.
+ 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 492a8fed8602..fc2455e2129f 100644
--- a/sci-physics/lhapdf/lhapdf-9999.ebuild
+++ b/sci-physics/lhapdf/lhapdf-9999.ebuild
@@ -37,9 +37,11 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="
- $(python_gen_cond_dep '
- >=dev-python/cython-0.19[${PYTHON_USEDEP}]
- ')
+ python? (
+ $(python_gen_cond_dep '
+ >=dev-python/cython-0.19[${PYTHON_USEDEP}]
+ ')
+ )
"
pkg_setup() {