1 |
dberkholz 08/08/03 07:54:01 |
2 |
|
3 |
Modified: ChangeLog metadata.xml |
4 |
Added: cns-1.2.1.ebuild |
5 |
Log: |
6 |
Bump. Keyword ~amd64; add OpenMP support for parallel refinement; (#209805) Fix a number of environment variables and cns_ functions to work properly. |
7 |
(Portage version: 2.2_rc5/cvs/Linux 2.6.26 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.11 sci-chemistry/cns/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.11&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.11&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?r1=1.10&r2=1.11 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v |
19 |
retrieving revision 1.10 |
20 |
retrieving revision 1.11 |
21 |
diff -u -r1.10 -r1.11 |
22 |
--- ChangeLog 3 Jun 2008 02:09:01 -0000 1.10 |
23 |
+++ ChangeLog 3 Aug 2008 07:54:00 -0000 1.11 |
24 |
@@ -1,6 +1,15 @@ |
25 |
# ChangeLog for sci-chemistry/cns |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.10 2008/06/03 02:09:01 mr_bones_ Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.11 2008/08/03 07:54:00 dberkholz Exp $ |
29 |
+ |
30 |
+*cns-1.2.1 (03 Aug 2008) |
31 |
+ |
32 |
+ 03 Aug 2008; Donnie Berkholz <dberkholz@g.o>; |
33 |
+ +files/1.2.1-allow-gcc-openmp.patch, +files/cns_solve_env_sh, |
34 |
+ metadata.xml, +cns-1.2.1.ebuild: |
35 |
+ Bump. Keyword ~amd64; add OpenMP support for parallel refinement; |
36 |
+ (#209805) Fix a number of environment variables and cns_ functions to work |
37 |
+ properly. |
38 |
|
39 |
03 Jun 2008; Michael Sterrett <mr_bones_@g.o> cns-1.1.ebuild, |
40 |
cns-1.2.ebuild, cns-1.2-r1.ebuild: |
41 |
|
42 |
|
43 |
|
44 |
1.5 sci-chemistry/cns/metadata.xml |
45 |
|
46 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/metadata.xml?rev=1.5&view=markup |
47 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/metadata.xml?rev=1.5&content-type=text/plain |
48 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/metadata.xml?r1=1.4&r2=1.5 |
49 |
|
50 |
Index: metadata.xml |
51 |
=================================================================== |
52 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/metadata.xml,v |
53 |
retrieving revision 1.4 |
54 |
retrieving revision 1.5 |
55 |
diff -u -r1.4 -r1.5 |
56 |
--- metadata.xml 20 Sep 2006 05:08:59 -0000 1.4 |
57 |
+++ metadata.xml 3 Aug 2008 07:54:00 -0000 1.5 |
58 |
@@ -2,4 +2,7 @@ |
59 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
60 |
<pkgmetadata> |
61 |
<herd>sci-chemistry</herd> |
62 |
+<use> |
63 |
+ <flag name='openmp'>Build support for the OpenMP (support parallel computing)</flag> |
64 |
+</use> |
65 |
</pkgmetadata> |
66 |
|
67 |
|
68 |
|
69 |
1.1 sci-chemistry/cns/cns-1.2.1.ebuild |
70 |
|
71 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild?rev=1.1&view=markup |
72 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild?rev=1.1&content-type=text/plain |
73 |
|
74 |
Index: cns-1.2.1.ebuild |
75 |
=================================================================== |
76 |
# Copyright 1999-2008 Gentoo Foundation |
77 |
# Distributed under the terms of the GNU General Public License v2 |
78 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.1 2008/08/03 07:54:00 dberkholz Exp $ |
79 |
|
80 |
inherit eutils fortran toolchain-funcs versionator flag-o-matic |
81 |
|
82 |
MY_PN="${PN}_solve" |
83 |
MY_PV="$(delete_version_separator 2)" |
84 |
MY_P="${MY_PN}_${MY_PV}" |
85 |
|
86 |
DESCRIPTION="Crystallography and NMR System" |
87 |
HOMEPAGE="http://cns.csb.yale.edu/" |
88 |
SRC_URI="!openmp? ( ${MY_P}_all.tar.gz ) |
89 |
openmp? ( ${MY_P}_all-mp.tar.gz )" |
90 |
RESTRICT="fetch" |
91 |
LICENSE="cns" |
92 |
SLOT="0" |
93 |
KEYWORDS="~amd64 ~ppc ~x86" |
94 |
IUSE="openmp" |
95 |
RDEPEND="app-shells/tcsh |
96 |
!app-text/dos2unix" |
97 |
DEPEND="${RDEPEND}" |
98 |
S="${WORKDIR}/${MY_P}" |
99 |
|
100 |
FORTRAN="g77 gfortran" |
101 |
|
102 |
pkg_nofetch() { |
103 |
einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/" |
104 |
einfo "and place these files:" |
105 |
einfo "${A}" |
106 |
einfo "in ${DISTDIR}." |
107 |
} |
108 |
|
109 |
pkg_setup() { |
110 |
fortran_pkg_setup |
111 |
|
112 |
if use openmp; then |
113 |
if [[ gcc-major-version < 4 ]] \ |
114 |
|| ( [[ gcc-major-version < 4 ]] && [[ gcc-minor-version < 2 ]] ); then |
115 |
local msg="Sorry, you need gcc 4.2 or newer to use OpenMP." |
116 |
eerror "$msg" |
117 |
die "$msg" |
118 |
fi |
119 |
fi |
120 |
} |
121 |
|
122 |
src_unpack() { |
123 |
unpack ${A} |
124 |
cd "${S}" |
125 |
|
126 |
use openmp && append-flags -fopenmp |
127 |
use openmp && append-ldflags -lgomp |
128 |
|
129 |
# Someone already did the same in the openmp version, apparently |
130 |
use openmp || epatch "${FILESDIR}"/1.2-allow-unknown-architectures.patch |
131 |
|
132 |
# the code uses Intel-compiler-specific directives |
133 |
use openmp && epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch |
134 |
|
135 |
# Set up location for the build directory |
136 |
# Uses obsolete `sort` syntax, so we set _POSIX2_VERSION |
137 |
cp "${FILESDIR}"/cns_solve_env_sh "${T}"/ |
138 |
sed -i \ |
139 |
-e "s:_CNSsolve_location_:${S}:g" \ |
140 |
-e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \ |
141 |
"${S}"/cns_solve_env |
142 |
sed -i \ |
143 |
-e "s:_CNSsolve_location_:${S}:g" \ |
144 |
-e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \ |
145 |
"${T}"/cns_solve_env_sh |
146 |
} |
147 |
|
148 |
src_compile() { |
149 |
local GLOBALS |
150 |
local MALIGN= |
151 |
if [[ ${FORTRANC} = g77 ]]; then |
152 |
GLOBALS="-fno-globals" |
153 |
MALIGN='\$(CNS_MALIGN_I86)' |
154 |
fi |
155 |
|
156 |
# Set up the compiler to use |
157 |
pushd instlib/machine/unsupported/g77-unix 2>/dev/null |
158 |
ln -s Makefile.header Makefile.header.${FORTRANC} || die |
159 |
popd 2>/dev/null |
160 |
|
161 |
# make install really means build, since it's expected to be used in-place |
162 |
emake \ |
163 |
CC="$(tc-getCC)" \ |
164 |
F77="${FORTRANC}" \ |
165 |
LD="${FORTRANC}" \ |
166 |
CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \ |
167 |
LDFLAGS="${LDFLAGS}" \ |
168 |
F77OPT="${FFLAGS:- -O2} ${MALIGN}" \ |
169 |
F77STD="${GLOBALS}" \ |
170 |
g77install \ |
171 |
|| die "emake failed" |
172 |
} |
173 |
|
174 |
src_test() { |
175 |
# We need to force on g77 manually, because we can't get aliases working |
176 |
# when we source in a -c |
177 |
einfo "Running tests ..." |
178 |
sh -c \ |
179 |
"export CNS_G77=ON; source .cns_solve_env_sh; make run_tests" \ |
180 |
|| die "tests failed" |
181 |
einfo "Displaying test results ..." |
182 |
cat "${S}"/*_g77/test/*.diff-test |
183 |
} |
184 |
|
185 |
src_install() { |
186 |
# Install to locations resembling FHS |
187 |
sed -i \ |
188 |
-e "s:${S}:usr:g" \ |
189 |
-e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT usr:g" \ |
190 |
-e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/data:g" \ |
191 |
-e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DOC \$CNS_ROOT/share/doc/${PF}:g" \ |
192 |
-e "s:CNS_LIB \$CNS_SOLVE/libraries:CNS_LIB \$CNS_DATA/libraries:g" \ |
193 |
-e "s:CNS_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \ |
194 |
-e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \ |
195 |
-e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \ |
196 |
"${S}"/cns_solve_env |
197 |
# I don't entirely understand why the sh version requires a leading / |
198 |
# for CNS_SOLVE and CNS_ROOT, but it does |
199 |
sed -i \ |
200 |
-e "s:${S}:/usr:g" \ |
201 |
-e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=/usr:g" \ |
202 |
-e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DATA=\$CNS_ROOT/share/cns:g" \ |
203 |
-e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \ |
204 |
-e "s:CNS_LIB=\$CNS_SOLVE/libraries:CNS_LIB=\$CNS_DATA/libraries:g" \ |
205 |
-e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \ |
206 |
-e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \ |
207 |
-e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \ |
208 |
"${T}"/cns_solve_env_sh |
209 |
|
210 |
# Get rid of setup stuff we don't need in the installed script |
211 |
sed -i \ |
212 |
-e "83,$ d" \ |
213 |
-e "37,46 d" \ |
214 |
"${S}"/cns_solve_env |
215 |
sed -i \ |
216 |
-e "84,$ d" \ |
217 |
-e "39,50 d" \ |
218 |
"${T}"/cns_solve_env_sh |
219 |
|
220 |
newbin "${S}"/*_g77/bin/cns_solve* cns_solve \ |
221 |
|| die "install cns_solve failed" |
222 |
|
223 |
# Can be run by either cns_solve or cns |
224 |
dosym cns_solve /usr/bin/cns |
225 |
|
226 |
# Don't want to install this |
227 |
rm -f "${S}"/*_g77/utils/Makefile |
228 |
|
229 |
dobin "${S}"/*_g77/utils/* || die "install utils failed" |
230 |
|
231 |
sed -i \ |
232 |
-e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \ |
233 |
"${S}"/bin/cns_web |
234 |
|
235 |
dobin "${S}"/bin/cns_{edit,header,transfer,web} || die "install bin failed" |
236 |
|
237 |
insinto /usr/share/cns |
238 |
doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib |
239 |
doins "${S}"/bin/cns_info |
240 |
|
241 |
insinto /etc/profile.d |
242 |
newins "${S}"/cns_solve_env cns_solve_env.csh |
243 |
newins "${T}"/cns_solve_env_sh cns_solve_env.sh |
244 |
|
245 |
dohtml \ |
246 |
-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 \ |
247 |
-f all_cns_info_template,omac,def \ |
248 |
-r doc/html/* |
249 |
} |
250 |
|
251 |
pkg_info() { |
252 |
if use openmp; then |
253 |
elog "Set OMP_NUM_THREADS to the number of threads you want." |
254 |
elog "If you get segfaults on large structures, set the GOMP_STACKSIZE" |
255 |
elog "variable if using gcc (16384 should be good). Also run" |
256 |
elog "ulimit -s 16384." |
257 |
fi |
258 |
} |
259 |
|
260 |
pkg_postinst() { |
261 |
pkg_info |
262 |
} |