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