diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
commit | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch) | |
tree | e1810a4b135afce04b34862ef0fab2bfaeb8aeca /sci-chemistry/gromacs/gromacs-9999.ebuild | |
parent | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff) |
gentoo resync : 15.01.2020
Diffstat (limited to 'sci-chemistry/gromacs/gromacs-9999.ebuild')
-rw-r--r-- | sci-chemistry/gromacs/gromacs-9999.ebuild | 75 |
1 files changed, 63 insertions, 12 deletions
diff --git a/sci-chemistry/gromacs/gromacs-9999.ebuild b/sci-chemistry/gromacs/gromacs-9999.ebuild index f9d980d7c0f3..aa6382b595a9 100644 --- a/sci-chemistry/gromacs/gromacs-9999.ebuild +++ b/sci-chemistry/gromacs/gromacs-9999.ebuild @@ -1,11 +1,15 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 CMAKE_MAKEFILE_GENERATOR="ninja" -inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo-r1 toolchain-funcs xdg-utils +PYTHON_COMPAT=( python3_{6,7} ) + +DISTUTILS_SINGLE_IMPL=1 + +inherit bash-completion-r1 cmake-utils cuda distutils-r1 eutils multilib readme.gentoo-r1 toolchain-funcs xdg-utils if [[ $PV = *9999* ]]; then EGIT_REPO_URI="git://git.gromacs.org/gromacs.git @@ -30,7 +34,7 @@ HOMEPAGE="http://www.gromacs.org/" # base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )" SLOT="0/${PV}" -IUSE="X blas cuda +doc -double-precision +fftw +gmxapi +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +single-precision test +threads +tng ${ACCE_IUSE}" +IUSE="X blas cuda +doc -double-precision +fftw +gmxapi +gmxapi-legacy +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}" CDEPEND=" X? ( @@ -47,13 +51,16 @@ CDEPEND=" lmfit? ( sci-libs/lmfit ) mkl? ( sci-libs/mkl ) mpi? ( virtual/mpi ) + ${PYTHON_DEPS} + !sci-chemistry/gmxapi " -DEPEND="${CDEPEND} +BDEPEND="${CDEPEND} virtual/pkgconfig doc? ( app-doc/doxygen - dev-python/sphinx + dev-python/sphinx[${PYTHON_USEDEP}] media-gfx/mscgen + media-gfx/graphviz dev-texlive/texlive-latex dev-texlive/texlive-latexextra media-gfx/imagemagick @@ -64,7 +71,8 @@ REQUIRED_USE=" || ( single-precision double-precision ) cuda? ( single-precision ) cuda? ( !opencl ) - mkl? ( !blas !fftw !lapack )" + mkl? ( !blas !fftw !lapack ) + ${PYTHON_REQUIRED_USE}" DOCS=( AUTHORS README ) @@ -74,12 +82,18 @@ if [[ ${PV} != *9999 ]]; then S="${WORKDIR}/${PN}-${PV/_/-}" fi +PATCHES=( "${FILESDIR}/${PN}-2020_beta1-pytest.patch" ) + pkg_pretend() { [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs" use openmp && ! tc-has-openmp && \ die "Please switch to an openmp compatible compiler" } +pkg_setup() { + python-single-r1_pkg_setup +} + src_unpack() { if [[ ${PV} != *9999 ]]; then default @@ -116,6 +130,28 @@ src_prepare() { fi DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats" + + # try to create policy for imagemagik + mkdir -p ${HOME}/.config/ImageMagick + cat >> ${HOME}/.config/ImageMagick/policy.xml <<- EOF + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE policymap [ + <!ELEMENT policymap (policy)+> + !ATTLIST policymap xmlns CDATA #FIXED ''> + <!ELEMENT policy EMPTY> + <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED + name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED + stealth NMTOKEN #IMPLIED value CDATA #IMPLIED> + ]> + <policymap> + <policy domain="coder" rights="read | write" pattern="PS" /> + <policy domain="coder" rights="read | write" pattern="PS2" /> + <policy domain="coder" rights="read | write" pattern="PS3" /> + <policy domain="coder" rights="read | write" pattern="EPS" /> + <policy domain="coder" rights="read | write" pattern="PDF" /> + <policy domain="coder" rights="read | write" pattern="XPS" /> + </policymap> + EOF } src_configure() { @@ -172,6 +208,7 @@ src_configure() { -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/" -DBUILD_TESTING=$(usex test) -DGMX_BUILD_UNITTESTS=$(usex test) + -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}" ${extra} ) @@ -193,11 +230,13 @@ src_configure() { -DGMX_MPI=OFF -DGMX_THREAD_MPI=$(usex threads) -DGMXAPI=$(usex gmxapi) + -DGMX_INSTALL_LEGACY_API=$(usex gmxapi-legacy) "${opencl[@]}" "${cuda[@]}" "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")" -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" + -DGMX_PYTHON_PACKAGE=$(usex python) ) BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure [[ ${CHOST} != *-darwin* ]] || \ @@ -207,9 +246,11 @@ src_configure() { mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_THREAD_MPI=OFF - -DGMX_MPI=ON ${cuda} + -DGMX_MPI=ON -DGMX_OPENMM=OFF -DGMXAPI=OFF + "${opencl[@]}" + "${cuda[@]}" -DGMX_BUILD_MDRUN_ONLY=ON -DBUILD_SHARED_LIBS=OFF -DGMX_BUILD_MANUAL=OFF @@ -227,6 +268,12 @@ src_compile() { einfo "Compiling for ${x} precision" BUILD_DIR="${WORKDIR}/${P}_${x}"\ cmake-utils_src_compile + if use python; then + BUILD_DIR="${WORKDIR}/${P}_${x}"\ + cmake-utils_src_compile python_packaging/all + BUILD_DIR="${WORKDIR}/${P}" \ + distutils-r1_src_compile + fi # not 100% necessary for rel ebuilds as available from website if use doc; then BUILD_DIR="${WORKDIR}/${P}_${x}"\ @@ -250,6 +297,10 @@ src_install() { for x in ${GMX_DIRS}; do BUILD_DIR="${WORKDIR}/${P}_${x}" \ cmake-utils_src_install + if use python; then + BUILD_DIR="${WORKDIR}/${P}_${x}" \ + cmake-utils_src_install python_packaging/install + fi if use doc; then newdoc "${WORKDIR}/${P}_${x}"/docs/manual/gromacs.pdf "${PN}-manual-${PV}.pdf" fi @@ -263,14 +314,14 @@ src_install() { doins src/external/tng_io/include/tng/*h fi # drop unneeded stuff - rm "${ED}"usr/bin/GMXRC* || die - for x in "${ED}"usr/bin/gmx-completion-*.bash ; do + rm "${ED}"/usr/bin/GMXRC* || die + for x in "${ED}"/usr/bin/gmx-completion-*.bash ; do local n=${x##*/gmx-completion-} n="${n%.bash}" - cat "${ED}"usr/bin/gmx-completion.bash "$x" > "${T}/${n}" || die + cat "${ED}"/usr/bin/gmx-completion.bash "$x" > "${T}/${n}" || die newbashcomp "${T}"/"${n}" "${n}" done - rm "${ED}"usr/bin/gmx-completion*.bash || die + rm "${ED}"/usr/bin/gmx-completion*.bash || die readme.gentoo_create_doc } |