1 |
commit: 42964d3e017f8448f79958d94118b5775e76b6ae |
2 |
Author: Nicolas Bock <nicolasbock <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Feb 1 23:04:13 2014 +0000 |
4 |
Commit: Nicolas Bock <nicolasbock <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Feb 1 23:04:13 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=42964d3e |
7 |
|
8 |
sci-physics/lammps: Upstream now releases a stable channel |
9 |
|
10 |
I added Feb 1 2014 in the stable slot to indicate that upstream considers this |
11 |
version more tested and stable than their normal frequent releases. |
12 |
|
13 |
Package-Manager: portage-2.2.7 |
14 |
|
15 |
--- |
16 |
sci-physics/lammps/ChangeLog | 11 +++ |
17 |
sci-physics/lammps/lammps-20140201.ebuild | 114 ++++++++++++++++++++++++++++++ |
18 |
sci-physics/lammps/metadata.xml | 31 ++++++++ |
19 |
3 files changed, 156 insertions(+) |
20 |
|
21 |
diff --git a/sci-physics/lammps/ChangeLog b/sci-physics/lammps/ChangeLog |
22 |
new file mode 100644 |
23 |
index 0000000..c5700d3 |
24 |
--- /dev/null |
25 |
+++ b/sci-physics/lammps/ChangeLog |
26 |
@@ -0,0 +1,11 @@ |
27 |
+# ChangeLog for sci-physics/lammps |
28 |
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
29 |
+# $Header: $ |
30 |
+ |
31 |
+*lammps-20140201 (01 Feb 2014) |
32 |
+ |
33 |
+ 01 Feb 2014; Nicolas Bock <nicolasbock@g.o> +lammps-20140201.ebuild, |
34 |
+ +metadata.xml: |
35 |
+ sci-physics/lammps: Upstream now releases a stable channel I added Feb 1 2014 |
36 |
+ in the stable slot to indicate that upstream considers this version more |
37 |
+ tested and stable than their normal frequent releases. |
38 |
|
39 |
diff --git a/sci-physics/lammps/lammps-20140201.ebuild b/sci-physics/lammps/lammps-20140201.ebuild |
40 |
new file mode 100644 |
41 |
index 0000000..8c6e17b |
42 |
--- /dev/null |
43 |
+++ b/sci-physics/lammps/lammps-20140201.ebuild |
44 |
@@ -0,0 +1,114 @@ |
45 |
+# Copyright 1999-2014 Gentoo Foundation |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20140129.ebuild,v 1.1 2014/01/27 18:20:39 nicolasbock Exp $ |
48 |
+ |
49 |
+EAPI=5 |
50 |
+ |
51 |
+FORTRAN_NEEDED="package-meam" |
52 |
+ |
53 |
+inherit eutils fortran-2 |
54 |
+ |
55 |
+convert_month() { |
56 |
+ case $1 in |
57 |
+ 01) echo Jan |
58 |
+ ;; |
59 |
+ 02) echo Feb |
60 |
+ ;; |
61 |
+ 03) echo Mar |
62 |
+ ;; |
63 |
+ 04) echo Apr |
64 |
+ ;; |
65 |
+ 05) echo May |
66 |
+ ;; |
67 |
+ 06) echo Jun |
68 |
+ ;; |
69 |
+ 07) echo Jul |
70 |
+ ;; |
71 |
+ 08) echo Aug |
72 |
+ ;; |
73 |
+ 09) echo Sep |
74 |
+ ;; |
75 |
+ 10) echo Oct |
76 |
+ ;; |
77 |
+ 11) echo Nov |
78 |
+ ;; |
79 |
+ 12) echo Dec |
80 |
+ ;; |
81 |
+ *) echo unknown |
82 |
+ ;; |
83 |
+ esac |
84 |
+} |
85 |
+ |
86 |
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2} |
87 |
+ |
88 |
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator" |
89 |
+HOMEPAGE="http://lammps.sandia.gov/" |
90 |
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz" |
91 |
+ |
92 |
+LICENSE="GPL-2" |
93 |
+SLOT="stable" |
94 |
+KEYWORDS="~amd64" |
95 |
+IUSE="doc examples gzip lammps-memalign mpi package-dipole package-meam package-rigid" |
96 |
+ |
97 |
+DEPEND="mpi? ( virtual/mpi )" |
98 |
+RDEPEND="${DEPEND}" |
99 |
+ |
100 |
+S="${WORKDIR}/${MY_P}" |
101 |
+ |
102 |
+lmp_emake() { |
103 |
+ local LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')" |
104 |
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')" |
105 |
+ |
106 |
+ # Note: The lammps makefile uses CC to indicate the C++ compiler. |
107 |
+ emake \ |
108 |
+ ARCHIVE=$(tc-getAR) \ |
109 |
+ CC=$(usex mpi "mpic++" "$(tc-getCXX)") \ |
110 |
+ F90=$(usex mpi "mpif90" "$(tc-getFC)") \ |
111 |
+ LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \ |
112 |
+ CCFLAGS="${CXXFLAGS}" \ |
113 |
+ F90FLAGS="${FCFLAGS}" \ |
114 |
+ LINKFLAGS="${LDFLAGS}" \ |
115 |
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \ |
116 |
+ MPI_INC=$(usex mpi '' "-I../STUBS") \ |
117 |
+ MPI_PATH=$(usex mpi '' '-L../STUBS') \ |
118 |
+ MPI_LIB=$(usex mpi '' '-lmpi_stubs') \ |
119 |
+ "$@" |
120 |
+} |
121 |
+ |
122 |
+src_compile() { |
123 |
+ # Compile stubs for serial version. |
124 |
+ use mpi || lmp_emake -C src stubs |
125 |
+ |
126 |
+ # Build optional packages. |
127 |
+ if use package-meam; then |
128 |
+ lmp_emake -C src yes-meam |
129 |
+ lmp_emake -j1 -C lib/meam -f Makefile.gfortran |
130 |
+ fi |
131 |
+ use package-dipole && emake -C src yes-dipole |
132 |
+ use package-rigid && emake -C src yes-rigid |
133 |
+ |
134 |
+ # Compile. |
135 |
+ lmp_emake -C src serial |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ newbin "src/lmp_serial" "lmp" |
140 |
+ |
141 |
+ local LAMMPS_POTENTIALS="/usr/share/${PF}/potentials" |
142 |
+ insinto "${LAMMPS_POTENTIALS}" |
143 |
+ doins potentials/* |
144 |
+ echo "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS}" > 99lammps |
145 |
+ doenvd 99lammps |
146 |
+ |
147 |
+ if use examples; then |
148 |
+ local LAMMPS_EXAMPLES="/usr/share/${PF}/examples" |
149 |
+ insinto "${LAMMPS_EXAMPLES}" |
150 |
+ doins -r examples/* |
151 |
+ fi |
152 |
+ |
153 |
+ dodoc README |
154 |
+ if use doc; then |
155 |
+ dodoc doc/Manual.pdf |
156 |
+ dohtml -r doc/* |
157 |
+ fi |
158 |
+} |
159 |
|
160 |
diff --git a/sci-physics/lammps/metadata.xml b/sci-physics/lammps/metadata.xml |
161 |
new file mode 100644 |
162 |
index 0000000..7a1dc94 |
163 |
--- /dev/null |
164 |
+++ b/sci-physics/lammps/metadata.xml |
165 |
@@ -0,0 +1,31 @@ |
166 |
+<?xml version="1.0" encoding="UTF-8"?> |
167 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
168 |
+<pkgmetadata> |
169 |
+ <longdescription lang="en"> |
170 |
+ LAMMPS is a classical molecular dynamics code, and an acronym for |
171 |
+ Large-scale Atomic/Molecular Massively Parallel Simulator. |
172 |
+ |
173 |
+ LAMMPS has potentials for soft materials (biomolecules, polymers) and |
174 |
+ solid-state materials (metals, semiconductors) and coarse-grained or |
175 |
+ mesoscopic systems. It can be used to model atoms or, more generically, |
176 |
+ as a parallel particle simulator at the atomic, meso, or continuum |
177 |
+ scale. |
178 |
+ |
179 |
+ LAMMPS runs on single processors or in parallel using message-passing |
180 |
+ techniques and a spatial-decomposition of the simulation domain. The |
181 |
+ code is designed to be easy to modify or extend with new functionality. |
182 |
+ </longdescription> |
183 |
+ <use> |
184 |
+ <flag name="lammps-memalign">Enables the use of the posix_memalign() |
185 |
+ call instead of malloc() when large chunks or memory are allocated |
186 |
+ by LAMMPS</flag> |
187 |
+ <flag name="package-meam">modified EAM potential</flag> |
188 |
+ <flag name="package-dipole">point dipole particles</flag> |
189 |
+ <flag name="package-rigid">rigid bodies</flag> |
190 |
+ </use> |
191 |
+ <herd>sci-physics</herd> |
192 |
+ <maintainer> |
193 |
+ <email>nicolasbock@g.o</email> |
194 |
+ </maintainer> |
195 |
+</pkgmetadata> |
196 |
+ |