diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-04-04 10:13:09 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-04-04 10:13:09 +0000 |
commit | ee2672efe27fc17b2c204b423a45cccdc48b4c8d (patch) | |
tree | 29f71d1f78716d864f539b26e7a9c9f47661983a /sci-chemistry/pymol | |
parent | Move to virtual/ffmpeg from media-video/ffmpeg. (diff) | |
download | gentoo-2-ee2672efe27fc17b2c204b423a45cccdc48b4c8d.tar.gz gentoo-2-ee2672efe27fc17b2c204b423a45cccdc48b4c8d.tar.bz2 gentoo-2-ee2672efe27fc17b2c204b423a45cccdc48b4c8d.zip |
Version Bump
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/pymol')
-rw-r--r-- | sci-chemistry/pymol/ChangeLog | 10 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/1.4-shaders.patch | 62 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/1.4-vmd.patch | 36 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-1.4_beta1.ebuild | 115 |
4 files changed, 221 insertions, 2 deletions
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog index e07437afcaf9..2b1a95e34f23 100644 --- a/sci-chemistry/pymol/ChangeLog +++ b/sci-chemistry/pymol/ChangeLog @@ -1,6 +1,12 @@ # 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.75 2010/11/12 08:20:43 jlec Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.76 2011/04/04 10:13:09 jlec Exp $ + +*pymol-1.4_beta1 (04 Apr 2011) + + 04 Apr 2011; Justin Lecher <jlec@gentoo.org> +files/1.4-shaders.patch, + +files/1.4-vmd.patch, +pymol-1.4_beta1.ebuild: + Version Bump *pymol-1.3.1_pre3925-r1 (12 Nov 2010) diff --git a/sci-chemistry/pymol/files/1.4-shaders.patch b/sci-chemistry/pymol/files/1.4-shaders.patch new file mode 100644 index 000000000000..853ebff9da81 --- /dev/null +++ b/sci-chemistry/pymol/files/1.4-shaders.patch @@ -0,0 +1,62 @@ + layer0/ShaderMgr.c | 16 ++++++++-------- + layer1/Setting.c | 2 +- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/layer0/ShaderMgr.c b/layer0/ShaderMgr.c +index 929167f..ecb4130 100644 +--- a/layer0/ShaderMgr.c ++++ b/layer0/ShaderMgr.c +@@ -386,7 +386,7 @@ int CShaderMgr_ShadersPresent(CShaderMgr * I) + char * CShaderMgr_ReadShaderFromDisk(PyMOLGlobals * G, const char * fileName) { + FILE* f; + long size; +- char* buffer = NULL, *p, *pymol_path, *shader_path, *fullFile; ++ char* buffer = NULL, *p, *pymol_data, *shader_path, *fullFile; + + PRINTFB(G, FB_ShaderMgr, FB_Debugging) + "CShaderMgr_ReadShaderFromDisk: fileName='%s'\n", fileName +@@ -398,16 +398,16 @@ char * CShaderMgr_ReadShaderFromDisk(PyMOLGlobals * G, const char * fileName) { + return NULL; + } + +- pymol_path = getenv("PYMOL_PATH"); +- if (!pymol_path){ ++ pymol_data = getenv("PYMOL_DATA"); ++ if (!pymol_data){ + PRINTFB(G, FB_ShaderMgr, FB_Warnings) +- " PyMOLShader_NewFromFile-Warning: PYMOL_PATH not set, cannot read shader config files (%s) from disk\n", fileName ENDFB(G); ++ " PyMOLShader_NewFromFile-Warning: PYMOL_DATA not set, cannot read shader config files (%s) from disk\n", fileName ENDFB(G); + return NULL; + } + /* make this a setting */ +- shader_path = "/data/shaders/"; +- fullFile = malloc( sizeof(char) * (strlen(pymol_path)+strlen(shader_path)+strlen(fileName)+1)); +- fullFile = strcpy(fullFile, pymol_path); ++ shader_path = "/shaders/"; ++ fullFile = malloc( sizeof(char) * (strlen(pymol_data)+strlen(shader_path)+strlen(fileName)+1)); ++ fullFile = strcpy(fullFile, pymol_data); + fullFile = strcat(fullFile, shader_path); + fullFile = strcat(fullFile, fileName); + +@@ -416,7 +416,7 @@ char * CShaderMgr_ReadShaderFromDisk(PyMOLGlobals * G, const char * fileName) { + + if (!f) { + PRINTFB(G, FB_ShaderMgr, FB_Errors) +- " PyMOLShader_NewFromFile-Error: Unable to open file '%s' PYMOL_PATH='%s'\n", fullFile, pymol_path ENDFB(G); ++ " PyMOLShader_NewFromFile-Error: Unable to open file '%s' PYMOL_DATA='%s'\n", fullFile, pymol_data ENDFB(G); + return NULL; + } else { + PRINTFB(G, FB_ShaderMgr, FB_Blather) +diff --git a/layer1/Setting.c b/layer1/Setting.c +index 3aa0b8d..f9b5789 100644 +--- a/layer1/Setting.c ++++ b/layer1/Setting.c +@@ -3956,7 +3956,7 @@ void SettingInitGlobal(PyMOLGlobals * G, int alloc, int reset_gui, int use_defau + set_b(I, cSetting_line_use_shader, 1); + set_b(I, cSetting_sphere_use_shader, 1); + set_b(I, cSetting_use_shaders, 0); /* disable by default until optimized shaders present; doesn't effect vol */ +- set_s(I, cSetting_shader_path, "data/shaders"); ++ set_s(I, cSetting_shader_path, "shaders"); + set_i(I, cSetting_volume_bit_depth, 8); + set_color(I, cSetting_volume_color, "-1"); + set_f(I, cSetting_volume_layers, 256); diff --git a/sci-chemistry/pymol/files/1.4-vmd.patch b/sci-chemistry/pymol/files/1.4-vmd.patch new file mode 100644 index 000000000000..2fd909ffd540 --- /dev/null +++ b/sci-chemistry/pymol/files/1.4-vmd.patch @@ -0,0 +1,36 @@ + setup.py | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index b0f4dad..4ec5145 100644 +--- a/setup.py ++++ b/setup.py +@@ -132,8 +132,8 @@ else: # linux or other unix + "/usr/include/freetype2", + # "/users/warren/ext/include", + # VMD plugin support +-# "contrib/uiuc/plugins/include", +-# "contrib/uiuc/plugins/molfile_plugin/src", ++ "contrib/uiuc/plugins/include", ++ "contrib/uiuc/plugins/molfile_plugin/src", + "modules/cealign/src", + "modules/cealign/src/tnt", ] + libs=["GL","GLU","glut","png","z","freetype", "GLEW", +@@ -153,7 +153,7 @@ else: # linux or other unix + # Numeric Python support + # ("_PYMOL_NUMPY",None), + # VMD plugin support +-# ("_PYMOL_VMD_PLUGINS",None) ++ ("_PYMOL_VMD_PLUGINS",None), + ("NO_MMLIBS",None), + ] + ext_comp_args=["-ffast-math","-funroll-loops","-O3"] +@@ -307,7 +307,7 @@ setup ( # Distribution meta-data + "layer5/main.c" + # VMD plugin support + # switch the 0 to 1 to activate the additional source code +- ] + 0 * [ ++ ] + 1 * [ + # (incomplete support -- only TRJ, TRR, XTC, DCD so far...) + 'contrib/uiuc/plugins/molfile_plugin/src/PlugIOManagerInit.c', + 'contrib/uiuc/plugins/molfile_plugin/src/avsplugin.cpp', diff --git a/sci-chemistry/pymol/pymol-1.4_beta1.ebuild b/sci-chemistry/pymol/pymol-1.4_beta1.ebuild new file mode 100644 index 000000000000..337b9b78e5d7 --- /dev/null +++ b/sci-chemistry/pymol/pymol-1.4_beta1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.4_beta1.ebuild,v 1.1 2011/04/04 10:13:09 jlec Exp $ + +EAPI="3" + +PYTHON_DEPEND="2:2.6" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="2.4 2.5 3.*" +PYTHON_USE_WITH="tk" +PYTHON_MODNAME="${PN} chempy pmg_tk pmg_wx" +REV="3925" + +inherit eutils distutils prefix versionator + +DESCRIPTION="A Python-extensible molecular graphics system." +HOMEPAGE="http://pymol.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}/${PN}/$(get_version_component_range 1-2)/${PN}-v${PV/_beta/b}.tar.bz2" +#SRC_URI="http://pymol.svn.sourceforge.net/viewvc/pymol/trunk/pymol.tar.gz?view=tar&pathrev=${REV} -> ${P}.tar.gz" +#SRC_URI="mirror://gentoo/${PF}.tar.gz" + +LICENSE="PSF-2.2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="apbs numpy vmd" + +DEPEND=" + dev-python/numpy + dev-python/pmw + 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 + )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${PN} + +src_prepare() { + epatch \ + "${FILESDIR}"/1.2.2-data-path.patch \ + "${FILESDIR}"/$(get_version_component_range 1-2)-shaders.patch + + epatch "${FILESDIR}"/1.2.2-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 vmd && epatch "${FILESDIR}"/$(get_version_component_range 1-2)-vmd.patch + + use numpy && \ + sed \ + -e '/PYMOL_NUMPY/s:^#::g' \ + -i setup.py + + rm ./modules/pmg_tk/startup/apbs_tools.py || die + + # python 3.* fix + # sed '452,465d' -i setup.py + distutils_src_prepare +} + +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 -f)/${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 -f) -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." +} + +pkg_postinst() { + elog "\t USE=shaders was removed," + elog "please use pymol config settings" + elog "\t set use_shaders, 1" + distutils_pkg_postinst +} |