Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/cns: cns-1.2.ebuild cns-1.2.1-r2.ebuild cns-1.1.ebuild ChangeLog cns-1.2-r1.ebuild cns-1.2.1.ebuild metadata.xml
Date: Sat, 06 Feb 2010 21:49:45
Message-Id: E1NdsX7-0002qB-9w@stork.gentoo.org
1 jlec 10/02/06 21:49:41
2
3 Modified: cns-1.2.ebuild cns-1.1.ebuild ChangeLog
4 cns-1.2-r1.ebuild cns-1.2.1.ebuild metadata.xml
5 Added: cns-1.2.1-r2.ebuild
6 Log:
7 Added aria support per 220905
8 (Portage version: 2.2_rc62/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.3 sci-chemistry/cns/cns-1.2.ebuild
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild?rev=1.3&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild?rev=1.3&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild?r1=1.2&r2=1.3
16
17 Index: cns-1.2.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild,v
20 retrieving revision 1.2
21 retrieving revision 1.3
22 diff -u -r1.2 -r1.3
23 --- cns-1.2.ebuild 3 Jun 2008 02:09:01 -0000 1.2
24 +++ cns-1.2.ebuild 6 Feb 2010 21:49:39 -0000 1.3
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2008 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild,v 1.2 2008/06/03 02:09:01 mr_bones_ Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild,v 1.3 2010/02/06 21:49:39 jlec Exp $
30
31 inherit eutils fortran toolchain-funcs
32
33 @@ -25,7 +25,7 @@
34 pkg_nofetch() {
35 einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/"
36 einfo "and place these files:"
37 - einfo "${A}"
38 + einfo ${A}
39 einfo "in ${DISTDIR}."
40 }
41
42
43
44
45 1.6 sci-chemistry/cns/cns-1.1.ebuild
46
47 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild?rev=1.6&view=markup
48 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild?rev=1.6&content-type=text/plain
49 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild?r1=1.5&r2=1.6
50
51 Index: cns-1.1.ebuild
52 ===================================================================
53 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild,v
54 retrieving revision 1.5
55 retrieving revision 1.6
56 diff -u -r1.5 -r1.6
57 --- cns-1.1.ebuild 3 Jun 2008 02:09:01 -0000 1.5
58 +++ cns-1.1.ebuild 6 Feb 2010 21:49:39 -0000 1.6
59 @@ -1,6 +1,6 @@
60 # Copyright 1999-2008 Gentoo Foundation
61 # Distributed under the terms of the GNU General Public License v2
62 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild,v 1.5 2008/06/03 02:09:01 mr_bones_ Exp $
63 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild,v 1.6 2010/02/06 21:49:39 jlec Exp $
64
65 inherit eutils fortran toolchain-funcs
66
67 @@ -26,7 +26,7 @@
68 pkg_nofetch() {
69 einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/"
70 einfo "and place these files:"
71 - einfo "${A}"
72 + einfo ${A}
73 einfo "in ${DISTDIR}."
74 }
75
76
77
78
79 1.19 sci-chemistry/cns/ChangeLog
80
81 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.19&view=markup
82 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.19&content-type=text/plain
83 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?r1=1.18&r2=1.19
84
85 Index: ChangeLog
86 ===================================================================
87 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v
88 retrieving revision 1.18
89 retrieving revision 1.19
90 diff -u -r1.18 -r1.19
91 --- ChangeLog 6 Feb 2010 12:02:19 -0000 1.18
92 +++ ChangeLog 6 Feb 2010 21:49:39 -0000 1.19
93 @@ -1,6 +1,13 @@
94 # ChangeLog for sci-chemistry/cns
95 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
96 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.18 2010/02/06 12:02:19 jlec Exp $
97 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.19 2010/02/06 21:49:39 jlec Exp $
98 +
99 +*cns-1.2.1-r2 (06 Feb 2010)
100 +
101 + 06 Feb 2010; Justin Lecher (jlec) <jlec@g.o>
102 + +files/1.2.1-aria.patch, +cns-1.2.1-r2.ebuild:
103 + Added aria support per 220905
104 + Some QA fixes to make repoman happy
105
106 06 Feb 2010; Justin Lecher (jlec) <jlec@g.o> cns-1.2.1-r1.ebuild:
107 We have to repect selection of USE="-openmp", fixed path in setup file.
108
109
110
111 1.4 sci-chemistry/cns/cns-1.2-r1.ebuild
112
113 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild?rev=1.4&view=markup
114 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild?rev=1.4&content-type=text/plain
115 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild?r1=1.3&r2=1.4
116
117 Index: cns-1.2-r1.ebuild
118 ===================================================================
119 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v
120 retrieving revision 1.3
121 retrieving revision 1.4
122 diff -u -r1.3 -r1.4
123 --- cns-1.2-r1.ebuild 3 Jun 2008 02:09:01 -0000 1.3
124 +++ cns-1.2-r1.ebuild 6 Feb 2010 21:49:39 -0000 1.4
125 @@ -1,6 +1,6 @@
126 # Copyright 1999-2008 Gentoo Foundation
127 # Distributed under the terms of the GNU General Public License v2
128 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v 1.3 2008/06/03 02:09:01 mr_bones_ Exp $
129 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v 1.4 2010/02/06 21:49:39 jlec Exp $
130
131 inherit eutils fortran toolchain-funcs
132
133 @@ -25,7 +25,7 @@
134 pkg_nofetch() {
135 einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/"
136 einfo "and place these files:"
137 - einfo "${A}"
138 + einfo ${A}
139 einfo "in ${DISTDIR}."
140 }
141
142
143
144
145 1.5 sci-chemistry/cns/cns-1.2.1.ebuild
146
147 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild?rev=1.5&view=markup
148 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild?rev=1.5&content-type=text/plain
149 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild?r1=1.4&r2=1.5
150
151 Index: cns-1.2.1.ebuild
152 ===================================================================
153 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v
154 retrieving revision 1.4
155 retrieving revision 1.5
156 diff -u -r1.4 -r1.5
157 --- cns-1.2.1.ebuild 7 Jul 2009 23:26:17 -0000 1.4
158 +++ cns-1.2.1.ebuild 6 Feb 2010 21:49:39 -0000 1.5
159 @@ -1,6 +1,6 @@
160 # Copyright 1999-2009 Gentoo Foundation
161 # Distributed under the terms of the GNU General Public License v2
162 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.4 2009/07/07 23:26:17 flameeyes Exp $
163 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.5 2010/02/06 21:49:39 jlec Exp $
164
165 inherit eutils fortran toolchain-funcs versionator flag-o-matic
166
167 @@ -27,7 +27,7 @@
168 pkg_nofetch() {
169 elog "Fill out the form at http://cns.csb.yale.edu/cns_request/"
170 elog "and place these files:"
171 - elog "${A}"
172 + elog ${A}
173 elog "in ${DISTDIR}."
174 }
175
176
177
178
179 1.7 sci-chemistry/cns/metadata.xml
180
181 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/metadata.xml?rev=1.7&view=markup
182 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/metadata.xml?rev=1.7&content-type=text/plain
183 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/metadata.xml?r1=1.6&r2=1.7
184
185 Index: metadata.xml
186 ===================================================================
187 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/metadata.xml,v
188 retrieving revision 1.6
189 retrieving revision 1.7
190 diff -u -r1.6 -r1.7
191 --- metadata.xml 17 Oct 2008 18:41:31 -0000 1.6
192 +++ metadata.xml 6 Feb 2010 21:49:39 -0000 1.7
193 @@ -2,4 +2,10 @@
194 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
195 <pkgmetadata>
196 <herd>sci-chemistry</herd>
197 +<maintainer>
198 + <email>jlec@g.o</email>
199 +</maintainer>
200 +<use>
201 + <flag name='aria'> Support patch for sci-chemistry/aria</flag>
202 +</use>
203 </pkgmetadata>
204
205
206
207 1.1 sci-chemistry/cns/cns-1.2.1-r2.ebuild
208
209 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r2.ebuild?rev=1.1&view=markup
210 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r2.ebuild?rev=1.1&content-type=text/plain
211
212 Index: cns-1.2.1-r2.ebuild
213 ===================================================================
214 # Copyright 1999-2010 Gentoo Foundation
215 # Distributed under the terms of the GNU General Public License v2
216 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r2.ebuild,v 1.1 2010/02/06 21:49:39 jlec Exp $
217
218 EAPI="2"
219
220 inherit eutils fortran toolchain-funcs versionator flag-o-matic
221
222 MY_PN="${PN}_solve"
223 MY_PV="$(delete_version_separator 2)"
224 MY_P="${MY_PN}_${MY_PV}"
225
226 DESCRIPTION="Crystallography and NMR System"
227 HOMEPAGE="http://cns.csb.yale.edu/"
228 SRC_URI="${MY_P}_all-mp.tar.gz
229 aria? ( aria2.2.tar.gz )"
230
231 SLOT="0"
232 LICENSE="cns"
233 KEYWORDS="~amd64 ~x86"
234 IUSE="aria openmp"
235
236 RDEPEND="app-shells/tcsh
237 !app-text/dos2unix"
238 DEPEND="${RDEPEND}"
239 PDEPEND="aria? ( sci-chemistry/aria )"
240
241 RESTRICT="fetch"
242 S="${WORKDIR}/${MY_P}"
243
244 FORTRAN="g77 gfortran"
245
246 pkg_nofetch() {
247 elog "Fill out the form at http://cns.csb.yale.edu/cns_request/"
248 use aria && elog "and http://aria.pasteur.fr/"
249 elog "and place these files:"
250 elog ${A}
251 elog "in ${DISTDIR}."
252 }
253
254 pkg_setup() {
255 fortran_pkg_setup
256
257 if [[ $(tc-getCC)$ == *gcc* ]] &&
258 ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
259 ! built_with_use sys-devel/gcc openmp )
260 then
261 ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
262 ewarn "Switch CC to an OpenMP capable compiler"
263 fi
264 }
265
266 src_prepare() {
267 epatch "${FILESDIR}"/${PV}-gentoo.patch
268
269 cd "${WORKDIR}"
270 if use aria; then
271 # Update the cns sources in aria for version 1.2.1
272 epatch "${FILESDIR}"/1.2.1-aria.patch
273
274 # Update the code with aria specific things
275 cp -rf aria2.2/cns/src/* "${S}"/source/
276 fi
277 cd "${S}"
278
279 use openmp && append-fflags -fopenmp
280
281 # the code uses Intel-compiler-specific directives
282 epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch
283
284 use openmp && OMPLIB="-lgomp"
285
286 use amd64 && \
287 append-cflags "-DINTEGER='long long int'" && \
288 append-fflags -fdefault-integer-8
289
290 # Set up location for the build directory
291 # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION
292 cp "${FILESDIR}"/cns_solve_env_sh "${T}"/
293 sed -i \
294 -e "s:_CNSsolve_location_:${S}:g" \
295 -e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \
296 "${S}"/cns_solve_env
297 sed -i \
298 -e "s:_CNSsolve_location_:${S}:g" \
299 -e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \
300 "${T}"/cns_solve_env_sh
301 }
302
303 src_compile() {
304 local GLOBALS
305 local MALIGN
306 if [[ ${FORTRANC} = g77 ]]; then
307 GLOBALS="-fno-globals"
308 MALIGN='\$(CNS_MALIGN_I86)'
309 fi
310
311 # Set up the compiler to use
312 pushd instlib/machine/unsupported/g77-unix 2>/dev/null
313 ln -s Makefile.header Makefile.header.${FORTRANC} || die
314 popd 2>/dev/null
315
316 # make install really means build, since it's expected to be used in-place
317 emake \
318 CC="$(tc-getCC)" \
319 F77="${FORTRANC}" \
320 LD="${FORTRANC}" \
321 CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \
322 LDFLAGS="${LDFLAGS}" \
323 F77OPT="${FFLAGS:- -O2} ${MALIGN}" \
324 F77STD="${GLOBALS}" \
325 OMPLIB="${OMPLIB}" \
326 g77install \
327 || die "emake failed"
328
329 }
330
331 src_test() {
332 # We need to force on g77 manually, because we can't get aliases working
333 # when we source in a -c
334 einfo "Running tests ..."
335 sh -c \
336 "export CNS_G77=ON; source ${T}/cns_solve_env_sh; make run_tests" \
337 || die "tests failed"
338 einfo "Displaying test results ..."
339 cat "${S}"/*_g77/test/*.diff-test
340 }
341
342 src_install() {
343 # Install to locations resembling FHS
344 sed -i \
345 -e "s:${S}:usr:g" \
346 -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT /usr:g" \
347 -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/cns:g" \
348 -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DOC \$CNS_ROOT/share/doc/${PF}:g" \
349 -e "s:CNS_LIB \$CNS_SOLVE/libraries:CNS_LIB \$CNS_DATA/libraries:g" \
350 -e "s:CNS_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \
351 -e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \
352 -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \
353 "${S}"/cns_solve_env
354 # I don't entirely understand why the sh version requires a leading /
355 # for CNS_SOLVE and CNS_ROOT, but it does
356 sed -i \
357 -e "s:${S}:/usr:g" \
358 -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=/usr:g" \
359 -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DATA=\$CNS_ROOT/share/cns:g" \
360 -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \
361 -e "s:CNS_LIB=\$CNS_SOLVE/libraries:CNS_LIB=\$CNS_DATA/libraries:g" \
362 -e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \
363 -e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \
364 -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \
365 "${T}"/cns_solve_env_sh
366
367 # Get rid of setup stuff we don't need in the installed script
368 sed -i \
369 -e "83,$ d" \
370 -e "37,46 d" \
371 "${S}"/cns_solve_env
372 sed -i \
373 -e "84,$ d" \
374 -e "39,50 d" \
375 "${T}"/cns_solve_env_sh
376
377 newbin "${S}"/*_g77/bin/cns_solve* cns_solve \
378 || die "install cns_solve failed"
379
380 # Can be run by either cns_solve or cns
381 dosym cns_solve /usr/bin/cns
382
383 # Don't want to install this
384 rm -f "${S}"/*_g77/utils/Makefile
385
386 dobin "${S}"/*_g77/utils/* || die "install utils failed"
387
388 sed -i \
389 -e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \
390 "${S}"/bin/cns_web || die
391
392 dobin "${S}"/bin/cns_{edit,header,transfer,web} || die "install bin failed"
393
394 insinto /usr/share/cns
395 doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib || die
396 doins "${S}"/bin/cns_info || die
397
398 insinto /etc/profile.d
399 newins "${S}"/cns_solve_env cns_solve_env.csh || die
400 newins "${T}"/cns_solve_env_sh cns_solve_env.sh || die
401
402 dohtml \
403 -A iq,cgi,csh,cv,def,fm,gif,hkl,inp,jpeg,lib,link,list,mask,mtf,param,pdb,pdf,pl,ps,sc,sca,sdb,seq,tbl,top \
404 -f all_cns_info_template,omac,def \
405 -r doc/html/* || die
406 }
407
408 pkg_info() {
409 if use openmp; then
410 elog "Set OMP_NUM_THREADS to the number of threads you want."
411 elog "If you get segfaults on large structures, set the GOMP_STACKSIZE"
412 elog "variable if using gcc (16384 should be good)."
413 fi
414 }
415
416 pkg_postinst() {
417 pkg_info
418 }