summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gentoo.org>2023-05-03 11:20:22 -0600
committerNicolas Bock <nicolasbock@gentoo.org>2023-05-03 12:06:26 -0600
commit6e6f9189b9545624034ce59db619b8455a8a65d7 (patch)
treee4dff88114885e0c9d9c692c709cfb0cdb22da13 /sci-physics/lammps
parentapp-office/libreoffice-bin: Fix lpsolve subslot (diff)
downloadgentoo-6e6f9189b9545624034ce59db619b8455a8a65d7.tar.gz
gentoo-6e6f9189b9545624034ce59db619b8455a8a65d7.tar.bz2
gentoo-6e6f9189b9545624034ce59db619b8455a8a65d7.zip
sci-physics/lammps: Version bump to 20220623
Also bump supported Python version to 3.11. Closes: https://bugs.gentoo.org/897240 Signed-off-by: Nicolas Bock <nicolasbock@gentoo.org>
Diffstat (limited to 'sci-physics/lammps')
-rw-r--r--sci-physics/lammps/Manifest1
-rw-r--r--sci-physics/lammps/lammps-20220217-r1.ebuild166
-rw-r--r--sci-physics/lammps/lammps-20220623.ebuild166
3 files changed, 333 insertions, 0 deletions
diff --git a/sci-physics/lammps/Manifest b/sci-physics/lammps/Manifest
index 0ba9f3103b2d..d0aa38862c96 100644
--- a/sci-physics/lammps/Manifest
+++ b/sci-physics/lammps/Manifest
@@ -1 +1,2 @@
DIST lammps-17Feb2022.tar.gz 170036241 BLAKE2B 74d370657bff17847dce0bbe082134721722574b298832ea37d319968123b12d37ecdfea5560b2776e846c32d05a98f722710327d8da46f80869f75a36f6c255 SHA512 f2df65847906ca5890aae98efed5712eb6dd694f2b85dc062084a02b9bf43412ecd075f54df2947bff71d3b6313c1ec39c437e02497920da795e9ba0cd5dc068
+DIST lammps-23Jun2022.tar.gz 181439760 BLAKE2B b8012417257527820a4f37dbd300d3f949e3768fc7ae669c49bc7ea0cdc30b28512cb3ee25d375394184bbf1371763da6c3556b2d600f060b754816c589197bf SHA512 e882cb8a83a90b17471cd5c79b2b724378a28642b82511c695a36c0d9a0feb63681b29171c5bfb0bcb218ea3a1a5e4f00fdb8e6ce5f0fc8aed1fa83680cd3a34
diff --git a/sci-physics/lammps/lammps-20220217-r1.ebuild b/sci-physics/lammps/lammps-20220217-r1.ebuild
new file mode 100644
index 000000000000..0c599b37fc74
--- /dev/null
+++ b/sci-physics/lammps/lammps-20220217-r1.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+CMAKE_MAKEFILE_GENERATOR=emake
+# Doc building insists on fetching mathjax
+# DOCS_BUILDER="doxygen"
+# DOCS_DEPEND="
+# media-gfx/graphviz
+# dev-libs/mathjax
+# "
+
+inherit cmake fortran-2 distutils-r1 # docs
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_PV="$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:0:4}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="https://lammps.sandia.gov/"
+SRC_URI="https://download.lammps.org/tars/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}/cmake"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cuda examples gzip hip lammps-memalign mpi opencl python test"
+# Requires write access to /dev/dri/renderD...
+RESTRICT="test"
+
+RDEPEND="
+ app-arch/gzip
+ media-libs/libpng:0
+ sys-libs/zlib
+ mpi? (
+ virtual/mpi
+ sci-libs/hdf5:=[mpi]
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ sci-libs/fftw:3.0=
+ sci-libs/netcdf:=
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= )
+ opencl? ( virtual/opencl )
+ hip? ( dev-util/hip:= )
+ dev-cpp/eigen:3
+ "
+ # Kokkos-3.5 not in tree atm
+ # kokkos? ( dev-cpp/kokkos-3.5.* )
+BDEPEND="${DISTUTILS_DEPS}"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ ?? ( cuda opencl hip )
+"
+
+src_prepare() {
+ cmake_src_prepare
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_prepare
+ popd
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_MPI=$(usex mpi)
+ -DBUILD_DOC=OFF
+ #-DBUILD_DOC=$(usex doc)
+ -DENABLE_TESTING=$(usex test)
+ -DPKG_ASPHERE=ON
+ -DPKG_BODY=ON
+ -DPKG_CLASS2=ON
+ -DPKG_COLLOID=ON
+ -DPKG_COMPRESS=ON
+ -DPKG_CORESHELL=ON
+ -DPKG_DIPOLE=ON
+ -DPKG_GRANULAR=ON
+ -DPKG_KSPACE=ON
+ -DFFT=FFTW3
+ -DPKG_KOKKOS=OFF
+ #-DPKG_KOKKOS=$(usex kokkos)
+ #$(use kokkos && echo -DEXTERNAL_KOKKOS=ON)
+ -DPKG_MANYBODY=ON
+ -DPKG_MC=ON
+ -DPKG_MEAM=ON
+ -DPKG_MISC=ON
+ -DPKG_MOLECULE=ON
+ -DPKG_PERI=ON
+ -DPKG_QEQ=ON
+ -DPKG_REPLICA=ON
+ -DPKG_RIGID=ON
+ -DPKG_SHOCK=ON
+ -DPKG_SRD=ON
+ -DPKG_PYTHON=$(usex python)
+ -DPKG_MPIIO=$(usex mpi)
+ -DPKG_VORONOI=ON
+ )
+ if use cuda || use opencl || use hip; then
+ mycmakeargs+=( -DPKG_GPU=ON )
+ use cuda && mycmakeargs+=( -DGPU_API=cuda )
+ use opencl && mycmakeargs+=( -DGPU_API=opencl -DUSE_STATIC_OPENCL_LOADER=OFF )
+ use hip && mycmakeargs+=( -DGPU_API=hip )
+ else
+ mycmakeargs+=( -DPKG_GPU=OFF )
+ fi
+ cmake_src_configure
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_configure
+ popd
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_compile
+ popd
+ fi
+}
+
+src_test() {
+ cmake_src_test
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_test
+ popd
+ fi
+}
+
+src_install() {
+ cmake_src_install
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_install
+ popd
+ fi
+
+ if use examples; then
+ for d in examples bench; do
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/${d}"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r "${S}"/../${d}/*
+ done
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20220623.ebuild b/sci-physics/lammps/lammps-20220623.ebuild
new file mode 100644
index 000000000000..0c599b37fc74
--- /dev/null
+++ b/sci-physics/lammps/lammps-20220623.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+CMAKE_MAKEFILE_GENERATOR=emake
+# Doc building insists on fetching mathjax
+# DOCS_BUILDER="doxygen"
+# DOCS_DEPEND="
+# media-gfx/graphviz
+# dev-libs/mathjax
+# "
+
+inherit cmake fortran-2 distutils-r1 # docs
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_PV="$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:0:4}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="https://lammps.sandia.gov/"
+SRC_URI="https://download.lammps.org/tars/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}/cmake"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cuda examples gzip hip lammps-memalign mpi opencl python test"
+# Requires write access to /dev/dri/renderD...
+RESTRICT="test"
+
+RDEPEND="
+ app-arch/gzip
+ media-libs/libpng:0
+ sys-libs/zlib
+ mpi? (
+ virtual/mpi
+ sci-libs/hdf5:=[mpi]
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ sci-libs/fftw:3.0=
+ sci-libs/netcdf:=
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= )
+ opencl? ( virtual/opencl )
+ hip? ( dev-util/hip:= )
+ dev-cpp/eigen:3
+ "
+ # Kokkos-3.5 not in tree atm
+ # kokkos? ( dev-cpp/kokkos-3.5.* )
+BDEPEND="${DISTUTILS_DEPS}"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ ?? ( cuda opencl hip )
+"
+
+src_prepare() {
+ cmake_src_prepare
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_prepare
+ popd
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_MPI=$(usex mpi)
+ -DBUILD_DOC=OFF
+ #-DBUILD_DOC=$(usex doc)
+ -DENABLE_TESTING=$(usex test)
+ -DPKG_ASPHERE=ON
+ -DPKG_BODY=ON
+ -DPKG_CLASS2=ON
+ -DPKG_COLLOID=ON
+ -DPKG_COMPRESS=ON
+ -DPKG_CORESHELL=ON
+ -DPKG_DIPOLE=ON
+ -DPKG_GRANULAR=ON
+ -DPKG_KSPACE=ON
+ -DFFT=FFTW3
+ -DPKG_KOKKOS=OFF
+ #-DPKG_KOKKOS=$(usex kokkos)
+ #$(use kokkos && echo -DEXTERNAL_KOKKOS=ON)
+ -DPKG_MANYBODY=ON
+ -DPKG_MC=ON
+ -DPKG_MEAM=ON
+ -DPKG_MISC=ON
+ -DPKG_MOLECULE=ON
+ -DPKG_PERI=ON
+ -DPKG_QEQ=ON
+ -DPKG_REPLICA=ON
+ -DPKG_RIGID=ON
+ -DPKG_SHOCK=ON
+ -DPKG_SRD=ON
+ -DPKG_PYTHON=$(usex python)
+ -DPKG_MPIIO=$(usex mpi)
+ -DPKG_VORONOI=ON
+ )
+ if use cuda || use opencl || use hip; then
+ mycmakeargs+=( -DPKG_GPU=ON )
+ use cuda && mycmakeargs+=( -DGPU_API=cuda )
+ use opencl && mycmakeargs+=( -DGPU_API=opencl -DUSE_STATIC_OPENCL_LOADER=OFF )
+ use hip && mycmakeargs+=( -DGPU_API=hip )
+ else
+ mycmakeargs+=( -DPKG_GPU=OFF )
+ fi
+ cmake_src_configure
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_configure
+ popd
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_compile
+ popd
+ fi
+}
+
+src_test() {
+ cmake_src_test
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_test
+ popd
+ fi
+}
+
+src_install() {
+ cmake_src_install
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_install
+ popd
+ fi
+
+ if use examples; then
+ for d in examples bench; do
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/${d}"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r "${S}"/../${d}/*
+ done
+ fi
+}