commit: 8bfe3614f161abf4836c66418ca0deceef3bb251 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> AuthorDate: Wed Aug 31 15:25:08 2022 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Wed Aug 31 15:26:10 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bfe3614
sci-physics/espresso: update to version 4.2.0 Closes: https://bugs.gentoo.org/846287 Closes: https://bugs.gentoo.org/811186 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> sci-physics/espresso/Manifest | 1 + ...{espresso-9999.ebuild => espresso-4.2.0.ebuild} | 34 +++++++++++++--------- sci-physics/espresso/espresso-9999.ebuild | 30 ++++++++++--------- .../files/espresso-4.2.0-fix-disable-test.patch | 12 ++++++++ 4 files changed, 50 insertions(+), 27 deletions(-) diff --git a/sci-physics/espresso/Manifest b/sci-physics/espresso/Manifest index 366b7e767003..949e4ac778c0 100644 --- a/sci-physics/espresso/Manifest +++ b/sci-physics/espresso/Manifest @@ -1 +1,2 @@ DIST espresso-4.1.3.tar.gz 16947336 BLAKE2B 14d3513eda87f62a8473a0cac0c273b3590bf78ed48b96e76d10c106713f7bbd7d37de951bd3d9210062b34c02bd83a68f3aaf1ca8215ed1dcde590e4e99b113 SHA512 1fe82683eddb7bfd9bae6e446b0f42a50087d755995963905cd419473ad17b204f20049d0cf4af9264898dd6fee36f02744b38fa45cd0e33086374cf2aebd934 +DIST espresso-4.2.0.tar.gz 14000445 BLAKE2B 79de0e364cd932e534b0e1ee9433ae90e4deeb1ade262aa6877a30c8656f03155ca77b8feafdd5607f83e36ee4f47ad7ec28be353bc3358216a9c9f8c0902323 SHA512 b80afb1bef57911fd79b88378a5b2e31b07a18d415fe17fcd5ed28fb448eeca5922f98af8df42117e9e869645765d55ecfb3aae615fa6a53c915f7d8a63081c5 diff --git a/sci-physics/espresso/espresso-9999.ebuild b/sci-physics/espresso/espresso-4.2.0.ebuild similarity index 83% copy from sci-physics/espresso/espresso-9999.ebuild copy to sci-physics/espresso/espresso-4.2.0.ebuild index 19e9be04e85a..fb6b55b2bc12 100644 --- a/sci-physics/espresso/espresso-9999.ebuild +++ b/sci-physics/espresso/espresso-4.2.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{8,9} ) +PYTHON_COMPAT=( python3_{8..11} ) CMAKE_MAKEFILE_GENERATOR="emake" inherit cmake cuda python-single-r1 savedconfig @@ -19,11 +19,14 @@ else SRC_URI="https://github.com/${PN}md/${PN}/releases/download/${PV}/${P}.tar.gz" KEYWORDS="~amd64 ~x86 ~amd64-linux" fi +S="${WORKDIR}/${PN}" LICENSE="GPL-3" SLOT="0" IUSE="cuda doc examples +fftw +hdf5 test" -RESTRICT="!test? ( test )" + +# unittest_decorators not packaged +RESTRICT="test" REQUIRED_USE=" ${PYTHON_REQUIRED_USE}" @@ -37,17 +40,22 @@ RDEPEND=" cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 ) fftw? ( sci-libs/fftw:3.0 ) dev-libs/boost:=[mpi] - hdf5? ( sci-libs/hdf5:=[mpi] )" + hdf5? ( sci-libs/hdf5:=[mpi] ) +" DEPEND="${RDEPEND} doc? ( app-doc/doxygen[dot] dev-texlive/texlive-latexextra - virtual/latex-base )" + virtual/latex-base + ) +" -DOCS=( AUTHORS NEWS README ChangeLog ) +DOCS=( AUTHORS NEWS Readme.md ChangeLog ) -S="${WORKDIR}/${PN}" +PATCHES=( + "${FILESDIR}/${P}-fix-disable-test.patch" +) src_prepare() { use cuda && cuda_src_prepare @@ -74,23 +82,23 @@ src_compile() { [[ ${PV} = 9999 ]] && use doc && cmake_build ug dg tutorials } +src_test() { + LD_PRELOAD="${BUILD_DIR}/src/core/Espresso_core.so" cmake_src_test +} + src_install() { local i docdir="${S}" cmake_src_install + python_optimize + insinto /usr/share/${PN}/ doins "${BUILD_DIR}/myconfig-sample.hpp" save_config "${BUILD_DIR}/src/config/myconfig-final.hpp" if use doc; then - [[ ${PV} = 9999 ]] && docdir="${BUILD_DIR}" - newdoc "${docdir}"/doc/dg/dg.pdf developer_guide.pdf - newdoc "${docdir}"/doc/ug/ug.pdf user_guide.pdf - for i in "${docdir}/doc/tutorials/python"/*/[0-9]*.pdf; do - newdoc "${i}" "tutorial_${i##*/}" - done dodoc -r "${BUILD_DIR}/doc/doxygen/html" fi diff --git a/sci-physics/espresso/espresso-9999.ebuild b/sci-physics/espresso/espresso-9999.ebuild index 19e9be04e85a..0373c76056bf 100644 --- a/sci-physics/espresso/espresso-9999.ebuild +++ b/sci-physics/espresso/espresso-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{8,9} ) +PYTHON_COMPAT=( python3_{8..11} ) CMAKE_MAKEFILE_GENERATOR="emake" inherit cmake cuda python-single-r1 savedconfig @@ -19,11 +19,14 @@ else SRC_URI="https://github.com/${PN}md/${PN}/releases/download/${PV}/${P}.tar.gz" KEYWORDS="~amd64 ~x86 ~amd64-linux" fi +S="${WORKDIR}/${PN}" LICENSE="GPL-3" SLOT="0" IUSE="cuda doc examples +fftw +hdf5 test" -RESTRICT="!test? ( test )" + +# unittest_decorators not packaged +RESTRICT="test" REQUIRED_USE=" ${PYTHON_REQUIRED_USE}" @@ -37,17 +40,18 @@ RDEPEND=" cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 ) fftw? ( sci-libs/fftw:3.0 ) dev-libs/boost:=[mpi] - hdf5? ( sci-libs/hdf5:=[mpi] )" + hdf5? ( sci-libs/hdf5:=[mpi] ) +" DEPEND="${RDEPEND} doc? ( app-doc/doxygen[dot] dev-texlive/texlive-latexextra - virtual/latex-base )" + virtual/latex-base + ) +" -DOCS=( AUTHORS NEWS README ChangeLog ) - -S="${WORKDIR}/${PN}" +DOCS=( AUTHORS NEWS Readme.md ChangeLog ) src_prepare() { use cuda && cuda_src_prepare @@ -74,6 +78,10 @@ src_compile() { [[ ${PV} = 9999 ]] && use doc && cmake_build ug dg tutorials } +src_test() { + LD_PRELOAD="${BUILD_DIR}/src/core/Espresso_core.so" cmake_src_test +} + src_install() { local i docdir="${S}" @@ -85,12 +93,6 @@ src_install() { save_config "${BUILD_DIR}/src/config/myconfig-final.hpp" if use doc; then - [[ ${PV} = 9999 ]] && docdir="${BUILD_DIR}" - newdoc "${docdir}"/doc/dg/dg.pdf developer_guide.pdf - newdoc "${docdir}"/doc/ug/ug.pdf user_guide.pdf - for i in "${docdir}/doc/tutorials/python"/*/[0-9]*.pdf; do - newdoc "${i}" "tutorial_${i##*/}" - done dodoc -r "${BUILD_DIR}/doc/doxygen/html" fi diff --git a/sci-physics/espresso/files/espresso-4.2.0-fix-disable-test.patch b/sci-physics/espresso/files/espresso-4.2.0-fix-disable-test.patch new file mode 100644 index 000000000000..83c133df4bdd --- /dev/null +++ b/sci-physics/espresso/files/espresso-4.2.0-fix-disable-test.patch @@ -0,0 +1,12 @@ +diff --git a/src/script_interface/CMakeLists.txt b/src/script_interface/CMakeLists.txt +index a799571..9d03f33 100644 +--- a/src/script_interface/CMakeLists.txt ++++ b/src/script_interface/CMakeLists.txt +@@ -54,4 +54,6 @@ target_link_libraries( + target_include_directories(Espresso_script_interface + PUBLIC ${CMAKE_SOURCE_DIR}/src) + +-add_subdirectory(tests) ++if(WITH_TESTS) ++ add_subdirectory(tests) ++endif(WITH_TESTS)
