summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-06-18 12:20:15 +0000
committerJustin Lecher <jlec@gentoo.org>2013-06-18 12:20:15 +0000
commit0295179b2d28eb14f04ac47d12eaa4712a56896c (patch)
tree9de9dc2dcc998e0a5735593797aba5d68133297e /sci-chemistry/pymol
parentChanged DESCRIPTION to make clear what purpose this package has (bug #372475) (diff)
downloadhistorical-0295179b2d28eb14f04ac47d12eaa4712a56896c.tar.gz
historical-0295179b2d28eb14f04ac47d12eaa4712a56896c.tar.bz2
historical-0295179b2d28eb14f04ac47d12eaa4712a56896c.zip
sci-chemistry/pymol: Add backports of upstream bugfixes
Package-Manager: portage-2.2.0_alpha180/cvs/Linux x86_64 Manifest-Sign-Key: 0x8009D6F070EB7916
Diffstat (limited to 'sci-chemistry/pymol')
-rw-r--r--sci-chemistry/pymol/ChangeLog8
-rw-r--r--sci-chemistry/pymol/Manifest11
-rw-r--r--sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch254
-rw-r--r--sci-chemistry/pymol/files/pymol-1.6.0.0-labels.patch372
-rw-r--r--sci-chemistry/pymol/pymol-1.6.0.0-r1.ebuild99
5 files changed, 739 insertions, 5 deletions
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog
index 2382f9cf54a2..0ce39b4be0f0 100644
--- a/sci-chemistry/pymol/ChangeLog
+++ b/sci-chemistry/pymol/ChangeLog
@@ -1,6 +1,12 @@
# 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.101 2013/06/12 08:10:49 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/ChangeLog,v 1.102 2013/06/18 12:20:13 jlec Exp $
+
+*pymol-1.6.0.0-r1 (18 Jun 2013)
+
+ 18 Jun 2013; Justin Lecher <jlec@gentoo.org> +pymol-1.6.0.0-r1.ebuild,
+ +files/pymol-1.6.0.0-bg_rgb.patch, +files/pymol-1.6.0.0-labels.patch:
+ Add backports of upstream bugfixes
*pymol-1.6.0.0 (12 Jun 2013)
diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest
index bab96703adf6..0e28e9b667d9 100644
--- a/sci-chemistry/pymol/Manifest
+++ b/sci-chemistry/pymol/Manifest
@@ -9,20 +9,23 @@ AUX pymol-1.5.0.1-vmd.patch 1723 SHA256 9a31ff39838484ce0df7658b896b8da137740871
AUX pymol-1.5.0.1-web.patch 634 SHA256 7c30f0c030c3f2e30cbd1f37c58910592a71ee2d5c5a351130e0bde13104c49e SHA512 98da13dcf6d652a55edfa702ecd2e304b525833cf13380f87185a8710aeac5529a9284f83146e5fd80d2ca3b15c174ddc666a931f2a643ca4c80333f00fb9d3a WHIRLPOOL 8ff57da3a02d5d6fea9fab91fe11bc18c361e563145853166a2793285fd87490859089a1a3c46488b5703f801f805bc3b3720ae6f9bbabfd0bc33d89804c00d2
AUX pymol-1.5.0.3-prefix.patch 2278 SHA256 d4bb54dd667011747cf4f201cc4c0ac84ed6eb59cb066c374d6f89097a3914cc SHA512 bce01e7eb890863f43be482e7eeae8100002c5e27ea935dfd36f3867b80f734a41d7f723e33e39574bb6ff0547d16febf637d44fd0371c68897d6b6f61d6ecec WHIRLPOOL 4a74ea99bf6620e1c37b6a3c1382de6d1f5b97ca97d7fbeddb3207172dfbbda1bd3bf90ea6072627e5595014c7760c2d15378b67a67f3ecc0cefc9fff84e9eac
AUX pymol-1.5.0.3-web.patch 545 SHA256 559fbf42497c33a0ec844a11d7cd89178a8e0bae437df71a4408b891857ef9b3 SHA512 272a516e8d2780bd5b74e852c9d06c27f8dd645e3c68b17bba1931d0d59af55637bc0565447642539b3b0e73b82e5392c13e51171aa3a2ebf42d717fabf4bce2 WHIRLPOOL 95a5bf25a068da437dd2c04fb22b9b4216646f9b0bd0c3ce333428a5eccc090005a0e6b4fd50279ba22df9a754acb9b61fdec07dfb7a134e3d966e0e8e14cb88
+AUX pymol-1.6.0.0-bg_rgb.patch 9264 SHA256 12fa3a5a83f77ecbff3f5958e40b7c8f0b5f9c9bb7fa2c1e87cff15f2476e83b SHA512 23627c8db8f55bfe8150a7bd4f75033d3f09f308e0f7c39f79e67c6c749fede2402f611df102e30d74cf8c83b27c0143833c7bfbcc54bd04cbae1adefefc0726 WHIRLPOOL dfa0a9918815c9d048a89ed3b8f40409532192f2bdfdb64a1c1495b5aa0641bf4c40889387ba752de5381999809812ab2933a155e5054efa3997a4a7cbad49f9
+AUX pymol-1.6.0.0-labels.patch 17150 SHA256 b1385696a5f781e51adcd61774362f76c4f8443e168e5232b1b577f06a6821b0 SHA512 190353d690656685da0e7912cb74426c161659a177d3cc8b1e9bdeb02513756b9d36b32c0ee351905b5dd31e7a7ea6dfe7ca685533b0ef7651bd51190e2060bc WHIRLPOOL e79fd2debc7b3bb80f0d83fe49c9b90de24d5e3f0e373e2b91452965059874c2d007b3e2731028a2ab4005ddef3c75404ee7f4b6bde6216e930eb5ff2fd1fbf3
DIST pymol-1.5.0.3.tar.xz 7412080 SHA256 b304c2839bc944bd2619403474d36cb846b372ba281c8f05931d3f155a0aec7a SHA512 a3f1dd3089fa4158840f2cb8c3848ef70284d1f859429cfab6ac9b00f649d7274a3ac7697a7fb4996d7643068a916f9ad7b1952c5ff27003cedcc7c89e795485 WHIRLPOOL 82788bf6fce52d76ff00d1d7243e8f3962027b4512addaf0fc2f881aaf5f0da6582cb3b3b56a178ed36572947273a999be3d67ba49845eb887da6cf242c5b5f3
DIST pymol-1.6.0_rc1.tar.xz 6592108 SHA256 7353c9bdfa272b516bd43efaea7df16a6e1632b013ac6091eb5ec34b1f8676bc SHA512 971f03b41db1ed6b1095e91cea49ca5ffb819bf9b97e34dab215112462da02d7bb1b608c462d07556998dfd49631663f3d2cbf27368980f3d69bf134002224a8 WHIRLPOOL 2368fb3a20cbb2d490b1f4b370f770aa7b89921c5827414715ec7616ad66e991bb7f378ed7c379db78b9391dea0bcae9d56362bd705978d667858af8ef46ebb4
DIST pymol-icons.tar.xz 38100 SHA256 03500f28256f67abfbb7d08b798b11aaa208f0ae1473ef2a7205b3c012ddb06a SHA512 5af51014d4fcbc85ef1fecd7667224709c9305b9b72bfdfd89ece2b4420fa8a81bf8c85fcc5903e2a670f44403f12764808f6a16ef42f111bbd0e7ed8e412d54 WHIRLPOOL 6104d378928c56b39f8cbe29184629b73f87da09e81e41ddc08b9b291876f1a30ccaf9ec257f47798c6d03253816f80c14567073c419fa48dd1520fa3fa58ecd
DIST pymol-v1.6.0.0.tar.bz2 8695114 SHA256 a37eb1a1bd882da14ac9c03617f62f6a49eea5a6dacd0d7202fb3b7cba84e62b SHA512 afe4a9e9c9501b3e636ca97eac3e4204da2cbafd7dc85ad6fd43227c68b448de435f190eea9c75b3403f11786bc512b6366bdf092c591432440032ddc018b0b2 WHIRLPOOL 30302badde84ad63e4a402a54046da63812051879bdb707782589b4bfaa09a8f590e58b5bdd89d0deefd9d2127f17406dd862f36f6a0e33e3e410f8a9d47a937
EBUILD pymol-1.5.0.3-r1.ebuild 3131 SHA256 3381ef60e5dc156116f2ca0e8cd9631c58d38e188f7de4b00e91a39b099f50e3 SHA512 4a34c1416d871da56dc8d753ad46b97a0167dd63a14919d59e601143ad60236b8267b0d779fecc970e1e5b4c8ce1716cca8d125977b92af1d8adf7e2a045f1e0 WHIRLPOOL a05f2b444bb281b78d4199c23c462663d3184735cd66c946f2d32e673593f442876027b142e0cdf6206247574b539526e7aff7f6863f4ce97f878cd783828fe8
EBUILD pymol-1.5.0.3-r2.ebuild 3048 SHA256 10f44dc1054724a3abf111b5232bbcbf18920066778afdeb965da10bbc7e92e5 SHA512 31441e2cd38615bf977273e5ad7114a99a6680bc9e096625724eef4c71a53186e2d84e41977fc95650728cd0dd0201f3081af42d31019029a24b9154f85d2490 WHIRLPOOL 46cef085836c28f9b41693af62c9a2f5371f6cd54b8bd00013fb799a1cd7c04016a2934728dc0128693b8ddd7be78a22947283c490aa9f2c3ca5fc0fa604e6c6
+EBUILD pymol-1.6.0.0-r1.ebuild 2419 SHA256 7bd6cebcd5d308e5facd47705b857689da698359fef1c866346880f1470470ee SHA512 0a599151b7bcf6f8de25f2f15bdf5a4d80e1c25e94ba5cf5311c608d7a2d2dda4eb3f52af5525a4a8c6c3d4e7b600db28f490f3119fc26b901725b307d058601 WHIRLPOOL 2ca9788e2031f62dc803648e86f7cb2d681e1dcde7efbaac00d7dcb04a73dca1109b3682ab237e4ba68a37f908e16d5d51c4e10e316fa60ae367535404e86db5
EBUILD pymol-1.6.0.0.ebuild 2337 SHA256 a6df3b85b342539aa4743164511f5c39361db0141cb3acffda7242bd1837d398 SHA512 104221e52fa572aadf58ecaaa817510fee4c7defe47ad826b9b8bbef416cad3be632624343ad38f6265c73ea51255dacbe1df4f19b912c680ea9f1a072b84853 WHIRLPOOL 54524d364491f913e66b4c0a3b5cc0eabf38afde975eedc38e0d8d5376a6bcf274ad0ef8a55c3f634ad59d9982221a8b78e59291fa0aea5e694d12821b2add62
EBUILD pymol-1.6.0_rc1.ebuild 2270 SHA256 4a7a7bea1ce4c0c96c0dc6a2a624a33ab779b783776a6293b38a11d6c028a751 SHA512 826ee97eec01fe34ca34cfdee1c4a85e994e861297fbf7dd93b63e347aa83800c84f21aee8c7052d4930bc6a299fcab97d34ca7849e7ff80e5394c609beda2fd WHIRLPOOL 70ec2a72a1ace006b1d0b98958d22d916b60447a7383c0a7891db028c33ace1a12c649626428cc3aea1ef58632e646c04c1731332c7c638393253d3308427bc9
-MISC ChangeLog 4601 SHA256 ee3c26b418dbcd068036413e2bf60a3bd0939732f7b9630f3090a6cd8add68e4 SHA512 458c134d4a0ba310938db1bc2dc7e87c1c2e87880d39a28732d5957981b37518eb7fa157fde3e9e51aeecdb0897118f1835c5d5abfb4beca70abd9a8eb6a6b49 WHIRLPOOL 458b9f46eb916c27db20fe1d7ed50658bae840a3d06d1c1340c3f45e5ddda29e63f319fac6f9d5d6a482dde1ef346a32eeb42b4a1496b10d2417bd6861c4017d
+MISC ChangeLog 4817 SHA256 7e8de1cc4dc9dd518be7a0219a22311e79425a4d3f14c9f619be84062be522dc SHA512 8f41509c9c00b5e8d26196f02d5dca0aec24985657876fda1e78875cebdd6df9223e0e51a0e435aea44dfcec7eeca139b5e6c6f9ace1adc352a0ff8db445d5df WHIRLPOOL 8d2758be534c7756ce25c54d1068d022a302bb6c66507da1bd89b277bbc800e8d5ff54af243574c967d1addc03a39fae0ab73966fc4a7f6bed829c07c6ab6b31
MISC metadata.xml 491 SHA256 7370aee92bf4088e8dc054dc8812cc30e98be7995570afae89dfacc49eec711b SHA512 319f8924b56ecb64e35892fa10ab94adbca68dc3d9dffc760d54e44fe19feb0e3bf87110aa7e94f25a353792e84610353f2f8684b6032426cd4eaa70fa5a9fdc WHIRLPOOL 93baebbb622f81fd48b7396bb3f98c8ce0d97db41c6a09e28da0cd923261961100cd715ada8f4ff70f79638cca88b0f1ab0b0ff78f9656323efcb871ea0958cf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-iEYEAREKAAYFAlG4LQoACgkQgAnW8HDreRazUgCggkT6xxdwIeFvETB0DHiT/EOi
-umgAn3jVuq+eG0+loWHk1/6mMZw1uN/A
-=kF5i
+iEYEAREKAAYFAlHAUH8ACgkQgAnW8HDreRbb5QCfVP3MvHYof8W45UAf+6H6qzW/
+Ln0AoJ7vBKs4P6Y/U2cs2el7ghsBxUIo
+=iC1n
-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch b/sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch
new file mode 100644
index 000000000000..39fcbc019bbe
--- /dev/null
+++ b/sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch
@@ -0,0 +1,254 @@
+Index: pymol/setup.py
+===================================================================
+--- pymol/setup.py (revision 4031)
++++ pymol/setup.py (revision 4032)
+@@ -123,10 +123,10 @@
+ out.write('"%s" "%s"' % (python_exe, pymol_file))
+ out.write(' %1 %2 %3 %4 %5 %6 %7 %8 %9' + os.linesep)
+ else:
+- out.write('#!/bin/sh' + os.linesep)
++ out.write('#!/bin/bash' + os.linesep)
+ if sys.platform.startswith('darwin'):
+- out.write('if [ "$DISPLAY" == "" ]; then DISPLAY=":0.0"; export DISPLAY; fi' + os.linesep)
+- out.write('PYMOL_PATH="%s"; export PYMOL_PATH' % pymol_path + os.linesep)
++ out.write('[ "$DISPLAY" == "" ] && export DISPLAY=":0.0"' + os.linesep)
++ out.write('export PYMOL_PATH="%s"' % pymol_path + os.linesep)
+ out.write('"%s" "%s" "$@"' % (python_exe, pymol_file) + os.linesep)
+
+ os.chmod(launch_script, 0755)
+@@ -135,12 +135,16 @@
+
+ #============================================================================
+
++# should be something like (build_base + "/generated"), but that's only
++# known to build and install instances
++generated_dir = os.path.join(os.environ.get("PYMOL_BLD", "build"), "generated")
++
+ import create_shadertext
+ create_shadertext.create_shadertext(
+ "data/shaders",
+ "shadertext.txt",
+- "generated/include/ShaderText.h",
+- "generated/src/ShaderText.c")
++ generated_dir + "/ShaderText.h",
++ generated_dir + "/ShaderText.c")
+
+ pymol_src_dirs = [
+ "ov/src",
+@@ -152,12 +156,10 @@
+ "layer5",
+ "modules/cealign/src",
+ "modules/cealign/src/tnt",
+- 'generated/src',
+- 'generated/include',
++ generated_dir,
+ ]
+
+ def_macros = [
+- ("_PYMOL_MODULE", None),
+ ]
+
+ libs = []
+@@ -226,27 +228,32 @@
+
+ for prefix in prefix_path:
+ inc_dirs += filter(os.path.isdir, [prefix + s for s in ["/include", "/include/freetype2"]])
+- lib_dirs += filter(os.path.isdir, [prefix + s for s in ["/lib"]])
++ lib_dirs += filter(os.path.isdir, [prefix + s for s in ["/lib64", "/lib"]])
+
+ glut = posix_find_lib(['glut', 'freeglut'], lib_dirs)
+- for _libs in (libs, pyogl_libs):
+- _libs += ["GL", "GLU", "GLEW", glut]
+
+- ext_comp_args = ["-ffast-math", "-funroll-loops", "-O3", "-fcommon"]
++ libs += ["GLEW"]
++ pyogl_libs += ["GL", "GLU", glut]
+
++ libs += pyogl_libs
++
++ ext_comp_args += ["-ffast-math", "-funroll-loops", "-O3", "-fcommon"]
++
+ def get_pymol_version():
+ return re.findall(r'_PyMOL_VERSION "(.*)"', open('layer0/Version.h').read())[0]
+
+ def get_sources(subdirs, suffixes=('.c', '.cpp')):
+ return [f for d in subdirs for s in suffixes for f in glob(d + '/*' + s)]
+
+-def get_packages(base, parent='', r=[]):
++def get_packages(base, parent='', r=None):
+ from os.path import join, exists
++ if r is None:
++ r = []
+ if parent:
+ r.append(parent)
+ for name in os.listdir(join(base, parent)):
+ if '.' not in name and exists(join(base, parent, name, '__init__.py')):
+- get_packages(base, join(parent, name))
++ get_packages(base, join(parent, name), r)
+ return r
+
+ def pyogl_extension(name, sources):
+@@ -260,7 +267,10 @@
+ author = "Schrodinger",
+ url = "http://pymol.org",
+ contact = "pymol-users@lists.sourceforge.net",
+- description = "PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source PyMOL is free to everyone!",
++ description = ("PyMOL is a Python-enhanced molecular graphics tool. "
++ "It excels at 3D visualization of proteins, small molecules, density, "
++ "surfaces, and trajectories. It also includes molecular editing, "
++ "ray tracing, and movies. Open Source PyMOL is free to everyone!"),
+
+ package_dir = {'' : 'modules'},
+ packages = get_packages('modules'),
+Index: pymol/ChangeLog
+===================================================================
+--- pymol/ChangeLog (revision 4031)
++++ pymol/ChangeLog (revision 4032)
+@@ -2,6 +2,12 @@
+ CHANGE LOG
+ =========================================================================
+
++2013-06-18 Blaine Bell, Thomas Holder
++
++ * fixed loading in bg_rgb settings from old project pse files
++
++ * add URL support for run command
++
+ 2013-06-13 Blaine Bell <blaine.bell@schrodinger.com>
+
+ * fixed labels when use_shaders is 0 and show_frame_rate is on
+Index: pymol/layer1/Setting.c
+===================================================================
+--- pymol/layer1/Setting.c (revision 4031)
++++ pymol/layer1/Setting.c (revision 4032)
+@@ -41,6 +41,7 @@
+ #include"ShaderMgr.h"
+ #include"Sphere.h"
+ #include"Selector.h"
++#include"Parse.h"
+
+ static void *SettingPtr(CSetting * I, int index, ov_size size);
+
+@@ -920,43 +921,67 @@
+ set_type = false;
+ break;
+ default:
+- if(ok)
+- switch (setting_type) {
+- case cSetting_boolean:
+- case cSetting_int:
+- ok = PConvPyIntToInt(PyList_GetItem(list, 2),
+- (int *) SettingPtr(I, index, sizeof(int)));
+- break;
+- case cSetting_color:
+- {
+- int color = 0;
+- ok = PConvPyIntToInt(PyList_GetItem(list, 2), &color);
+- if(ok)
+- color = ColorConvertOldSessionIndex(I->G, color);
+- *((int *) SettingPtr(I, index, sizeof(int))) = color;
+- }
+- break;
+- case cSetting_float:
+- ok = PConvPyFloatToFloat(PyList_GetItem(list, 2),
+- (float *) SettingPtr(I, index, sizeof(float)));
+- break;
+- case cSetting_float3:
+- ok = PConvPyListToFloatArrayInPlaceAutoZero(PyList_GetItem(list, 2),
+- (float *) SettingPtr(I, index,
+- 3 *
+- sizeof
+- (float)), 3);
+- break;
+- case cSetting_string:
+- ok = PConvPyStrToStrPtr(PyList_GetItem(list, 2), &str);
+- if(ok) {
+- strcpy(((char *) SettingPtr(I, index, strlen(str) + 1)), str);
+- }
+- break;
+- }
++ if(ok){
++ int skip = false;
++ switch (index){
++ case cSetting_bg_rgb:
++ case cSetting_bg_rgb_top:
++ case cSetting_bg_rgb_bottom:
++ if (setting_type == cSetting_float3){
++ float vals[3];
++ ok = PConvPyListToFloatArrayInPlaceAutoZero(PyList_GetItem(list, 2), (float*)&vals, 3);
++ if (ok){
++ SettingSet_color_from_3f(I, index, vals);
++ setting_type = cSetting_color;
++ skip = true;
++ }
++ } else if (setting_type == cSetting_color){
++ int color = 0;
++ ok = PConvPyIntToInt(PyList_GetItem(list, 2), &color);
++ if(ok)
++ color = ColorConvertOldSessionIndex(I->G, color);
++ *((int *) SettingPtr(I, index, sizeof(int))) = color;
++ }
++ }
++ if (!skip){
++ switch (setting_type) {
++ case cSetting_boolean:
++ case cSetting_int:
++ ok = PConvPyIntToInt(PyList_GetItem(list, 2),
++ (int *) SettingPtr(I, index, sizeof(int)));
++ break;
++ case cSetting_color:
++ {
++ int color = 0;
++ ok = PConvPyIntToInt(PyList_GetItem(list, 2), &color);
++ if(ok)
++ color = ColorConvertOldSessionIndex(I->G, color);
++ *((int *) SettingPtr(I, index, sizeof(int))) = color;
++ }
++ break;
++ case cSetting_float:
++ ok = PConvPyFloatToFloat(PyList_GetItem(list, 2),
++ (float *) SettingPtr(I, index, sizeof(float)));
++ break;
++ case cSetting_float3:
++ ok = PConvPyListToFloatArrayInPlaceAutoZero(PyList_GetItem(list, 2),
++ (float *) SettingPtr(I, index,
++ 3 *
++ sizeof
++ (float)), 3);
++ break;
++ case cSetting_string:
++ ok = PConvPyStrToStrPtr(PyList_GetItem(list, 2), &str);
++ if(ok) {
++ strcpy(((char *) SettingPtr(I, index, strlen(str) + 1)), str);
++ }
++ break;
++ }
++ }
++ }
+ }
+ if(ok && set_type)
+- I->info[index].type = setting_type;
++ I->info[index].type = setting_type;
+ }
+ }
+ return (ok);
+Index: pymol/modules/pymol/parsing.py
+===================================================================
+--- pymol/modules/pymol/parsing.py (revision 4031)
++++ pymol/modules/pymol/parsing.py (revision 4032)
+@@ -437,6 +437,15 @@
+
+ # launching routines
+
++ def execfile(filename, global_ns, local_ns):
++ if '://' in filename:
++ import pymol.internal as pi
++ co = compile(pi.file_read(filename), filename, 'exec')
++ exec(co, global_ns, local_ns)
++ else:
++ import __builtin__ as b
++ b.execfile(filename, global_ns, local_ns)
++
+ def run_file(file,global_ns,local_ns):
+ pymol.__script__ = file
+ try:
diff --git a/sci-chemistry/pymol/files/pymol-1.6.0.0-labels.patch b/sci-chemistry/pymol/files/pymol-1.6.0.0-labels.patch
new file mode 100644
index 000000000000..170ab2edcd95
--- /dev/null
+++ b/sci-chemistry/pymol/files/pymol-1.6.0.0-labels.patch
@@ -0,0 +1,372 @@
+Index: pymol/ChangeLog
+===================================================================
+--- pymol/ChangeLog (revision 4030)
++++ pymol/ChangeLog (revision 4031)
+@@ -2,6 +2,16 @@
+ CHANGE LOG
+ =========================================================================
+
++2013-06-13 Blaine Bell <blaine.bell@schrodinger.com>
++
++ * fixed labels when use_shaders is 0 and show_frame_rate is on
++
++2013-06-12 Thomas Holder <thomas.holder@schrodinger.com>
++
++ * update APBS Tools plugin
++
++ * fix spectrumany when minimum/maximum are provided
++
+ 2013-06-11 Blaine Bell <blaine.bell@schrodinger.com>
+
+ * Open Source PyMOL v1.6.0.0
+Index: pymol/layer1/Character.c
+===================================================================
+--- pymol/layer1/Character.c (revision 4030)
++++ pymol/layer1/Character.c (revision 4031)
+@@ -276,16 +276,16 @@
+ rec->extent[2], rec->extent[1],
+ rec->extent[2], rec->extent[3]
+ };
+- glEnableClientState(GL_VERTEX_ARRAY);
+- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+-#ifdef OPENGL_ES_1
+- glClientActiveTexture(GL_TEXTURE1);
+-#endif
+- glVertexPointer(3, GL_FLOAT, 0, vertexVals);
+- glTexCoordPointer(2, GL_FLOAT, 0, texVals);
+- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+- glDisableClientState(GL_VERTEX_ARRAY);
+- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
++ glBegin(GL_QUADS);
++ glTexCoord2f(rec->extent[0], rec->extent[1]);
++ glVertex3f(v0[0], v0[1], v0[2]);
++ glTexCoord2f(rec->extent[0], rec->extent[3]);
++ glVertex3f(v0[0], v1[1], v0[2]);
++ glTexCoord2f(rec->extent[2], rec->extent[3]);
++ glVertex3f(v1[0], v1[1], v0[2]);
++ glTexCoord2f(rec->extent[2], rec->extent[1]);
++ glVertex3f(v1[0], v0[1], v0[2]);
++ glEnd();
+ }
+ }
+ }
+Index: pymol/modules/pymol/__init__.py
+===================================================================
+--- pymol/modules/pymol/__init__.py (revision 4030)
++++ pymol/modules/pymol/__init__.py (revision 4031)
+@@ -252,9 +252,11 @@
+ # auto-detect bundled FREEMOL (if present)
+
+ if not os.environ.has_key("FREEMOL"):
+- test_path = os.path.join(os.environ['PYMOL_PATH'],"freemol")
+- if os.path.isdir(test_path):
+- os.environ['FREEMOL'] = test_path
++ for test_path in ['freemol', 'ext']:
++ test_path = os.path.join(os.environ['PYMOL_PATH'], test_path)
++ if os.path.isdir(test_path):
++ os.environ['FREEMOL'] = test_path
++ break
+
+ # include FREEMOL's libpy in sys.path (if present)
+
+@@ -339,9 +341,6 @@
+ elif vendor.startswith('Parallels'):
+ if renderer[0:8]=='Parallel':
+ pass
+- # this was critical for older Parallels
+- # but actually slows down current versions
+- # cmd.set('texture_fonts',1)
+
+ elif vendor.startswith('ATI'):
+ if renderer[0:17]=='FireGL2 / FireGL3': # obsolete ?
+Index: pymol/modules/pymol/preset.py
+===================================================================
+--- pymol/modules/pymol/preset.py (revision 4030)
++++ pymol/modules/pymol/preset.py (revision 4031)
+@@ -21,7 +21,7 @@
+
+ tmp_sele = "_p_tmp"
+
+-prot_and_dna_sele = "(resn ALA+CYS+CYX+ASP+GLU+PHE+GLY+HIS+HID+HIE+HIP+HISE+HISD+HISP+ILE+LYS+LEU+MET+MSE+ASN+PRO+GLN+ARG+SER+THR+VAL+TRP+TYR+A+C+T+G+U)"
++prot_and_dna_sele = "(resn ALA+CYS+CYX+ASP+GLU+PHE+GLY+HIS+HID+HIE+HIP+HISE+HISD+HISP+ILE+LYS+LEU+MET+MSE+ASN+PRO+GLN+ARG+SER+THR+VAL+TRP+TYR+A+C+T+G+U+DA+DC+DT+DG+DU+DI)"
+ wat_sele = "(resn WAT,H2O,HOH,TIP)"
+ ion_sele = "(resn CA,HG,K,NA,ZN,MG,CL)"
+ solv_sele = "("+wat_sele+"|"+ion_sele+")"
+Index: pymol/modules/pymol/cmd.py
+===================================================================
+--- pymol/modules/pymol/cmd.py (revision 4030)
++++ pymol/modules/pymol/cmd.py (revision 4031)
+@@ -310,8 +310,7 @@
+ selection_sc = lambda sc=Shortcut,gn=get_names:sc(gn('public')+['all'])
+ object_sc = lambda sc=Shortcut,gn=get_names:sc(gn('objects'))
+ map_sc = lambda sc=Shortcut,gnot=get_names_of_type:sc(gnot('object:map'))
+- contour_sc = lambda sc=Shortcut,gnot=get_names_of_type:sc(
+- gnot('object:mesh')+gnot('object:surface'))
++ contour_sc = lambda sc=Shortcut,gnot=get_names_of_type:sc(gnot('object:mesh')+gnot('object:surface'))
+ group_sc = lambda sc=Shortcut,gnot=get_names_of_type:sc(gnot('object:group'))
+
+ # Table for argument autocompletion
+Index: pymol/modules/pymol/viewing.py
+===================================================================
+--- pymol/modules/pymol/viewing.py (revision 4030)
++++ pymol/modules/pymol/viewing.py (revision 4031)
+@@ -1393,9 +1393,9 @@
+ if action=='clear':
+ for key in pymol._scene_dict.keys():
+ # free selections
+- list = pymol._scene_dict[key]
+- if len(list)>3:
+- colorection = list[3]
++ scene_list = pymol._scene_dict[key]
++ if len(scene_list)>3:
++ colorection = scene_list[3]
+ if colorection!=None:
+ _self.del_colorection(colorection,key)
+ name = "_scene_"+key+"_*"
+@@ -1427,6 +1427,8 @@
+ print "Error: scene '%s' not found."%key
+ elif new_key==None:
+ print "Error: must provide the 'new_key' argument"
++ elif new_key == key:
++ print "scene: '%s' not changed" % key
+ else:
+ new_scene_order = []
+ for a in pymol._scene_order:
+@@ -1443,9 +1445,9 @@
+ if name in valid_names:
+ new_name = "_scene_"+new_key+"_"+rep_name
+ _self.set_name(name,new_name)
+- list = pymol._scene_dict[new_key]
+- if len(list)>3:
+- _self.set_colorection_name(list[3],key,new_key)
++ scene_list = pymol._scene_dict[new_key]
++ if len(scene_list)>3:
++ _self.set_colorection_name(scene_list[3],key,new_key)
+ print" scene: '%s' renamed to '%s'."%(key,new_key)
+ pymol._scene_dict_sc.rebuild( pymol._scene_dict.keys())
+ _self.set("session_changed",1,quiet=1)
+@@ -1464,29 +1466,29 @@
+ _self.set("scenes_changed",1,quiet=1);
+ key = pymol._scene_dict_sc.auto_err(key,'scene')
+ _self.set('scene_current_name', key, quiet=1)
+- list = pymol._scene_dict[key]
+- ll = len(list)
++ scene_list = pymol._scene_dict[key]
++ ll = len(scene_list)
+ if (ll>1) and (active):
+- if list[1]!=None:
++ if scene_list[1]!=None:
+ _self.disable()
+ _self.deselect()
+- _self.set_vis(list[1])
++ _self.set_vis(scene_list[1])
+ if (ll>2) and (frame):
+- if list[2]!=None:
++ if scene_list[2]!=None:
+ if not _self.get_movie_playing(): # don't set frame when movie is already playing
+- if _self.get_frame()!=list[2]: # only set the frame when it isn't already correct
+- _self.frame(list[2],scene=1) # let frame know that it is being set by a scene
++ if _self.get_frame()!=scene_list[2]: # only set the frame when it isn't already correct
++ _self.frame(scene_list[2],scene=1) # let frame know that it is being set by a scene
+ else:
+ _self.set_frame(1,10) # seek scene
+ if (ll>3) and (color):
+- if list[3]!=None:
+- _self.set_colorection(list[3],key)
++ if scene_list[3]!=None:
++ _self.set_colorection(scene_list[3],key)
+ if (ll>4) and (rep):
+- if list[4]==None:
++ if scene_list[4]==None:
+ rep = 0
+ if (ll>5) and (message==None):
+- if list[5]!=None:
+- message=list[5]
++ if scene_list[5]!=None:
++ message=scene_list[5]
+ if rep!=0:
+ _self.hide("(all)")
+ valid_names = _self.get_names("all")
+@@ -1521,8 +1523,8 @@
+ if replace_flag and not mess_flag:
+ _self.wizard()
+ if (ll>0) and (view):
+- if list[0]!=None:
+- _self.set_view(list[0],animate,quiet,hand)
++ if scene_list[0]!=None:
++ _self.set_view(scene_list[0],animate,quiet,hand)
+ if not quiet and _feedback(fb_module.scene,fb_mask.actions,_self): # redundant
+ print " scene: \"%s\" recalled."%key
+ elif (action=='store') or (action=='update'):
+@@ -1535,11 +1537,11 @@
+ if not pymol._scene_dict.has_key(key):
+ pymol._scene_dict_sc.append(key)
+ else: # get rid of existing one (if exists)
+- list = pymol._scene_dict[key]
+- if (action=='update') and (message==None) and len(list)>5:
++ scene_list = pymol._scene_dict[key]
++ if (action=='update') and (message==None) and len(scene_list)>5:
+ message = pymol._scene_dict[key][5]
+- if len(list)>3:
+- colorection = list[3]
++ if len(scene_list)>3:
++ colorection = scene_list[3]
+ if colorection!=None:
+ _self.del_colorection(colorection,key) # important -- free RAM
+ name = "_scene_"+key+"_*"
+@@ -1575,9 +1577,9 @@
+ key = setting.get("scene_current_name",_self=_self)
+ key = pymol._scene_dict_sc.auto_err(key,'scene')
+ if pymol._scene_dict.has_key(key):
+- list = pymol._scene_dict[key]
+- if len(list)>3:
+- colorection = list[3]
++ scene_list = pymol._scene_dict[key]
++ if len(scene_list)>3:
++ colorection = scene_list[3]
+ if colorection!=None:
+ _self.del_colorection(colorection,key) # important -- free RAM
+ lst = _scene_validate_list(_self)
+@@ -2573,7 +2575,7 @@
+ v = e_it.next()
+ if v is None:
+ return False
+- v = (float(v) - minimum) / val_range * (n_colors - 1)
++ v = min(1.0, max(0.0, (float(v) - minimum) / val_range)) * (n_colors - 1)
+ i = min(int(v), n_colors - 2)
+ p = v - i
+ rgb = [int(255 * (col_tuples[i+1][j] * p + col_tuples[i][j] * (1.0 - p)))
+Index: pymol/modules/pymol/checking.py
+===================================================================
+--- pymol/modules/pymol/checking.py (revision 4030)
++++ pymol/modules/pymol/checking.py (revision 4031)
+@@ -1,6 +1,9 @@
+
+ import types
+-import cmd
++try:
++ import cmd
++except:
++ cmd = None
+
+ def _raising(code=-1,_self=cmd):
+ # WARNING: internal routine, subject to change
+Index: pymol/modules/pymol/shortcut.py
+===================================================================
+--- pymol/modules/pymol/shortcut.py (revision 4030)
++++ pymol/modules/pymol/shortcut.py (revision 4031)
+@@ -15,7 +15,10 @@
+ if __name__=='pymol.shortcut' or __name__=='shortcut':
+
+ import copy
+- from pymol.checking import is_string, is_list
++ try:
++ from pymol.checking import is_string, is_list
++ except:
++ from checking import is_string, is_list
+
+ def mkabbr(a, m=1):
+ b = a.split('_')
+Index: pymol/modules/pymol/editing.py
+===================================================================
+--- pymol/modules/pymol/editing.py (revision 4030)
++++ pymol/modules/pymol/editing.py (revision 4031)
+@@ -400,13 +400,15 @@
+ if _self._raising(r,_self): raise pymol.CmdException
+ return r
+
+- def push_undo(selection, state=0, _self=cmd):
++ def push_undo(selection, just_coordinates=1, finish_undo=0, add_objects=0, delete_objects=0, state=0, _self=cmd):
+ '''
+ DESCRIPTION
+
+ "push_undo" stores the current conformations of objects in the
+ selection onto their individual undo rings.
+
++ Notice: This command is only partly implemented in open-source PyMOL.
++
+ USAGE
+
+ push_undo (all)
+Index: pymol/modules/pmg_tk/skins/normal/__init__.py
+===================================================================
+--- pymol/modules/pmg_tk/skins/normal/__init__.py (revision 4030)
++++ pymol/modules/pmg_tk/skins/normal/__init__.py (revision 4031)
+@@ -106,19 +106,6 @@
+ self.app.destroycomponent('commandframe')
+
+ def createMessageBar(self):
+- # Create the message bar area for help and status messages.
+-# frame = self.app.createcomponent('bottomtray', (), None,
+-# Frame,(self.app._hull,), relief=SUNKEN)
+-# self.__messageBar = self.app.createcomponent('messagebar',
+-# (), None,
+-# Pmw.MessageBar,
+-# (frame,),
+-# #entry_width = 40,
+-# entry_relief=SUNKEN,
+-# entry_bd=1,
+-# labelpos=None)
+-# self.__messageBar.pack(side=LEFT, expand=NO, fill=X)
+-
+ self.messageBar = Pmw.MessageBar(self.commandFrame, entry_width = 25,
+ entry_relief='sunken', entry_borderwidth=1) #, labelpos = 'w')
+
+@@ -139,7 +126,6 @@
+ self.balloon.configure(statuscommand = self.messageBar.helpmessage)
+
+ def destroyMessageBar(self):
+-
+ self.messageBar.destroy()
+
+ def get_current_session_file(self):
+@@ -465,27 +451,6 @@
+ self.entry.bind('<Home>',lambda e,s=self: s.cmd.do("cmd._special(106,0,0)"))
+ self.entry.bind('<End>',lambda e,s=self: s.cmd.do("cmd._special(107,0,0)"))
+
+-# obviated by changes made to the X11 OpenGL Window
+-# if sys.platform=='darwin':
+-# if self.app.pymol.invocation.options.external_gui==3: # PyMOLX11Hybrid focus kludge
+-# self.root.bind_all('<Leave>',lambda e,s=self: s.focus_out(e))
+-# self.root.bind_all('<Enter>',lambda e,s=self: s.focus_in(e))
+-
+-# def focus_in(self,event): # PyMOLX11Hybrid focus kludge
+-# if self.refocus_entry:
+-# self.cmd.do("_ cmd.window('defocus')") # deactivate MacPyMOL OpenGL window
+-# self.refocus_entry = 0
+-# self.entry.focus_set()
+-
+-# def focus_out(self,event): # PyMOLX11Hybrid focus kludge
+-# # necessary so that the OpenGL portion of
+-# # PyMOLX11Hybrid can exhibit click-through behavior
+-# if id(event.widget) == id(self.root):
+-# if ((event.y>event.widget.winfo_height())):
+-# self.root.focus_set() # (return cursor to entry window)
+-# self.cmd.do("_ cmd.window('focus')") # activate MacPyMOL OpenGL window
+-# self.refocus_entry = 1
+-
+ def update_feedback(self):
+ if self.focus_entry:
+ self.focus_entry=0
+@@ -981,18 +946,16 @@
+ self.cmd.save(sfile,quiet=0)
+
+ def file_save_mpeg(self):
+- ok = 1
+ try:
+ from freemol import mpeg_encode
+ if not mpeg_encode.validate():
+- ok = 0
+ print "produce-error: Unable to validate freemol.mpeg_encode"
++ raise
+ except:
+- ok = 0
+- pass
+- if not ok:
+ tkMessageBox.showerror("Error",
+ "MPEG encoder missing.\nThe FreeMOL add-ons may not be installed.")
++ return
++
+ else:
+ sfile = asksaveasfilename(defaultextension = _def_ext(".mpg"),
+ initialdir = self.initialdir,
diff --git a/sci-chemistry/pymol/pymol-1.6.0.0-r1.ebuild b/sci-chemistry/pymol/pymol-1.6.0.0-r1.ebuild
new file mode 100644
index 000000000000..cfbb77cbbb4f
--- /dev/null
+++ b/sci-chemistry/pymol/pymol-1.6.0.0-r1.ebuild
@@ -0,0 +1,99 @@
+# 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.6.0.0-r1.ebuild,v 1.1 2013/06/18 12:20:13 jlec Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk"
+
+inherit distutils-r1 fdo-mime 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}.tar.bz2
+ 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 web"
+
+DEPEND="
+ 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}"
+
+S="${WORKDIR}"/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-labels.patch
+ "${FILESDIR}"/${P}-bg_rgb.patch
+ )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ sed \
+ -e "s:\"/usr:\"${EPREFIX}/usr:g" \
+ -e "/ext_comp_args/s:=\[.*\]$:= \[\]:g" \
+ -i setup.py || die
+
+ rm ./modules/pmg_tk/startup/apbs_tools.py || die
+
+ sed \
+ -e "s:/opt/local:${EPREFIX}/usr:g" \
+ -e '/ext_comp_args/s:\[.*\]:[]:g' \
+ -i setup.py || die
+}
+
+python_install() {
+ distutils-r1_python_install --pymol-path="${EPREFIX}/usr/share/pymol"
+}
+
+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="$(python_get_sitedir)/${PN}"
+ PYMOL_DATA="${EPREFIX}/usr/share/pymol/data"
+ PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts"
+ EOF
+
+ doenvd "${T}"/20pymol
+
+ doicon "${WORKDIR}"/${PN}.{xpm,png}
+ make_desktop_entry pymol PyMol ${PN} "Graphics;Education;Science;Chemistry" "MimeType=chemical/x-pdb;"
+
+ if ! use web; then
+ rm -rf "${D}/$(python_get_sitedir)/web" || die
+ fi
+
+ rm -f "${ED}"/usr/share/${PN}/LICENSE || die
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}