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-20140320.ebuild ChangeLog
Date: Mon, 31 Mar 2014 12:27:18
Message-Id: 20140331122714.D688E2005C@flycatcher.gentoo.org
1 nicolasbock 14/03/31 12:27:14
2
3 Modified: ChangeLog
4 Added: lammps-20140320.ebuild
5 Log:
6 sci-physics/lammps-20140320: Version bump.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key AC91CA52)
9
10 Revision Changes Path
11 1.30 sci-physics/lammps/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.30&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.30&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?r1=1.29&r2=1.30
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v
20 retrieving revision 1.29
21 retrieving revision 1.30
22 diff -u -r1.29 -r1.30
23 --- ChangeLog 17 Mar 2014 15:29:51 -0000 1.29
24 +++ ChangeLog 31 Mar 2014 12:27:14 -0000 1.30
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.29 2014/03/17 15:29:51 ottxor Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.30 2014/03/31 12:27:14 nicolasbock Exp $
30 +
31 +*lammps-20140320 (31 Mar 2014)
32 +
33 + 31 Mar 2014; Nicolas Bock <nicolasbock@g.o> +lammps-20140320.ebuild:
34 + sci-physics/lammps-20140320: Version bump.
35
36 17 Mar 2014; Christoph Junghans <ottxor@g.o> lammps-20140314.ebuild:
37 added ~x86 (tested by me)
38
39
40
41 1.1 sci-physics/lammps/lammps-20140320.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20140320.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20140320.ebuild?rev=1.1&content-type=text/plain
45
46 Index: lammps-20140320.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-20140320.ebuild,v 1.1 2014/03/31 12:27:14 nicolasbock Exp $
51
52 EAPI=5
53
54 inherit eutils 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? ( virtual/mpi )
100 sci-libs/voro++
101 "
102 RDEPEND="${DEPEND}"
103
104 S="${WORKDIR}/${MY_P}"
105
106 lmp_emake() {
107 local LAMMPS_INCLUDEFLAGS
108 LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
109 LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')"
110
111 # The lammps makefile uses CC to indicate the C++ compiler.
112 emake \
113 ARCHIVE=$(tc-getAR) \
114 CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
115 F90=$(usex mpi "mpif90" "$(tc-getFC)") \
116 LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
117 CCFLAGS="${CXXFLAGS}" \
118 F90FLAGS="${FCFLAGS}" \
119 LINKFLAGS="${LDFLAGS}" \
120 LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
121 MPI_INC=$(usex mpi '' "-I../STUBS") \
122 MPI_PATH=$(usex mpi '' '-L../STUBS') \
123 MPI_LIB=$(usex mpi '' '-lmpi_stubs') \
124 "$@"
125 }
126
127 src_prepare() {
128 # Fix inconsistent use of SHFLAGS.
129 sed -i -e 's:$(CCFLAGS):$(CCFLAGS) -fPIC:' src/STUBS/Makefile || die
130 sed -i -e 's:$(F90FLAGS):$(F90FLAGS) -fPIC:' lib/meam/Makefile.gfortran || die
131 sed -i -e 's:$(F90FLAGS):$(F90FLAGS) -fPIC:' lib/reax/Makefile.gfortran || die
132 sed -i \
133 -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
134 -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
135 src/VORONOI/Makefile.lammps || die
136
137 # Fix missing .so name.
138 sed -i \
139 -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
140 src/MAKE/Makefile.serial || die
141
142 # Fix makefile in tools.
143 sed -i \
144 -e 's:g++:$(CXX) $(CXXFLAGS):' \
145 -e 's:gcc:$(CC) $(CCFLAGS):' \
146 -e 's:ifort:$(FC) $(FCFLAGS):' \
147 tools/Makefile || die
148 }
149
150 src_compile() {
151 # Compile stubs for serial version.
152 use mpi || lmp_emake -C src stubs
153
154 # Build packages
155 emake -C src yes-asphere
156 emake -C src yes-body
157 emake -C src yes-class2
158 emake -C src yes-colloid
159 emake -C src yes-dipole
160 emake -C src yes-fld
161 #emake -C src yes-gpu
162 emake -C src yes-granular
163 # Need OpenKIM external dependency.
164 #emake -C src yes-kim
165 emake -C src yes-kspace
166 emake -C src yes-manybody
167 emake -C src yes-mc
168 lmp_emake -C src yes-meam
169 lmp_emake -j1 -C lib/meam -f Makefile.gfortran
170 emake -C src yes-misc
171 emake -C src yes-molecule
172 #emake -C src yes-mpiio
173 emake -C src yes-opt
174 emake -C src yes-peri
175 #emake -C src yes-poems
176 #lmp_emake -j1 -C lib/poems -f Makefile.g++
177 emake -C src yes-reax
178 lmp_emake -j1 -C lib/reax -f Makefile.gfortran
179 emake -C src yes-replica
180 emake -C src yes-rigid
181 emake -C src yes-shock
182 emake -C src yes-srd
183 emake -C src yes-voronoi
184 emake -C src yes-xtc
185
186 if use static-libs; then
187 # Build static library.
188 lmp_emake -C src makelib
189 lmp_emake -C src -f Makefile.lib serial
190 fi
191
192 # Build shared library.
193 lmp_emake -C src makeshlib
194 lmp_emake -C src -f Makefile.shlib serial
195
196 # Compile main executable.
197 lmp_emake -C src serial
198
199 # Compile tools.
200 emake -C tools binary2txt chain micelle2d data2xmovie
201 }
202
203 src_install() {
204 use static-libs && newlib.a src/liblammps_serial.a liblammps.a
205 newlib.so src/liblammps_serial.so liblammps.so.0.0.0
206 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
207 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
208 newbin src/lmp_serial lmp
209 dobin tools/binary2txt
210 # Don't forget to add header files of optional packages as they are added
211 # to this ebuild. There may also be .mod files from Fortran based
212 # packages.
213 insinto "/usr/include/${PN}"
214 doins -r src/*.h lib/meam/*.mod
215
216 local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
217 insinto "/${LAMMPS_POTENTIALS}"
218 doins potentials/*
219 echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
220 doenvd 99lammps
221
222 if use examples; then
223 local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
224 insinto "${LAMMPS_EXAMPLES}"
225 doins -r examples/*
226 fi
227
228 dodoc README
229 if use doc; then
230 dodoc doc/Manual.pdf
231 dohtml -r doc/*
232 fi
233 }