1 |
jlec 11/08/30 13:48:39 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: cns-1.2.1-r7.ebuild |
5 |
Log: |
6 |
Bump patches to aria-2.3.2 |
7 |
|
8 |
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.8 sci-chemistry/cns/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/metadata.xml?rev=1.8&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/metadata.xml?rev=1.8&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/metadata.xml?r1=1.7&r2=1.8 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/metadata.xml,v |
20 |
retrieving revision 1.7 |
21 |
retrieving revision 1.8 |
22 |
diff -u -r1.7 -r1.8 |
23 |
--- metadata.xml 6 Feb 2010 21:49:39 -0000 1.7 |
24 |
+++ metadata.xml 30 Aug 2011 13:48:39 -0000 1.8 |
25 |
@@ -1,11 +1,11 @@ |
26 |
<?xml version="1.0" encoding="UTF-8"?> |
27 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
28 |
<pkgmetadata> |
29 |
-<herd>sci-chemistry</herd> |
30 |
-<maintainer> |
31 |
- <email>jlec@g.o</email> |
32 |
-</maintainer> |
33 |
-<use> |
34 |
- <flag name='aria'> Support patch for sci-chemistry/aria</flag> |
35 |
-</use> |
36 |
+ <herd>sci-chemistry</herd> |
37 |
+ <maintainer> |
38 |
+ <email>jlec@g.o</email> |
39 |
+ </maintainer> |
40 |
+ <use> |
41 |
+ <flag name="aria"> Support patch for sci-chemistry/aria</flag> |
42 |
+ </use> |
43 |
</pkgmetadata> |
44 |
|
45 |
|
46 |
|
47 |
1.42 sci-chemistry/cns/ChangeLog |
48 |
|
49 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.42&view=markup |
50 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.42&content-type=text/plain |
51 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/ChangeLog?r1=1.41&r2=1.42 |
52 |
|
53 |
Index: ChangeLog |
54 |
=================================================================== |
55 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v |
56 |
retrieving revision 1.41 |
57 |
retrieving revision 1.42 |
58 |
diff -u -r1.41 -r1.42 |
59 |
--- ChangeLog 21 Jun 2011 16:05:16 -0000 1.41 |
60 |
+++ ChangeLog 30 Aug 2011 13:48:39 -0000 1.42 |
61 |
@@ -1,6 +1,12 @@ |
62 |
# ChangeLog for sci-chemistry/cns |
63 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
64 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.41 2011/06/21 16:05:16 jlec Exp $ |
65 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.42 2011/08/30 13:48:39 jlec Exp $ |
66 |
+ |
67 |
+*cns-1.2.1-r7 (30 Aug 2011) |
68 |
+ |
69 |
+ 30 Aug 2011; Justin Lecher <jlec@g.o> +cns-1.2.1-r7.ebuild, |
70 |
+ metadata.xml: |
71 |
+ Bump patches to aria-2.3.2 |
72 |
|
73 |
21 Jun 2011; Justin Lecher <jlec@g.o> cns-1.1.ebuild, |
74 |
cns-1.2.1.ebuild, cns-1.2.1-r5.ebuild, cns-1.2.1-r6.ebuild, |
75 |
|
76 |
|
77 |
|
78 |
1.1 sci-chemistry/cns/cns-1.2.1-r7.ebuild |
79 |
|
80 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r7.ebuild?rev=1.1&view=markup |
81 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r7.ebuild?rev=1.1&content-type=text/plain |
82 |
|
83 |
Index: cns-1.2.1-r7.ebuild |
84 |
=================================================================== |
85 |
# Copyright 1999-2011 Gentoo Foundation |
86 |
# Distributed under the terms of the GNU General Public License v2 |
87 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r7.ebuild,v 1.1 2011/08/30 13:48:39 jlec Exp $ |
88 |
|
89 |
EAPI=3 |
90 |
|
91 |
inherit eutils fortran-2 toolchain-funcs versionator flag-o-matic |
92 |
|
93 |
MY_PN="${PN}_solve" |
94 |
MY_PV="$(delete_version_separator 2)" |
95 |
MY_P="${MY_PN}_${MY_PV}" |
96 |
|
97 |
DESCRIPTION="Crystallography and NMR System" |
98 |
HOMEPAGE="http://cns.csb.yale.edu/" |
99 |
SRC_URI=" |
100 |
${MY_P}_all-mp.tar.gz |
101 |
aria? ( aria2.3.2.tar.gz )" |
102 |
|
103 |
SLOT="0" |
104 |
LICENSE="cns" |
105 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
106 |
IUSE="aria openmp" |
107 |
|
108 |
RDEPEND=" |
109 |
virtual/fortran |
110 |
app-shells/tcsh" |
111 |
DEPEND="${RDEPEND}" |
112 |
|
113 |
FORTRAN_NEED_OPENMP=1 |
114 |
|
115 |
S="${WORKDIR}/${MY_P}" |
116 |
|
117 |
RESTRICT="fetch" |
118 |
|
119 |
pkg_nofetch() { |
120 |
elog "Fill out the form at http://cns.csb.yale.edu/cns_request/" |
121 |
use aria && elog "and http://aria.pasteur.fr/" |
122 |
elog "and place these files:" |
123 |
elog ${A} |
124 |
elog "in ${DISTDIR}." |
125 |
} |
126 |
|
127 |
get_fcomp() { |
128 |
case $(tc-getFC) in |
129 |
*gfortran* ) |
130 |
FCOMP="gfortran" ;; |
131 |
ifort ) |
132 |
FCOMP="ifc" ;; |
133 |
* ) |
134 |
FCOMP=$(tc-getFC) ;; |
135 |
esac |
136 |
} |
137 |
|
138 |
pkg_setup() { |
139 |
fortran-2_pkg_setup |
140 |
get_fcomp |
141 |
} |
142 |
|
143 |
get_bitness() { |
144 |
echo > "${T}"/test.c |
145 |
$(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o |
146 |
case $(file "${T}"/test.o) in |
147 |
*64-bit*|*ppc64*|*x86_64*) export _bitness="64";; |
148 |
*32-bit*|*ppc*|*i386*) export _bitness="32";; |
149 |
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
150 |
esac |
151 |
} |
152 |
|
153 |
src_prepare() { |
154 |
epatch \ |
155 |
"${FILESDIR}"/${PV}-gentoo.patch \ |
156 |
"${FILESDIR}"/${PV}-parallel.patch |
157 |
|
158 |
get_bitness |
159 |
|
160 |
if use aria; then |
161 |
pushd "${WORKDIR}"/aria* >& /dev/null |
162 |
# Update the cns sources in aria for version 1.2.1 |
163 |
epatch "${FILESDIR}"/1.2.1-aria2.3.patch |
164 |
|
165 |
# Update the code with aria specific things |
166 |
cp -rf cns/src/* "${S}"/source/ |
167 |
popd >& /dev/null |
168 |
fi |
169 |
|
170 |
# the code uses Intel-compiler-specific directives |
171 |
if [[ $(tc-getFC) =~ gfortran ]]; then |
172 |
epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch |
173 |
use openmp && \ |
174 |
append-flags -fopenmp && append-ldflags -fopenmp |
175 |
COMP="gfortran" |
176 |
[[ ${_bitness} == 64 ]] && \ |
177 |
append-fflags -fdefault-integer-8 |
178 |
elif [[ $(tc-getFC) == if* ]]; then |
179 |
epatch "${FILESDIR}"/${PV}-ifort.patch |
180 |
use openmp && \ |
181 |
append-flags -openmp && append-ldflags -openmp |
182 |
COMP="ifort" |
183 |
[[ ${_bitness} == 64 ]] && append-fflags -i8 |
184 |
fi |
185 |
|
186 |
[[ ${_bitness} == 64 ]] && \ |
187 |
append-cflags "-DINTEGER='long long int'" |
188 |
|
189 |
# Set up location for the build directory |
190 |
# Uses obsolete `sort` syntax, so we set _POSIX2_VERSION |
191 |
cp "${FILESDIR}"/cns_solve_env_sh "${T}"/ |
192 |
sed -i \ |
193 |
-e "s:_CNSsolve_location_:${S}:g" \ |
194 |
-e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \ |
195 |
"${S}"/cns_solve_env |
196 |
sed -i \ |
197 |
-e "s:_CNSsolve_location_:${S}:g" \ |
198 |
-e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \ |
199 |
"${T}"/cns_solve_env_sh |
200 |
|
201 |
einfo "Fixing shebangs..." |
202 |
find "${S}" -type f \ |
203 |
-exec sed "s:/bin/csh:${EPREFIX}/bin/csh:g" -i '{}' \; || die |
204 |
} |
205 |
|
206 |
src_compile() { |
207 |
local GLOBALS |
208 |
local MALIGN |
209 |
if [[ $(tc-getFC) =~ g77 ]]; then |
210 |
GLOBALS="-fno-globals" |
211 |
MALIGN='\$(CNS_MALIGN_I86)' |
212 |
fi |
213 |
|
214 |
# Set up the compiler to use |
215 |
pushd instlib/machine/unsupported/g77-unix 2>/dev/null |
216 |
ln -s Makefile.header Makefile.header.${FCOMP} || die |
217 |
popd 2>/dev/null |
218 |
|
219 |
# make install really means build, since it's expected to be used in-place |
220 |
# -j1 doesn't mean we do no respect MAKEOPTS! |
221 |
emake -j1 \ |
222 |
CC="$(tc-getCC)" \ |
223 |
F77=$(tc-getFC) \ |
224 |
LD=$(tc-getFC) \ |
225 |
CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \ |
226 |
LDFLAGS="${LDFLAGS}" \ |
227 |
F77OPT="${FFLAGS:- -O2} ${MALIGN}" \ |
228 |
F77STD="${GLOBALS}" \ |
229 |
OMPLIB="${OMPLIB}" \ |
230 |
compiler="${COMP}" \ |
231 |
install \ |
232 |
|| die "emake failed" |
233 |
} |
234 |
|
235 |
src_test() { |
236 |
# We need to force on g77 manually, because we can't get aliases working |
237 |
# when we source in a -c |
238 |
einfo "Running tests ..." |
239 |
sh -c \ |
240 |
"export CNS_G77=ON; source ${T}/cns_solve_env_sh; make run_tests" \ |
241 |
|| die "tests failed" |
242 |
einfo "Displaying test results ..." |
243 |
cat "${S}"/*_g77/test/*.diff-test |
244 |
} |
245 |
|
246 |
src_install() { |
247 |
# Install to locations resembling FHS |
248 |
sed -i \ |
249 |
-e "s:${S}:usr:g" \ |
250 |
-e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT ${EPREFIX}/usr:g" \ |
251 |
-e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/cns:g" \ |
252 |
-e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DOC \$CNS_ROOT/share/doc/${PF}:g" \ |
253 |
-e "s:CNS_LIB \$CNS_SOLVE/libraries:CNS_LIB \$CNS_DATA/libraries:g" \ |
254 |
-e "s:CNS_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \ |
255 |
-e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \ |
256 |
-e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \ |
257 |
-e "/^g77on/d" \ |
258 |
"${S}"/cns_solve_env |
259 |
# I don't entirely understand why the sh version requires a leading / |
260 |
# for CNS_SOLVE and CNS_ROOT, but it does |
261 |
sed -i \ |
262 |
-e "s:${S}:/usr:g" \ |
263 |
-e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=${EPREFIX}/usr:g" \ |
264 |
-e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DATA=\$CNS_ROOT/share/cns:g" \ |
265 |
-e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \ |
266 |
-e "s:CNS_LIB=\$CNS_SOLVE/libraries:CNS_LIB=\$CNS_DATA/libraries:g" \ |
267 |
-e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \ |
268 |
-e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \ |
269 |
-e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \ |
270 |
-e "/^g77on/d" \ |
271 |
-e "/^g77off/d" \ |
272 |
"${T}"/cns_solve_env_sh |
273 |
|
274 |
# Get rid of setup stuff we don't need in the installed script |
275 |
sed -i \ |
276 |
-e "83,$ d" \ |
277 |
-e "37,46 d" \ |
278 |
"${S}"/cns_solve_env |
279 |
sed -i \ |
280 |
-e "84,$ d" \ |
281 |
-e "39,50 d" \ |
282 |
"${T}"/cns_solve_env_sh |
283 |
|
284 |
newbin "${S}"/*linux*/bin/cns_solve* cns_solve \ |
285 |
|| die "install cns_solve failed" |
286 |
|
287 |
# Can be run by either cns_solve or cns |
288 |
dosym cns_solve /usr/bin/cns |
289 |
|
290 |
# Don't want to install this |
291 |
rm -f "${S}"/*linux*/utils/Makefile |
292 |
|
293 |
dobin "${S}"/*linux*/utils/* || die "install utils failed" |
294 |
|
295 |
sed -i \ |
296 |
-e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \ |
297 |
"${S}"/bin/cns_web || die |
298 |
|
299 |
dobin "${S}"/bin/cns_{edit,header,transfer,web} || die "install bin failed" |
300 |
|
301 |
insinto /usr/share/cns |
302 |
doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib || die |
303 |
doins "${S}"/bin/cns_info || die |
304 |
|
305 |
insinto /etc/profile.d |
306 |
newins "${S}"/cns_solve_env cns_solve_env.csh || die |
307 |
newins "${T}"/cns_solve_env_sh cns_solve_env.sh || die |
308 |
|
309 |
dohtml \ |
310 |
-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 \ |
311 |
-f all_cns_info_template,omac,def \ |
312 |
-r doc/html/* || die |
313 |
# Conflits with app-text/dos2unix |
314 |
rm -f "${D}"/usr/bin/dos2unix |
315 |
} |
316 |
|
317 |
pkg_info() { |
318 |
if use openmp; then |
319 |
elog "Set OMP_NUM_THREADS to the number of threads you want." |
320 |
elog "If you get segfaults on large structures, set the GOMP_STACKSIZE" |
321 |
elog "variable if using gcc (16384 should be good)." |
322 |
fi |
323 |
} |
324 |
|
325 |
pkg_postinst() { |
326 |
pkg_info |
327 |
} |