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-20140226.ebuild ChangeLog
Date: Sat, 01 Mar 2014 13:21:11
Message-Id: 20140301132104.30AFC2004C@flycatcher.gentoo.org
1 nicolasbock 14/03/01 13:21:04
2
3 Modified: ChangeLog
4 Added: lammps-20140226.ebuild
5 Log:
6 sci-physics/lammps-20140226: Version bump.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key AC91CA52)
9
10 Revision Changes Path
11 1.21 sci-physics/lammps/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.21&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?rev=1.21&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/ChangeLog?r1=1.20&r2=1.21
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v
20 retrieving revision 1.20
21 retrieving revision 1.21
22 diff -u -r1.20 -r1.21
23 --- ChangeLog 27 Feb 2014 03:47:31 -0000 1.20
24 +++ ChangeLog 1 Mar 2014 13:21:04 -0000 1.21
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.20 2014/02/27 03:47:31 nicolasbock Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.21 2014/03/01 13:21:04 nicolasbock Exp $
30 +
31 +*lammps-20140226 (01 Mar 2014)
32 +
33 + 01 Mar 2014; Nicolas Bock <nicolasbock@g.o> +lammps-20140226.ebuild:
34 + sci-physics/lammps-20140226: Version bump.
35
36 *lammps-20140214-r2 (27 Feb 2014)
37
38
39
40
41 1.1 sci-physics/lammps/lammps-20140226.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20140226.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-physics/lammps/lammps-20140226.ebuild?rev=1.1&content-type=text/plain
45
46 Index: lammps-20140226.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-20140226.ebuild,v 1.1 2014/03/01 13:21:04 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"
96 IUSE="doc examples gzip lammps-memalign lammps-package-voronoi mpi static-libs"
97
98 DEPEND="
99 mpi? ( virtual/mpi )
100 lammps-package-voronoi? ( 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-dipole
156 emake -C src yes-kspace
157 emake -C src yes-mc
158 lmp_emake -C src yes-meam
159 lmp_emake -j1 -C lib/meam -f Makefile.gfortran
160 emake -C src yes-reax
161 emake -C src yes-replica
162 lmp_emake -j1 -C lib/reax -f Makefile.gfortran
163 emake -C src yes-rigid
164 emake -C src yes-shock
165 emake -C src yes-xtc
166 use lammps-package-voronoi && emake -C src yes-voronoi
167
168 if use static-libs; then
169 # Build static library.
170 lmp_emake -C src makelib
171 lmp_emake -C src -f Makefile.lib serial
172 fi
173
174 # Build shared library.
175 lmp_emake -C src makeshlib
176 lmp_emake -C src -f Makefile.shlib serial
177
178 # Compile main executable.
179 lmp_emake -C src serial
180
181 # Compile tools.
182 emake -C tools binary2txt
183 }
184
185 src_install() {
186 use static-libs && newlib.a src/liblammps_serial.a liblammps.a
187 newlib.so src/liblammps_serial.so liblammps.so.0.0.0
188 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
189 dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
190 newbin src/lmp_serial lmp
191 dobin tools/binary2txt
192 # Don't forget to add header files of optional packages as they are added
193 # to this ebuild. There may also be .mod files from Fortran based
194 # packages.
195 insinto "/usr/include/${PN}"
196 doins -r src/*.h lib/meam/*.mod
197
198 local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
199 insinto "/${LAMMPS_POTENTIALS}"
200 doins potentials/*
201 echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
202 doenvd 99lammps
203
204 if use examples; then
205 local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
206 insinto "${LAMMPS_EXAMPLES}"
207 doins -r examples/*
208 fi
209
210 dodoc README
211 if use doc; then
212 dodoc doc/Manual.pdf
213 dohtml -r doc/*
214 fi
215 }