diff options
author | Jeffrey Gardner <je_fro@gentoo.org> | 2009-08-02 14:58:31 +0000 |
---|---|---|
committer | Jeffrey Gardner <je_fro@gentoo.org> | 2009-08-02 14:58:31 +0000 |
commit | a9dd064c96a65de82d8fbd8df79e654acb899aa6 (patch) | |
tree | f67745f0360dd684581c80428f3a193132d2f542 /sci-chemistry | |
parent | amd64 stable, bug #278978 (diff) | |
download | gentoo-2-a9dd064c96a65de82d8fbd8df79e654acb899aa6.tar.gz gentoo-2-a9dd064c96a65de82d8fbd8df79e654acb899aa6.tar.bz2 gentoo-2-a9dd064c96a65de82d8fbd8df79e654acb899aa6.zip |
New version, works with python 2.6, closes bug #269119. Many thanks to Justin Lecher for doing the work, and fauli for a kick in the pants :)
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/pymol/ChangeLog | 10 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-data-path.patch | 30 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-shaders.patch | 10 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-0.99_rc10.ebuild | 4 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-1.0-r1.ebuild | 6 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-1.2.1.ebuild | 120 |
6 files changed, 176 insertions, 4 deletions
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog index 914f2597e868..b637d10b40dd 100644 --- a/sci-chemistry/pymol/ChangeLog +++ b/sci-chemistry/pymol/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-chemistry/pymol # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.42 2009/05/06 21:06:39 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.43 2009/08/02 14:58:31 je_fro Exp $ + +*pymol-1.2.1 (02 Aug 2009) + + 02 Aug 2009; Jeff Gardner <je_fro@gentoo.org> +pymol-1.2.1.ebuild, + +files/1.2.1/pymol-1.2.1-data-path.patch, + +files/1.2.1/pymol-1.2.1-shaders.patch: + New version, works with python 2.6, closes bug #269119. Many thanks to + Justin Lecher for doing the work, and fauli for a kick in the pants :) 06 May 2009; Markus Meier <maekke@gentoo.org> pymol-1.1-r2.ebuild: amd64/x86 stable, bug #250903 diff --git a/sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-data-path.patch b/sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-data-path.patch new file mode 100644 index 000000000000..86c3fe1f1c27 --- /dev/null +++ b/sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-data-path.patch @@ -0,0 +1,30 @@ +diff -arNu -uarN pymol/modules/pymol/commanding.py pymol.new/modules/pymol/commanding.py +--- pymol/modules/pymol/commanding.py 2009-03-31 12:43:14.585834066 +0200 ++++ pymol.new/modules/pymol/commanding.py 2009-03-31 12:44:26.436354330 +0200 +@@ -219,11 +219,11 @@ + _self.unlock(0,_self) + r = DEFAULT_SUCCESS + if show_splash==1: # generic / open-source +- png_path = _self.exp_path("$PYMOL_PATH/data/pymol/splash.png") ++ png_path = _self.exp_path("$PYMOL_DATA/pymol/splash.png") + elif show_splash==2: # evaluation builds +- png_path = _self.exp_path("$PYMOL_PATH/data/pymol/epymol.png") ++ png_path = _self.exp_path("$PYMOL_DATA/pymol/epymol.png") + else: # incentive builds +- png_path = _self.exp_path("$PYMOL_PATH/data/pymol/ipymol.png") ++ png_path = _self.exp_path("$PYMOL_DATA/pymol/ipymol.png") + if os.path.exists(png_path): + _self.do("_ cmd.load_png('%s',0,quiet=1)"%png_path) + else: +diff -arNu -uarN pymol/modules/pymol/importing.py pymol.new/modules/pymol/importing.py +--- pymol/modules/pymol/importing.py 2009-03-31 12:43:14.546250540 +0200 ++++ pymol.new/modules/pymol/importing.py 2009-03-31 12:44:48.876657949 +0200 +@@ -191,7 +191,7 @@ + ''' + r = DEFAULT_ERROR + +- tables = { 'cmyk' : "$PYMOL_PATH/data/pymol/cmyk.png", ++ tables = { 'cmyk' : "$PYMOL_DATA/pymol/cmyk.png", + 'pymol' : 'pymol', + 'rgb' : 'rgb' } + diff --git a/sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-shaders.patch b/sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-shaders.patch new file mode 100644 index 000000000000..06f75682344f --- /dev/null +++ b/sci-chemistry/pymol/files/1.2.1/pymol-1.2.1-shaders.patch @@ -0,0 +1,10 @@ +--- pymol-1.2_rc1/setup.py.old 2009-07-17 00:05:10.339203020 -0500 ++++ pymol-1.2_rc1/setup.py 2009-07-17 00:09:03.375274561 -0500 +@@ -138,6 +138,7 @@ + ("_PYMOL_INLINE",None), + ("_PYMOL_FREETYPE",None), + ("_PYMOL_LIBPNG",None), ++ ("_PYMOL_OPENGL_SHADERS",None), + # Numeric Python support + # ("_PYMOL_NUMPY",None), + # VMD plugin support diff --git a/sci-chemistry/pymol/pymol-0.99_rc10.ebuild b/sci-chemistry/pymol/pymol-0.99_rc10.ebuild index 93bc63309411..2fbe43a7b397 100644 --- a/sci-chemistry/pymol/pymol-0.99_rc10.ebuild +++ b/sci-chemistry/pymol/pymol-0.99_rc10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-0.99_rc10.ebuild,v 1.8 2009/04/16 13:42:53 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-0.99_rc10.ebuild,v 1.9 2009/08/02 14:58:31 je_fro Exp $ inherit distutils eutils multilib subversion @@ -20,6 +20,8 @@ media-libs/libpng sys-libs/zlib virtual/glut" +RDEPEND="${DEPEND}" + src_unpack() { subversion_src_unpack diff --git a/sci-chemistry/pymol/pymol-1.0-r1.ebuild b/sci-chemistry/pymol/pymol-1.0-r1.ebuild index 948171be7872..271f37596af7 100644 --- a/sci-chemistry/pymol/pymol-1.0-r1.ebuild +++ b/sci-chemistry/pymol/pymol-1.0-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.0-r1.ebuild,v 1.3 2008/08/17 03:06:59 je_fro Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.0-r1.ebuild,v 1.4 2009/08/02 14:58:31 je_fro Exp $ inherit distutils eutils multilib subversion @@ -22,6 +22,8 @@ media-libs/libpng sys-libs/zlib virtual/glut" +RDEPEND="${DEPEND}" + src_unpack() { subversion_src_unpack diff --git a/sci-chemistry/pymol/pymol-1.2.1.ebuild b/sci-chemistry/pymol/pymol-1.2.1.ebuild new file mode 100644 index 000000000000..e7e1fb391e1e --- /dev/null +++ b/sci-chemistry/pymol/pymol-1.2.1.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.2.1.ebuild,v 1.1 2009/08/02 14:58:31 je_fro Exp $ + +EAPI="2" + +inherit distutils subversion + +PYTHON_MODNAME="chempy pmg_tk pymol" +APBS_PATCH="090618" +REV="3825" + +DESCRIPTION="A Python-extensible molecular graphics system." +HOMEPAGE="http://pymol.sourceforge.net/" +SRC_URI="apbs? ( mirror://gentoo/apbs_tools.py.${APBS_PATCH}.bz2 )" +ESVN_REPO_URI="https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol@${REV}" + +LICENSE="PSF-2.2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="apbs shaders" + +DEPEND="dev-python/pmw + dev-python/numpy + >=dev-lang/python-2.4[tk] + media-libs/libpng + sys-libs/zlib + virtual/glut + media-video/mpeg-tools + apbs? ( dev-libs/maloc + sci-chemistry/apbs + sci-chemistry/pdb2pqr + )" +RDEPEND="${DEPEND}" + +pkg_setup(){ + python_version +} + +src_unpack() { + use apbs && unpack ${A} + subversion_src_unpack +} + +src_prepare() { + epatch "${FILESDIR}"/${PV}/${P}-data-path.patch \ + || die "Failed to apply data-path.patch" + + # Turn off splash screen. Please do make a project contribution + # if you are able though. + [[ -n ${WANT_SPLASH} ]] || epatch "${FILESDIR}"/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}"/${PV}/${P}-shaders.patch + + if use apbs; then + cp -f "${WORKDIR}"/apbs_tools.py.${APBS_PATCH} modules/pmg_tk/startup/apbs_tools.py \ + || die "Failed to copy apbs_tools.py" + + sed "s:LIBANDPYTHON:$(python_get_libdir):g" \ + -i modules/pmg_tk/startup/apbs_tools.py \ + || die "Failed running sed on apbs_tools.py" + fi +} + +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=$(python_get_sitedir)/${PN} + PYMOL_DATA="/usr/share/pymol/data" + PYMOL_SCRIPTS="/usr/share/pymol/scripts" + EOF + + if use apbs; then + echo "APBS_PSIZE=$(python_get_sitedir)/pdb2pqr/src/psize.py" >> "${T}"/20pymol + fi + + doenvd "${T}"/20pymol || die "Failed to install env.d file." + + cat >> "${T}"/pymol <<- EOF + #!/bin/sh + ${python} -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." + + if ! use apbs; then + rm "${D}"$(python_get_sitedir)/pmg_tk/startup/apbs_tools.py + fi +} + +pkg_postinst(){ + distutils_pkg_postinst + + # The apbs ebuild was just corrected and not bumped #213616 + if use apbs; then + [ -e /usr/share/apbs-0.5* ] && \ + ewarn "You need to reemerge sci-chemistry/apbs!" + fi +} + |