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/apbs: ChangeLog apbs-1.3-r2.ebuild
Date: Wed, 04 Jan 2012 17:25:35
Message-Id: 20120104172525.BF5D52004C@flycatcher.gentoo.org
1 jlec 12/01/04 17:25:25
2
3 Modified: ChangeLog
4 Added: apbs-1.3-r2.ebuild
5 Log:
6 Rewrite build, rely on pkg-config when possible, move to autotools-utils.eclass, handle static-libs correctly
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.54 sci-chemistry/apbs/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/apbs/ChangeLog?rev=1.54&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/apbs/ChangeLog?rev=1.54&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/apbs/ChangeLog?r1=1.53&r2=1.54
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v
20 retrieving revision 1.53
21 retrieving revision 1.54
22 diff -u -r1.53 -r1.54
23 --- ChangeLog 13 Dec 2011 14:25:50 -0000 1.53
24 +++ ChangeLog 4 Jan 2012 17:25:25 -0000 1.54
25 @@ -1,6 +1,27 @@
26 # ChangeLog for sci-chemistry/apbs
27 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.53 2011/12/13 14:25:50 jlec Exp $
29 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.54 2012/01/04 17:25:25 jlec Exp $
31 +
32 +*apbs-1.3-r2 (04 Jan 2012)
33 +
34 + 04 Jan 2012; Justin Lecher <jlec@g.o> +apbs-1.3-r2.ebuild,
35 + +files/apbs-1.3/0001-autoconf-2.68.patch,
36 + +files/apbs-1.3/0002-python-linking.patch,
37 + +files/apbs-1.3/0003-apbs-1.3-pkg-config-file.patch,
38 + +files/apbs-1.3/0004-apbs-1.3-system-zlib.patch,
39 + +files/apbs-1.3/0005-apbs-1.3-linking.patch,
40 + +files/apbs-1.3/0006-apbs-1.3-clean-targets.patch,
41 + +files/apbs-1.3/0007-apbs-1.3-configure.patch,
42 + +files/apbs-1.3/0008-apbs-1.3-broken-test.patch,
43 + +files/apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch,
44 + +files/apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch,
45 + +files/apbs-1.3/0011-apbs-1.3-shared-linking.patch,
46 + +files/apbs-1.3/0012-apbs-1.3-python-linking-correction.patch,
47 + +files/apbs-1.3/0013-apbs-1.3-tools-installation.patch,
48 + +files/apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch,
49 + +files/apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch:
50 + Rewrite build, rely on pkg-config when possible, move to
51 + autotools-utils.eclass, handle static-libs correctly
52
53 13 Dec 2011; Justin Lecher <jlec@g.o> apbs-1.2.1b-r4.ebuild,
54 apbs-1.3.ebuild, apbs-1.3-r1.ebuild:
55
56
57
58 1.1 sci-chemistry/apbs/apbs-1.3-r2.ebuild
59
60 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/apbs/apbs-1.3-r2.ebuild?rev=1.1&view=markup
61 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/apbs/apbs-1.3-r2.ebuild?rev=1.1&content-type=text/plain
62
63 Index: apbs-1.3-r2.ebuild
64 ===================================================================
65 # Copyright 1999-2012 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/apbs-1.3-r2.ebuild,v 1.1 2012/01/04 17:25:25 jlec Exp $
68
69 EAPI=4
70
71 PYTHON_DEPEND="python? 2"
72
73 inherit autotools-utils eutils fortran-2 python toolchain-funcs versionator
74
75 MY_PV=$(get_version_component_range 1-3)
76 MY_P="${PN}-${MY_PV}"
77
78 DESCRIPTION="For evaluation of electrostatic properties of nanoscale biomolecular systems"
79 HOMEPAGE="http://apbs.sourceforge.net/"
80 SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
81
82 SLOT="0"
83 LICENSE="BSD"
84 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
85 IUSE="arpack doc examples fetk mpi openmp python static-libs tools"
86 REQUIRED_USE="mpi? ( !python )"
87
88 DEPEND="
89 dev-libs/maloc[mpi=]
90 virtual/blas
91 sys-libs/readline
92 virtual/fortran
93 arpack? ( sci-libs/arpack )
94 tools? ( !sci-libs/gts )
95 fetk? (
96 sci-libs/fetk
97 sci-libs/amd
98 sci-libs/umfpack
99 sci-libs/superlu )
100 mpi? ( virtual/mpi )"
101 RDEPEND="${DEPEND}"
102
103 S="${WORKDIR}"/"${MY_P}-source"
104
105 AUTOTOOLS_IN_SOURCE_BUILD=1
106 MAKEOPTS+=" -j1"
107
108 pkg_setup() {
109 fortran-2_pkg_setup
110 use python && python_set_active_version 2 && python_pkg_setup
111 if [[ -z ${MAXMEM} ]]; then
112 einfo "You can specify the max amount of RAM used"
113 einfo "by setting MAXMEM=\"your size in MB\""
114 else
115 einfo "Settings max memory usage to ${MAXMEM} MB"
116 fi
117 }
118
119 # git clone ssh://woodpecker/home/jlec/apbs.git
120 PATCHES=( "${FILESDIR}"/${P}/00{01..15}* )
121
122 src_prepare() {
123 rm -rf contrib/{blas,maloc,opal,zlib} || die
124 find -name "._*" -delete || die
125 touch apbs.pc.in || die
126
127 autotools-utils_src_prepare
128
129 sed \
130 -e "s:GENTOO_PKG_NAME:${PN}:g" \
131 -i Makefile.am || die "Cannot correct package name"
132 sed \
133 -e 's:libmaloc.a:libmaloc.so:g' \
134 -e 's:-lblas::g' \
135 -i configure.ac || die
136 sed -e 's:opal::g' -i contrib/Makefile.am || die
137 sed \
138 -e 's:noinst_PROGRAMS:bin_PROGRAMS:g' \
139 -i tools/*/Makefile.am || die
140 eautoreconf
141 }
142
143 src_configure() {
144 local myeconfargs=( --docdir="${EPREFIX}/usr/share/doc/${PF}" )
145 use arpack && myeconfargs+=( --with-arpack="${EPREFIX}/usr/$(get_libdir)" )
146
147 # check which mpi version is installed and tell configure
148 if use mpi; then
149 export CC="${EPREFIX}/usr/bin/mpicc"
150 export F77="${EPREFIX}/usr/bin/mpif77"
151
152 if has_version sys-cluster/mpich; then
153 myeconfargs+=( --with-mpich="${EPREFIX}/usr" )
154 elif has_version sys-cluster/mpich2; then
155 myeconfargs+=( --with-mpich2="${EPREFIX}/usr" )
156 elif has_version sys-cluster/openmpi; then
157 myeconfargs+=( --with-openmpi="${EPREFIX}/usr" )
158 fi
159 fi || die "Failed to select proper mpi implementation"
160
161 if use fetk; then
162 myeconfargs+=( --with-fetk-include="${EPREFIX}/usr/include" --with-fetk-library="${EPREFIX}/usr/$(get_libdir)" )
163 else
164 myeconfargs+=( --disable-fetk )
165 fi
166
167 [[ -n ${MAXMEM} ]] && myeconfargs+=( --with-maxmem=${MAXMEM} )
168
169 if use python; then
170 myeconfargs+=( --enable-tools )
171 else
172 myeconfargs+=( $(use_enable tools) )
173 fi
174
175 myeconfargs+=(
176 --disable-maloc-rebuild
177 --enable-shared
178 $(use_enable openmp)
179 $(use_enable python)
180 )
181 autotools-utils_src_configure
182 }
183
184 src_test() {
185 export LC_NUMERIC=C
186 cd examples && make test \
187 || die "Tests failed"
188 grep -q 'FAILED' "${S}"/examples/TESTRESULTS.log && die "Tests failed"
189 }
190
191 src_install() {
192 autotools-utils_src_install
193
194 use doc && dohtml -r doc/*
195 use examples && insinto /usr/share/${PN} && doins -r examples
196 use tools && emake DESTDIR="${D}" install-tools
197
198 if use python && ! use mpi; then
199 insinto $(python_get_sitedir)/${PN}
200 doins tools/manip/*.py
201 doins tools/python/{*.py,*.pqr}
202 doins tools/python/*/{*.py,*.so}
203 python_clean_installation_image
204 fi
205 }
206
207 pkg_postinst() {
208 use python && python_mod_optimize ${PN}
209 }
210
211 pkg_postrm() {
212 use python && python_mod_cleanup ${PN}
213 }