This bumps pdb2pqr-1.0.2 to pdb2pqr-1.1.2 diff -u /usr/portage/sci-chemistry/pdb2pqr/pdb2pqr-1.0.2.ebuild pdb2pqr-1.1.2.ebuild --- /usr/portage/sci-chemistry/pdb2pqr/pdb2pqr-1.0.2.ebuild 2006-03-21 11:07:14.000000000 -0600 +++ pdb2pqr-1.1.2.ebuild 2006-06-29 18:10:33.000000000 -0500 @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pdb2pqr/pdb2pqr-1.0.2.ebuild,v 1.1 2006/03/21 17:07:14 markusle Exp $ +# $Header: $ inherit eutils fortran python multilib @@ -11,7 +11,7 @@ SLOT="0" IUSE="" -KEYWORDS="~x86" +KEYWORDS="~x86 amd64" DEPEND="dev-lang/python" @@ -21,8 +21,7 @@ unpack "${A}" cd "${S}" - epatch "${FILESDIR}"/${PN}-gcc4-gentoo.patch - epatch "${FILESDIR}"/${PN}-propka-gentoo.patch + epatch "${FILESDIR}"/${P}-gcc4-gentoo.patch } src_install() { @@ -30,16 +29,20 @@ INPATH="/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}" insinto "${INPATH}" - doins __init__.py constants.py || \ + doins __init__.py || \ die "Setting up the pdb2pqr site-package failed." exeinto "${INPATH}" - doexe ${PN}.py || die "Installing pdb2pqr failed." + doexe ${PN}.py || die "Installing pdb2pqr.py failed." exeinto "${INPATH}"/propka doexe propka/_propkalib.so || \ die "Failed to install propka." + exeinto "${INPATH}"/extensions + doexe extensions/* || \ + die "Failed to install extensions." + insinto "${INPATH}"/propka doins propka/propkalib.py propka/__init__.py || \ die "Failed to install propka." @@ -50,12 +53,26 @@ insinto "${INPATH}"/dat doins dat/* || die "Installing data failed." - into /usr/bin - dosym "${INPATH}"/${PN}.py /usr/bin/${PN} \ - || die "Failed to install symlink into /usr/bin." +# Make a wrapper to start pdb2pqr. +cat >> "${T}"/${PN} << EOF +#!/bin/sh +${python} ${INPATH}/${PN}.py \$* +EOF + + exeinto /usr/bin + doexe ${T}/${PN} || die "Failed to install pdb2pqr wrapper." dodoc ChangeLog NEWS README AUTHORS || \ die "Failed to install docs" - dohtml doc/* || die "Failed to install html docs." + + dohtml -r doc/* || die "Failed to install html docs." } +pkg_postinst() { + python_mod_optimize + } + +pkg_postrm() { + python_mod_cleanup + } +
Created attachment 90488 [details, diff] patch for gcc-4 users adds support for gfortran
Hi Jeffrey, Thanks a lot and the patch looks (almost, see below) fine by just glancing at it. Hopefully I can have a closer look at it tomorrow or over the weekend. There is a problem with this line +KEYWORDS="~x86 amd64" since you can not keyword a new ebuild as ARCH, i.e. amd64 in this case. You might want to review the policy on this in the Gentoo Developer Handbook [1]. Thanks again and I am looking forward to having you being part of the Gentoo Sci team soon. cheers, Markus [1] http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
Ahh..yeah, I should have changed that to ~amd64...that's left over from my box, where I am using an overlay :D
Hi Jeffrey, I just committed the pdb2pqr-1.1.2.ebuild to portage cvs. I used your patch verbatim except for the following changes/additions - removed the amd64 keyword - instead of just calling python_mod_* which would act on all python modules that are installed, I rather inherited the distutils.eclass which does this "for free" on only the pdb2pqr module - At least on my box _propkalib.so contains TEXTRELS which is bad. Hence I appended -fPIC to CFLAGS/FFLAGS globally. This should be fine in this case since the only fortran and c-files that are being compiled are part of the *.so. Otherwise, -fPIC should only be applied locally to wherever the *.so is being built. Thanks again for your help. cheers, Markus
Hi Jeffrey, FYI: I just replaced the global appending of -fPIC by a local makefile patch since I find it cleaner and it also avoids potential problems down the road in case the pdb2pqr folks decide to add non *.so code. Thanks, Markus