/[gentoo-x86]/sci-chemistry/pdb2pqr/pdb2pqr-1.7.0.ebuild
Gentoo

Contents of /sci-chemistry/pdb2pqr/pdb2pqr-1.7.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Fri Oct 19 10:10:18 2012 UTC (21 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +7 -3 lines
sci-chemistry/pdb2pqr: Remove virtual/fortran and always call fortran-2_pkg_setup as intend by the updated fortran-2.eclass

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pdb2pqr/pdb2pqr-1.7.0.ebuild,v 1.8 2011/06/21 16:02:05 jlec Exp $
4
5 EAPI="3"
6
7 PYTHON_DEPEND="2:2.5"
8 SUPPORT_PYTHON_ABIS="1"
9 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
10 RESTRICT_PYTHON_ABIS="2.4 3.*"
11
12 inherit autotools eutils fortran-2 flag-o-matic python toolchain-funcs versionator
13
14 MY_PV=$(get_version_component_range 1-2)
15 MY_P="${PN}-${MY_PV}"
16
17 DESCRIPTION="An automated pipeline for performing Poisson-Boltzmann electrostatics calculations"
18 LICENSE="BSD"
19 HOMEPAGE="http://pdb2pqr.sourceforge.net/"
20 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
21
22 SLOT="0"
23 IUSE="doc examples opal"
24 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
25
26 RDEPEND="
27 dev-python/numpy
28 sci-chemistry/openbabel
29 opal? ( dev-python/zsi )"
30 DEPEND="${RDEPEND}"
31
32 S="${WORKDIR}/${MY_P}"
33
34 pkg_setup() {
35 fortran-2_pkg_setup
36 python_pkg_setup
37 }
38
39 src_prepare() {
40 epatch "${FILESDIR}"/${PN}-1.4.0-ldflags.patch
41 epatch "${FILESDIR}"/${PN}-1.4.0-automagic.patch
42 epatch "${FILESDIR}"/${PV}-install.patch
43 sed '50,200s:CWD:DESTDIR:g' -i Makefile.am \
44 || die "Failed to fix Makefile.am"
45 python_src_prepare
46 preparation() {
47 eautoreconf
48 }
49 python_execute_function -s preparation
50 }
51
52 src_configure() {
53 # we need to compile the *.so as pic
54 append-flags -fPIC
55 FFLAGS="${FFLAGS} -fPIC"
56
57 configuration() {
58 # Avoid automagic to numeric
59 NUMPY="${EPREFIX}/$(python_get_sitedir)" \
60 F77="$(tc-getFC)" \
61 econf \
62 $(use_with opal)
63 }
64 python_execute_function -s configuration
65 }
66
67 src_compile() {
68 compilation() {
69 emake || die
70 }
71 python_execute_function -s compilation
72 }
73
74 src_test() {
75 testing() {
76 emake -j1 test \
77 || die "tests failed"
78 }
79 python_execute_function -s testing
80 }
81
82 src_install() {
83 installation() {
84 dodir $(python_get_sitedir)/${PN}
85 emake -j1 DESTDIR="${ED}$(python_get_sitedir)/${PN}" \
86 PREFIX="" install || die "install failed"
87
88 INPATH="$(python_get_sitedir)/${PN}"
89
90 # generate pdb2pqr wrapper
91 cat >> "${T}"/${PN}-$(python_get_version) <<-EOF
92 #!/bin/sh
93 $(PYTHON) ${EPREFIX}/${INPATH}/${PN}.py \$*
94 EOF
95
96 dobin "${T}"/${PN}-$(python_get_version) || die "Failed to install pdb2pqr wrapper."
97
98 insinto "${INPATH}"
99 doins __init__.py || \
100 die "Setting up the pdb2pqr site-package failed."
101
102 exeinto "${INPATH}"
103 doexe ${PN}.py || die "Installing pdb2pqr failed."
104
105 insinto "${INPATH}"/dat
106 doins dat/* || die "Installing data failed."
107
108 exeinto "${INPATH}"/extensions
109 doexe extensions/* || \
110 die "Failed to install extensions."
111
112 insinto "${INPATH}"/src
113 doins src/*.py || die "Installing of python scripts failed."
114
115 exeinto "${INPATH}"/propka
116 doexe propka/_propkalib.so || \
117 die "Failed to install propka."
118
119 insinto "${INPATH}"/propka
120 doins propka/propkalib.py propka/__init__.py || \
121 die "Failed to install propka."
122
123 insinto "${INPATH}"/pdb2pka
124 doins pdb2pka/*.{py,so,DAT,h} || \
125 die "Failed to install pdb2pka."
126
127 insinto "${INPATH}"/pdb2pka/
128 doins pdb2pka/*.{py,so,DAT,h} || \
129 die "Failed to install pdb2pka."
130 }
131 python_execute_function -s installation
132
133 dosym ${PN}-$(python_get_version -f) /usr/bin/${PN}
134
135 if use doc; then
136 cd doc
137 sh genpydoc.sh \
138 || die "genpydoc failed"
139 dohtml -r *.html images pydoc \
140 || die "failed to install html docs"
141 cd -
142 fi
143
144 if use examples; then
145 insinto /usr/share/${PN}/
146 doins -r examples || die "Failed to install examples."
147 fi
148
149 dodoc ChangeLog NEWS README AUTHORS || \
150 die "Failed to install docs"
151 }
152
153 pkg_postinst() {
154 python_mod_optimize ${PN}
155 }
156
157 pkg_postrm() {
158 python_mod_cleanup ${PN}
159 }

  ViewVC Help
Powered by ViewVC 1.1.20