summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-03-29 19:00:29 +0000
committerJustin Lecher <jlec@gentoo.org>2010-03-29 19:00:29 +0000
commit364936ea7841492867e3ff7cc5ea349d09fa2110 (patch)
tree64b144558509086b5c5dfcc770858f7e5617d584 /sci-chemistry/apbs
parentAdd ~ia64 wrt #309331 (diff)
downloadgentoo-2-364936ea7841492867e3ff7cc5ea349d09fa2110.tar.gz
gentoo-2-364936ea7841492867e3ff7cc5ea349d09fa2110.tar.bz2
gentoo-2-364936ea7841492867e3ff7cc5ea349d09fa2110.zip
Configure fixes, removed unnecessary installed files. Make tools optional
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/apbs')
-rw-r--r--sci-chemistry/apbs/ChangeLog9
-rw-r--r--sci-chemistry/apbs/apbs-1.2.1b-r2.ebuild128
-rw-r--r--sci-chemistry/apbs/files/apbs-1.2.1b-install-fix.patch53
-rw-r--r--sci-chemistry/apbs/files/apbs-1.2.1b-openmp.patch48
-rw-r--r--sci-chemistry/apbs/metadata.xml1
5 files changed, 238 insertions, 1 deletions
diff --git a/sci-chemistry/apbs/ChangeLog b/sci-chemistry/apbs/ChangeLog
index 832f53684647..3e07b3b682d2 100644
--- a/sci-chemistry/apbs/ChangeLog
+++ b/sci-chemistry/apbs/ChangeLog
@@ -1,6 +1,13 @@
# 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.25 2010/02/20 09:33:57 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/ChangeLog,v 1.26 2010/03/29 19:00:29 jlec Exp $
+
+*apbs-1.2.1b-r2 (28 Mar 2010)
+
+ 28 Mar 2010; Justin Lecher (jlec) <jlec@gentoo.org>
+ +apbs-1.2.1b-r2.ebuild, +files/apbs-1.2.1b-install-fix.patch,
+ +files/apbs-1.2.1b-openmp.patch:
+ Configure fixes, removed unnecessary installed files. Make tools optional
*apbs-1.2.1b-r1 (20 Feb 2010)
diff --git a/sci-chemistry/apbs/apbs-1.2.1b-r2.ebuild b/sci-chemistry/apbs/apbs-1.2.1b-r2.ebuild
new file mode 100644
index 000000000000..c9727e661f38
--- /dev/null
+++ b/sci-chemistry/apbs/apbs-1.2.1b-r2.ebuild
@@ -0,0 +1,128 @@
+# 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.2.1b-r2.ebuild,v 1.1 2010/03/29 19:00:29 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="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 blas doc mpi openmp python tools"
+KEYWORDS="~x86 ~amd64 ~ppc ~amd64-linux ~x86-linux"
+
+DEPEND="
+ dev-libs/maloc[mpi=]
+ blas? ( virtual/blas )
+ python? ( dev-lang/python )
+ sys-libs/readline
+ arpack? ( sci-libs/arpack )
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/"${MY_P}-source"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-openmp.patch
+ epatch "${FILESDIR}"/${P}-install-fix.patch
+ epatch "${FILESDIR}"/${PN}-1.2.0-contrib.patch
+ epatch "${FILESDIR}"/${PN}-1.2.0-link.patch
+ epatch "${FILESDIR}"/${P}-autoconf-2.64.patch
+ sed "s:GENTOO_PKG_NAME:${PN}:g" \
+ -i Makefile.am || die "Cannot correct package name"
+ eautoreconf
+ find . -name "._*" -exec rm -f '{}' \;
+}
+
+src_configure() {
+ local myconf="--docdir=${EPREFIX}/usr/share/doc/${PF}"
+ use blas && myconf="${myconf} --with-blas=-lblas"
+ 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/lam-mpi; then
+ myconf="${myconf} --with-lam=${EPREFIX}/usr"
+ elif has_version sys-cluster/openmpi; then
+ myconf="${myconf} --with-openmpi=${EPREFIX}/usr"
+ fi
+ fi || die "Failed to select proper mpi implementation"
+
+ econf $(use_enable python) \
+ --disable-maloc-rebuild \
+ $(use_enable openmp) \
+ $(use_enable tools) \
+ ${myconf}
+}
+
+src_compile() {
+ emake -j1 || die "make failed"
+}
+
+src_test() {
+ cd examples && make test \
+ || 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 /usr/$(python_get_sitedir)/${PN}
+ doins tools/manip/*.py || die
+
+ if use python && ! use mpi; then
+ insinto /usr/$(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 /usr/$(python_get_sitedir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(python_get_sitedir)/${PN}
+}
diff --git a/sci-chemistry/apbs/files/apbs-1.2.1b-install-fix.patch b/sci-chemistry/apbs/files/apbs-1.2.1b-install-fix.patch
new file mode 100644
index 000000000000..636c685f1b9a
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.2.1b-install-fix.patch
@@ -0,0 +1,53 @@
+diff --git a/Makefile.am b/Makefile.am
+index 437402d..b400095 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -27,11 +27,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
+diff --git a/bin/Makefile.am b/bin/Makefile.am
+index 7b2f3ee..0470525 100644
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -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/sci-chemistry/apbs/files/apbs-1.2.1b-openmp.patch b/sci-chemistry/apbs/files/apbs-1.2.1b-openmp.patch
new file mode 100644
index 000000000000..e202725b6056
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.2.1b-openmp.patch
@@ -0,0 +1,48 @@
+diff --git a/configure.ac b/configure.ac
+index 24748bd..bd1b608 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -976,7 +976,6 @@ AC_MSG_CHECKING([for --disable-tools])
+ AC_ARG_ENABLE(
+ [tools],
+ AS_HELP_STRING([--disable-tools],[disable tool compilation]),,
+- [enable_tools=yes]
+ )
+ apbs_do_tools=""
+ if test x"$enable_tools" != "xno"; then
+@@ -1134,22 +1133,17 @@ 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
++if test x"$enable_openmp" != "xno"; then
+ 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`
++ if [[[ "${CC}" = *gcc* ]]] && [[[ "${F77}" = *gfortran* ]]]; then
++ gcc_version=`${CC} --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"
+@@ -1159,6 +1153,9 @@ else
+ AC_MSG_RESULT([WARNING])
+ fi
+ fi
++else
++ AC_MSG_RESULT([yes])
++ disable_openmp=yes
+ fi
+
+ dnl # -----------------------
diff --git a/sci-chemistry/apbs/metadata.xml b/sci-chemistry/apbs/metadata.xml
index cc7f93f699b0..c6c79fd71ace 100644
--- a/sci-chemistry/apbs/metadata.xml
+++ b/sci-chemistry/apbs/metadata.xml
@@ -8,5 +8,6 @@
<herd>sci-chemistry</herd>
<use>
<flag name='arpack'>Include support for arpack libs</flag>
+ <flag name='tools'>Install optional tools</flag>
</use>
</pkgmetadata>