/[gentoo-x86]/sci-chemistry/refmac/refmac-5.5.0110-r3.ebuild
Gentoo

Contents of /sci-chemistry/refmac/refmac-5.5.0110-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Mon Jan 6 15:25:52 2014 UTC (4 years, 6 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +5 -4 lines
sci-chemistry/refmac: Punt base.eclass

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/refmac/refmac-5.5.0110-r3.ebuild,v 1.11 2013/02/27 14:40:04 jlec Exp $
4
5 EAPI=4
6
7 inherit eutils fortran-2 flag-o-matic toolchain-funcs versionator
8
9 DESCRIPTION="Macromolecular crystallographic refinement program"
10 HOMEPAGE="http://www.ysbl.york.ac.uk/~garib/refmac"
11 SRC_URI="
12 ${HOMEPAGE}/data/refmac_stable/refmac_${PV}.tar.gz
13 test? ( http://dev.gentooexperimental.org/~jlec/distfiles/test-framework.tar.gz )"
14
15 SLOT="0"
16 LICENSE="ccp4"
17 KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
18 IUSE="test"
19
20 RDEPEND="
21 sci-chemistry/makecif
22 >=sci-libs/ccp4-libs-6.1.3-r7
23 sci-libs/mmdb
24 <sci-libs/monomer-db-1
25 virtual/blas
26 virtual/lapack"
27 DEPEND="${RDEPEND}
28 virtual/pkgconfig"
29
30 FORTRAN_STANDARD="77 90"
31
32 S="${WORKDIR}"
33
34 PATCHES=(
35 "${FILESDIR}"/${PV}-allow-dynamic-linking.patch
36 "${FILESDIR}"/${PV}-gcc4.6.patch
37 )
38
39 src_prepare() {
40 epatch ${PATCHES[@]}
41
42 use test && epatch "${FILESDIR}"/$(get_version_component_range 1-2 ${PV})-test.log.patch
43 [[ ${FC} == *gfortran* ]] && \
44 append-fflags -fno-second-underscore && \
45 append-cflags -DGFORTRAN -DPROTOTYPE && \
46 append-libs -lgfortran -lgfortranbegin -lstdc++
47 [[ ${FC} == *ifort* ]] && \
48 append-libs -lstdc++
49 }
50
51 src_compile() {
52 emake \
53 FC=$(tc-getFC) \
54 CC=$(tc-getCC) \
55 CXX=$(tc-getCXX) \
56 COPTIM="${CFLAGS}" \
57 FOPTIM="${FFLAGS:- -O2}" \
58 VERSION="" \
59 XFFLAGS="" \
60 XCFLAGS="" \
61 LLIBCCP="-lccp4f -lccp4c -lccif $($(tc-getPKG_CONFIG) --libs mmdb)" \
62 LLIBLAPACK="$($(tc-getPKG_CONFIG) --libs lapack blas)" \
63 LLIBOTHERS="${LIBS}" \
64 ${PN} libcheck
65 }
66
67 src_test() {
68 einfo "Starting tests ..."
69 source "${EPREFIX}/etc/profile.d/40ccp4.setup.sh"
70 export PATH="${WORKDIR}/test-framework/scripts:${S}:${PATH}"
71 export CCP4_TEST="${WORKDIR}"/test-framework
72 export CCP4_SCR="${T}"
73 ln -sf refmac "${S}"/refmac5
74 sed '/^ANISOU/d' -i ${CCP4_TEST}/data/pdb/1vr7.pdb
75 ccp4-run-thorough-tests -v test_refmac5 || die
76 }
77
78 src_install() {
79 exeinto /usr/libexec/ccp4/bin/
80 doexe ${PN}
81 dosym refmac /usr/libexec/ccp4/bin/refmac5
82 dosym ../libexec/ccp4/bin/${PN} /usr/bin/${PN}
83 dosym refmac /usr/bin/refmac5
84 dodoc refmac_keywords.pdf bugs_and_features.pdf
85 }

  ViewVC Help
Powered by ViewVC 1.1.20