Gentoo Archives: gentoo-commits

From: "Nicolas Bock (nicolasbock)" <nicolasbock@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-physics/lammps: lammps-20150224.ebuild ChangeLog
Date: Thu, 26 Feb 2015 22:20:18
Message-Id: 20150226222013.340AD129F0@oystercatcher.gentoo.org
1 nicolasbock 15/02/26 22:20:13
2
3 Modified: ChangeLog
4 Added: lammps-20150224.ebuild
5 Log:
6 sci-physics/lammps: Adding new version.
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key AC91CA52)
9
10 Revision Changes Path
11 1.75 sci-physics/lammps/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.75&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.75&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?r1=1.74&r2=1.75
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v
20 retrieving revision 1.74
21 retrieving revision 1.75
22 diff -u -r1.74 -r1.75
23 --- ChangeLog 25 Feb 2015 15:31:22 -0000 1.74
24 +++ ChangeLog 26 Feb 2015 22:20:13 -0000 1.75
25 @@ -1,6 +1,11 @@
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.74 2015/02/25 15:31:22 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.75 2015/02/26 22:20:13 nicolasbock Exp $
30 +
31 +*lammps-20150224 (26 Feb 2015)
32 +
33 + 26 Feb 2015; Nicolas Bock <nicolasbock@g.o> +lammps-20150224.ebuild:
34 + sci-physics/lammps: Adding new version.
35
36 25 Feb 2015; Agostino Sarubbo <ago@g.o> lammps-20141030.ebuild:
37 Stable for x86, wrt bug #534042
38
39
40
41 1.1 sci-physics/lammps/lammps-20150224.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20150224.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20150224.ebuild?rev=1.1&content-type=text/plain
45
46 Index: lammps-20150224.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20150224.ebuild,v 1.1 2015/02/26 22:20:13 nicolasbock Exp $
51
52 EAPI=5
53
54 inherit eutils flag-o-matic fortran-2 multilib
55
56 convert_month() {
57 case $1 in
58 01) echo Jan
59 ;;
60 02) echo Feb
61 ;;
62 03) echo Mar
63 ;;
64 04) echo Apr
65 ;;
66 05) echo May
67 ;;
68 06) echo Jun
69 ;;
70 07) echo Jul
71 ;;
72 08) echo Aug
73 ;;
74 09) echo Sep
75 ;;
76 10) echo Oct
77 ;;
78 11) echo Nov
79 ;;
80 12) echo Dec
81 ;;
82 *) echo unknown
83 ;;
84 esac
85 }
86
87 MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
88
89 DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
90 HOMEPAGE="http://lammps.sandia.gov/"
91 SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
92
93 LICENSE="GPL-2"
94 SLOT="0"
95 KEYWORDS="~amd64 ~x86"
96 IUSE="doc examples gzip lammps-memalign mpi static-libs"
97
98 DEPEND="
99 mpi? (
100 virtual/blas
101 virtual/lapack
102 virtual/mpi
103 )
104 sci-libs/voro++
105 "
106 RDEPEND="${DEPEND}"
107
108 S="${WORKDIR}/${MY_P}"
109
110 lmp_emake() {
111 local LAMMPS_INCLUDEFLAGS
112 LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
113 LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')"
114
115 # The lammps makefile uses CC to indicate the C++ compiler.
116 emake \
117 ARCHIVE=$(tc-getAR) \
118 CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
119 F90=$(usex mpi "mpif90" "$(tc-getFC)") \
120 LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
121 CCFLAGS="${CXXFLAGS}" \
122 F90FLAGS="${FCFLAGS}" \
123 LINKFLAGS="${LDFLAGS}" \
124 LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
125 MPI_INC=$(usex mpi '' "-I../STUBS") \
126 MPI_PATH=$(usex mpi '' '-L../STUBS') \
127 MPI_LIB=$(usex mpi '' '-lmpi_stubs') \
128 user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
129 "$@"
130 }
131
132 src_prepare() {
133 # Fix inconsistent use of SHFLAGS.
134 sed -i \
135 -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
136 -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
137 lib/voronoi/Makefile.lammps || die
138
139 # Fix missing .so name.
140 sed -i \
141 -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
142 src/MAKE/Makefile.serial || die
143
144 # Fix makefile in tools.
145 sed -i \
146 -e 's:g++:$(CXX) $(CXXFLAGS):' \
147 -e 's:gcc:$(CC) $(CCFLAGS):' \
148 -e 's:ifort:$(FC) $(FCFLAGS):' \
149 tools/Makefile || die
150 }
151
152 src_compile() {
153 # Prepare compiler flags.
154 append-cxxflags -fPIC -I../../src
155 append-fflags -fPIC
156
157 # Compile stubs for serial version.
158 use mpi || lmp_emake -C src stubs
159
160 # Build packages
161 emake -C src yes-asphere
162 emake -C src yes-body
163 emake -C src yes-class2
164 emake -C src yes-colloid
165 emake -C src yes-dipole
166 emake -C src yes-fld
167 #emake -C src yes-gpu
168 emake -C src yes-granular
169 # Need OpenKIM external dependency.
170 #emake -C src yes-kim
171 # Need Kokkos external dependency.
172 #emake -C src yes-kokkos
173 emake -C src yes-kspace
174 emake -C src yes-manybody
175 emake -C src yes-mc
176 lmp_emake -C src yes-meam
177 lmp_emake -j1 -C lib/meam -f Makefile.gfortran
178 emake -C src yes-misc
179 emake -C src yes-molecule
180 #emake -C src yes-mpiio
181 emake -C src yes-opt
182 emake -C src yes-peri
183 emake -C src yes-poems
184 lmp_emake -C lib/poems -f Makefile.g++
185 emake -C src yes-reax
186 lmp_emake -j1 -C lib/reax -f Makefile.gfortran
187 emake -C src yes-replica
188 emake -C src yes-rigid
189 emake -C src yes-shock
190 emake -C src yes-snap
191 emake -C src yes-srd
192 emake -C src yes-voronoi
193 emake -C src yes-xtc
194
195 emake -C src yes-user-eff
196 emake -C src yes-user-fep
197 use mpi && emake -C src yes-user-lb
198 emake -C src yes-user-phonon
199 emake -C src yes-user-sph
200
201 if use mpi; then
202 emake -C src yes-user-atc
203 lmp_emake -C lib/atc -f Makefile.g++
204 fi
205
206 if use static-libs; then
207 # Build static library.
208 lmp_emake -C src makelib
209 lmp_emake -C src -f Makefile.lib serial
210 fi
211
212 # Build shared library.
213 lmp_emake -C src makeshlib
214 lmp_emake -C src -f Makefile.shlib serial
215
216 # Compile main executable.
217 lmp_emake -C src serial
218
219 # Compile tools.
220 emake -C tools binary2txt chain micelle2d data2xmovie
221 }
222
223 src_install() {
224 use static-libs && newlib.a src/liblammps_serial.a liblammps.a
225 newlib.so src/liblammps_serial.so liblammps.so.0.0.0
226 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
227 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
228 newbin src/lmp_serial lmp
229 dobin tools/binary2txt
230 # Don't forget to add header files of optional packages as they are added
231 # to this ebuild. There may also be .mod files from Fortran based
232 # packages.
233 insinto "/usr/include/${PN}"
234 doins -r src/*.h lib/meam/*.mod
235
236 local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
237 insinto "/${LAMMPS_POTENTIALS}"
238 doins potentials/*
239 echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
240 doenvd 99lammps
241
242 if use examples; then
243 local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
244 insinto "${LAMMPS_EXAMPLES}"
245 doins -r examples/*
246 fi
247
248 dodoc README
249 if use doc; then
250 dodoc doc/Manual.pdf
251 dohtml -r doc/*
252 fi
253 }