aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gmail.com>2013-07-03 09:25:50 -0600
committerNicolas Bock <nicolasbock@gmail.com>2013-07-03 09:25:50 -0600
commit9c9f63650c60fe29306477afb94ac5b66b808e90 (patch)
treeab2f5cd39ac8fe54547167c3a98ccb803347b280 /sci-physics
parentdev-lang/julia update ebuild so that it builds (diff)
downloadsci-9c9f63650c60fe29306477afb94ac5b66b808e90.tar.gz
sci-9c9f63650c60fe29306477afb94ac5b66b808e90.tar.bz2
sci-9c9f63650c60fe29306477afb94ac5b66b808e90.zip
Version bump to 1-Jul-2013.
Package-Manager: portage-2.2.0_alpha186
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/lammps/ChangeLog9
-rw-r--r--sci-physics/lammps/Manifest1
-rw-r--r--sci-physics/lammps/lammps-20130701.ebuild105
-rw-r--r--sci-physics/lammps/metadata.xml31
4 files changed, 146 insertions, 0 deletions
diff --git a/sci-physics/lammps/ChangeLog b/sci-physics/lammps/ChangeLog
new file mode 100644
index 000000000..2f4ea9eb9
--- /dev/null
+++ b/sci-physics/lammps/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for sci-physics/lammps
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*lammps-20130701 (03 Jul 2013)
+
+ 03 Jul 2013; Nicolas Bock <nicolasbock@gmail.com> +lammps-20130701.ebuild,
+ +metadata.xml:
+ Version bump to 1-Jul-2013.
diff --git a/sci-physics/lammps/Manifest b/sci-physics/lammps/Manifest
new file mode 100644
index 000000000..2e2bd893c
--- /dev/null
+++ b/sci-physics/lammps/Manifest
@@ -0,0 +1 @@
+DIST lammps-1Jul13.tar.gz 47784757 SHA256 9a41b6bdc6b5288e711d0ff877f18a028a6ae9981c3cf7b7ab77df344d5ac5e2 SHA512 de9dd48926a53127f53862df7f604599e0ec6cbe6e7661b83126239d5c63775e76c12e6f0677d286204696fb1734cc57370483f052b1060a5db9d8dc3765ae84 WHIRLPOOL 05eb83d8fe4fb7affe8331b987c6d87d3437fe265e1f50554970265ed4df1dd22d931e9bb8461df6e0ea3d19bb3458623dc40b0ee1a13b297ad3e3a611055dda
diff --git a/sci-physics/lammps/lammps-20130701.ebuild b/sci-physics/lammps/lammps-20130701.ebuild
new file mode 100644
index 000000000..4793d8305
--- /dev/null
+++ b/sci-physics/lammps/lammps-20130701.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20130526.ebuild,v 1.1 2013/06/26 23:53:11 ottxor Exp $
+
+EAPI=5
+
+FORTRAN_NEEDED="package-meam"
+
+inherit eutils fortran-2
+
+convert_month() {
+ case $1 in
+ 01) echo Jan
+ ;;
+ 02) echo Feb
+ ;;
+ 03) echo Mar
+ ;;
+ 04) echo Apr
+ ;;
+ 05) echo May
+ ;;
+ 06) echo Jun
+ ;;
+ 07) echo Jul
+ ;;
+ 08) echo Aug
+ ;;
+ 09) echo Sep
+ ;;
+ 10) echo Oct
+ ;;
+ 11) echo Nov
+ ;;
+ 12) echo Dec
+ ;;
+ *) echo unknown
+ ;;
+ esac
+}
+
+MY_P=${PN}-$((${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples gzip lammps-memalign mpi package-dipole package-meam package-rigid"
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')"
+
+ # Note: The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE=$(tc-getAR) \
+ CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ F90=$(usex mpi "mpif90" "$(tc-getFC)") \
+ LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC=$(usex mpi '' "-I../STUBS") \
+ MPI_PATH=$(usex mpi '' '-L../STUBS') \
+ MPI_LIB=$(usex mpi '' '-lmpi_stubs') \
+ "$@"
+}
+
+src_compile() {
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src stubs
+
+ # Build optional packages.
+ if use package-meam; then
+ lmp_emake -C src yes-meam
+ lmp_emake -j1 -C lib/meam -f Makefile.gfortran
+ fi
+ use package-dipole && emake -C src yes-dipole
+ use package-rigid && emake -C src yes-rigid
+
+ # Compile.
+ lmp_emake -C src serial
+}
+
+src_install() {
+ newbin "src/lmp_serial" "lmp"
+ if use examples; then
+ insinto "/usr/share/doc/${PF}"
+ doins -r examples
+ fi
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/metadata.xml b/sci-physics/lammps/metadata.xml
new file mode 100644
index 000000000..1acfbc73e
--- /dev/null
+++ b/sci-physics/lammps/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ LAMMPS is a classical molecular dynamics code, and an acronym for
+ Large-scale Atomic/Molecular Massively Parallel Simulator.
+
+ LAMMPS has potentials for soft materials (biomolecules, polymers) and
+ solid-state materials (metals, semiconductors) and coarse-grained or
+ mesoscopic systems. It can be used to model atoms or, more generically,
+ as a parallel particle simulator at the atomic, meso, or continuum
+ scale.
+
+ LAMMPS runs on single processors or in parallel using message-passing
+ techniques and a spatial-decomposition of the simulation domain. The
+ code is designed to be easy to modify or extend with new functionality.
+ </longdescription>
+ <use>
+ <flag name="lammps-memalign">Enables the use of the posix_memalign()
+ call instead of malloc() when large chunks or memory are allocated
+ by LAMMPS</flag>
+ <flag name="package-meam">modified EAM potential</flag>
+ <flag name="package-dipole">point dipole particles</flag>
+ <flag name="package-rigid">rigid bodies</flag>
+ </use>
+ <herd>sci-physics</herd>
+ <maintainer>
+ <email>nicolasbock@gmail.com</email>
+ </maintainer>
+</pkgmetadata>
+