diff options
Diffstat (limited to 'sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch')
-rw-r--r-- | sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch | 254 |
1 files changed, 0 insertions, 254 deletions
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 deleted file mode 100644 index 39fcbc019bbe..000000000000 --- a/sci-chemistry/pymol/files/pymol-1.6.0.0-bg_rgb.patch +++ /dev/null @@ -1,254 +0,0 @@ -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: |