summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-01-04 17:25:25 +0000
committerJustin Lecher <jlec@gentoo.org>2012-01-04 17:25:25 +0000
commit6b7e14a060ffd4f91debc1a7ea11efc549a6ebc0 (patch)
treeb4afab1ed84cc471d864139f620a68b2c9c183aa /sci-chemistry
parentStable for AMD64, wrt bug #396913 (diff)
downloadhistorical-6b7e14a060ffd4f91debc1a7ea11efc549a6ebc0.tar.gz
historical-6b7e14a060ffd4f91debc1a7ea11efc549a6ebc0.tar.bz2
historical-6b7e14a060ffd4f91debc1a7ea11efc549a6ebc0.zip
Rewrite build, rely on pkg-config when possible, move to autotools-utils.eclass, handle static-libs correctly
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/apbs/ChangeLog25
-rw-r--r--sci-chemistry/apbs/Manifest24
-rw-r--r--sci-chemistry/apbs/apbs-1.3-r2.ebuild149
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0001-autoconf-2.68.patch37
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0002-python-linking.patch41
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0003-apbs-1.3-pkg-config-file.patch32
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0004-apbs-1.3-system-zlib.patch28
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0005-apbs-1.3-linking.patch70
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0006-apbs-1.3-clean-targets.patch65
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0007-apbs-1.3-configure.patch237
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0008-apbs-1.3-broken-test.patch43
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch41
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch51
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0011-apbs-1.3-shared-linking.patch26
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0012-apbs-1.3-python-linking-correction.patch60
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0013-apbs-1.3-tools-installation.patch70
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch28
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch49
18 files changed, 1070 insertions, 6 deletions
diff --git a/sci-chemistry/apbs/ChangeLog b/sci-chemistry/apbs/ChangeLog
index f9b4465ddb85..0c4db73650ac 100644
--- a/sci-chemistry/apbs/ChangeLog
+++ b/sci-chemistry/apbs/ChangeLog
@@ -1,6 +1,27 @@
# ChangeLog for sci-chemistry/apbs
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.53 2011/12/13 14:25:50 jlec Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.54 2012/01/04 17:25:25 jlec Exp $
+
+*apbs-1.3-r2 (04 Jan 2012)
+
+ 04 Jan 2012; Justin Lecher <jlec@gentoo.org> +apbs-1.3-r2.ebuild,
+ +files/apbs-1.3/0001-autoconf-2.68.patch,
+ +files/apbs-1.3/0002-python-linking.patch,
+ +files/apbs-1.3/0003-apbs-1.3-pkg-config-file.patch,
+ +files/apbs-1.3/0004-apbs-1.3-system-zlib.patch,
+ +files/apbs-1.3/0005-apbs-1.3-linking.patch,
+ +files/apbs-1.3/0006-apbs-1.3-clean-targets.patch,
+ +files/apbs-1.3/0007-apbs-1.3-configure.patch,
+ +files/apbs-1.3/0008-apbs-1.3-broken-test.patch,
+ +files/apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch,
+ +files/apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch,
+ +files/apbs-1.3/0011-apbs-1.3-shared-linking.patch,
+ +files/apbs-1.3/0012-apbs-1.3-python-linking-correction.patch,
+ +files/apbs-1.3/0013-apbs-1.3-tools-installation.patch,
+ +files/apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch,
+ +files/apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch:
+ Rewrite build, rely on pkg-config when possible, move to
+ autotools-utils.eclass, handle static-libs correctly
13 Dec 2011; Justin Lecher <jlec@gentoo.org> apbs-1.2.1b-r4.ebuild,
apbs-1.3.ebuild, apbs-1.3-r1.ebuild:
diff --git a/sci-chemistry/apbs/Manifest b/sci-chemistry/apbs/Manifest
index 4294982dff28..599e303ee03a 100644
--- a/sci-chemistry/apbs/Manifest
+++ b/sci-chemistry/apbs/Manifest
@@ -17,17 +17,33 @@ AUX apbs-1.3-openmp.patch 1843 RMD160 58030d378e217752c56b925e7e17ec4b4eb43e52 S
AUX apbs-1.3-python.patch 985 RMD160 03562872ec1996a93c54bcfce16f4dbf15e7adf4 SHA1 1ea3b38334062c09f91b12edc54c5ed4de915e2e SHA256 fc0ba045bc0fb9b9913c5fa04e1d58f92c5c6df29c1586e7198f17d81d3876ec
AUX apbs-1.3-shared.patch 2888 RMD160 89d7e36f6a361753a178111ce87d01616ccd9864 SHA1 f2178cf365e6c1930fc7a6c661c87064663db7c3 SHA256 f3965767dcdc17e4d97663d2febb7ede717d55736d4ba8554039dda5fd357c93
AUX apbs-1.3-zlib.patch 1231 RMD160 a0278f6883bf045de59aae921072a756495587b9 SHA1 2635e07429e4ad110c347beeaf0cea1f1d279a85 SHA256 77e4752ccd3c466efcadb95c50004c2f62147e9f220d10a871ec7a72d30eb2be
+AUX apbs-1.3/0001-autoconf-2.68.patch 1224 RMD160 74a9085bfd103518a785354bc83d397bd7b6ffa3 SHA1 5f54ba17a18bf7fcbc02bf276197667f46331f75 SHA256 676ef592fb52cef75fa7f53e0ca159471c9d70551324e653868e421f0915f520
+AUX apbs-1.3/0002-python-linking.patch 2212 RMD160 b6c6950ea7b3474122e2229109fce4af6dc8396a SHA1 75549cd23965b4ddebc0155e9c92ab5ca006de32 SHA256 f3a6fc3d73ff105db72cd82827ab6812e0dc1b6071d19a978dbb08c9130b11c7
+AUX apbs-1.3/0003-apbs-1.3-pkg-config-file.patch 927 RMD160 8456047f9428f6df78ce2ec217d69310f3015f70 SHA1 f4a117114c85a77aad748a6ffa5aed0aca04e6b7 SHA256 b5585885d8b1cd15927e3240f8085970639e265c23b464825d2e5a9fd6fa6cee
+AUX apbs-1.3/0004-apbs-1.3-system-zlib.patch 999 RMD160 6eb46534bc2489253439f5f263df67c372b22a26 SHA1 fdb8d06fc07255a5db248627668420aefccd74b4 SHA256 51f7dc4d11dda4922f76620ca9b929f280d7136c50813c5218982927912be046
+AUX apbs-1.3/0005-apbs-1.3-linking.patch 2673 RMD160 ede2d6190cd7a446f9c8e77002cf0ecc26eb3216 SHA1 f5f6b599cafaf732f4d7966e1687791d2044f79a SHA256 4a078632f656739dea24a8160f4f516fadba0678bf61b5cc06186dd0c6c593fb
+AUX apbs-1.3/0006-apbs-1.3-clean-targets.patch 1826 RMD160 5e98a95bdce0d5b1f866b05bb7371c6c9a9674ef SHA1 73ce6084dfc39afbfe75f5d6c9b4b1d1c0e8afa7 SHA256 2f931428eac36022b07a8856c48917e1b7cf4c9dfddcfb311a28e9c4b7cb350e
+AUX apbs-1.3/0007-apbs-1.3-configure.patch 7735 RMD160 401f5901e91f7081994b60c6bb2047843574b8d9 SHA1 5202acec11032c38c21023013a54df8584b79b33 SHA256 8371e3dbb1570b83c9f1ccd8654997d129e14510c55c28652d9447981a088eb1
+AUX apbs-1.3/0008-apbs-1.3-broken-test.patch 1896 RMD160 d0ac81396a6794a7c46c2af0b8a88a2dd12ac424 SHA1 69b711a2ec22c36a55b1942ae3c3e3789bc1760f SHA256 395b3780799b6dc0efe12db39bbd7039339b89ac35602206b0777214d18f7369
+AUX apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch 1247 RMD160 f1ec05b871a19bd115d1e034f66d69ad245c9ac9 SHA1 92a1317c605acbcdec4de52865dda9a6a9775093 SHA256 25356fff07091ff6d13f5f2cefbe61639cad5581c3feccb1fb070f990d1bb5cc
+AUX apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch 1819 RMD160 c82c67fe47d99665707a158cf32e65564866e493 SHA1 fa7d1a6d73cec31c76398916c75af666fe0419b1 SHA256 3cf0dfea9c1faacd4620e75a5861cf9fb561702a2e081d79c0beef1a0b80adeb
+AUX apbs-1.3/0011-apbs-1.3-shared-linking.patch 1197 RMD160 999f31b2056622a4258e84a477e9b4b873d67704 SHA1 d12f41a9597a7f3a94aa8ed90349611aedcc9192 SHA256 b17024321c8eaa9f016039a1bb10aeb826436a22a5b1d9683cfde75e1ed59c4b
+AUX apbs-1.3/0012-apbs-1.3-python-linking-correction.patch 2862 RMD160 b3e78f77f7d2252e6346dc751957515c29f4bb82 SHA1 957f40ab90b1cd4ad462b2902b4f7d0b76a6b799 SHA256 ad8c92ccef3ed56e18a2de313c18ed2fb5e18f1d6cf61d5b5794d86cd003a458
+AUX apbs-1.3/0013-apbs-1.3-tools-installation.patch 2683 RMD160 4a6bd9310002d4ff3686cda8ff908f21ea35ca95 SHA1 7bb596b8d6cad278529f593883bd77dbd1f743a7 SHA256 fd1f4345977b1c714b2408e2cf9b2124e5fe0c2ea760e78f0da3ca390132c1f2
+AUX apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch 1170 RMD160 9c0c56bbf1db22b6fc743602445cdb4bdd3371c5 SHA1 186d8690718c055e07ba1aeec724701b924520f6 SHA256 e092594f4bab6b4c41ff34b7b4ca8cdd5410352ea12f3e74d4277dd1805f9adb
+AUX apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch 2055 RMD160 dd424aa44e3bc1d08a56fcd507731a38025a8473 SHA1 d7f678de1b05dacba0d2b7a33baa9b225cc66441 SHA256 7855076f6e70c462c84a65870d6984a367f0050b5400e780907faf9879857e6a
DIST apbs-1.2.1b-source.tar.gz 40647966 RMD160 4ba1f72a7f9adcf7b283dc18743488143025b398 SHA1 dc3e6933a987ff9fdf88db510db79b3dacb100d6 SHA256 7d088def1ed7689127eb64014ea44069b9d7bfc995941fe5800ff753d48c87be
DIST apbs-1.3-source.tar.gz 48625351 RMD160 c075a747dc28f382f3a383a0944a1b20e0c8a9f1 SHA1 1494f36e35f2e4b1a18d4b22516fad4948c6391f SHA256 5fa5b597f7d5a3d9bb55429ec4fefc69e7d0f918d568c3c4a288088c0fde9ef2
EBUILD apbs-1.2.1b-r4.ebuild 3605 RMD160 9cc3a6e31fef129da866bf90f6a6eeb97710a111 SHA1 c8df66903bcaf4e2cd39715112b9b83280513820 SHA256 38dc067d4a8efd351a15d292b3d00424e3782871e1ff8caada78a8ab2772bfac
EBUILD apbs-1.3-r1.ebuild 4543 RMD160 ad848dd2f7f9f02dc13bbd1ac4b98ccccbb20c8e SHA1 d3140513caa7d5ea77472d560e040a3f38024849 SHA256 04edd7a4849302039b34cbbad5623eeaaf163eb32b20d84fa5253126b85f0f99
+EBUILD apbs-1.3-r2.ebuild 3797 RMD160 0c43f05fe04db4488802b2a8b8815e700b0a6000 SHA1 a08887dd834dd8891dc07e76cc917c065dd42fd2 SHA256 556e07abeb74313aa5a8fdc69c72b6994a3abb2ae9082722672a01dbca4632dc
EBUILD apbs-1.3.ebuild 4358 RMD160 c3897181791ca3715ed77f30031af6a811f2beac SHA1 17c656a149e83de4a8158145ded80423f4fe5d3a SHA256 d3683ca49b49838368d70658a0e28b30f6a172de1709983d11a33bd1dc042cde
-MISC ChangeLog 8992 RMD160 f7012914ac84ddd21f6ddd837569aaf16db2cdb1 SHA1 d35a7d688b8442d94cc309b4a1dbe2d5a6287bf6 SHA256 1d10d93f0c21f6656ffe567787e0686d53505ed8f2339652f69a17d569a569c0
+MISC ChangeLog 10034 RMD160 a3b6a30b63574cba316726a47922371dcf5152fc SHA1 3a0ad2e4445cfea90257708f7e7e19c3ba10531d SHA256 1aea2cdf6aa2ee002bb57063907da7df81d00f3d73239764064aab41b15e8624
MISC metadata.xml 871 RMD160 e50499e926ad62fc924b5c48f6d6fd56519c7cf7 SHA1 fe5335ee3c033f9f0b336663c4065ba4af3f9c8b SHA256 510d88fd555af07b55320109b1a56718980f6eb9e3569f9c39d88c82268cf56f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iEYEAREKAAYFAk7nYHMACgkQgAnW8HDreRad5ACgmPMNryL1Lsbc/9SdpXJ7wXTi
-NA4AoJDqFHzWfBXSzxAfH4SDSSqqAXbE
-=J17d
+iEYEAREKAAYFAk8Ei5AACgkQgAnW8HDreRa18ACeNgsXOGQeeQ2mETxlRp2H6OBp
+l1YAnRvZKKAqxtq4dYbDiKKc04855w+Y
+=rlk6
-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/apbs/apbs-1.3-r2.ebuild b/sci-chemistry/apbs/apbs-1.3-r2.ebuild
new file mode 100644
index 000000000000..e4145b592a25
--- /dev/null
+++ b/sci-chemistry/apbs/apbs-1.3-r2.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/apbs-1.3-r2.ebuild,v 1.1 2012/01/04 17:25:25 jlec Exp $
+
+EAPI=4
+
+PYTHON_DEPEND="python? 2"
+
+inherit autotools-utils eutils fortran-2 python toolchain-funcs versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="For evaluation of electrostatic properties of nanoscale biomolecular systems"
+HOMEPAGE="http://apbs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="arpack doc examples fetk mpi openmp python static-libs tools"
+REQUIRED_USE="mpi? ( !python )"
+
+DEPEND="
+ dev-libs/maloc[mpi=]
+ virtual/blas
+ sys-libs/readline
+ virtual/fortran
+ arpack? ( sci-libs/arpack )
+ tools? ( !sci-libs/gts )
+ fetk? (
+ sci-libs/fetk
+ sci-libs/amd
+ sci-libs/umfpack
+ sci-libs/superlu )
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/"${MY_P}-source"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+MAKEOPTS+=" -j1"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ use python && python_set_active_version 2 && python_pkg_setup
+ if [[ -z ${MAXMEM} ]]; then
+ einfo "You can specify the max amount of RAM used"
+ einfo "by setting MAXMEM=\"your size in MB\""
+ else
+ einfo "Settings max memory usage to ${MAXMEM} MB"
+ fi
+}
+
+# git clone ssh://woodpecker/home/jlec/apbs.git
+PATCHES=( "${FILESDIR}"/${P}/00{01..15}* )
+
+src_prepare() {
+ rm -rf contrib/{blas,maloc,opal,zlib} || die
+ find -name "._*" -delete || die
+ touch apbs.pc.in || die
+
+ autotools-utils_src_prepare
+
+ sed \
+ -e "s:GENTOO_PKG_NAME:${PN}:g" \
+ -i Makefile.am || die "Cannot correct package name"
+ sed \
+ -e 's:libmaloc.a:libmaloc.so:g' \
+ -e 's:-lblas::g' \
+ -i configure.ac || die
+ sed -e 's:opal::g' -i contrib/Makefile.am || die
+ sed \
+ -e 's:noinst_PROGRAMS:bin_PROGRAMS:g' \
+ -i tools/*/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=( --docdir="${EPREFIX}/usr/share/doc/${PF}" )
+ use arpack && myeconfargs+=( --with-arpack="${EPREFIX}/usr/$(get_libdir)" )
+
+ # check which mpi version is installed and tell configure
+ if use mpi; then
+ export CC="${EPREFIX}/usr/bin/mpicc"
+ export F77="${EPREFIX}/usr/bin/mpif77"
+
+ if has_version sys-cluster/mpich; then
+ myeconfargs+=( --with-mpich="${EPREFIX}/usr" )
+ elif has_version sys-cluster/mpich2; then
+ myeconfargs+=( --with-mpich2="${EPREFIX}/usr" )
+ elif has_version sys-cluster/openmpi; then
+ myeconfargs+=( --with-openmpi="${EPREFIX}/usr" )
+ fi
+ fi || die "Failed to select proper mpi implementation"
+
+ if use fetk; then
+ myeconfargs+=( --with-fetk-include="${EPREFIX}/usr/include" --with-fetk-library="${EPREFIX}/usr/$(get_libdir)" )
+ else
+ myeconfargs+=( --disable-fetk )
+ fi
+
+ [[ -n ${MAXMEM} ]] && myeconfargs+=( --with-maxmem=${MAXMEM} )
+
+ if use python; then
+ myeconfargs+=( --enable-tools )
+ else
+ myeconfargs+=( $(use_enable tools) )
+ fi
+
+ myeconfargs+=(
+ --disable-maloc-rebuild
+ --enable-shared
+ $(use_enable openmp)
+ $(use_enable python)
+ )
+ autotools-utils_src_configure
+}
+
+src_test() {
+ export LC_NUMERIC=C
+ cd examples && make test \
+ || die "Tests failed"
+ grep -q 'FAILED' "${S}"/examples/TESTRESULTS.log && die "Tests failed"
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ use doc && dohtml -r doc/*
+ use examples && insinto /usr/share/${PN} && doins -r examples
+ use tools && emake DESTDIR="${D}" install-tools
+
+ if use python && ! use mpi; then
+ insinto $(python_get_sitedir)/${PN}
+ doins tools/manip/*.py
+ doins tools/python/{*.py,*.pqr}
+ doins tools/python/*/{*.py,*.so}
+ python_clean_installation_image
+ fi
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup ${PN}
+}
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0001-autoconf-2.68.patch b/sci-chemistry/apbs/files/apbs-1.3/0001-autoconf-2.68.patch
new file mode 100644
index 000000000000..ea6a27479c57
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0001-autoconf-2.68.patch
@@ -0,0 +1,37 @@
+From 89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea Mon Sep 17 00:00:00 2001
+Message-Id: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:25:55 +0100
+Subject: [PATCH 01/15] autoconf 2.68
+
+---
+ acinclude.m4 | 13 +++++--------
+ 1 files changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 3701ceb..34602e3 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -54,14 +54,11 @@ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_LIBS="$LIBS"
+ LIBS="mangle-func.o $LIBS"
+-AC_TRY_LINK(,foobar();,
+- ac_f77_mangle_type=lowercase,
+- AC_TRY_LINK(,foobar_();,
+- ac_f77_mangle_type=lowercase-underscore,
+- AC_TRY_LINK(,FOOBAR();,
+- ac_f77_mangle_type=uppercase,
+- AC_TRY_LINK(,FOOBAR_();,
+- ac_f77_mangle_type=uppercase-underscore))))
++AC_TRY_LINK(,foobar();,ac_f77_mangle_type=lowercase)
++AC_TRY_LINK(,foobar_();,ac_f77_mangle_type=lowercase-underscore)
++AC_TRY_LINK(,FOOBAR();,ac_f77_mangle_type=uppercase)
++AC_TRY_LINK(,FOOBAR_();,ac_f77_mangle_type=uppercase-underscore)
++
+ LIBS="$ac_save_LIBS"
+ AC_LANG_RESTORE
+ AC_MSG_RESULT($ac_f77_mangle_type)
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0002-python-linking.patch b/sci-chemistry/apbs/files/apbs-1.3/0002-python-linking.patch
new file mode 100644
index 000000000000..4c699ad19f07
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0002-python-linking.patch
@@ -0,0 +1,41 @@
+From 5b208a6ef5fc706b699b3b33bd9248126c54a034 Mon Sep 17 00:00:00 2001
+Message-Id: <5b208a6ef5fc706b699b3b33bd9248126c54a034.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:45:58 +0100
+Subject: [PATCH 02/15] python linking
+
+---
+ tools/python/Makefile.am | 4 ++--
+ tools/python/vgrid/Makefile.am | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tools/python/Makefile.am b/tools/python/Makefile.am
+index 73d25f7..2c1fbea 100644
+--- a/tools/python/Makefile.am
++++ b/tools/python/Makefile.am
+@@ -15,5 +15,5 @@ SUBDIRS = vgrid
+
+ noinst_PROGRAMS = _apbslib.so
+ _apbslib_so_SOURCES = apbslib.c
+-_apbslib_so_LINK = $(PY_CC) $(PY_LINKFLAGS) -o $@ $(PY_SHARED)
+-_apbslib_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.a ${top_builddir}/src/aaa_lib/.libs/libapbs.a ${top_builddir}/contrib/lib/libmaloc.a ${top_builddir}/contrib/blas/.libs/libapbsblas.a $(PY_LDFLAGS) ${z_lib}
++_apbslib_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
++_apbslib_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.a ${top_builddir}/src/aaa_lib/.libs/libapbs.a $(PY_LDFLAGS) ${z_lib} @OPENMP_LIBS@ @maloc_lib@ @mc_lib@
+diff --git a/tools/python/vgrid/Makefile.am b/tools/python/vgrid/Makefile.am
+index b573268..b31c9b6 100644
+--- a/tools/python/vgrid/Makefile.am
++++ b/tools/python/vgrid/Makefile.am
+@@ -15,6 +15,6 @@ CLEANFILES = _vgrid.so
+ if PY_PRESENT
+ noinst_PROGRAMS = _vgrid.so
+ _vgrid_so_SOURCES = vgridlib.c
+- _vgrid_so_LINK = $(PY_CC) $(PY_LINKFLAGS) -o $@ $(PY_SHARED)
+- _vgrid_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.a ${top_builddir}/src/aaa_lib/.libs/libapbs.a $(PY_LDFLAGS) ${top_builddir}/contrib/lib/libmaloc.a @lib_list@
++ _vgrid_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
++ _vgrid_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.a ${top_builddir}/src/aaa_lib/.libs/libapbs.a @lib_list@
+ endif
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0003-apbs-1.3-pkg-config-file.patch b/sci-chemistry/apbs/files/apbs-1.3/0003-apbs-1.3-pkg-config-file.patch
new file mode 100644
index 000000000000..9ae90d2977cb
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0003-apbs-1.3-pkg-config-file.patch
@@ -0,0 +1,32 @@
+From 9876050808e5d43c02d3c703e998a82f7502275d Mon Sep 17 00:00:00 2001
+Message-Id: <9876050808e5d43c02d3c703e998a82f7502275d.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:47:13 +0100
+Subject: [PATCH 03/15] apbs 1.3 pkg-config file
+
+---
+ apbs.pc.in | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/apbs.pc.in b/apbs.pc.in
+new file mode 100644
+index 0000000..c177512
+--- /dev/null
++++ b/apbs.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@/apbs
++
++Name: apbs
++Description: apbs
++Version: @PACKAGE_VERSION@
++Libs: -L${libdir} -lapbsmainroutines -lapbs
++Libs.private: @LIBS@
++Cflags: -I${includedir}
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0004-apbs-1.3-system-zlib.patch b/sci-chemistry/apbs/files/apbs-1.3/0004-apbs-1.3-system-zlib.patch
new file mode 100644
index 000000000000..1a668132f350
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0004-apbs-1.3-system-zlib.patch
@@ -0,0 +1,28 @@
+From 7abe31a7006c97e908ec717f5f85dddd4cd36110 Mon Sep 17 00:00:00 2001
+Message-Id: <7abe31a7006c97e908ec717f5f85dddd4cd36110.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:47:58 +0100
+Subject: [PATCH 04/15] apbs 1.3 system zlib
+
+---
+ src/mg/vgrid.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/mg/vgrid.c b/src/mg/vgrid.c
+index d183bb2..e0669ab 100644
+--- a/src/mg/vgrid.c
++++ b/src/mg/vgrid.c
+@@ -432,7 +432,7 @@ VPUBLIC int Vgrid_gradient(Vgrid *thee, double pt[3], double grad[3]) {
+ /////////////////////////////////////////////////////////////////////////// */
+ #ifdef HAVE_ZLIB
+ #define off_t long
+-#include "../../contrib/zlib/zlib.h"
++#include <zlib.h>
+ #endif
+ VPUBLIC int Vgrid_readGZ(Vgrid *thee, const char *fname) {
+
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0005-apbs-1.3-linking.patch b/sci-chemistry/apbs/files/apbs-1.3/0005-apbs-1.3-linking.patch
new file mode 100644
index 000000000000..dd3f286eff23
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0005-apbs-1.3-linking.patch
@@ -0,0 +1,70 @@
+From 071473a3ead25df253236329511dcc4c63c3b53a Mon Sep 17 00:00:00 2001
+Message-Id: <071473a3ead25df253236329511dcc4c63c3b53a.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:48:36 +0100
+Subject: [PATCH 05/15] apbs 1.3 linking
+
+---
+ bin/Makefile.am | 8 +++-----
+ src/aaa_lib/Makefile.am | 6 +++---
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/bin/Makefile.am b/bin/Makefile.am
+index 7b2f3ee..9dae096 100644
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -15,7 +15,7 @@ build_libraries = @apbs_build_libraries@
+ bindir = ${prefix}/bin
+ bin_PROGRAMS = apbs
+ apbs_SOURCES = main.c
+-apbs_LDADD = ${build_libraries}
++apbs_LDADD = ${build_libraries} -L../src/aaa_lib/.libs/ libapbsmainroutines.la
+
+ # This is a hack I suspect, but needed to force apbs to be
+ # rebuilt anytime the make command is issued
+@@ -27,9 +27,9 @@ BUILT_SOURCES = rm.apbs
+ rm.apbs: Makefile
+ -rm -f apbs
+
+-libdir = ${prefix}/lib
+ lib_LTLIBRARIES = libapbsmainroutines.la
+ libapbsmainroutines_la_SOURCES = routines.c
++libapbsmainroutines_la_LIBADD = -L../src/aaa_lib/.libs/ -lapbs @mc_lib@
+ libapbsmainroutines_la_LDFLAGS = -version-info ${APBS_VERSION}
+
+ INCLUDES = @inc_list@
+@@ -40,6 +40,4 @@ includedir = ${prefix}/include/apbs
+ include_HEADERS = routines.h
+
+ install-data-local:
+- -cp -p ${top_apbsdir}/bin/ApbsClient.py ${prefix}/bin
+- -chmod 755 ${prefix}/bin/ApbsClient.py
+- -rm -f ${prefix}/bin/wsdl2py
+\ No newline at end of file
++ -rm -f $(DESTDIR)${prefix}/bin/wsdl2py
+diff --git a/src/aaa_lib/Makefile.am b/src/aaa_lib/Makefile.am
+index 2c5026b..2495246 100644
+--- a/src/aaa_lib/Makefile.am
++++ b/src/aaa_lib/Makefile.am
+@@ -16,13 +16,13 @@ FEM_LIBS = ${top_builddir}/src/fem/libapbsfem.la
+ MG_LIBS = ${top_builddir}/src/mg/libapbsmg.la
+ PMGZ_LIBS = ${top_builddir}/contrib/pmgZ/libapbspmgz.la
+ AQUA_LIBS = ${top_builddir}/contrib/aqua/libapbsaqua.la
+-BLAS_LIBS = @blas_lib@
++BLAS_LIBS = @BLAS_LIBS@
+
+-libdir = ${prefix}/lib
+ lib_LTLIBRARIES = libapbs.la
+
+ libapbs_la_SOURCES = apbs_link.c
+-libapbs_la_LIBADD = ${GEN_LIBS} ${FEM_LIBS} ${MG_LIBS} ${PMGZ_LIBS} ${AQUA_LIBS} ${BLAS_LIBS}
++libapbs_la_LIBADD = ${GEN_LIBS} ${FEM_LIBS} ${MG_LIBS} ${PMGZ_LIBS} ${AQUA_LIBS} ${BLAS_LIBS} \
++ @OPENMP_LIBS@ @maloc_lib@ @mc_lib@ @z_lib@
+ libapbs_la_LDFLAGS = -version-info ${APBS_VERSION}
+
+ INCLUDES = -I${top_srcdir}/src/generic -I${top_srcdir}/src/mg -I${top_srcdir}/src/fem @inc_list@
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0006-apbs-1.3-clean-targets.patch b/sci-chemistry/apbs/files/apbs-1.3/0006-apbs-1.3-clean-targets.patch
new file mode 100644
index 000000000000..b157252647e8
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0006-apbs-1.3-clean-targets.patch
@@ -0,0 +1,65 @@
+From e000438cebba988300c1210bc92a62635ba2ddf8 Mon Sep 17 00:00:00 2001
+Message-Id: <e000438cebba988300c1210bc92a62635ba2ddf8.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:49:24 +0100
+Subject: [PATCH 06/15] apbs 1.3 clean targets
+
+---
+ Makefile.am | 32 +++++++++++++++++++++++++++-----
+ 1 files changed, 27 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 437402d..af3a3a3 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -16,6 +16,9 @@ SUFFIXES = .H .h .C .cc .c .f .o
+
+ SUBDIRS = contrib src bin @apbs_do_tools@
+
++pkgconfigdir = @pkgconfigdir@
++pkgconfig_DATA = apbs.pc
++
+ distclean-local: clean-local
+
+ clean-local: clean-ac
+@@ -27,11 +30,30 @@ clean-ac:
+ install-exec-local:
+ -rm -f ./bin/apbs
+
+-install-data-local:
+- mkdir -p ${prefix}/share
+- -cp -rf examples ${prefix}/share
+- -cp -rf doc ${prefix}/share
+- -cp -rf tools ${prefix}/share
++install-data-local: install-cleanup
++ -rm -f doc/LICENSE.txt
++
++install-cleanup:
++ -rm -f tools/manip/*.pyc
++ -rm -f tools/**/*.o
++ -rm -f tools/**/*.c
++ -rm -f tools/**/*.f
++ -rm -f tools/**/*Makefile*
++ -rm -f tools/**/**/*.o
++ -rm -f tools/**/**/*.c
++ -rm -f tools/**/**/*.f
++ -rm -f tools/**/**/*Makefile*
++ -rm -f tools/*Makefile*
++ -rm -f examples/*Makefile*
++ -rm -f examples/**/*Makefile*
++
++install-tools:
++ mkdir -p $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/tools
++ -cp -rf tools $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/
++
++install-examples:
++ mkdir -p $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/examples
++ -cp -rf examples $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/
+
+ test:
+ cd examples; make test
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0007-apbs-1.3-configure.patch b/sci-chemistry/apbs/files/apbs-1.3/0007-apbs-1.3-configure.patch
new file mode 100644
index 000000000000..38c1cb8d7934
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0007-apbs-1.3-configure.patch
@@ -0,0 +1,237 @@
+From b196b6b83a969e6c7ee60e3cdfe03b76eb87bd11 Mon Sep 17 00:00:00 2001
+Message-Id: <b196b6b83a969e6c7ee60e3cdfe03b76eb87bd11.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:50:19 +0100
+Subject: [PATCH 07/15] apbs 1.3 configure
+
+---
+ configure.ac | 117 +++++++++++++++------------------------------------------
+ 1 files changed, 31 insertions(+), 86 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6020fbf..c91abb5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,4 +1,4 @@
+-1.3dnl ##########################################################################
++dnl ##########################################################################
+ dnl APBS -- Adaptive Poisson-Boltzmann Solver
+ dnl
+ dnl Nathan A. Baker (nathan.baker@pnl.gov)
+@@ -71,6 +71,10 @@ AM_CONFIG_HEADER(src/aaa_inc/apbscfg.h)
+ AC_CONFIG_AUX_DIR(config)
+ AC_PREFIX_DEFAULT(${HOME})
+ AC_CANONICAL_SYSTEM
++LT_INIT
++LT_LANG([Fortran 77])
++AC_F77_DUMMY_MAIN
++AC_F77_LIBRARY_LDFLAGS
+
+ dnl ##########################################################################
+ dnl 1. automake initialization (uncomment only if rebuilding Makefile.in's)
+@@ -152,8 +156,7 @@ dnl ##########################################################################
+ AC_MSG_CHECKING([for --enable-python])
+ AC_ARG_ENABLE(
+ [python],
+- AS_HELP_STRING([--enable-python],[enables Python wrapper compilation]),,
+- [enable_python=no]
++ AS_HELP_STRING([--enable-python],[enables Python wrapper compilation])
+ )
+ if test x"$enable_python" != "xno"; then
+ AC_MSG_RESULT([yes])
+@@ -582,6 +585,7 @@ if test x"$enable_python" != "xno"; then
+ PY_SHARED="-shared"
+ CC="${CC} -fPIC"
+ F77="${F77} -fPIC"
++ PY_LDFLAGS="-lpython$PY_VERSION"
+ ;;
+ irix*)
+ PY_SHARED="-shared"
+@@ -717,8 +721,7 @@ if test -z "${USE_FETK}"; then
+ AC_MSG_CHECKING([for --disable-maloc-rebuild])
+ AC_ARG_ENABLE(
+ [maloc-rebuild],
+- AS_HELP_STRING([--disable-maloc-rebuild], [disable rebuilding maloc]),,
+- [enable_maloc_rebuild=yes]
++ AS_HELP_STRING([--disable-maloc-rebuild], [disable rebuilding maloc])
+ )
+
+ if test x"$enable_maloc_rebuild" = "xno"; then
+@@ -981,8 +984,7 @@ dnl # -----------------------
+ AC_MSG_CHECKING([for --disable-tools])
+ AC_ARG_ENABLE(
+ [tools],
+- AS_HELP_STRING([--disable-tools],[disable tool compilation]),,
+- [enable_tools=yes]
++ AS_HELP_STRING([--disable-tools],[disable tool compilation])
+ )
+ apbs_do_tools=""
+ if test x"$enable_tools" != "xno"; then
+@@ -999,45 +1001,10 @@ AC_SUBST(apbs_do_tools)
+ dnl # -----------------------
+ dnl # HANDLE THE BLAS LIBRARIES
+ dnl # -----------------------
+-blas_lib=""
+-AC_ARG_WITH(
+- [blas],
+- AS_HELP_STRING([--with-blas=LDFLAGS], [link to user-specified BLAS (specify flags to pass to ld)])
+- )
+-AC_MSG_CHECKING([for --with-blas])
+-if test x"$with_blas" != "xno" -a -n "$with_blas"; then
+- blas_lib="${with_blas}"
+- AC_MSG_RESULT([${blas_lib}])
+- AC_ARG_WITH(
+- [blas_name],
+- AS_HELP_STRING([--with-blas-name=NAME], [name of BLAS library, defaults to blas]),,
+- [with_blas_name="blas"]
+- )
+- if test x"$with_blas_name" != "xno" -a -n "$with_blas_name"; then
+- blas_name="${with_blas_name}"
+- fi
+- AC_MSG_NOTICE([checking ${blas_name} using ${blas_lib}])
+- AC_LANG_FORTRAN77
+- LDFLAGS_SAVE=${LDFLAGS};
+- CPPFLAGS_SAVE=${CPPFLAGS};
+- LDFLAGS="-L${maloc_lib_path} ${blas_lib}";
+- AC_CHECK_LIB(${blas_name},dscal,
+- [blas_found="yes"],
+- [blas_found=""],
+- [${blas_lib} ${socket_lib} ${nsl_lib} ${math_lib}])
+- LDFLAGS=${LDFLAGS_SAVE};
+- CPPFLAGS=${CPPFLAGS_SAVE};
+- if test -z "${blas_found}"; then
+- AC_MSG_ERROR([BLAS libraries or headers missing: exiting on error!])
+- fi
+- apbs_do_blas=""
+- AC_LANG_C
+-else
+- AC_MSG_RESULT([no])
+- apbs_do_blas="blas"
+- blas_lib=${contrib_path}/blas/.libs/libapbsblas.a
+-fi
++apbs_do_blas=""
++PKG_CHECK_MODULES([BLAS],[blas])
+ AC_SUBST(apbs_do_blas)
++AC_SUBST([BLAS_LIBS])
+
+ dnl # --------------------------------
+ dnl # HANDLE ZLIB COMPILATION
+@@ -1047,13 +1014,12 @@ z_lib=
+ AC_MSG_CHECKING([--disable-zlib])
+ AC_ARG_ENABLE(
+ [zlib],
+- AS_HELP_STRING([--disable-zlib], [disable zlib compilation]),,
+- [disable_zlib=no]
++ AS_HELP_STRING([--disable-zlib], [disable zlib compilation])
+ )
+-if test x"$disable_zlib" == "xno"; then
++if test x"$disable_zlib" != "xno"; then
+ AC_MSG_RESULT([yes])
+ zlib="zlib"
+- z_lib=${contrib_path}/zlib/.libs/libz.a
++ z_lib=-lz
+ AC_DEFINE([HAVE_ZLIB], [], [have zlib compression enabled])
+ fi
+ AC_SUBST(zlib)
+@@ -1143,8 +1109,7 @@ dnl # -----------------------
+ AC_MSG_CHECKING([for --enable-abps-quiet])
+ AC_ARG_ENABLE(
+ [abps-quiet],
+- AS_HELP_STRING([--enable-abps-quiet],[prevent APBS diagnostic messages from displaying to stdout]),,
+- [enable_apbs_quiet=no]
++ AS_HELP_STRING([--enable-abps-quiet],[prevent APBS diagnostic messages from displaying to stdout])
+ )
+ if test x"$enable_apbs_quiet" != "xno"; then
+ AC_MSG_RESULT([yes])
+@@ -1156,36 +1121,7 @@ fi
+ dnl # -----------------------
+ dnl # CHECK WHETHER YOU WANT TO DISABLE OPENMP SUPPORT
+ dnl # -----------------------
+-AC_MSG_CHECKING([for --disable-openmp])
+-AC_ARG_ENABLE(
+- [openmp],
+- AS_HELP_STRING([--disable-openmp],[disables OpenMP compiler support]),,
+- [disable_openmp=yes]
+-)
+-if test x"$disable_openmp" != "xyes"; then
+- AC_MSG_RESULT([yes])
+-else
+- AC_MSG_RESULT([no])
+- if [[ "${CC}" = "icc" ] && [ "${F77}" = "ifort" ]]; then
+- CFLAGS="${CFLAGS} -openmp"
+- FFLAGS="${FFLAGS} -openmp -assume cc_omp"
+- LDFLAGS="${LDFLAGS} -static-intel"
+- fi
+-
+- if [[ "${CC}" = "gcc" ] && [ "${F77}" = "gfortran" ]]; then
+- gcc_version=`gcc --version`
+- gcc_complete_version=`echo ${gcc_version} | awk '{printf("%s",$3)}' | awk -F'.' '{print $1$2}'`
+-
+- if test ["${gcc_complete_version}" -ge 42]; then
+- CFLAGS="${CFLAGS} -fopenmp"
+- FFLAGS="${FFLAGS} -fopenmp"
+- else
+- AC_MSG_RESULT([WARNING])
+- AC_MSG_RESULT([WARNING Version of gcc/gfortran does not support OpenMP. Disabling.])
+- AC_MSG_RESULT([WARNING])
+- fi
+- fi
+-fi
++AC_OPENMP
+
+ dnl # -----------------------
+ dnl # CHECK FOR WINDOWS SPECIFIC LIBRARIES
+@@ -1217,7 +1153,7 @@ dnl # COMPILATIONS
+ dnl # -----------------------
+ top_srcdir="`pwd`"
+ base_list="${FLIBS} ${tree_lib} ${vmetis_lib} ${vor_lib} ${mcx_lib} ${mc_lib} \
+- ${thread_lib} ${mpi_lib} ${math_lib} ${rl_lib} ${socket_lib} ${nsl_lib} ${blas_lib} ${z_lib}"
++ ${thread_lib} ${mpi_lib} ${math_lib} ${rl_lib} ${socket_lib} ${nsl_lib} ${BLAS_LIBS} ${z_lib}"
+
+ case $host_os in
+
+@@ -1284,6 +1220,17 @@ else
+ fi
+ AC_SUBST(apbs_build_libraries)
+
++# Additional arguments (and substitutions)
++# Allow the pkg-config directory to be set
++AC_ARG_WITH(pkgconfigdir,
++ AC_HELP_STRING([--with-pkgconfigdir],
++ [Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
++ [pkgconfigdir=${withval}],
++ [pkgconfigdir='${libdir}/pkgconfig'])
++
++AC_SUBST([pkgconfigdir])
++AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
++
+ dnl ##########################################################################
+ dnl 11. generate the makefiles
+ dnl ##########################################################################
+@@ -1292,12 +1239,8 @@ AC_CONFIG_FILES([
+ Makefile
+
+ contrib/Makefile
+- contrib/blas/Makefile
+ contrib/pmgZ/Makefile
+ contrib/aqua/Makefile
+- contrib/opal/Makefile
+- contrib/opal/ZSI/Makefile
+- contrib/zlib/Makefile
+
+ tools/Makefile
+ tools/mesh/Makefile
+@@ -1332,6 +1275,8 @@ AC_CONFIG_FILES([
+
+ bin/Makefile
+
++ apbs.pc:apbs.pc.in
++
+ ])
+ AC_OUTPUT
+
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0008-apbs-1.3-broken-test.patch b/sci-chemistry/apbs/files/apbs-1.3/0008-apbs-1.3-broken-test.patch
new file mode 100644
index 000000000000..4c481a574195
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0008-apbs-1.3-broken-test.patch
@@ -0,0 +1,43 @@
+From 6bcd14554262bf366aa371873c22cccb21b32850 Mon Sep 17 00:00:00 2001
+Message-Id: <6bcd14554262bf366aa371873c22cccb21b32850.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 3 Jan 2012 20:59:43 +0100
+Subject: [PATCH 08/15] apbs 1.3 broken test
+
+---
+ examples/Makefile.am | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+diff --git a/examples/Makefile.am b/examples/Makefile.am
+index 6cf5664..adf901f 100644
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -22,7 +22,6 @@ clean:
+ cd born; make clean
+ cd FKBP; make clean
+ cd hca-bind; make clean
+- cd ion-pmf; make clean
+ cd ion-protein; make clean
+ cd ionize; make clean
+ cd pka-lig; make clean
+@@ -39,7 +38,6 @@ test:
+ cd born; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd FKBP; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd hca-bind; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+- cd ion-pmf; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd ion-protein; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd ionize; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd pka-lig; make test; cat TESTRESULTS.log >> ../TESTRESULTS.log
+@@ -56,7 +54,6 @@ testocd:
+ cd born; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd FKBP; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd hca-bind; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+- cd ion-pmf; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd ion-protein; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd ionize; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+ cd pka-lig; make testocd; cat TESTRESULTS.log >> ../TESTRESULTS.log
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch b/sci-chemistry/apbs/files/apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch
new file mode 100644
index 000000000000..136d86bc8a18
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0009-apbs-1.3-use-pkg-config-for-zlib-detection.patch
@@ -0,0 +1,41 @@
+From a7705f4957dca398031f1b6f3a74494004588c4d Mon Sep 17 00:00:00 2001
+Message-Id: <a7705f4957dca398031f1b6f3a74494004588c4d.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 10:52:29 +0100
+Subject: [PATCH 09/15] apbs 1.3 use pkg-config for zlib detection
+
+---
+ configure.ac | 15 ++++-----------
+ 1 files changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c91abb5..53deb06 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1011,17 +1011,10 @@ dnl # HANDLE ZLIB COMPILATION
+ dnl # --------------------------------
+ disable_zlib=yes
+ z_lib=
+-AC_MSG_CHECKING([--disable-zlib])
+-AC_ARG_ENABLE(
+- [zlib],
+- AS_HELP_STRING([--disable-zlib], [disable zlib compilation])
+-)
+-if test x"$disable_zlib" != "xno"; then
+- AC_MSG_RESULT([yes])
+- zlib="zlib"
+- z_lib=-lz
+- AC_DEFINE([HAVE_ZLIB], [], [have zlib compression enabled])
+-fi
++zlib=
++PKG_CHECK_MODULES([ZLIB],[zlib])
++z_lib=$(ZLIB_LIBS)
++AC_DEFINE([HAVE_ZLIB], [], [have zlib compression enabled])
+ AC_SUBST(zlib)
+ AC_SUBST(z_lib)
+
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch b/sci-chemistry/apbs/files/apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch
new file mode 100644
index 000000000000..b955e9237668
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0010-apbs-1.3-use-OPENMP_CFLAGS-instead-of-OPENMP_LIBS.patch
@@ -0,0 +1,51 @@
+From c09358a2aca006d93d8bc7525efe656f1b4f9c0a Mon Sep 17 00:00:00 2001
+Message-Id: <c09358a2aca006d93d8bc7525efe656f1b4f9c0a.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 11:05:04 +0100
+Subject: [PATCH 10/15] apbs 1.3 use OPENMP_CFLAGS instead of OPENMP_LIBS
+
+---
+ configure.ac | 4 ++--
+ src/aaa_lib/Makefile.am | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 53deb06..9837a57 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1013,7 +1013,7 @@ disable_zlib=yes
+ z_lib=
+ zlib=
+ PKG_CHECK_MODULES([ZLIB],[zlib])
+-z_lib=$(ZLIB_LIBS)
++z_lib=${ZLIB_LIBS}
+ AC_DEFINE([HAVE_ZLIB], [], [have zlib compression enabled])
+ AC_SUBST(zlib)
+ AC_SUBST(z_lib)
+@@ -1115,7 +1115,7 @@ dnl # -----------------------
+ dnl # CHECK WHETHER YOU WANT TO DISABLE OPENMP SUPPORT
+ dnl # -----------------------
+ AC_OPENMP
+-
++CFLAGS+=" ${OPENMP_CFLAGS}"
+ dnl # -----------------------
+ dnl # CHECK FOR WINDOWS SPECIFIC LIBRARIES
+ dnl # -----------------------
+diff --git a/src/aaa_lib/Makefile.am b/src/aaa_lib/Makefile.am
+index 2495246..9fcbcaa 100644
+--- a/src/aaa_lib/Makefile.am
++++ b/src/aaa_lib/Makefile.am
+@@ -22,7 +22,7 @@ lib_LTLIBRARIES = libapbs.la
+
+ libapbs_la_SOURCES = apbs_link.c
+ libapbs_la_LIBADD = ${GEN_LIBS} ${FEM_LIBS} ${MG_LIBS} ${PMGZ_LIBS} ${AQUA_LIBS} ${BLAS_LIBS} \
+- @OPENMP_LIBS@ @maloc_lib@ @mc_lib@ @z_lib@
++ @maloc_lib@ @mc_lib@ @z_lib@
+ libapbs_la_LDFLAGS = -version-info ${APBS_VERSION}
+
+ INCLUDES = -I${top_srcdir}/src/generic -I${top_srcdir}/src/mg -I${top_srcdir}/src/fem @inc_list@
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0011-apbs-1.3-shared-linking.patch b/sci-chemistry/apbs/files/apbs-1.3/0011-apbs-1.3-shared-linking.patch
new file mode 100644
index 000000000000..f0c7259b0d2b
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0011-apbs-1.3-shared-linking.patch
@@ -0,0 +1,26 @@
+From 0f26ce7c0c5013ba72c6bf5fcf04004240e79d26 Mon Sep 17 00:00:00 2001
+Message-Id: <0f26ce7c0c5013ba72c6bf5fcf04004240e79d26.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 11:36:56 +0100
+Subject: [PATCH 11/15] apbs 1.3 shared linking
+
+---
+ tools/python/vgrid/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tools/python/vgrid/Makefile.am b/tools/python/vgrid/Makefile.am
+index b31c9b6..50c09ac 100644
+--- a/tools/python/vgrid/Makefile.am
++++ b/tools/python/vgrid/Makefile.am
+@@ -16,5 +16,5 @@ if PY_PRESENT
+ noinst_PROGRAMS = _vgrid.so
+ _vgrid_so_SOURCES = vgridlib.c
+ _vgrid_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
+- _vgrid_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.a ${top_builddir}/src/aaa_lib/.libs/libapbs.a @lib_list@
++ _vgrid_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.la ${top_builddir}/src/aaa_lib/.libs/libapbs.la @lib_list@
+ endif
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0012-apbs-1.3-python-linking-correction.patch b/sci-chemistry/apbs/files/apbs-1.3/0012-apbs-1.3-python-linking-correction.patch
new file mode 100644
index 000000000000..56a86d21d184
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0012-apbs-1.3-python-linking-correction.patch
@@ -0,0 +1,60 @@
+From 73a1f1d63d7617fea85c10990b1f35c9567a3573 Mon Sep 17 00:00:00 2001
+Message-Id: <73a1f1d63d7617fea85c10990b1f35c9567a3573.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 11:49:50 +0100
+Subject: [PATCH 12/15] apbs 1.3 python linking correction
+
+---
+ bin/Makefile.am | 4 ++--
+ tools/python/Makefile.am | 2 +-
+ tools/python/vgrid/Makefile.am | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/bin/Makefile.am b/bin/Makefile.am
+index 9dae096..574be3d 100644
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -15,7 +15,7 @@ build_libraries = @apbs_build_libraries@
+ bindir = ${prefix}/bin
+ bin_PROGRAMS = apbs
+ apbs_SOURCES = main.c
+-apbs_LDADD = ${build_libraries} -L../src/aaa_lib/.libs/ libapbsmainroutines.la
++apbs_LDADD = ${build_libraries} .libs/libapbsmainroutines.la
+
+ # This is a hack I suspect, but needed to force apbs to be
+ # rebuilt anytime the make command is issued
+@@ -29,7 +29,7 @@ rm.apbs: Makefile
+
+ lib_LTLIBRARIES = libapbsmainroutines.la
+ libapbsmainroutines_la_SOURCES = routines.c
+-libapbsmainroutines_la_LIBADD = -L../src/aaa_lib/.libs/ -lapbs @mc_lib@
++libapbsmainroutines_la_LIBADD = ../src/aaa_lib/.libs/libapbs.la @mc_lib@
+ libapbsmainroutines_la_LDFLAGS = -version-info ${APBS_VERSION}
+
+ INCLUDES = @inc_list@
+diff --git a/tools/python/Makefile.am b/tools/python/Makefile.am
+index 2c1fbea..6a09644 100644
+--- a/tools/python/Makefile.am
++++ b/tools/python/Makefile.am
+@@ -16,4 +16,4 @@ SUBDIRS = vgrid
+ noinst_PROGRAMS = _apbslib.so
+ _apbslib_so_SOURCES = apbslib.c
+ _apbslib_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
+-_apbslib_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.a ${top_builddir}/src/aaa_lib/.libs/libapbs.a $(PY_LDFLAGS) ${z_lib} @OPENMP_LIBS@ @maloc_lib@ @mc_lib@
++_apbslib_so_LDADD = -L${top_builddir}/bin/.libs/ -lapbsmainroutines -L${top_builddir}/src/aaa_lib/.libs/ -lapbs $(PY_LDFLAGS) ${z_lib} @maloc_lib@ @mc_lib@
+diff --git a/tools/python/vgrid/Makefile.am b/tools/python/vgrid/Makefile.am
+index 50c09ac..165cd4d 100644
+--- a/tools/python/vgrid/Makefile.am
++++ b/tools/python/vgrid/Makefile.am
+@@ -16,5 +16,5 @@ if PY_PRESENT
+ noinst_PROGRAMS = _vgrid.so
+ _vgrid_so_SOURCES = vgridlib.c
+ _vgrid_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
+- _vgrid_so_LDADD = ${top_builddir}/bin/.libs/libapbsmainroutines.la ${top_builddir}/src/aaa_lib/.libs/libapbs.la @lib_list@
++ _vgrid_so_LDADD = -L${top_builddir}/bin/.libs/ -lapbsmainroutines -L${top_builddir}/src/aaa_lib/.libs/ -lapbs @lib_list@
+ endif
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0013-apbs-1.3-tools-installation.patch b/sci-chemistry/apbs/files/apbs-1.3/0013-apbs-1.3-tools-installation.patch
new file mode 100644
index 000000000000..b52483f54e70
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0013-apbs-1.3-tools-installation.patch
@@ -0,0 +1,70 @@
+From 4fd349da80e63c6fd3fbb2f015d8d802c326508e Mon Sep 17 00:00:00 2001
+Message-Id: <4fd349da80e63c6fd3fbb2f015d8d802c326508e.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 13:29:19 +0100
+Subject: [PATCH 13/15] apbs 1.3 tools installation
+
+---
+ Makefile.am | 2 +-
+ tools/arpack/Makefile.am | 2 +-
+ tools/manip/Makefile.am | 2 +-
+ tools/mesh/Makefile.am | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index af3a3a3..60ba9bd 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -49,7 +49,7 @@ install-cleanup:
+
+ install-tools:
+ mkdir -p $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/tools
+- -cp -rf tools $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/
++ -cp -rf tools/conversion tools/visualization tools/matlab $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/tools
+
+ install-examples:
+ mkdir -p $(DESTDIR)${prefix}/share/GENTOO_PKG_NAME/examples
+diff --git a/tools/arpack/Makefile.am b/tools/arpack/Makefile.am
+index 6c05f4a..2362114 100644
+--- a/tools/arpack/Makefile.am
++++ b/tools/arpack/Makefile.am
+@@ -10,7 +10,7 @@ AUTOMAKE_OPTIONS = no-dependencies
+ SUFFIXES = .H .h .C .c .f .o
+ CCLD = $(F77)
+
+-noinst_PROGRAMS = driver
++bin_PROGRAMS = driver
+ driver_SOURCES = driver.c readhb.f ardriv.f
+ driver_LDADD = ../../src/aaa_lib/libapbs.la @arpack_lib@ @apbs_build_libraries@
+ INCLUDES = @inc_list@
+diff --git a/tools/manip/Makefile.am b/tools/manip/Makefile.am
+index f5f692b..f64f8fc 100644
+--- a/tools/manip/Makefile.am
++++ b/tools/manip/Makefile.am
+@@ -10,7 +10,7 @@ AUTOMAKE_OPTIONS = no-dependencies
+ SUFFIXES = .H .h .C .c .f .o
+ CCLD = $(CC)
+
+-noinst_PROGRAMS = coulomb born
++bin_PROGRAMS = coulomb born
+ coulomb_SOURCES = coulomb.c
+ coulomb_LDADD = ../../src/aaa_lib/libapbs.la @apbs_build_libraries@
+ born_SOURCES = born.c
+diff --git a/tools/mesh/Makefile.am b/tools/mesh/Makefile.am
+index 8ad5cfb..3cd9268 100644
+--- a/tools/mesh/Makefile.am
++++ b/tools/mesh/Makefile.am
+@@ -21,7 +21,7 @@ uhbd_asc2bin_CCLD = $(F77)
+ else
+ UHBD =
+ endif
+-noinst_PROGRAMS = mgmesh dxmath mergedx mergedx2 $(UHBD) smooth value dx2mol dx2uhbd benchmark similarity analysis multivalue del2dx tensor2dx
++bin_PROGRAMS = mgmesh dxmath mergedx mergedx2 $(UHBD) smooth value dx2mol dx2uhbd benchmark similarity analysis multivalue del2dx tensor2dx
+
+ mgmesh_SOURCES = mgmesh.c
+ mgmesh_LDADD = ../../src/aaa_lib/libapbs.la @apbs_build_libraries@
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch b/sci-chemistry/apbs/files/apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch
new file mode 100644
index 000000000000..08e98276ca05
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0014-apbs-1.3-pythonlib-fix.patch
@@ -0,0 +1,28 @@
+From 86ae9a75144d1d9600e7a9045e1154fb2f481efb Mon Sep 17 00:00:00 2001
+Message-Id: <86ae9a75144d1d9600e7a9045e1154fb2f481efb.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 14:05:22 +0100
+Subject: [PATCH 14/15] apbs 1.3 pythonlib fix
+
+---
+ tools/python/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tools/python/Makefile.am b/tools/python/Makefile.am
+index 6a09644..aecd6ed 100644
+--- a/tools/python/Makefile.am
++++ b/tools/python/Makefile.am
+@@ -13,7 +13,7 @@ CCLD = $(PY_CC)
+ CLEANFILES = _apbslib.so
+ SUBDIRS = vgrid
+
+-noinst_PROGRAMS = _apbslib.so
++pyexec_LTLIBRARIES = _apbslib.so
+ _apbslib_so_SOURCES = apbslib.c
+ _apbslib_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
+ _apbslib_so_LDADD = -L${top_builddir}/bin/.libs/ -lapbsmainroutines -L${top_builddir}/src/aaa_lib/.libs/ -lapbs $(PY_LDFLAGS) ${z_lib} @maloc_lib@ @mc_lib@
+--
+1.7.8.2
+
diff --git a/sci-chemistry/apbs/files/apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch b/sci-chemistry/apbs/files/apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch
new file mode 100644
index 000000000000..a9dd87ba761b
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3/0015-apbs-1.3-pythonlib-fix.patch
@@ -0,0 +1,49 @@
+From 013f5770202f705df7c522dcb123da86ac62e901 Mon Sep 17 00:00:00 2001
+Message-Id: <013f5770202f705df7c522dcb123da86ac62e901.1325691465.git.jlec@gentoo.org>
+In-Reply-To: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+References: <89d53654acb88cd8dbd4bc9eb388ca6e76d0d6ea.1325691465.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 4 Jan 2012 14:28:14 +0100
+Subject: [PATCH 15/15] apbs 1.3 pythonlib fix
+
+---
+ configure.ac | 1 +
+ tools/python/Makefile.am | 11 ++++++-----
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9837a57..d39a0a5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -161,6 +161,7 @@ AC_ARG_ENABLE(
+ if test x"$enable_python" != "xno"; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_NOTICE([Python linkage requires GNU compilers])
++ AM_PATH_PYTHON
+ cclist="gcc"
+ f77list="gfortran g95 g77"
+ apbs_do_python="python"
+diff --git a/tools/python/Makefile.am b/tools/python/Makefile.am
+index aecd6ed..7d661b1 100644
+--- a/tools/python/Makefile.am
++++ b/tools/python/Makefile.am
+@@ -10,10 +10,11 @@ AUTOMAKE_OPTIONS = no-dependencies
+ SUFFIXES = .c .C .o .so
+ INCLUDES = @inc_list@ $(PY_CFLAGS) -I${top_srcdir}/bin
+ CCLD = $(PY_CC)
+-CLEANFILES = _apbslib.so
++CLEANFILES = _apbs.so
+ SUBDIRS = vgrid
+
+-pyexec_LTLIBRARIES = _apbslib.so
+-_apbslib_so_SOURCES = apbslib.c
+-_apbslib_so_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
+-_apbslib_so_LDADD = -L${top_builddir}/bin/.libs/ -lapbsmainroutines -L${top_builddir}/src/aaa_lib/.libs/ -lapbs $(PY_LDFLAGS) ${z_lib} @maloc_lib@ @mc_lib@
++pkgpyexec_LTLIBRARIES = _apbs.la
++_apbs_la_SOURCES = apbslib.c
++#_apbs_la_LINK = $(PY_CC) $(PY_LINKFLAGS) $(LDFLAGS) -o $@ $(PY_SHARED)
++_apbs_la_LDFLAGS = -module -avoid-version -shared
++_apbs_la_LIBADD = ${top_builddir}/bin/.libs/libapbsmainroutines.la ${top_builddir}/src/aaa_lib/.libs/libapbs.la $(PY_LDFLAGS) ${z_lib} @maloc_lib@ @mc_lib@
+--
+1.7.8.2
+