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