summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-01-30 08:51:20 +0000
committerJustin Lecher <jlec@gentoo.org>2013-01-30 08:51:20 +0000
commitfd6cc6f5e38f59465bd541b6b15db13474ba9e6f (patch)
tree61b20e98af16d5ad2d4ab9f2c8dc8f3b96386565 /sci-chemistry/pymol
parentremove old, automake compatibility (bug 454506). Thanks Helmut Jarausch. (diff)
downloadgentoo-2-fd6cc6f5e38f59465bd541b6b15db13474ba9e6f.tar.gz
gentoo-2-fd6cc6f5e38f59465bd541b6b15db13474ba9e6f.tar.bz2
gentoo-2-fd6cc6f5e38f59465bd541b6b15db13474ba9e6f.zip
sci-chemistry/pymol: Move to new python eclasses, #453572
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 70EB7916)
Diffstat (limited to 'sci-chemistry/pymol')
-rw-r--r--sci-chemistry/pymol/ChangeLog7
-rw-r--r--sci-chemistry/pymol/pymol-1.5.0.3-r2.ebuild121
2 files changed, 127 insertions, 1 deletions
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog
index a83c6c81f772..0a8be6df600d 100644
--- a/sci-chemistry/pymol/ChangeLog
+++ b/sci-chemistry/pymol/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-chemistry/pymol
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.97 2013/01/22 19:10:13 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.98 2013/01/30 08:51:20 jlec Exp $
+
+*pymol-1.5.0.3-r2 (30 Jan 2013)
+
+ 30 Jan 2013; Justin Lecher <jlec@gentoo.org> +pymol-1.5.0.3-r2.ebuild:
+ Move to new python eclasses, #453572
22 Jan 2013; Justin Lecher <jlec@gentoo.org> pymol-1.5.0.3-r1.ebuild,
metadata.xml:
diff --git a/sci-chemistry/pymol/pymol-1.5.0.3-r2.ebuild b/sci-chemistry/pymol/pymol-1.5.0.3-r2.ebuild
new file mode 100644
index 000000000000..8752c8f519a9
--- /dev/null
+++ b/sci-chemistry/pymol/pymol-1.5.0.3-r2.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.5.0.3-r2.ebuild,v 1.1 2013/01/30 08:51:20 jlec Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk"
+
+inherit distutils-r1 fdo-mime prefix versionator
+
+DESCRIPTION="A Python-extensible molecular graphics system"
+HOMEPAGE="http://pymol.sourceforge.net/"
+SRC_URI="
+ http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz
+ http://dev.gentoo.org/~jlec/distfiles/${PN}-icons.tar.xz"
+
+LICENSE="PSF-2.2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="apbs numpy vmd web"
+
+DEPEND="
+ dev-python/numpy
+ dev-python/pmw[${PYTHON_USEDEP}]
+ media-libs/freetype:2
+ media-libs/glew
+ media-libs/libpng
+ media-video/mpeg-tools
+ sys-libs/zlib
+ media-libs/freeglut
+ apbs? (
+ dev-libs/maloc
+ sci-chemistry/apbs
+ sci-chemistry/pdb2pqr
+ sci-chemistry/pymol-apbs-plugin
+ )
+ web? ( !dev-python/webpy )"
+RDEPEND="${DEPEND}"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.0.1-setup.py.patch
+ "${FILESDIR}"/${PN}-1.5.0.1-data-path.patch
+ "${FILESDIR}"/${PN}-1.5.0.1-flags.patch
+ "${FILESDIR}"/${P}-prefix.patch
+ )
+
+ use web || PATCHES+=( "${FILESDIR}"/${P}-web.patch )
+ use vmd && PATCHES+=( "${FILESDIR}"/${PN}-1.5.0.1-vmd.patch )
+
+ if use numpy; then
+ sed \
+ -e '/PYMOL_NUMPY/s:^#::g' \
+ -i setup.py || die
+ fi
+
+ rm ./modules/pmg_tk/startup/apbs_tools.py || die
+
+ python_export python2_7 EPYTHON PYTHON_SITEDIR
+ echo "site_packages = \'$(python_get_sitedir)\'" > setup3.py || die
+
+ sed \
+ -e "s:/opt/local:${EPREFIX}/usr:g" \
+ -e '/ext_comp_args/s:\[.*\]:[]:g' \
+ -i setup.py || die
+
+ distutils-r1_python_prepare_all
+
+ eprefixify setup.py
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ python_export python2_7 EPYTHON
+
+ # 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
+
+ cat >> "${T}"/pymol <<- EOF
+ #!/bin/sh
+ ${EPYTHON} -O \${PYMOL_PATH}/__init__.py -q \$*
+ EOF
+
+ dobin "${T}"/pymol
+
+ insinto /usr/share/pymol
+ doins -r test data scripts
+
+ insinto /usr/share/pymol/examples
+ doins -r examples
+
+ dodoc DEVELOPERS README
+
+ doicon "${WORKDIR}"/${PN}.{xpm,png}
+ make_desktop_entry pymol PyMol ${PN} "Graphics;Education;Science;Chemistry" "MimeType=chemical/x-pdb;"
+}
+
+pkg_postinst() {
+ elog "\t USE=shaders was removed,"
+ elog "please use pymol config settings (~/.pymolrc)"
+ elog "\t set use_shaders, 1"
+ elog "in case of crashes, please deactivate this experimental feature by setting"
+ elog "\t set use_shaders, 0"
+ elog "\t set sphere_mode, 0"
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}