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