diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /sci-chemistry/gromacs/gromacs-9999.ebuild | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'sci-chemistry/gromacs/gromacs-9999.ebuild')
-rw-r--r-- | sci-chemistry/gromacs/gromacs-9999.ebuild | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/sci-chemistry/gromacs/gromacs-9999.ebuild b/sci-chemistry/gromacs/gromacs-9999.ebuild index 203a0f716f57..c4951b414c97 100644 --- a/sci-chemistry/gromacs/gromacs-9999.ebuild +++ b/sci-chemistry/gromacs/gromacs-9999.ebuild @@ -5,26 +5,27 @@ EAPI=7 CMAKE_MAKEFILE_GENERATOR="ninja" -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8,9} ) DISTUTILS_SINGLE_IMPL=1 -inherit bash-completion-r1 cmake cuda distutils-r1 eutils multilib readme.gentoo-r1 toolchain-funcs xdg-utils +inherit bash-completion-r1 cmake cuda distutils-r1 eutils flag-o-matic multilib readme.gentoo-r1 toolchain-funcs xdg-utils if [[ $PV = *9999* ]]; then - EGIT_REPO_URI="git://git.gromacs.org/gromacs.git - https://gerrit.gromacs.org/gromacs.git + EGIT_REPO_URI=" + https://gitlab.com/gromacs/gromacs.git https://github.com/gromacs/gromacs.git - https://repo.or.cz/r/gromacs.git" + git://git.gromacs.org/gromacs.git" [[ $PV = 9999 ]] && EGIT_BRANCH="master" || EGIT_BRANCH="release-${PV:0:4}" inherit git-r3 else - SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${PN}-${PV/_/-}.tar.gz - test? ( http://gerrit.gromacs.org/download/regressiontests-${PV/_/-}.tar.gz )" + SRC_URI=" + http://ftp.gromacs.org/gromacs/${PN}-${PV/_/-}.tar.gz + test? ( http://ftp.gromacs.org/regressiontests/regressiontests-${PV/_/-}.tar.gz )" KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" fi -ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2" +ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_arm_neon" DESCRIPTION="The ultimate molecular dynamics simulation package" HOMEPAGE="http://www.gromacs.org/" @@ -34,7 +35,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 +gmxapi-legacy +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}" +IUSE="X blas cuda +custom-cflags +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? ( @@ -159,13 +160,24 @@ src_prepare() { src_configure() { local mycmakeargs_pre=( ) extra fft_opts=( ) - #go from slowest to fastest acceleration - local acce="None" - use cpu_flags_x86_sse2 && acce="SSE2" - use cpu_flags_x86_sse4_1 && acce="SSE4.1" - use cpu_flags_x86_fma4 && acce="AVX_128_FMA" - use cpu_flags_x86_avx && acce="AVX_256" - use cpu_flags_x86_avx2 && acce="AVX2_256" + if use custom-cflags; then + #go from slowest to fastest acceleration + local acce="None" + if (use amd64 || use x86); then + use cpu_flags_x86_sse2 && acce="SSE2" + use cpu_flags_x86_sse4_1 && acce="SSE4.1" + use cpu_flags_x86_fma4 && acce="AVX_128_FMA" + use cpu_flags_x86_avx && acce="AVX_256" + use cpu_flags_x86_avx2 && acce="AVX2_256" + use cpu_flags_x86_avx512f && acce="AVX_512" + elif (use arm); then + use cpu_flags_arm_neon && acce="ARM_NEON" + elif (use arm64); then + use cpu_flags_arm_neon && acce="ARM_NEON_ASIMD" + fi + else + strip-flags + fi #to create man pages, build tree binaries are executed (bug #398437) [[ ${CHOST} = *-darwin* ]] && \ @@ -222,24 +234,21 @@ src_configure() { [[ ${x} = "double" ]] && suffix="_d" local p [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF" - local cuda=( "-DGMX_GPU=OFF" ) - [[ ${x} = "float" ]] && use cuda && \ - cuda=( "-DGMX_GPU=ON" ) - local opencl=( "-DGMX_USE_OPENCL=OFF" ) - use opencl && opencl=( "-DGMX_USE_OPENCL=ON" ) cuda=( "-DGMX_GPU=ON" ) + local gpu=( "-DGMX_GPU=OFF" ) + [[ ${x} = "float" ]] && use cuda && gpu=( "-DGMX_GPU=CUDA" ) + use opencl && gpu=( "-DGMX_GPU=OPENCL" ) mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF -DGMX_THREAD_MPI=$(usex threads) -DGMXAPI=$(usex gmxapi) -DGMX_INSTALL_LEGACY_API=$(usex gmxapi-legacy) - "${opencl[@]}" - "${cuda[@]}" + "${gpu[@]}" "$(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_src_configure [[ ${CHOST} != *-darwin* ]] || \ sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}/gentoo_rules.cmake" || die |