summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-11-04 09:40:09 +0000
committerJustin Lecher <jlec@gentoo.org>2010-11-04 09:40:09 +0000
commit9a9c2f312e7e9a839e5b0e94e72acb30c83a3c0f (patch)
tree6139fe22c5901c87044e283271e16a23b19a6f5d /sci-chemistry/apbs
parentAdded support for psb2pka (diff)
downloadgentoo-2-9a9c2f312e7e9a839e5b0e94e72acb30c83a3c0f.tar.gz
gentoo-2-9a9c2f312e7e9a839e5b0e94e72acb30c83a3c0f.tar.bz2
gentoo-2-9a9c2f312e7e9a839e5b0e94e72acb30c83a3c0f.zip
Fix compilation of python module, fix support for zlib
(Portage version: 2.2.0_alpha3/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/apbs')
-rw-r--r--sci-chemistry/apbs/ChangeLog10
-rw-r--r--sci-chemistry/apbs/apbs-1.3-r1.ebuild172
-rw-r--r--sci-chemistry/apbs/files/apbs-1.2.1b-multilib.patch10
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3-python.patch22
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3-shared.patch2
-rw-r--r--sci-chemistry/apbs/files/apbs-1.3-zlib.patch43
6 files changed, 247 insertions, 12 deletions
diff --git a/sci-chemistry/apbs/ChangeLog b/sci-chemistry/apbs/ChangeLog
index 410f44e06637..dc2b15fb7380 100644
--- a/sci-chemistry/apbs/ChangeLog
+++ b/sci-chemistry/apbs/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-chemistry/apbs
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.43 2010/11/01 17:25:22 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.44 2010/11/04 09:40:09 jlec Exp $
+
+*apbs-1.3-r1 (04 Nov 2010)
+
+ 04 Nov 2010; Justin Lecher <jlec@gentoo.org>
+ files/apbs-1.2.1b-multilib.patch, +apbs-1.3-r1.ebuild,
+ +files/apbs-1.3-python.patch, files/apbs-1.3-shared.patch,
+ +files/apbs-1.3-zlib.patch:
+ Fix compilation of python module, fix support for zlib
01 Nov 2010; Justin Lecher <jlec@gentoo.org> apbs-1.3.ebuild,
+files/apbs-1.3-mainroutines.patch, files/apbs-1.3-shared.patch,
diff --git a/sci-chemistry/apbs/apbs-1.3-r1.ebuild b/sci-chemistry/apbs/apbs-1.3-r1.ebuild
new file mode 100644
index 000000000000..f47d8c077b56
--- /dev/null
+++ b/sci-chemistry/apbs/apbs-1.3-r1.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/apbs-1.3-r1.ebuild,v 1.1 2010/11/04 09:40:09 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="python? 2"
+FORTRAN="g77 gfortran ifc"
+
+inherit autotools eutils flag-o-matic fortran python versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Software for evaluating the electrostatic properties of nanoscale biomolecular systems"
+HOMEPAGE="http://apbs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+IUSE="arpack doc fetk mpi openmp python tools"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ dev-libs/maloc[mpi=]
+ virtual/blas
+ sys-libs/readline
+ arpack? ( sci-libs/arpack )
+ fetk? (
+ media-libs/sg
+ sci-libs/amd
+ sci-libs/punc
+ sci-libs/mc
+ sci-libs/gamer
+ sci-libs/umfpack
+ sci-libs/superlu )
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/"${MY_P}-source"
+
+pkg_setup() {
+ use python && python_set_active_version 2
+ fortran_pkg_setup
+ if use mpi && use python; then
+ einfo "mpi and python support are incompatible"
+ einfo "Disabling USE=python"
+ fi
+ 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
+}
+
+src_prepare() {
+ rm -rf contrib/{blas,maloc,opal,zlib} || die
+ find . -name "._*" -exec rm -f '{}' \;
+ epatch \
+ "${FILESDIR}"/${P}-openmp.patch \
+ "${FILESDIR}"/${PN}-1.2.1b-install-fix.patch \
+ "${FILESDIR}"/${P}-contrib.patch \
+ "${FILESDIR}"/${P}-link.patch \
+ "${FILESDIR}"/${PN}-1.2.1b-autoconf-2.64.patch \
+ "${FILESDIR}"/${P}-shared.patch \
+ "${FILESDIR}"/${PN}-1.2.1b-multilib.patch \
+ "${FILESDIR}"/${PN}-1.2.1b-parallelbuild.patch \
+ "${FILESDIR}"/${P}-mainroutines.patch \
+ "${FILESDIR}"/${P}-zlib.patch \
+ "${FILESDIR}"/${P}-python.patch
+ sed "s:GENTOO_PKG_NAME:${PN}:g" \
+ -i Makefile.am || die "Cannot correct package name"
+ # this test is broken
+ sed '/ion-pmf/d' -i examples/Makefile.am || die
+ sed 's:libmaloc.a:libmaloc.so:g' -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ local myconf="--docdir=${EPREFIX}/usr/share/doc/${PF}"
+ use arpack && myconf="${myconf} --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
+ myconf="${myconf} --with-mpich=${EPREFIX}/usr"
+ elif has_version sys-cluster/mpich2; then
+ myconf="${myconf} --with-mpich2=${EPREFIX}/usr"
+ elif has_version sys-cluster/openmpi; then
+ myconf="${myconf} --with-openmpi=${EPREFIX}/usr"
+ fi
+ fi || die "Failed to select proper mpi implementation"
+
+ # we need the tools target for python
+ if use python && ! use tools; then
+ myconf="${myconf} --enable-tools"
+ fi
+
+ if use fetk; then
+ myconf="${myconf} --with-fetk-include=${EPREFIX}/usr/include --with-fetk-library=${EPREFIX}/usr/$(get_libdir)"
+ else
+ myconf="${myconf} --disable-fetk"
+ fi
+
+ [[ -n ${MAXMEM} ]] && myconf="${myconf} --with-maxmem=${MAXMEM}"
+
+ econf \
+ --disable-maloc-rebuild \
+ --enable-shared \
+ --with-blas=-lblas \
+ $(use_enable openmp) \
+ $(use_enable python) \
+ $(use_enable tools) \
+ ${myconf}
+}
+
+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() {
+ emake -j1 DESTDIR="${D}" install \
+ || die "make install failed"
+
+ if use tools; then
+ mv tools/mesh/{,mesh-}analysis || die
+ dobin tools/mesh/* || die
+
+ if use arpack; then
+ dobin tools/arpack/* || die
+ fi
+
+ insinto /usr/share/${PN}
+ doins -r tools/conversion || die
+ doins -r tools/visualization/opendx || die
+
+ dobin tools/manip/{born,coulomb} || die
+
+ doins -r tools/matlab || die
+ fi
+
+ insinto $(python_get_sitedir)/${PN}
+ doins tools/manip/*.py || die
+
+ if use python && ! use mpi; then
+ insinto $(python_get_sitedir)/${PN}
+ doins tools/python/{*.py,*.pqr,*.so} || die
+ doins tools/python/*/{*.py,*.so} || die
+ fi
+
+ dodoc AUTHORS INSTALL README NEWS ChangeLog \
+ || die "Failed to install docs"
+
+ if use doc; then
+ dohtml -r doc/* || die "Failed to install html docs"
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+}
diff --git a/sci-chemistry/apbs/files/apbs-1.2.1b-multilib.patch b/sci-chemistry/apbs/files/apbs-1.2.1b-multilib.patch
index e0637349b551..b52a629056a1 100644
--- a/sci-chemistry/apbs/files/apbs-1.2.1b-multilib.patch
+++ b/sci-chemistry/apbs/files/apbs-1.2.1b-multilib.patch
@@ -20,13 +20,3 @@ Respect multilib directories
lib_LTLIBRARIES = libapbsmainroutines.la
libapbsmainroutines_la_SOURCES = routines.c
libapbsmainroutines_la_LDFLAGS = -version-info ${APBS_VERSION}
---- contrib/maloc/src/aaa_lib/Makefile.am
-+++ contrib/maloc/src/aaa_lib/Makefile.am
-@@ -49,7 +49,6 @@
- LIBEFENCE =
- endif
-
--libdir = ${prefix}/lib
- lib_LTLIBRARIES = libmaloc.la ${LIBEFENCE}
-
- libmaloc_la_SOURCES =
diff --git a/sci-chemistry/apbs/files/apbs-1.3-python.patch b/sci-chemistry/apbs/files/apbs-1.3-python.patch
new file mode 100644
index 000000000000..66dec34d32a9
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3-python.patch
@@ -0,0 +1,22 @@
+diff --git a/configure.ac b/configure.ac
+index 31a0053..7301f0f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -585,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"
+diff --git a/tools/python/Makefile.am b/tools/python/Makefile.am
+index 431640c..2c1fbea 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}
++_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/sci-chemistry/apbs/files/apbs-1.3-shared.patch b/sci-chemistry/apbs/files/apbs-1.3-shared.patch
index f7eb4dfc1d1f..2b6688697f5e 100644
--- a/sci-chemistry/apbs/files/apbs-1.3-shared.patch
+++ b/sci-chemistry/apbs/files/apbs-1.3-shared.patch
@@ -90,7 +90,7 @@ index 0064aaa..8b33f70 100644
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@
++ @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@
diff --git a/sci-chemistry/apbs/files/apbs-1.3-zlib.patch b/sci-chemistry/apbs/files/apbs-1.3-zlib.patch
new file mode 100644
index 000000000000..c7ce0bcc589e
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.3-zlib.patch
@@ -0,0 +1,43 @@
+diff --git a/configure.ac b/configure.ac
+index 31a0053..7301f0f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1052,10 +1053,10 @@ AC_ARG_ENABLE(
+ [zlib],
+ AS_HELP_STRING([--disable-zlib], [disable zlib compilation]),,
+ )
+-if test x"$disable_zlib" == "xno"; then
++if test x"$disable_zlib" == "xyes"; 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)
+@@ -1307,12 +1308,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
+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) {
+