From 8ec855c644f7c1488cf89696d8afab04ff9da0e9 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 23 Sep 2018 06:48:41 -0600 Subject: sci-physics/espresso: fix install Package-Manager: Portage-2.3.49, Repoman-2.3.10 --- sci-physics/espresso/espresso-4.0.0-r1.ebuild | 115 ++++++++++++++++++++++++++ sci-physics/espresso/espresso-4.0.0.ebuild | 113 ------------------------- sci-physics/espresso/files/2277.patch | 19 +++++ 3 files changed, 134 insertions(+), 113 deletions(-) create mode 100644 sci-physics/espresso/espresso-4.0.0-r1.ebuild delete mode 100644 sci-physics/espresso/espresso-4.0.0.ebuild create mode 100644 sci-physics/espresso/files/2277.patch (limited to 'sci-physics/espresso') diff --git a/sci-physics/espresso/espresso-4.0.0-r1.ebuild b/sci-physics/espresso/espresso-4.0.0-r1.ebuild new file mode 100644 index 000000000000..54eb213cc07a --- /dev/null +++ b/sci-physics/espresso/espresso-4.0.0-r1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +CMAKE_MAKEFILE_GENERATOR="ninja" + +inherit cmake-utils python-single-r1 savedconfig + +DESCRIPTION="Extensible Simulation Package for Research on Soft matter" +HOMEPAGE="http://espressomd.org" + +if [[ ${PV} = 9999 ]]; then + EGIT_REPO_URI="https://github.com/${PN}md/${PN}.git" + EGIT_BRANCH="python" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/${PN}md/${PN}/releases/download/${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="cuda doc examples +fftw +hdf5 test" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + >=dev-python/cython-0.26.1[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + 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] )" + +DEPEND="${RDEPEND} + doc? ( + app-doc/doxygen[dot] + dev-texlive/texlive-latexextra + virtual/latex-base )" + +DOCS=( AUTHORS NEWS README ChangeLog ) + +PATCHES=( "${FILESDIR}/2277.patch" ) + +src_prepare() { + use cuda && cuda_src_prepare + cmake-utils_src_prepare +} + +src_configure() { + mycmakeargs=( + -DWITH_CUDA=$(usex cuda) + -DPYTHON_EXECUTABLE="${PYTHON}" + -DWITH_TESTS=$(usex test) + -DINSTALL_PYPRESSO=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3=$(usex !fftw) + -DWITH_HDF5=$(usex hdf5) + -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=$(usex !hdf5) + -DCMAKE_SKIP_RPATH=YES + -DLIBDIR=$(get_libdir) + ) + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + use doc && cmake-utils_src_make doxygen + [[ ${PV} = 9999 ]] && use doc && cmake-utils_src_make ug dg tutorials +} + +src_install() { + local i docdir="${S}" + + cmake-utils_src_install + + insinto /usr/share/${PN}/ + doins ${CMAKE_BUILD_DIR}/myconfig-sample.hpp + + save_config ${CMAKE_BUILD_DIR}/src/core/myconfig-final.hpp + + if use doc; then + [[ ${PV} = 9999 ]] && docdir="${CMAKE_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 ${CMAKE_BUILD_DIR}/doc/doxygen/html + fi + + if use examples; then + insinto "/usr/share/${PN}/examples/python" + doins -r samples/${i}/. + fi +} + +pkg_postinst() { + echo + elog "Please read and cite:" + elog "ESPResSo, Comput. Phys. Commun. 174(9) ,704, 2006." + elog "https://dx.doi.org/10.1016/j.cpc.2005.10.005" + echo + elog "If you need more features, change" + elog "/etc/portage/savedconfig/${CATEGORY}/${PF}" + elog "and reemerge with USE=savedconfig" + echo + elog "For a full feature list see:" + elog "/usr/share/${PN}/myconfig-sample.hpp" + echo +} diff --git a/sci-physics/espresso/espresso-4.0.0.ebuild b/sci-physics/espresso/espresso-4.0.0.ebuild deleted file mode 100644 index 953909c3dd7d..000000000000 --- a/sci-physics/espresso/espresso-4.0.0.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) -CMAKE_MAKEFILE_GENERATOR="ninja" - -inherit cmake-utils python-single-r1 savedconfig - -DESCRIPTION="Extensible Simulation Package for Research on Soft matter" -HOMEPAGE="http://espressomd.org" - -if [[ ${PV} = 9999 ]]; then - EGIT_REPO_URI="https://github.com/${PN}md/${PN}.git" - EGIT_BRANCH="python" - inherit git-r3 - KEYWORDS="" -else - SRC_URI="https://github.com/${PN}md/${PN}/releases/download/${PV}/${P}.tar.gz" - KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos" -fi - -LICENSE="GPL-3" -SLOT="0" -IUSE="cuda doc examples +fftw +hdf5 test" - -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE}" - -RDEPEND=" - ${PYTHON_DEPS} - >=dev-python/cython-0.26.1[${PYTHON_USEDEP}] - dev-python/numpy[${PYTHON_USEDEP}] - 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] )" - -DEPEND="${RDEPEND} - doc? ( - app-doc/doxygen[dot] - dev-texlive/texlive-latexextra - virtual/latex-base )" - -DOCS=( AUTHORS NEWS README ChangeLog ) - -src_prepare() { - use cuda && cuda_src_prepare - cmake-utils_src_prepare -} - -src_configure() { - mycmakeargs=( - -DWITH_CUDA=$(usex cuda) - -DPYTHON_EXECUTABLE="${PYTHON}" - -DWITH_TESTS=$(usex test) - -DINSTALL_PYPRESSO=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3=$(usex !fftw) - -DWITH_HDF5=$(usex hdf5) - -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=$(usex !hdf5) - -DCMAKE_SKIP_RPATH=YES - -DLIBDIR=$(get_libdir) - ) - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile - use doc && cmake-utils_src_make doxygen - [[ ${PV} = 9999 ]] && use doc && cmake-utils_src_make ug dg tutorials -} - -src_install() { - local i docdir="${S}" - - cmake-utils_src_install - - insinto /usr/share/${PN}/ - doins ${CMAKE_BUILD_DIR}/myconfig-sample.hpp - - save_config ${CMAKE_BUILD_DIR}/src/core/myconfig-final.hpp - - if use doc; then - [[ ${PV} = 9999 ]] && docdir="${CMAKE_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 ${CMAKE_BUILD_DIR}/doc/doxygen/html - fi - - if use examples; then - insinto "/usr/share/${PN}/examples/python" - doins -r samples/${i}/. - fi -} - -pkg_postinst() { - echo - elog "Please read and cite:" - elog "ESPResSo, Comput. Phys. Commun. 174(9) ,704, 2006." - elog "https://dx.doi.org/10.1016/j.cpc.2005.10.005" - echo - elog "If you need more features, change" - elog "/etc/portage/savedconfig/${CATEGORY}/${PF}" - elog "and reemerge with USE=savedconfig" - echo - elog "For a full feature list see:" - elog "/usr/share/${PN}/myconfig-sample.hpp" - echo -} diff --git a/sci-physics/espresso/files/2277.patch b/sci-physics/espresso/files/2277.patch new file mode 100644 index 000000000000..608bd2876121 --- /dev/null +++ b/sci-physics/espresso/files/2277.patch @@ -0,0 +1,19 @@ +From 46110a514ce2420a350cca8b9af28e0c4eb51861 Mon Sep 17 00:00:00 2001 +From: Christoph Junghans +Date: Fri, 21 Sep 2018 06:57:16 -0600 +Subject: [PATCH] cmake: install libH5mdCore + +--- + src/core/io/writer/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/core/io/writer/CMakeLists.txt b/src/core/io/writer/CMakeLists.txt +index e677ba273a..42b96c96af 100644 +--- a/src/core/io/writer/h5md/CMakeLists.txt ++++ b/src/core/io/writer/h5md/CMakeLists.txt +@@ -4,4 +4,5 @@ + "${CMAKE_SOURCE_DIR}/libs/h5xx" + ) + add_dependencies(H5mdCore EspressoConfig) ++install(TARGETS H5mdCore LIBRARY DESTINATION ${LIBDIR}) + -- cgit v1.2.3-65-gdbad