summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-02-18 13:23:49 +0000
committerJustin Lecher <jlec@gentoo.org>2010-02-18 13:23:49 +0000
commit5528eddd22be180525cdd222ddf49fd38cd3c52a (patch)
tree16967196ba850ea4410a627139c87ac7f7a4cb42
parentFix LICENSE. (diff)
downloadgentoo-2-5528eddd22be180525cdd222ddf49fd38cd3c52a.tar.gz
gentoo-2-5528eddd22be180525cdd222ddf49fd38cd3c52a.tar.bz2
gentoo-2-5528eddd22be180525cdd222ddf49fd38cd3c52a.zip
Fixed usage of pathon eclass, EAPI=3 and PREFIX ready fixes, keyworded for amd64-linux & x86-linux
(Portage version: 2.2_rc62/cvs/Linux i686)
-rw-r--r--sci-chemistry/pymol/ChangeLog9
-rw-r--r--sci-chemistry/pymol/files/1.2.2-prefix.patch31
-rw-r--r--sci-chemistry/pymol/pymol-1.2.2-r3.ebuild103
3 files changed, 142 insertions, 1 deletions
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog
index b5d58281abc3..e729b1d1bec4 100644
--- a/sci-chemistry/pymol/ChangeLog
+++ b/sci-chemistry/pymol/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-chemistry/pymol
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.54 2010/02/10 11:22:34 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.55 2010/02/18 13:23:48 jlec Exp $
+
+*pymol-1.2.2-r3 (18 Feb 2010)
+
+ 18 Feb 2010; Justin Lecher (jlec) <jlec@j-schmitz.net>
+ +files/1.2.2-prefix.patch, +pymol-1.2.2-r3.ebuild:
+ Fixed usage of pathon eclass, EAPI=3 and PREFIX ready fixes, keyworded for
+ amd64-linux & x86-linux
*pymol-1.2.2-r2 (10 Feb 2010)
diff --git a/sci-chemistry/pymol/files/1.2.2-prefix.patch b/sci-chemistry/pymol/files/1.2.2-prefix.patch
new file mode 100644
index 000000000000..211881435123
--- /dev/null
+++ b/sci-chemistry/pymol/files/1.2.2-prefix.patch
@@ -0,0 +1,31 @@
+diff --git a/setup.py b/setup.py
+index 197f827..b39c129 100644
+--- a/setup.py
++++ b/setup.py
+@@ -112,7 +112,7 @@ elif sys.platform=='darwin':
+ ]
+ ext_comp_args=[]
+ ext_link_args=[
+- "-L/usr/X11R6/lib", "-lGL", "-lXxf86vm",
++ "-L@GENTOO_PORTAGE_EPREFIX@/usr/lib", "-lGL", "-lXxf86vm",
+ "-L"+EXT+"/lib", "-lpng", "-lglut", "-lfreetype"
+ ]
+ #============================================================================
+@@ -120,7 +120,7 @@ else: # linux or other unix
+ inc_dirs=["ov/src",
+ "layer0","layer1","layer2",
+ "layer3","layer4","layer5",
+- "/usr/include/freetype2",
++ "@GENTOO_PORTAGE_EPREFIX@/usr/include/freetype2",
+ # "/users/warren/ext/include",
+ # VMD plugin support
+ # "contrib/uiuc/plugins/include",
+@@ -131,7 +131,7 @@ else: # linux or other unix
+ ]
+ pyogl_libs = ["GL","GLU","glut"]
+ lib_dirs=[
+- "/usr/X11R6/lib",
++ "@GENTOO_PORTAGE_EPREFIX@/usr/lib",
+ # "/users/warren/pymol/ext/lib"
+ ]
+ def_macros=[("_PYMOL_MODULE",None),
diff --git a/sci-chemistry/pymol/pymol-1.2.2-r3.ebuild b/sci-chemistry/pymol/pymol-1.2.2-r3.ebuild
new file mode 100644
index 000000000000..e480beed14b6
--- /dev/null
+++ b/sci-chemistry/pymol/pymol-1.2.2-r3.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.2.2-r3.ebuild,v 1.1 2010/02/18 13:23:48 jlec Exp $
+
+EAPI="3"
+
+PYTHON_USE_WITH="tk"
+PYTHON_DEPEND="2:2.5"
+PYTHON_MODNAME="chempy pmg_tk pymol"
+REV="3859"
+
+inherit eutils distutils prefix
+
+DESCRIPTION="A Python-extensible molecular graphics system."
+HOMEPAGE="http://pymol.sourceforge.net/"
+SRC_URI="http://pymol.svn.sourceforge.net/viewvc/pymol/trunk/pymol.tar.gz?view=tar&pathrev=${REV} -> ${P}.tar.gz"
+
+LICENSE="PSF-2.2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="apbs numpy shaders vmd"
+
+DEPEND="
+ dev-python/numpy
+ dev-python/pmw
+ media-libs/freetype:2
+ media-libs/libpng
+ media-video/mpeg-tools
+ sys-libs/zlib
+ virtual/glut
+ apbs? (
+ dev-libs/maloc
+ sci-chemistry/apbs
+ sci-chemistry/pdb2pqr
+ sci-chemistry/pymol-apbs-plugin
+ )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-data-path.patch
+
+ epatch "${FILESDIR}"/${PV}-prefix.patch && \
+ eprefixify setup.py
+
+ # Turn off splash screen. Please do make a project contribution
+ # if you are able though. #299020
+ epatch "${FILESDIR}"/1.2.1/nosplash-gentoo.patch
+
+ # Respect CFLAGS
+ sed -i \
+ -e "s:\(ext_comp_args=\).*:\1[]:g" \
+ "${S}"/setup.py || die "Failed running sed on setup.py"
+
+ use shaders && epatch "${FILESDIR}"/${P}-shaders.patch
+
+ use vmd && epatch "${FILESDIR}"/${P}-vmd.patch
+
+ use numpy && \
+ sed \
+ -e '/PYMOL_NUMPY/s:^#::g' \
+ -i setup.py
+}
+
+src_configure() {
+ :
+}
+
+src_install() {
+ distutils_src_install
+
+ # These environment variables should not go in the wrapper script, or else
+ # it will be impossible to use the PyMOL libraries from Python.
+ cat >> "${T}"/20pymol <<- EOF
+ PYMOL_PATH="${EPREFIX}/$(python_get_sitedir)/${PN}"
+ PYMOL_DATA="${EPREFIX}/usr/share/pymol/data"
+ PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts"
+ EOF
+
+ doenvd "${T}"/20pymol || die "Failed to install env.d file."
+
+ cat >> "${T}"/pymol <<- EOF
+ #!/bin/sh
+ $(PYTHON -A -a) -O \${PYMOL_PATH}/__init__.py \$*
+ EOF
+
+ dobin "${T}"/pymol || die "Failed to install wrapper."
+
+ insinto /usr/share/pymol
+ doins -r test data scripts || die "no shared data"
+
+ insinto /usr/share/pymol/examples
+ doins -r examples || die "Failed to install docs."
+
+ dodoc DEVELOPERS README || die "Failed to install docs."
+
+ rm "${D}"$(python_get_sitedir)/pmg_tk/startup/apbs_tools.py
+}