From 934ca520c4d746a03e007b0b9c0fa34d5efbc447 Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Fri, 1 Sep 2023 12:14:18 +0200 Subject: sci-physics/lhapdf: Fix setup.py plus fix for USE="doc" Closes: https://bugs.gentoo.org/912579 Signed-off-by: Alexander Puck Neuwirth Closes: https://github.com/gentoo/gentoo/pull/32548 Signed-off-by: Andrew Ammerlaan --- sci-physics/lhapdf/files/lhapdf-6.3.0-egg.patch | 16 +++++ sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild | 76 ---------------------- sci-physics/lhapdf/lhapdf-6.3.0-r2.ebuild | 83 +++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 76 deletions(-) create mode 100644 sci-physics/lhapdf/files/lhapdf-6.3.0-egg.patch delete mode 100644 sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild create mode 100644 sci-physics/lhapdf/lhapdf-6.3.0-r2.ebuild (limited to 'sci-physics') diff --git a/sci-physics/lhapdf/files/lhapdf-6.3.0-egg.patch b/sci-physics/lhapdf/files/lhapdf-6.3.0-egg.patch new file mode 100644 index 000000000000..9122b8eaf7ff --- /dev/null +++ b/sci-physics/lhapdf/files/lhapdf-6.3.0-egg.patch @@ -0,0 +1,16 @@ +--- a/wrappers/python/Makefile.am 2023-09-01 11:38:37.567370819 +0200 ++++ b/wrappers/python/Makefile.am 2023-09-01 11:37:50.641123445 +0200 +@@ -29,10 +29,10 @@ + + ## Always force setup.py, it's not good at guessing what needs to rebuild + all-local: fix-out-of-source +- $(PYEXT_ENV) $(PYTHON) setup.py install --install-lib=build/ --force ++ $(PYEXT_ENV) $(PYTHON) setup.py install --single-version-externally-managed --root=/ --install-lib=$(S)/build/ --force + + install-exec-local: +- $(PYEXT_ENV) $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) --force ++ $(PYEXT_ENV) $(PYTHON) setup.py install --single-version-externally-managed --root=/ --prefix=$(DESTDIR)$(prefix) --force + + uninstall-local: + rm -f $(DESTDIR)$(PYTHON_PATH)/lhapdf.so + diff --git a/sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild b/sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild deleted file mode 100644 index b2a2781f660e..000000000000 --- a/sci-physics/lhapdf/lhapdf-6.3.0-r1.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# 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 -} diff --git a/sci-physics/lhapdf/lhapdf-6.3.0-r2.ebuild b/sci-physics/lhapdf/lhapdf-6.3.0-r2.ebuild new file mode 100644 index 000000000000..03dda6b30a7f --- /dev/null +++ b/sci-physics/lhapdf/lhapdf-6.3.0-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..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 +DISTUTILS_EXT=1 +inherit distutils-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/" +SRC_URI="https://www.hepforge.org/downloads/lhapdf/${MY_PF}.tar.gz" +S="${WORKDIR}/${MY_PF}" +DOCS_DIR="${S}/doc" + +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}" + +PATCHES=( + "${FILESDIR}"/${P}-egg.patch +) + +src_prepare() { + default + # Let cython reproduce this for more recent python versions + rm wrappers/python/lhapdf.cpp || die + eautoreconf +} + +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 +} -- cgit v1.2.3-65-gdbad