1 |
nicolasbock 15/07/24 12:22:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: lammps-20150722.ebuild lammps-20150721.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key AC91CA52) |
9 |
|
10 |
Revision Changes Path |
11 |
1.107 sci-physics/lammps/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.107&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.107&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?r1=1.106&r2=1.107 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v |
20 |
retrieving revision 1.106 |
21 |
retrieving revision 1.107 |
22 |
diff -u -r1.106 -r1.107 |
23 |
--- ChangeLog 18 Jul 2015 21:59:49 -0000 1.106 |
24 |
+++ ChangeLog 24 Jul 2015 12:22:22 -0000 1.107 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for sci-physics/lammps |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.106 2015/07/18 21:59:49 nicolasbock Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.107 2015/07/24 12:22:22 nicolasbock Exp $ |
30 |
+ |
31 |
+*lammps-20150721 (24 Jul 2015) |
32 |
+*lammps-20150722 (24 Jul 2015) |
33 |
+ |
34 |
+ 24 Jul 2015; Nicolas Bock <nicolasbock@g.o> +lammps-20150721.ebuild, |
35 |
+ +lammps-20150722.ebuild: |
36 |
+ Version bump. |
37 |
|
38 |
*lammps-20150718 (18 Jul 2015) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sci-physics/lammps/lammps-20150722.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20150722.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20150722.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: lammps-20150722.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2015 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20150722.ebuild,v 1.1 2015/07/24 12:22:22 nicolasbock Exp $ |
53 |
|
54 |
EAPI=5 |
55 |
|
56 |
PYTHON_COMPAT=( python{2_7,3_3} ) |
57 |
|
58 |
inherit eutils flag-o-matic fortran-2 multilib python-r1 |
59 |
|
60 |
convert_month() { |
61 |
case $1 in |
62 |
01) echo Jan |
63 |
;; |
64 |
02) echo Feb |
65 |
;; |
66 |
03) echo Mar |
67 |
;; |
68 |
04) echo Apr |
69 |
;; |
70 |
05) echo May |
71 |
;; |
72 |
06) echo Jun |
73 |
;; |
74 |
07) echo Jul |
75 |
;; |
76 |
08) echo Aug |
77 |
;; |
78 |
09) echo Sep |
79 |
;; |
80 |
10) echo Oct |
81 |
;; |
82 |
11) echo Nov |
83 |
;; |
84 |
12) echo Dec |
85 |
;; |
86 |
*) echo unknown |
87 |
;; |
88 |
esac |
89 |
} |
90 |
|
91 |
MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2} |
92 |
|
93 |
DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator" |
94 |
HOMEPAGE="http://lammps.sandia.gov/" |
95 |
SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz" |
96 |
|
97 |
LICENSE="GPL-2" |
98 |
SLOT="0" |
99 |
KEYWORDS="~amd64 ~x86" |
100 |
IUSE="doc examples gzip lammps-memalign mpi python static-libs" |
101 |
|
102 |
DEPEND=" |
103 |
mpi? ( |
104 |
virtual/blas |
105 |
virtual/lapack |
106 |
virtual/mpi |
107 |
) |
108 |
gzip? ( app-arch/gzip ) |
109 |
sci-libs/voro++ |
110 |
python? ( ${PYTHON_DEPS} ) |
111 |
" |
112 |
RDEPEND="${DEPEND}" |
113 |
|
114 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
115 |
|
116 |
S="${WORKDIR}/${MY_P}" |
117 |
|
118 |
lmp_emake() { |
119 |
local LAMMPS_INCLUDEFLAGS |
120 |
LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')" |
121 |
LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')" |
122 |
|
123 |
# The lammps makefile uses CC to indicate the C++ compiler. |
124 |
emake \ |
125 |
ARCHIVE=$(tc-getAR) \ |
126 |
CC=$(usex mpi "mpic++" "$(tc-getCXX)") \ |
127 |
F90=$(usex mpi "mpif90" "$(tc-getFC)") \ |
128 |
LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \ |
129 |
CCFLAGS="${CXXFLAGS}" \ |
130 |
F90FLAGS="${FCFLAGS}" \ |
131 |
LINKFLAGS="${LDFLAGS}" \ |
132 |
LMP_INC="${LAMMPS_INCLUDEFLAGS}" \ |
133 |
MPI_INC=$(usex mpi "" "-I../STUBS") \ |
134 |
MPI_PATH=$(usex mpi "" "-L../STUBS") \ |
135 |
MPI_LIB=$(usex mpi "" "-lmpi_stubs") \ |
136 |
user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\ |
137 |
"$@" |
138 |
} |
139 |
|
140 |
lmp_activate_packages() { |
141 |
# Build packages |
142 |
lmp_emake -C src yes-asphere |
143 |
lmp_emake -C src yes-body |
144 |
lmp_emake -C src yes-class2 |
145 |
lmp_emake -C src yes-colloid |
146 |
lmp_emake -C src yes-coreshell |
147 |
lmp_emake -C src yes-dipole |
148 |
lmp_emake -C src yes-fld |
149 |
#lmp_emake -C src yes-gpu |
150 |
lmp_emake -C src yes-granular |
151 |
# Need OpenKIM external dependency. |
152 |
#lmp_emake -C src yes-kim |
153 |
# Need Kokkos external dependency. |
154 |
#lmp_emake -C src yes-kokkos |
155 |
lmp_emake -C src yes-kspace |
156 |
lmp_emake -C src yes-manybody |
157 |
lmp_emake -C src yes-mc |
158 |
lmp_emake -C src yes-meam |
159 |
lmp_emake -C src yes-misc |
160 |
lmp_emake -C src yes-molecule |
161 |
#lmp_emake -C src yes-mpiio |
162 |
lmp_emake -C src yes-opt |
163 |
lmp_emake -C src yes-peri |
164 |
lmp_emake -C src yes-poems |
165 |
lmp_emake -C src yes-qeq |
166 |
lmp_emake -C src yes-reax |
167 |
lmp_emake -C src yes-replica |
168 |
lmp_emake -C src yes-rigid |
169 |
lmp_emake -C src yes-shock |
170 |
lmp_emake -C src yes-snap |
171 |
lmp_emake -C src yes-srd |
172 |
lmp_emake -C src yes-voronoi |
173 |
lmp_emake -C src yes-xtc |
174 |
|
175 |
if use mpi; then |
176 |
lmp_emake -C src yes-user-atc |
177 |
fi |
178 |
lmp_emake -C src yes-user-eff |
179 |
lmp_emake -C src yes-user-fep |
180 |
use mpi && lmp_emake -C src yes-user-lb |
181 |
lmp_emake -C src yes-user-phonon |
182 |
lmp_emake -C src yes-user-sph |
183 |
} |
184 |
|
185 |
lmp_build_packages() { |
186 |
lmp_emake -C lib/meam -j1 -f Makefile.gfortran |
187 |
lmp_emake -C lib/poems -f Makefile.g++ |
188 |
lmp_emake -C lib/reax -j1 -f Makefile.gfortran |
189 |
use mpi && lmp_emake -C lib/atc -f Makefile.g++ |
190 |
} |
191 |
|
192 |
lmp_clean_packages() { |
193 |
lmp_emake -C lib/meam -f Makefile.gfortran clean |
194 |
lmp_emake -C lib/poems -f Makefile.g++ clean |
195 |
lmp_emake -C lib/reax -f Makefile.gfortran clean |
196 |
use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean |
197 |
} |
198 |
|
199 |
src_prepare() { |
200 |
# Fix inconsistent use of SHFLAGS. |
201 |
sed -i \ |
202 |
-e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \ |
203 |
-e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \ |
204 |
lib/voronoi/Makefile.lammps || die |
205 |
|
206 |
# Fix missing .so name. |
207 |
sed -i \ |
208 |
-e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \ |
209 |
src/MAKE/Makefile.serial || die |
210 |
|
211 |
# Fix makefile in tools. |
212 |
sed -i \ |
213 |
-e 's:g++:$(CXX) $(CXXFLAGS):' \ |
214 |
-e 's:gcc:$(CC) $(CCFLAGS):' \ |
215 |
-e 's:ifort:$(FC) $(FCFLAGS):' \ |
216 |
tools/Makefile || die |
217 |
|
218 |
# Patch python. |
219 |
epatch "${FILESDIR}/lammps-python3.patch" |
220 |
epatch "${FILESDIR}/python-shebang.patch" |
221 |
} |
222 |
|
223 |
src_compile() { |
224 |
# Fix atc... |
225 |
append-cxxflags -I../../src |
226 |
|
227 |
# Acticate packages. |
228 |
elog "Activating lammps packages..." |
229 |
lmp_activate_packages |
230 |
|
231 |
# Compile stubs for serial version. |
232 |
use mpi || lmp_emake -C src mpi-stubs |
233 |
|
234 |
elog "Building packages..." |
235 |
lmp_build_packages |
236 |
|
237 |
if use static-libs; then |
238 |
# Build static library. |
239 |
elog "Building static library..." |
240 |
lmp_emake -C src mode=lib serial |
241 |
fi |
242 |
|
243 |
# Clean out packages (that's not done by the build system with the clean |
244 |
# target), so we can rebuild the packages with -fPIC. |
245 |
elog "Cleaning packages..." |
246 |
lmp_clean_packages |
247 |
|
248 |
# The build system does not rebuild the packages with -fPIC, adding flag |
249 |
# manually. |
250 |
append-cxxflags -fPIC |
251 |
append-fflags -fPIC |
252 |
|
253 |
# Compile stubs for serial version. |
254 |
use mpi || lmp_emake -C src mpi-stubs |
255 |
|
256 |
elog "Building packages..." |
257 |
lmp_build_packages |
258 |
|
259 |
# Build shared library. |
260 |
elog "Building shared library..." |
261 |
lmp_emake -C src mode=shlib serial |
262 |
|
263 |
# Compile main executable. The shared library is always built, and |
264 |
# mode=shexe is simply a way to re-use the object files built in the |
265 |
# "shlib" step when linking the executable. The executable is not actually |
266 |
# using the shared library. If we have built the static library, then we |
267 |
# link that into the executable. |
268 |
elog "Linking executable..." |
269 |
if use static-libs; then |
270 |
lmp_emake -C src mode=exe serial |
271 |
else |
272 |
lmp_emake -C src mode=shexe serial |
273 |
fi |
274 |
|
275 |
# Compile tools. |
276 |
elog "Building tools..." |
277 |
lmp_emake -C tools binary2txt chain data2xmovie micelle2d |
278 |
} |
279 |
|
280 |
src_install() { |
281 |
use static-libs && newlib.a src/liblammps_serial.a liblammps.a |
282 |
newlib.so src/liblammps_serial.so liblammps.so.0.0.0 |
283 |
dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so |
284 |
dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0 |
285 |
newbin src/lmp_serial lmp |
286 |
dobin tools/binary2txt |
287 |
dobin tools/chain |
288 |
dobin tools/data2xmovie |
289 |
dobin tools/micelle2d |
290 |
# Don't forget to add header files of optional packages as they are added |
291 |
# to this ebuild. There may also be .mod files from Fortran based |
292 |
# packages. |
293 |
insinto "/usr/include/${PN}" |
294 |
doins -r src/*.h lib/meam/*.mod |
295 |
|
296 |
local LAMMPS_POTENTIALS="usr/share/${PN}/potentials" |
297 |
insinto "/${LAMMPS_POTENTIALS}" |
298 |
doins potentials/* |
299 |
echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps |
300 |
doenvd 99lammps |
301 |
|
302 |
# Install python script. |
303 |
use python && python_foreach_impl python_domodule python/lammps.py |
304 |
|
305 |
if use examples; then |
306 |
local LAMMPS_EXAMPLES="/usr/share/${PN}/examples" |
307 |
insinto "${LAMMPS_EXAMPLES}" |
308 |
doins -r examples/* |
309 |
fi |
310 |
|
311 |
dodoc README |
312 |
if use doc; then |
313 |
dodoc doc/Manual.pdf |
314 |
dohtml -r doc/* |
315 |
fi |
316 |
} |
317 |
|
318 |
|
319 |
|
320 |
1.1 sci-physics/lammps/lammps-20150721.ebuild |
321 |
|
322 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20150721.ebuild?rev=1.1&view=markup |
323 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20150721.ebuild?rev=1.1&content-type=text/plain |
324 |
|
325 |
Index: lammps-20150721.ebuild |
326 |
=================================================================== |
327 |
# Copyright 1999-2015 Gentoo Foundation |
328 |
# Distributed under the terms of the GNU General Public License v2 |
329 |
# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20150721.ebuild,v 1.1 2015/07/24 12:22:22 nicolasbock Exp $ |
330 |
|
331 |
EAPI=5 |
332 |
|
333 |
PYTHON_COMPAT=( python{2_7,3_3} ) |
334 |
|
335 |
inherit eutils flag-o-matic fortran-2 multilib python-r1 |
336 |
|
337 |
convert_month() { |
338 |
case $1 in |
339 |
01) echo Jan |
340 |
;; |
341 |
02) echo Feb |
342 |
;; |
343 |
03) echo Mar |
344 |
;; |
345 |
04) echo Apr |
346 |
;; |
347 |
05) echo May |
348 |
;; |
349 |
06) echo Jun |
350 |
;; |
351 |
07) echo Jul |
352 |
;; |
353 |
08) echo Aug |
354 |
;; |
355 |
09) echo Sep |
356 |
;; |
357 |
10) echo Oct |
358 |
;; |
359 |
11) echo Nov |
360 |
;; |
361 |
12) echo Dec |
362 |
;; |
363 |
*) echo unknown |
364 |
;; |
365 |
esac |
366 |
} |
367 |
|
368 |
MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2} |
369 |
|
370 |
DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator" |
371 |
HOMEPAGE="http://lammps.sandia.gov/" |
372 |
SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz" |
373 |
|
374 |
LICENSE="GPL-2" |
375 |
SLOT="0" |
376 |
KEYWORDS="~amd64 ~x86" |
377 |
IUSE="doc examples gzip lammps-memalign mpi python static-libs" |
378 |
|
379 |
DEPEND=" |
380 |
mpi? ( |
381 |
virtual/blas |
382 |
virtual/lapack |
383 |
virtual/mpi |
384 |
) |
385 |
gzip? ( app-arch/gzip ) |
386 |
sci-libs/voro++ |
387 |
python? ( ${PYTHON_DEPS} ) |
388 |
" |
389 |
RDEPEND="${DEPEND}" |
390 |
|
391 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
392 |
|
393 |
S="${WORKDIR}/${MY_P}" |
394 |
|
395 |
lmp_emake() { |
396 |
local LAMMPS_INCLUDEFLAGS |
397 |
LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')" |
398 |
LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')" |
399 |
|
400 |
# The lammps makefile uses CC to indicate the C++ compiler. |
401 |
emake \ |
402 |
ARCHIVE=$(tc-getAR) \ |
403 |
CC=$(usex mpi "mpic++" "$(tc-getCXX)") \ |
404 |
F90=$(usex mpi "mpif90" "$(tc-getFC)") \ |
405 |
LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \ |
406 |
CCFLAGS="${CXXFLAGS}" \ |
407 |
F90FLAGS="${FCFLAGS}" \ |
408 |
LINKFLAGS="${LDFLAGS}" \ |
409 |
LMP_INC="${LAMMPS_INCLUDEFLAGS}" \ |
410 |
MPI_INC=$(usex mpi "" "-I../STUBS") \ |
411 |
MPI_PATH=$(usex mpi "" "-L../STUBS") \ |
412 |
MPI_LIB=$(usex mpi "" "-lmpi_stubs") \ |
413 |
user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\ |
414 |
"$@" |
415 |
} |
416 |
|
417 |
lmp_activate_packages() { |
418 |
# Build packages |
419 |
lmp_emake -C src yes-asphere |
420 |
lmp_emake -C src yes-body |
421 |
lmp_emake -C src yes-class2 |
422 |
lmp_emake -C src yes-colloid |
423 |
lmp_emake -C src yes-coreshell |
424 |
lmp_emake -C src yes-dipole |
425 |
lmp_emake -C src yes-fld |
426 |
#lmp_emake -C src yes-gpu |
427 |
lmp_emake -C src yes-granular |
428 |
# Need OpenKIM external dependency. |
429 |
#lmp_emake -C src yes-kim |
430 |
# Need Kokkos external dependency. |
431 |
#lmp_emake -C src yes-kokkos |
432 |
lmp_emake -C src yes-kspace |
433 |
lmp_emake -C src yes-manybody |
434 |
lmp_emake -C src yes-mc |
435 |
lmp_emake -C src yes-meam |
436 |
lmp_emake -C src yes-misc |
437 |
lmp_emake -C src yes-molecule |
438 |
#lmp_emake -C src yes-mpiio |
439 |
lmp_emake -C src yes-opt |
440 |
lmp_emake -C src yes-peri |
441 |
lmp_emake -C src yes-poems |
442 |
lmp_emake -C src yes-qeq |
443 |
lmp_emake -C src yes-reax |
444 |
lmp_emake -C src yes-replica |
445 |
lmp_emake -C src yes-rigid |
446 |
lmp_emake -C src yes-shock |
447 |
lmp_emake -C src yes-snap |
448 |
lmp_emake -C src yes-srd |
449 |
lmp_emake -C src yes-voronoi |
450 |
lmp_emake -C src yes-xtc |
451 |
|
452 |
if use mpi; then |
453 |
lmp_emake -C src yes-user-atc |
454 |
fi |
455 |
lmp_emake -C src yes-user-eff |
456 |
lmp_emake -C src yes-user-fep |
457 |
use mpi && lmp_emake -C src yes-user-lb |
458 |
lmp_emake -C src yes-user-phonon |
459 |
lmp_emake -C src yes-user-sph |
460 |
} |
461 |
|
462 |
lmp_build_packages() { |
463 |
lmp_emake -C lib/meam -j1 -f Makefile.gfortran |
464 |
lmp_emake -C lib/poems -f Makefile.g++ |
465 |
lmp_emake -C lib/reax -j1 -f Makefile.gfortran |
466 |
use mpi && lmp_emake -C lib/atc -f Makefile.g++ |
467 |
} |
468 |
|
469 |
lmp_clean_packages() { |
470 |
lmp_emake -C lib/meam -f Makefile.gfortran clean |
471 |
lmp_emake -C lib/poems -f Makefile.g++ clean |
472 |
lmp_emake -C lib/reax -f Makefile.gfortran clean |
473 |
use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean |
474 |
} |
475 |
|
476 |
src_prepare() { |
477 |
# Fix inconsistent use of SHFLAGS. |
478 |
sed -i \ |
479 |
-e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \ |
480 |
-e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \ |
481 |
lib/voronoi/Makefile.lammps || die |
482 |
|
483 |
# Fix missing .so name. |
484 |
sed -i \ |
485 |
-e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \ |
486 |
src/MAKE/Makefile.serial || die |
487 |
|
488 |
# Fix makefile in tools. |
489 |
sed -i \ |
490 |
-e 's:g++:$(CXX) $(CXXFLAGS):' \ |
491 |
-e 's:gcc:$(CC) $(CCFLAGS):' \ |
492 |
-e 's:ifort:$(FC) $(FCFLAGS):' \ |
493 |
tools/Makefile || die |
494 |
|
495 |
# Patch python. |
496 |
epatch "${FILESDIR}/lammps-python3.patch" |
497 |
epatch "${FILESDIR}/python-shebang.patch" |
498 |
} |
499 |
|
500 |
src_compile() { |
501 |
# Fix atc... |
502 |
append-cxxflags -I../../src |
503 |
|
504 |
# Acticate packages. |
505 |
elog "Activating lammps packages..." |
506 |
lmp_activate_packages |
507 |
|
508 |
# Compile stubs for serial version. |
509 |
use mpi || lmp_emake -C src mpi-stubs |
510 |
|
511 |
elog "Building packages..." |
512 |
lmp_build_packages |
513 |
|
514 |
if use static-libs; then |
515 |
# Build static library. |
516 |
elog "Building static library..." |
517 |
lmp_emake -C src mode=lib serial |
518 |
fi |
519 |
|
520 |
# Clean out packages (that's not done by the build system with the clean |
521 |
# target), so we can rebuild the packages with -fPIC. |
522 |
elog "Cleaning packages..." |
523 |
lmp_clean_packages |
524 |
|
525 |
# The build system does not rebuild the packages with -fPIC, adding flag |
526 |
# manually. |
527 |
append-cxxflags -fPIC |
528 |
append-fflags -fPIC |
529 |
|
530 |
# Compile stubs for serial version. |
531 |
use mpi || lmp_emake -C src mpi-stubs |
532 |
|
533 |
elog "Building packages..." |
534 |
lmp_build_packages |
535 |
|
536 |
# Build shared library. |
537 |
elog "Building shared library..." |
538 |
lmp_emake -C src mode=shlib serial |
539 |
|
540 |
# Compile main executable. The shared library is always built, and |
541 |
# mode=shexe is simply a way to re-use the object files built in the |
542 |
# "shlib" step when linking the executable. The executable is not actually |
543 |
# using the shared library. If we have built the static library, then we |
544 |
# link that into the executable. |
545 |
elog "Linking executable..." |
546 |
if use static-libs; then |
547 |
lmp_emake -C src mode=exe serial |
548 |
else |
549 |
lmp_emake -C src mode=shexe serial |
550 |
fi |
551 |
|
552 |
# Compile tools. |
553 |
elog "Building tools..." |
554 |
lmp_emake -C tools binary2txt chain data2xmovie micelle2d |
555 |
} |
556 |
|
557 |
src_install() { |
558 |
use static-libs && newlib.a src/liblammps_serial.a liblammps.a |
559 |
newlib.so src/liblammps_serial.so liblammps.so.0.0.0 |
560 |
dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so |
561 |
dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0 |
562 |
newbin src/lmp_serial lmp |
563 |
dobin tools/binary2txt |
564 |
dobin tools/chain |
565 |
dobin tools/data2xmovie |
566 |
dobin tools/micelle2d |
567 |
# Don't forget to add header files of optional packages as they are added |
568 |
# to this ebuild. There may also be .mod files from Fortran based |
569 |
# packages. |
570 |
insinto "/usr/include/${PN}" |
571 |
doins -r src/*.h lib/meam/*.mod |
572 |
|
573 |
local LAMMPS_POTENTIALS="usr/share/${PN}/potentials" |
574 |
insinto "/${LAMMPS_POTENTIALS}" |
575 |
doins potentials/* |
576 |
echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps |
577 |
doenvd 99lammps |
578 |
|
579 |
# Install python script. |
580 |
use python && python_foreach_impl python_domodule python/lammps.py |
581 |
|
582 |
if use examples; then |
583 |
local LAMMPS_EXAMPLES="/usr/share/${PN}/examples" |
584 |
insinto "${LAMMPS_EXAMPLES}" |
585 |
doins -r examples/* |
586 |
fi |
587 |
|
588 |
dodoc README |
589 |
if use doc; then |
590 |
dodoc doc/Manual.pdf |
591 |
dohtml -r doc/* |
592 |
fi |
593 |
} |