Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138534 - version bump for pdb2pqr
Summary: version bump for pdb2pqr
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Science Related Packages
URL: http://sourceforge.net/project/showfi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-29 16:24 UTC by Jeffrey Gardner (RETIRED)
Modified: 2006-07-01 11:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for gcc-4 users (pdb2pqr-1.1.2-gcc4-gentoo.patch,1.08 KB, patch)
2006-06-29 16:34 UTC, Jeffrey Gardner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Gardner (RETIRED) gentoo-dev 2006-06-29 16:24:33 UTC
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
+       }
+
Comment 1 Jeffrey Gardner (RETIRED) gentoo-dev 2006-06-29 16:34:22 UTC
Created attachment 90488 [details, diff]
patch for gcc-4 users

adds support for gfortran
Comment 2 Markus Dittrich (RETIRED) gentoo-dev 2006-06-29 18:08:05 UTC
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
Comment 3 Jeffrey Gardner (RETIRED) gentoo-dev 2006-06-29 22:54:19 UTC
Ahh..yeah, I should have changed that to ~amd64...that's left over from my box, where I am using an overlay :D
Comment 4 Markus Dittrich (RETIRED) gentoo-dev 2006-07-01 10:05:34 UTC
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 
Comment 5 Markus Dittrich (RETIRED) gentoo-dev 2006-07-01 11:31:57 UTC
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