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-20140925.ebuild ChangeLog
Date: Tue, 30 Sep 2014 02:47:31
Message-Id: 20140930024726.17D9FA1D@oystercatcher.gentoo.org
1 nicolasbock 14/09/30 02:47:26
2
3 Modified: ChangeLog
4 Added: lammps-20140925.ebuild
5 Log:
6 sci-physics/lammps: Adding new version 20140925
7
8 (Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key AC91CA52)
9
10 Revision Changes Path
11 1.40 sci-physics/lammps/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.40&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.40&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?r1=1.39&r2=1.40
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v
20 retrieving revision 1.39
21 retrieving revision 1.40
22 diff -u -r1.39 -r1.40
23 --- ChangeLog 30 Aug 2014 16:47:10 -0000 1.39
24 +++ ChangeLog 30 Sep 2014 02:47:26 -0000 1.40
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-physics/lammps
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.39 2014/08/30 16:47:10 nimiux Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.40 2014/09/30 02:47:26 nicolasbock Exp $
30 +
31 +*lammps-20140925 (30 Sep 2014)
32 +
33 + 30 Sep 2014; Nicolas Bock <nicolasbock@g.o> +lammps-20140925.ebuild:
34 + sci-physics/lammps: Adding new version 20140925
35
36 30 Aug 2014; Chema Alonso <nimiux@g.o> lammps-20140628.ebuild:
37 Stable for amd64 wrt bug #519320
38
39
40
41 1.1 sci-physics/lammps/lammps-20140925.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20140925.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20140925.ebuild?rev=1.1&content-type=text/plain
45
46 Index: lammps-20140925.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20140925.ebuild,v 1.1 2014/09/30 02:47:26 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 src/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-srd
191 emake -C src yes-voronoi
192 emake -C src yes-xtc
193
194 if use mpi; then
195 emake -C src yes-user-atc
196 lmp_emake -C lib/atc -f Makefile.g++
197 fi
198
199 if use static-libs; then
200 # Build static library.
201 lmp_emake -C src makelib
202 lmp_emake -C src -f Makefile.lib serial
203 fi
204
205 # Build shared library.
206 lmp_emake -C src makeshlib
207 lmp_emake -C src -f Makefile.shlib serial
208
209 # Compile main executable.
210 lmp_emake -C src serial
211
212 # Compile tools.
213 emake -C tools binary2txt chain micelle2d data2xmovie
214 }
215
216 src_install() {
217 use static-libs && newlib.a src/liblammps_serial.a liblammps.a
218 newlib.so src/liblammps_serial.so liblammps.so.0.0.0
219 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
220 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
221 newbin src/lmp_serial lmp
222 dobin tools/binary2txt
223 # Don't forget to add header files of optional packages as they are added
224 # to this ebuild. There may also be .mod files from Fortran based
225 # packages.
226 insinto "/usr/include/${PN}"
227 doins -r src/*.h lib/meam/*.mod
228
229 local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
230 insinto "/${LAMMPS_POTENTIALS}"
231 doins potentials/*
232 echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
233 doenvd 99lammps
234
235 if use examples; then
236 local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
237 insinto "${LAMMPS_EXAMPLES}"
238 doins -r examples/*
239 fi
240
241 dodoc README
242 if use doc; then
243 dodoc doc/Manual.pdf
244 dohtml -r doc/*
245 fi
246 }