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/ccp4-apps: ChangeLog ccp4-apps-6.1.3-r6.ebuild
Date: Sat, 01 Jan 2011 08:57:50
Message-Id: 20110101085735.0DB4020054@flycatcher.gentoo.org
1 jlec 11/01/01 08:57:35
2
3 Modified: ChangeLog
4 Added: ccp4-apps-6.1.3-r6.ebuild
5 Log:
6 Fit sci-libs/ccp4-libs-6.1.3-r5
7
8 (Portage version: 2.2.0_alpha10/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.19 sci-chemistry/ccp4-apps/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccp4-apps/ChangeLog?rev=1.19&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccp4-apps/ChangeLog?rev=1.19&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccp4-apps/ChangeLog?r1=1.18&r2=1.19
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4-apps/ChangeLog,v
20 retrieving revision 1.18
21 retrieving revision 1.19
22 diff -u -r1.18 -r1.19
23 --- ChangeLog 31 Dec 2010 17:17:35 -0000 1.18
24 +++ ChangeLog 1 Jan 2011 08:57:34 -0000 1.19
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-chemistry/ccp4-apps
27 -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4-apps/ChangeLog,v 1.18 2010/12/31 17:17:35 jlec Exp $
29 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4-apps/ChangeLog,v 1.19 2011/01/01 08:57:34 jlec Exp $
31 +
32 +*ccp4-apps-6.1.3-r6 (01 Jan 2011)
33 +
34 + 01 Jan 2011; Justin Lecher <jlec@g.o> +ccp4-apps-6.1.3-r6.ebuild:
35 + Fit sci-libs/ccp4-libs-6.1.3-r5
36
37 31 Dec 2010; Justin Lecher <jlec@g.o> ccp4-apps-6.1.3-r5.ebuild:
38 Block new ccp4-libs version
39
40
41
42 1.1 sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r6.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r6.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r6.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ccp4-apps-6.1.3-r6.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r6.ebuild,v 1.1 2011/01/01 08:57:34 jlec Exp $
52
53 EAPI="3"
54
55 PYTHON_DEPEND="2"
56
57 inherit autotools eutils flag-o-matic gnuconfig python toolchain-funcs
58
59 MY_P="${PN/-apps}-${PV}"
60
61 SRC="ftp://ftp.ccp4.ac.uk/ccp4"
62
63 #UPDATE="04_03_09"
64 #PATCHDATE="090511"
65
66 PATCH_TOT="0"
67 # Here's a little scriptlet to generate this list from the provided
68 # index.patches file
69 #
70 # i=1; while read -a line; do [[ ${line//#} != ${line} ]] && continue;
71 # echo "PATCH${i}=( ${line[1]}"; echo "${line[0]} )"; (( i++ )); done <
72 # index.patches
73 #PATCH1=( src/topp_
74 #topp.f-r1.16.2.5-r1.16.2.6.diff )
75 #PATCH2=( .
76 #configure-r1.372.2.18-r1.372.2.19.diff )
77
78 DESCRIPTION="Protein X-ray crystallography toolkit"
79 HOMEPAGE="http://www.ccp4.ac.uk/"
80 RESTRICT="mirror"
81 SRC_URI="
82 ${SRC}/${PV}/${MY_P}-core-src.tar.gz
83 http://dev.gentooexperimental.org/~jlec/distfiles/${PV}-oasis4.0.patch.bz2"
84 # patch tarball from upstream
85 [[ -n ${UPDATE} ]] && SRC_URI="${SRC_URI} ${SRC}/${PV}/updates/${P}-src-patch-${UPDATE}.tar.gz"
86 # patches created by us
87 [[ -n ${PATCHDATE} ]] && SRC_URI="${SRC_URI} http://dev.gentooexperimental.org/~jlec/science-dist/${PV}-${PATCHDATE}-updates.patch.bz2"
88
89 for i in $(seq $PATCH_TOT); do
90 NAME="PATCH${i}[1]"
91 SRC_URI="${SRC_URI}
92 ${SRC}/${PV}/patches/${!NAME}"
93 done
94
95 LICENSE="ccp4"
96 SLOT="0"
97 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
98 IUSE="examples X"
99
100 X11DEPS="
101 x11-libs/libX11
102 x11-libs/libXaw
103 x11-libs/libXt
104 x11-libs/libxdl_view"
105
106 TKDEPS="
107 >=dev-lang/tk-8.3
108 >=dev-tcltk/blt-2.4
109 dev-tcltk/iwidgets
110 dev-tcltk/itcl
111 dev-tcltk/itk
112 >=dev-tcltk/tdom-0.8
113 dev-tcltk/tkimg
114 dev-tcltk/tktreectrl"
115
116 SCILIBS="
117 ~sci-libs/ccp4-libs-${PV}
118 >=sci-libs/ccp4-libs-${PV}-r5
119 sci-libs/clipper
120 =sci-libs/fftw-2*
121 sci-libs/mmdb
122 virtual/blas
123 virtual/lapack"
124
125 SCIAPPS="
126 sci-chemistry/pdb-extract
127 sci-chemistry/pymol
128 sci-chemistry/rasmol
129 >=sci-chemistry/oasis-4.0-r1"
130
131 RDEPEND="
132 ${TKDEPS}
133 ${SCILIBS}
134 app-shells/tcsh
135 dev-python/pyxml
136 dev-libs/libxml2
137 dev-libs/libjwc_c
138 dev-libs/libjwc_f
139 dev-libs/boehm-gc
140 !app-office/sc
141 !<sci-chemistry/ccp4-6.1.2
142 X? ( ${X11DEPS} )"
143 DEPEND="${RDEPEND}
144 X? (
145 x11-misc/imake
146 x11-proto/inputproto
147 x11-proto/xextproto
148 )"
149 PDEPEND="${SCIAPPS}"
150
151 S="${WORKDIR}/${MY_P}"
152
153 pkg_setup() {
154 python_set_active_version 2
155 }
156
157 src_prepare() {
158 einfo "Applying upstream patches ..."
159 for patch in $(seq $PATCH_TOT); do
160 base="PATCH${patch}"
161 dir=$(eval echo \${${base}[0]})
162 p=$(eval echo \${${base}[1]})
163 pushd "${dir}" >& /dev/null
164 ccp_patch "${DISTDIR}/${p}"
165 popd >& /dev/null
166 done
167 einfo "Done."
168 echo
169
170 [[ -n ${PATCHDATE} ]] && epatch "${WORKDIR}"/${PV}-${PATCHDATE}-updates.patch
171
172 einfo "Applying Gentoo patches ..."
173
174 # it tries to create libdir, bindir etc on live system in configure
175 ccp_patch "${FILESDIR}"/${PV}-dont-make-dirs-in-configure.patch
176
177 # We already have sci-chemistry/rasmol
178 # Also remember to create the bindir.
179 ccp_patch "${FILESDIR}"/${PV}-dont-build-double-and-make-bindir.patch
180
181 # libraries come from sci-libs/ccp4-libs
182 ccp_patch "${FILESDIR}"/${PV}-dont-build-libs.patch
183
184 # coreutils installs a binary called truncate
185 # ccp_patch "${FILESDIR}"/${PV}-rename-truncate.patch
186 # mv ./doc/truncate.doc ./doc/ftruncate.doc || die
187 # mv ./html/truncate.html ./html/ftruncate.html || die
188
189 # conflicts with media-libs/raptor
190 # ccp_patch "${FILESDIR}"/${PV}-rename-rapper.patch
191 # mv ./doc/rapper.doc ./doc/rappermc.doc || die
192 # mv ./html/rapper.html ./html/rappermc.html || die
193
194 # We have seperate ebuilds for those
195 for bin in molref xia scala imosflm balbes; do
196 ccp_patch "${FILESDIR}"/${PV}-dont-build-${bin}.patch
197 done
198
199 # don't configure what is not build
200 ccp_patch "${FILESDIR}"/${PV}-dont-configure.patch
201
202 # Set python paths correctly
203 ccp_patch "${FILESDIR}"/${PV}-pythonpath.patch
204
205 # Set python paths correctly
206 ccp_patch "${FILESDIR}"/${PV}-pisa.patch
207
208 # Set python paths correctly
209 ccp_patch "${FILESDIR}"/${PV}-clipper-template.patch
210
211 # Fix upstreams code
212 ccp_patch "${FILESDIR}"/${PV}-impl-dec.patch
213
214 # Update things for oasis 4 usage
215 epatch "${WORKDIR}"/${PV}-oasis4.0.patch
216 sed 's: oasis : :g' -i src/Makefile.in || die
217
218 einfo "Done." # done applying Gentoo patches
219 echo
220
221 # Don't build refmac, sfcheck, balbes, molrep binaries; available from the standalone version
222 sed -i -e "/^REFMACTARGETS/s:^.*:REFMACTARGETS="":g" configure
223
224 # Rapper bundles libxml2 and boehm-gc. Don't build, use or install those.
225 pushd src/rapper 2>/dev/null
226 sed -i \
227 -e '/^AC_CONFIG_SUBDIRS(\[gc7.0 libxml2\])/d' \
228 configure.ac
229 sed -i \
230 -e '/^SUBDIRS/s:libxml2 gc7.0::g' \
231 Makefile.am
232 sed -i \
233 -e '/^rapper_LDADD/s:../gc7.0/libgc.la ../libxml2/libxml2.la:-lgc -lxml2:g' \
234 LOOP/Makefile.am
235 sed -i \
236 -e "/^INCLUDES/s:-I../gc7.0/include -I../libxml2/include:-I${EPREFIX}/usr/include/gc -I${EPREFIX}/usr/include/libxml2:g" \
237 LOOP/Makefile.am
238 eautoreconf
239 popd 2>/dev/null
240
241 gnuconfig_update
242
243 python_convert_shebangs $(python_get_version) src/ccp4_pipeline_simple.py ./share/smartie/*.py
244 }
245
246 src_configure() {
247 # Build system is broken if we set LDFLAGS
248 unset LDFLAGS
249
250 # These are broken with ./src/procheck/ps.f
251 filter-flags "-floop-*"
252
253 # GENTOO_OSNAME can be one of:
254 # irix irix64 sunos sunos64 aix hpux osf1 linux freebsd
255 # linux_compaq_compilers linux_intel_compilers generic Darwin
256 # ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers
257 if [[ "$(tc-getFC)" = "ifort" ]]; then
258 if use ia64; then
259 GENTOO_OSNAME="ia64_linux_intel"
260 else
261 # Should be valid for x86, maybe amd64
262 GENTOO_OSNAME="linux_intel_compilers"
263 fi
264 else
265 # Should be valid for x86 and amd64, at least
266 GENTOO_OSNAME="linux"
267 fi
268
269 # Sets up env
270 ln -s \
271 ccp4.setup-bash \
272 "${S}"/include/ccp4.setup
273
274 # We agree to the license by emerging this, set in LICENSE
275 sed -i \
276 -e "s~^\(^agreed=\).*~\1yes~g" \
277 "${S}"/configure
278
279 # Fix up variables -- need to reset CCP4_MASTER at install-time
280 sed -i \
281 -e "s~^\(setenv CCP4_MASTER.*\)/.*~\1${WORKDIR}~g" \
282 -e "s~^\(export CCP4_MASTER.*\)/.*~\1${WORKDIR}~g" \
283 -e "s~^\(.*export CBIN=.*\)\$CCP4.*~\1\$CCP4/libexec/ccp4/bin/~g" \
284 -e "s~^\(.*setenv CBIN .*\)\$CCP4.*~\1\$CCP4/libexec/ccp4/bin/~g" \
285 -e "s~^\(setenv CCP4I_TCLTK.*\)/usr/local/bin~\1${EPREFIX}/usr/bin~g" \
286 -e "s~^\(export CCP4I_TCLTK.*\)/usr/local/bin~\1${EPREFIX}/usr/bin~g" \
287 "${S}"/include/ccp4.setup*
288
289 # Set up variables for build
290 source "${S}"/include/ccp4.setup-sh
291
292 export CC=$(tc-getCC)
293 export CXX=$(tc-getCXX)
294 export COPTIM=${CFLAGS}
295 export CXXOPTIM=${CXXFLAGS}
296 # Default to -O2 if FFLAGS is unset
297 export FC=$(tc-getFC)
298 export FOPTIM=${FFLAGS:- -O2}
299 export BINSORT_SCR="${T}"
300 export CCP4_MASTER="${WORKDIR}"
301 export CCP4I_TCLTK="${EPREFIX}/usr/bin"
302
303 # Can't use econf, configure rejects unknown options like --prefix
304 ./configure \
305 $(use_enable X x) \
306 --with-shared-libs \
307 --with-fftw="${EPREFIX}"/usr \
308 --with-warnings \
309 --disable-pdb_extract \
310 --disable-cctbx \
311 --disable-phaser \
312 --disable-diffractionImg \
313 --disable-clipper \
314 --disable-mosflm \
315 --disable-mrbump \
316 --tmpdir="${TMPDIR}" \
317 ${GENTOO_OSNAME} || die "econf failed"
318
319 # We do this manually, since disabling the clipper libraries also
320 # disables the clipper programs
321 pushd src/clipper_progs 2>/dev/null
322 econf \
323 --prefix="${S}" \
324 --bindir="${ED}"/usr/libexec/ccp4/bin \
325 --with-ccp4="${S}" \
326 --with-clipper="${EPREFIX}"/usr \
327 --with-fftw="${EPREFIX}"/usr \
328 --with-mmdb="${EPREFIX}"/usr \
329 CXX=$(tc-getCXX) \
330 || die
331 popd 2>/dev/null
332 }
333
334 src_compile() {
335 # fsplit is required for the programs
336 pushd lib/src 2>/dev/null
337 emake fsplit -j1 || die
338 popd 2>/dev/null
339
340 # We do this manually, since disabling the clipper libraries also
341 # disables the clipper programs
342 pushd src/clipper_progs 2>/dev/null
343 emake || die
344 popd 2>/dev/null
345
346 emake -j1 || die "emake failed"
347 }
348
349 src_install() {
350 # Set up variables for build
351 source "${S}"/include/ccp4.setup-sh
352
353 # make install || die "install failed"
354
355 # if we don't make this, a ton of programs fail to install
356 mkdir "${S}"/bin || die
357
358 # We do this manually, since disabling the clipper libraries also
359 # disables the clipper programs
360 pushd "${S}"/src/clipper_progs 2>/dev/null
361 emake install || die
362 popd 2>/dev/null
363
364 einstall || die "install failed"
365
366 # Fix env
367 # -e "s~^\(.*setenv PYTHONPATH .*\)\${CCP4}.*~\1\${CCP4}/share/ccp4/python~g" \
368 # -e "s~^\(.*export PYTHONPATH.*\)\${CCP4}.*~\1\${CCP4}/share/ccp4/python~g" \
369 sed -i \
370 -e "s~^\(setenv CCP4_MASTER.*\)${WORKDIR}~\1${EPREFIX}/usr~g" \
371 -e "s~^\(setenv CCP4.*\$CCP4_MASTER\).*~\1~g" \
372 -e "s~^\(setenv CCP4I_TOP\).*~\1 \$CCP4/$(get_libdir)/ccp4/ccp4i~g" \
373 -e "s~^\(setenv DBCCP4I_TOP\).*~\1 \$CCP4/share/ccp4/dbccp4i~g" \
374 -e "s~^\(.*setenv CINCL.*\$CCP4\).*~\1/share/ccp4/include~g" \
375 -e "s~^\(.*setenv CLIBD .*\$CCP4\).*~\1/share/ccp4/data~g" \
376 -e "s~^\(.*setenv CLIBD_MON .*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
377 -e "s~^\(.*setenv MOLREPLIB .*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
378 -e "s~^\(.*setenv CLIB .*\)\$CCP4.*~\1\$CCP4/$(get_libdir)~g" \
379 -e "s~^\(.*setenv CBIN .*\)\$CCP4.*~\1\$CCP4/libexec/ccp4/bin/~g" \
380 -e "s~^\(export CCP4_MASTER.*\)${WORKDIR}~\1${EPREFIX}/usr~g" \
381 -e "s~^\(export CCP4.*\$CCP4_MASTER\).*~\1~g" \
382 -e "s~^\(export CCP4I_TOP\).*~\1=\$CCP4/$(get_libdir)/ccp4/ccp4i~g" \
383 -e "s~^\(export DBCCP4I_TOP\).*~\1=\$CCP4/share/ccp4/dbccp4i~g" \
384 -e "s~^\(.*export CINCL.*\$CCP4\).*~\1/share/ccp4/include~g" \
385 -e "s~^\(.*export CLIBD.*\$CCP4\).*~\1/share/ccp4/data~g" \
386 -e "s~^\(.*export CLIBD_MON.*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
387 -e "s~^\(.*export MOLREPLIB.*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
388 -e "s~^\(.*export CLIB=.*\)\$CCP4.*~\1\$CCP4/$(get_libdir)~g" \
389 -e "s~^\(.*export CBIN=.*\)\$CCP4.*~\1\$CCP4/libexec/ccp4/bin/~g" \
390 -e "/IMOSFLM_VERSION/d" \
391 "${S}"/include/ccp4.setup* || die
392
393 # -e "s~\$CCP4/share/XIAROOT/setup.sh~\$CCP4/share/ccp4/XIAROOT/setup.sh~g" \
394
395 # Don't check for updates on every sourcing of /etc/profile
396 sed -i \
397 -e "s:\(eval python.*\):#\1:g"
398 "${S}"/include/ccp4.setup* || die
399
400 # Collision with sci-chemistry/mrbump
401 rm -f "${S}"/bin/{mrbump,pydbviewer} || die
402
403 # Bins
404 exeinto /usr/libexec/ccp4/bin/
405 doexe "${S}"/bin/* || die
406
407 # Libs
408 for file in "${S}"/lib/*; do
409 if [[ -d ${file} ]]; then
410 continue
411 elif [[ -x ${file} ]]; then
412 dolib.so ${file} || die
413 else
414 insinto /usr/$(get_libdir)
415 doins ${file} || die
416 fi
417 done
418
419 sed \
420 -e 's:test "LD_LIBRARY_PATH":test "$LD_LIBRARY_PATH":g' \
421 -i "${S}"/include/ccp4.setup-sh || die
422
423 # Setup scripts
424 insinto /etc/profile.d
425 # newins "${S}"/include/ccp4.setup-bash ccp4.setup.bash || die
426 newins "${S}"/include/ccp4.setup-csh 40ccp4.setup.csh || die
427 # newins "${S}"/include/ccp4.setup-zsh ccp4.setup.zsh || die
428 newins "${S}"/include/ccp4.setup-sh 40ccp4.setup.sh || die
429 rm -f "${S}"/include/ccp4.setup*
430
431 # smartie -- log parsing
432 insinto /usr/share/ccp4
433 doins -r "${S}"/share/smartie || die
434
435 # Install docs and examples
436 doman "${S}"/man/cat1/*
437
438 mv "${S}"/manual/README "${S}"/manual/README-manual
439 dodoc manual/* README CHANGES doc/* examples/README || die
440
441 rm "${ED}"/usr/share/doc/${PF}/GNUmakefile.*
442 rm "${ED}"/usr/share/doc/${PF}/COPYING.*
443
444 dohtml -r "${S}"/html/*
445
446 if use examples; then
447 for i in data rnase toxd; do
448 docinto examples/${i}
449 dodoc "${S}"/examples/${i}/*
450 done
451
452 docinto examples/tutorial
453 dohtml -r "${S}"/examples/tutorial/html examples/tutorial/tut.css
454 for i in data results; do
455 docinto examples/tutorial/${i}
456 dodoc "${S}"/examples/tutorial/${i}/*
457 done
458
459 for i in non-runnable runnable; do
460 docinto examples/unix/${i}
461 dodoc "${S}"/examples/unix/${i}/*
462 done
463 fi
464 # Needed for ccp4i docs to work
465 dosym ../../share/doc/${PF}/examples /usr/$(get_libdir)/ccp4/examples || die
466 dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/ccp4/html || die
467
468 # Fix overlaps with other packages
469 rm -f "${ED}"/usr/share/man/man1/rasmol.1* "${ED}"/usr/lib/font84.dat || die
470 mv "${ED}"/usr/share/man/man1/truncate{,-ccp4}.1 || die
471 mv "${ED}"/usr/share/man/man1/rapper{,-ccp4}.1 || die
472 mv "${ED}"/usr/share/man/man1/sc{,-ccp4}.1 || die
473
474 cat >> "${T}"/baubles <<- EOF
475 #!${EPREFIX}/bin/bash
476 exec $(PYTHON) \${CCP4}/share/ccp4/smartie/baubles.py
477 EOF
478
479 exeinto /usr/libexec/ccp4/bin/
480 doexe "${T}"/baubles || die
481 }
482
483 pkg_postinst() {
484 einfo "The Web browser defaults to firefox. Change CCP4_BROWSER"
485 einfo "in ${EPREFIX}/etc/profile.d/ccp4.setup* to modify this."
486 }
487
488 # Epatch wrapper for bulk patching
489 ccp_patch() {
490 EPATCH_SINGLE_MSG=" ${1##*/} ..." epatch ${1}
491 }