--- qutemol-0.4.1~cvs20081111.orig/debian/changelog +++ qutemol-0.4.1~cvs20081111/debian/changelog @@ -0,0 +1,71 @@ +qutemol (0.4.1~cvs20081111-3build1) trusty; urgency=medium + + * No change rebuild against glew 1.10. + + -- Dimitri John Ledkov Thu, 02 Jan 2014 13:10:31 +0000 + +qutemol (0.4.1~cvs20081111-3) unstable; urgency=low + + * debian/upstream: New file. + * debian/patches/34_geometry_tab_sliders.dpatch: New patch, fixes the sliders + in the geometry tab; LP: #1178239. + * debian/patches/01_makefile.dpatch: Updated to explicity link with -lpng. + * debian/patches/35_gifsave_honor_umask.dpatch: New patch, honor the umask + when saving a gif animation by changing the permissions accordingly + afterwards; Closes: #724547. + + -- Michael Banck Sun, 06 Oct 2013 18:34:02 +0200 + +qutemol (0.4.1~cvs20081111-2) unstable; urgency=low + + * debian/patches/33_format-security.dpatch: New patch, fixes build error + with -Werror=format-security, thanks to Ilya Barygin; Closes: #643463. + + -- Michael Banck Tue, 01 Nov 2011 17:51:03 +0100 + +qutemol (0.4.1~cvs20081111-1) unstable; urgency=low + + * Upload to unstable. + * debian/patches/31_reset_local_for_shaders.dpatch: New patch, set locale to + "C" before making shaders and reset it afterwards. + * debian/patches/32_stdio_includes.dpatch: New patch, add missing includes + for . + * debian/control (Uploaders): Added myself. + * debian/control (Standards-Version): Bumped to 3.9.2. + * debian/control (Vcs-Svn): Fixed repository URL. + * debian/control: Reworded description. + + -- Michael Banck Thu, 15 Sep 2011 11:06:40 +0200 + +qutemol (0.4.1~cvs20081111-0ubuntu1~ppa1) intrepid; urgency=low + + * New upstream version as of today. Dropped patches 26_trackmode.cpp + and 27_trackutils.cpp, since these have been addressed upstream. + + -- Morten Kjeldgaard Tue, 11 Nov 2008 19:21:14 +0100 + +qutemol (0.4.1~cvs20080130-0ubuntu1~ppa5) intrepid; urgency=low + + * Compile on intrepid. A few changes needed to meet stricter + compiler requirements: + - patch 28_mol.cpp to include string.h + - patch 29_mol.h to include + - patch 30_matrix33.h to include stdlib.h + + -- Morten Kjeldgaard Mon, 10 Nov 2008 14:49:33 +0100 + +qutemol (0.4.1~cvs20080130-0ubuntu1~ppa4) hardy; urgency=low + + * Fixed missing Build-Depends + + -- Morten Kjeldgaard Wed, 30 Jan 2008 23:01:00 +0100 + +qutemol (0.4.1~cvs20080130-0ubuntu1~ppa1) hardy; urgency=low + + * Initial packaging + * Authored manpage + * Many patches to make code compile cleanly + * Port to wxWidgets 2.8 + + -- Morten Kjeldgaard Sat, 26 Jan 2008 21:18:19 +0100 + --- qutemol-0.4.1~cvs20081111.orig/debian/compat +++ qutemol-0.4.1~cvs20081111/debian/compat @@ -0,0 +1 @@ +5 --- qutemol-0.4.1~cvs20081111.orig/debian/control +++ qutemol-0.4.1~cvs20081111/debian/control @@ -0,0 +1,41 @@ +Source: qutemol +Section: science +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debichem Team +Uploaders: Morten Kjeldgaard , Michael Banck +Build-Depends: debhelper (>= 5), cdbs, dpatch, libwxgtk2.8-dev, libglew1.5-dev, + libgif-dev, libpng12-dev +Standards-Version: 3.9.2 +Homepage: http://qutemol.sourceforge.net/ +Vcs-Browser: http://svn.debian.org/wsvn/debichem/ +Vcs-Svn: svn://svn.debian.org/svn/debichem/unstable/qutemol/ +DM-Upload-Allowed: yes + + +Package: qutemol +Section: science +Architecture: any +Depends: ${shlibs:Depends} +Description: interactive visualization of macromolecules + QuteMol is an interactive, high quality molecular visualization + system. It exploits the current GPU capabilities through OpenGL shaders + to offer an array of innovative visual effects. QuteMol visualization + techniques are aimed at improving clarity and an easier understanding + of the 3D shape and structure of large molecules or complex proteins. + . + Qutemol uses advanced OpenGL techniques and might not work correctly + with all video cards and drivers. + . + Features QuteMol offers include: + . + * Real time ambient occlusion + * Depth aware silhouette enhancement + * Ball-and-stick, space-filling and liquorice visualization modes + * High resolution antialiased snapshots for creating publication + quality renderings + * Automatic generation of animated gifs of rotating molecules for + web page animations + * Interactive rendering of macromolecules (>100k atoms) + . + QuteMol reads PDB files as input. --- qutemol-0.4.1~cvs20081111.orig/debian/copyright +++ qutemol-0.4.1~cvs20081111/debian/copyright @@ -0,0 +1,32 @@ +X-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat +X-Debianized-By: Morten Kjeldgaard +X-Debianized-Date: Sat, 26 Jan 2008 21:35:00 +0100. +X-Source-Downloaded-From: http://qutemol.cvs.sourceforge.net/qutemol/ +X-Upstream-Author: Marco Tarini and Paolo Cignoni of the Visual + Computing Lab at ISTI-CNR + +Files: src/*, Makefile +Copyright: (C) 2007 Marco Tarini and Paolo Cignoni +License: GPL-2 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Files: debian/* +Copyright: (C) 2008, Morten Kjeldgaard +License: GPL-2 + +X-Comment: On Debian systems, the complete text of the GNU + General Public License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + --- qutemol-0.4.1~cvs20081111.orig/debian/get-orig-source +++ qutemol-0.4.1~cvs20081111/debian/get-orig-source @@ -0,0 +1,30 @@ +#!/bin/sh + +dh_testdir || exit + +remember=`pwd` +cd /tmp +rm -rf /tmp/qutemol/ +echo "Hit at CVS Password prompt" + +cvs -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol login +cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol +cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol/src +cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol/src/image +cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol/src/presets + + +cd qutemol +cvs -d:pserver:anonymous@vcg.cvs.sourceforge.net:/cvsroot/vcg login +cvs -z3 -d:pserver:anonymous@vcg.cvs.sourceforge.net:/cvsroot/vcg co -P vcg +cd .. + +find qutemol -type d -name CVS |xargs rm -rf +rm -rfv /tmp/qutemol/vcg/apps +rm -rfv /tmp/qutemol/vcg/docs + +ddd=`date +'%Y%m%d'` +tar -czvf qutemol_0.4.1~cvs${ddd}.orig.tar.gz qutemol/ + +cd $remember +cp /tmp/qutemol_0.4.1~cvs${ddd}.orig.tar.gz .. --- qutemol-0.4.1~cvs20081111.orig/debian/patches/00list +++ qutemol-0.4.1~cvs20081111/debian/patches/00list @@ -0,0 +1,35 @@ +01_makefile.dpatch +02_qutemol.cfg.dpatch +03_ao.cpp.dpatch +04_ao.h.dpatch +05_aogpu.cpp.dpatch +06_atomcolor.cpp.dpatch +07_cgutil.cpp.dpatch +08_common.cpp.dpatch +09_cubemapsamp.h.dpatch +10_hardsettings.cpp.dpatch +11_hardsettings.h.dpatch +12_mol.cpp.dpatch +13_mol.h.dpatch +14_mycanvas.cpp.dpatch +15_mycanvas.h.dpatch +16_mytab.cpp.dpatch +17_shadowmap.cpp.dpatch +18_shadowmap.h.dpatch +19_gifsave.cpp.dpatch +20_main.cpp.dpatch +21_pngsave.cpp.dpatch +22_progress.cpp.dpatch +23_progress.h.dpatch +24_savesnapdialog.cpp.dpatch +25_matrix44.h.dpatch +#26_trackmode.cpp.dpatch +#27_trackutils.h.dpatch +28_mol.cpp.dpatch +29_mol.h.dpatch +30_matrix33.h.dpatch +31_reset_local_for_shaders.dpatch +32_stdio_includes.dpatch +33_format-security.dpatch +34_geometry_tab_sliders.dpatch +35_gifsave_honor_umask.dpatch --- qutemol-0.4.1~cvs20081111.orig/debian/patches/01_makefile.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/01_makefile.dpatch @@ -0,0 +1,62 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## makefile.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,9 @@ + + INCDIRS = -Ivcg -Isrc -I. +-OPTFLAGS = -Os -Wall -g ++OPTFLAGS = -O2 -Wall -g + +-CXXFLAGS = $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags` +-LIBS = $(CXXFLAGS) `wx-config --libs core,base --gl-libs` -lGLEW -lGLU -lGL ++CXXFLAGS = -DPKGDATADIR='"/usr/share/qutemol/"' $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags` ++LIBS = $(CXXFLAGS) `wx-config --libs core,base --gl-libs` -lGLEW -lGLU -lGL -lgif -lpng + + OBJS = \ + src/AO.o \ +@@ -19,12 +19,33 @@ OBJS = \ + src/main.o \ + src/wx_trackball.o \ + vcg/wrap/gui/trackball.o \ +- vcg/wrap/gui/trackmode.o ++ vcg/wrap/gui/trackmode.o \ ++ src/progress.o src/MyCanvas.o src/saveSnapDialog.o src/gifSave.o src/pngSave.o + + all: qutemol + + clean: +- find . -name "*.o" | xargs rm ++ rm -f $(OBJS) qutemol + + qutemol: $(OBJS) + $(CXX) -o qutemol $(CFLAGS) $(OBJS) $(LIBS) ++ ++src/AO.o: src/AO.cpp ++src/AOgpu.o: src/AOgpu.cpp ++src/AtomColor.o: src/AtomColor.cpp ++src/CgUtil.o: src/CgUtil.cpp ++src/Common.o: src/Common.cpp ++src/HardSettings.o: src/HardSettings.cpp ++src/Mol.o: src/Mol.cpp ++src/MyTab.o: src/MyTab.cpp ++src/Sampling.o: src/Sampling.cpp ++src/ShadowMap.o: src/ShadowMap.cpp ++src/main.o: src/main.cpp ++src/wx_trackball.o: src/wx_trackball.cpp ++vcg/wrap/gui/trackball.o: vcg/wrap/gui/trackball.cpp ++vcg/wrap/gui/trackmode.o: vcg/wrap/gui/trackmode.cpp ++src/progress.o: src/progress.cpp ++src/MyCanvas.o: src/MyCanvas.cpp ++src/saveSnapDialog.o: src/saveSnapDialog.cpp ++src/gifSave.o: src/gifSave.cpp ++src/pngSave.o: src/pngSave.cpp +diff --git a/qutemol.cfg b/qutemol.cfg +new file mode 100644 +index 0000000..10abe74 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/02_qutemol.cfg.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/02_qutemol.cfg.dpatch @@ -0,0 +1,112 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## qutemol.cfg.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- /dev/null ++++ b/qutemol.cfg +@@ -0,0 +1,99 @@ ++TSIZE = 1024 ++ \\ favoured texture size for molecule ++ \\ (default: 1024 ) ++ ++MAX_TSIZE = 2048 ++ \\ maximal texture size (used when molecule too large for TSIZE) ++ \\ (default: 2048 ) ++ ++N_VIEW_DIR = 128 ++ \\ number of view directions ussed in AO computation ++ \\ (default: 128 ) ++ ++SHADOWMAP_SIZE = 1024 ++ \\ texture size for shadowmap ++ \\ (default: 1024 ) ++ ++AOSM_SIZE = 256 ++ \\ texture size for shadowmmaps for AO computation ++ \\ (default: 256 ) ++ ++MOVING_QUALITY = 100 ++ \\ Quality of image on screen when molecole moves (between 50..200) ++ \\ (default: 100 ) ++ ++STILL_QUALITY = 200 ++ \\ Quality of image on screen when molecole is still (between 50..200) ++ \\ (default: 200 ) ++ ++doubleSM = 1 ++ \\ if 1, use double ShadomMap optimization (two way lights) ++ \\ (default: 1 ) ++ ++NVIDIA_PATCH = 0 ++ \\ use 1 - *AND* disable doubleSM - to patch a bug reported on some Nvidia cards (warning: lowers visual quality!) ++ \\ (default: 0 ) ++ ++SNAP_SIZE = 1024 ++ \\ snapshots resolution (per side) ++ \\ (default: 1024 ) ++ ++SNAP_ANTIALIAS = 1 ++ \\ if 1, antialias exported snapshots ++ \\ (default: 1 ) ++ ++PNG_TRANSPARENT = 0 ++ \\ if 1, save PNG images with tranparent background ++ \\ (default: 0 ) ++ ++GIF_SNAP_SIZE = 256 ++ \\ resolution of exported GIF animations ++ \\ (default: 256 ) ++ ++ \\ PARAMETERS FOR GIF ANIMATION ++ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ++ ++GIF_INITIAL_PAUSE = 0 ++ \\ initial pause in msec before each animation loop ++ \\ (default: 0 ) ++ ++GIF_ANIMATION_MODE = 0 ++ \\ if 0: full rotation. If 1: inspection mode (rotation around current viewpoint). If 2: six-views show. ++ \\ (default: 0 ) ++ ++GIF_ROT_N_FRAMES = 60 ++ \\ number of frames of exported GIF animations (for full rotation) ++ \\ (default: 60 ) ++ ++GIF_GIF_ROT_MSEC = 3000 ++ \\ total duration in msec of GIF animations loop (for full rotation) ++ \\ (default: 3000 ) ++ ++GIF_GIF_ROT_SIDEVIEW_ANGLE = 10 ++ \\ angle (in -45 +45). If 0, perfect side rotation; if >0, look from above; if <0, look from below (for full rotation) ++ \\ (default: 10 ) ++ ++GIF_INSP_N_FRAMES = 60 ++ \\ number of frames of exported GIF animations (for inspections) ++ \\ (default: 60 ) ++ ++GIF_INSP_MSEC = 3000 ++ \\ total duration in msec of GIF animations loop (for inspections) ++ \\ (default: 3000 ) ++ ++GIF_INSP_ANGLE = 10 ++ \\ in (10..45). Animation is an inspection around current view point (for inspections) ++ \\ (default: 10 ) ++ ++GIF_6SIDES_N_FRAMES = 10 ++ \\ number of frames of exported GIF animations (for six-views show) ++ \\ (default: 10 ) ++ ++GIF_6SIDES_MSEC = 400 ++ \\ duration in msec of each face shift (for six-views show) ++ \\ (default: 400 ) ++ ++GIF_6SIDES_PAUSE = 1000 ++ \\ pause in msec after each face shift (for six-views show) ++ \\ (default: 1000 ) ++ +diff --git a/src/AO.cpp b/src/AO.cpp +index 26b0f0b..6f6f579 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/03_ao.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/03_ao.cpp.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## ao.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/AO.cpp ++++ b/src/AO.cpp +@@ -109,7 +109,7 @@ AO::AO( Point3f _dir, Mol &m) { + + buf.resize(target*target,infty); + +- for (int i=0; i +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/AO.h ++++ b/src/AO.h +@@ -12,7 +12,7 @@ class AO{ + inline int index(int x, int y){ + int res=x+bufx*y; + if (res<0) res=0; +- if (res>=buf.size()) res=buf.size()-1; ++ if (res >= (int)buf.size()) res=buf.size()-1; + return res; + //return x+bufx*y; + } +diff --git a/src/AOgpu.cpp b/src/AOgpu.cpp +index f569555..8b63a1d 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/05_aogpu.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/05_aogpu.cpp.dpatch @@ -0,0 +1,62 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## aogpu.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/AOgpu.cpp ++++ b/src/AOgpu.cpp +@@ -51,7 +51,7 @@ void AOgpu::OpenGLSnap() + snapy = vp[3]; + + //Create(tx,ty); +- if (snap.size()!=snapx*snapy+1) snap.resize(snapx*snapy+1); ++ if ((int)snap.size()!=snapx*snapy+1) snap.resize(snapx*snapy+1); + + GLenum mtype = 0; + +@@ -117,11 +117,11 @@ AOgpu::AOgpu( Point3f _dir, Mol &m) { + OpenGLSnap(); + + // interpret spanshot +- int k=0,h=0; ++ //int k=0,h=0; + + //int* snapi=(int*)(&snap[0]); + int max=snapy*snapx; +- int maxt=sum.size(); ++ //int maxt=sum.size(); + + /*static*/ + // vector found(sum.size(), false ); +@@ -140,7 +140,7 @@ AOgpu::AOgpu( Point3f _dir, Mol &m) { + + + +- if (sum[ snap[i]&0x00ffffff ]>>24 !=div) { ++ if (sum[ snap[i]&0x00ffffff ]>>24 != (int)div) { + sum[ snap[i]&0x00ffffff ] = + (sum[ snap[i]&0x00ffffff ]+(snap[i]>>24))&0x00ffffff | (div<<24); + //printf("[%d]",snap[i]>>24); +@@ -196,7 +196,7 @@ void AOgpu::Reset(Mol &m){ + //ReloadTexture(fakeTexture, false); + + div=0; +- if (sum.size()!=hardSettings.TSIZE*hardSettings.TSIZE) { ++ if ((int)sum.size()!=hardSettings.TSIZE*hardSettings.TSIZE) { + sum.resize(hardSettings.TSIZE*hardSettings.TSIZE,0); + } else { + sum.clear(); +@@ -218,7 +218,7 @@ inline unsigned int BitCount(unsigned int x){ + } + + void AOgpu::GetFinalTexture(vector &text,Mol &m){ +- int k=0,i=0; ++ //int k=0,i=0; + + //m.SmoothTexture( sum, hardSettings.TSIZE ); + int maxt=sum.size(); +diff --git a/src/AtomColor.cpp b/src/AtomColor.cpp +index 44c6ff8..6c3d9fa 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/06_atomcolor.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/06_atomcolor.cpp.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## atomcolor.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/AtomColor.cpp ++++ b/src/AtomColor.cpp +@@ -165,7 +165,7 @@ E2C["MT"]= /*[235, 0, 38]*/ 0xFF1493 /* 0xEB0026 */ ; + } + } + +-static bool addAtomType(char* namei, int unused, float radius, float radiusC, int r, int g, int b){ ++static bool addAtomType(const char* namei, int unused, float radius, float radiusC, int r, int g, int b){ + InitTables(); + + // upperCase(name); +diff --git a/src/CgUtil.cpp b/src/CgUtil.cpp +index 2f880bc..ffd8a4c 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/07_cgutil.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/07_cgutil.cpp.dpatch @@ -0,0 +1,48 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## cgutil.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/CgUtil.cpp ++++ b/src/CgUtil.cpp +@@ -33,7 +33,7 @@ bool CgUtil::do_use_doubleshadow(){ + return ((P_double_shadows) && (can_use_doubleshadow())); + } + +-static char* FORMAT="void CgUtil::Set(int K){\nif (K==0){\n P_light_base = %f ;\n P_lighting = %f ;\n P_phong = %f ;\n P_phong_size = %f ;\n P_col_atoms_sat = %f ;\n P_col_atoms_bri = %f ;\n P_texture = %f ;\n P_border_inside = %f ;\n P_border_outside = %f ;\n P_depth_full = %f ;\n P_sem_effect = %d ;\n P_halo_size = %f ;\n P_halo_col = %f ;\n P_halo_str = %f ;\n P_halo_aware = %f ;\n P_fog = %f ;\n P_capping = %d ;\n P_shadowstrenght = %f ;\n P_bg_color_R = %f ;\n P_bg_color_G = %f ;\n P_bg_color_B = %f ;\n auto_normalize = %d ;\n P_double_shadows = %d ;\n P_border_fixed = %d ;\n}\n}"; ++static char* FORMAT=(char *)"void CgUtil::Set(int K){\nif (K==0){\n P_light_base = %f ;\n P_lighting = %f ;\n P_phong = %f ;\n P_phong_size = %f ;\n P_col_atoms_sat = %f ;\n P_col_atoms_bri = %f ;\n P_texture = %f ;\n P_border_inside = %f ;\n P_border_outside = %f ;\n P_depth_full = %f ;\n P_sem_effect = %d ;\n P_halo_size = %f ;\n P_halo_col = %f ;\n P_halo_str = %f ;\n P_halo_aware = %f ;\n P_fog = %f ;\n P_capping = %d ;\n P_shadowstrenght = %f ;\n P_bg_color_R = %f ;\n P_bg_color_G = %f ;\n P_bg_color_B = %f ;\n auto_normalize = %d ;\n P_double_shadows = %d ;\n P_border_fixed = %d ;\n}\n}"; + + bool CgUtil::Load(const char* filename){ + FILE *f=fopen(filename, "rt"); +@@ -700,7 +700,7 @@ CMP t.z, lighting.z, -t.z, t.z; \n\ + if ((!do_use_doubleshadow())&&(P_light_base>0)) { + sprintf(fp,"%s\n\ + CMP t.z, lighting.z, 1, t.z; # if light<0, then in shadow \n\ +-" ,fp,1.0-P_shadowstrenght); ++" ,fp); //,1.0-P_shadowstrenght); // error here + } + + if (P_shadowstrenght<1) { +@@ -789,7 +789,7 @@ LRP t, tmp.x, 1, t; \n\ + } else { + if (P_col_atoms_bri<1.0) + { +- sprintf(fp,"%s%s",fp,"MUL res, res, %5.3f;\n", P_col_atoms_bri ); ++ sprintf(fp,"%s%s",fp,"MUL res, res, %5.3f;\n"); //, P_col_atoms_bri ); // error here + } + } + +@@ -1499,7 +1499,7 @@ MUL t, t, t.z; \n\ + MAD t, t, 0.5, 0.5; \n\ + MAD t, t, {%5.2f,%5.2f,0,0}, {%5.2f, %5.2f, 0,0}; \n\ + MAD t, {%5.2f,%5.2f,0,0}, disp, t; \n\n", +- fp, CSIZE-gap*2.0, CSIZE-gap*2.0, gap, gap, CSIZE, CSIZE ); ++ fp, CSIZE-gap*2.0, CSIZE-gap*2.0, gap, gap, (double)CSIZE, (double)CSIZE ); + + else sprintf(fp, "%s\n\n\ + ## TEXTURING OCTAMAP STYLE \n\ +diff --git a/src/Common.cpp b/src/Common.cpp +index 8475861..1d1d604 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/08_common.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/08_common.cpp.dpatch @@ -0,0 +1,156 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## common.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/Common.cpp ++++ b/src/Common.cpp +@@ -136,8 +136,8 @@ void drawFrame(); // def later... + Byte* GetSnapshot(int sx, int sy, bool alpha){ + + +- static uint textureSnap = 666; +- static uint frameSnap; ++ //static uint textureSnap = 666; ++ //static uint frameSnap; + + // set offline rendering + mainCanvas.RedirectToMemory(); +@@ -448,7 +448,7 @@ void Mol::DrawHalos(){ + ); + + glBegin(GL_QUADS); +- for (int i=0; i=DirV.size()) return true; ++ if (AOdoneLvl >= (int)DirV.size()) return true; + if (atom.size()<10) return (AOdoneLvl>6*k); + if (atom.size()<100) return (AOdoneLvl>4*k); + if (atom.size()<1000) return (AOdoneLvl>2*k); +@@ -751,15 +751,15 @@ void Mol::PrepareAOstart(){ + } + + // for testing purposes +-bool Mol::PrepareAOSingleView(){ ++void Mol::PrepareAOSingleView(){ + static int i=0; + PrepareAOstart(); + AOgpu2::Bind(); + AOgpu2 ao(DirV[i], *this, 4 ); +- i++; if (i>DirV.size()) i=0; ++ i++; if (i > (int)DirV.size()) i=0; + AOgpu2::UnBind(); + AOdoneLvl=DirV.size(); +-} ++} + + bool Mol::PrepareAOstep(int nsteps){ + +@@ -772,7 +772,7 @@ bool Mol::PrepareAOstep(int nsteps){ + + + AOdoneLvl++; +- return (AOdoneLvl>=DirV.size()) ; ++ return (AOdoneLvl >= (int)DirV.size()) ; + } + + void Mol::PrepareAOallAtOnce(){ +@@ -786,12 +786,12 @@ void Mol::PrepareAOallAtOnce(){ + //refresh(); + + FILE *f = fopen("res.txt", "w"); +- long int w=TakeTime(f,"sampled"); ++ long int w=TakeTime(f, (char *)"sampled"); + +- fprintf(f," %d views done in %d msec (%.2f views x sec), with %d atoms & %d sticks.\n", +- DirV.size(), w, +- DirV.size()*1000.0/w, this->atom.size(), +- this->sticks?(this->bond.size()):0 ); ++ fprintf(f," %d views done in %ld msec (%.2f views x sec), with %d atoms & %d sticks.\n", ++ (int)DirV.size(), w, ++ (int)DirV.size()*1000.0/w, (int)this->atom.size(), ++ (int)(this->sticks?(this->bond.size()):0) ); + fclose(f); + + AOready=true; +@@ -822,7 +822,7 @@ Point3f getDirFromTrackball(vcg::Trackball &tb){ + tb.GetView(); + tb.Apply(false); + +- float pos[4]={0.0f,0.0f,-1.0f,0.0f}; ++ //float pos[4]={0.0f,0.0f,-1.0f,0.0f}; + float d[16]; + glGetFloatv(GL_MODELVIEW_MATRIX,d); + glPopMatrix(); +diff --git a/src/CubeMapSamp.h b/src/CubeMapSamp.h +index 5c19d8e..1290b9d 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/09_cubemapsamp.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/09_cubemapsamp.h.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## cubemapsamp.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/CubeMapSamp.h ++++ b/src/CubeMapSamp.h +@@ -14,7 +14,7 @@ public: + + + static void Transform(Point3f ax, Point3f ay, Point3f az){ +- for (int i=0; i0) { col=(Byte)(sum[i]/div[i]*255); colr=128; } + t[k++]= colr; +diff --git a/src/HardSettings.cpp b/src/HardSettings.cpp +index ab38145..662fd56 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/10_hardsettings.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/10_hardsettings.cpp.dpatch @@ -0,0 +1,80 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## hardsettings.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/HardSettings.cpp ++++ b/src/HardSettings.cpp +@@ -50,8 +50,7 @@ void HardSettings::SetDefaults(){ + }; + + +- +-static char* names[NNAMES]={ ++static const char* names[NNAMES]={ + "TSIZE", + "MAX_TSIZE", + "N_VIEW_DIR", +@@ -122,7 +121,7 @@ HardSettings::HardSettings(){ + } + + +-static char* comments[NNAMES]={ ++static const char* comments[NNAMES]={ + "favoured texture size for molecule", + "maximal texture size (used when molecule too large for TSIZE)", + "number of view directions ussed in AO computation", +@@ -158,8 +157,13 @@ static char* comments[NNAMES]={ + + + +-bool HardSettings::Load(char *fn){ +- FILE *f=fopen(fn,"rt"); ++bool HardSettings::Load(const char *fn){ ++ char buf[512]; ++ strcpy(buf, PKGDATADIR); ++ if (buf[strlen(buf)-1] != '/') { ++ strcat(buf,"/"); ++ } ++ FILE *f=fopen(strcat(buf,fn),"rt"); + + bool present[NNAMES]; + for (int i=0; i +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/HardSettings.h ++++ b/src/HardSettings.h +@@ -45,9 +45,9 @@ public: + int GIF_6SIDES_PAUSE; + + void SetDefaults(); +- bool Load(char *fn); +- bool Save(char *fn); +- bool OnStart(); // tries to load, on faliure setdefaults and saves ++ bool Load(const char *fn); ++ bool Save(const char *fn); ++ void OnStart(); // tries to load, on faliure setdefaults and saves + HardSettings(); + private: + int* data[NNAMES]; +diff --git a/src/Mol.cpp b/src/Mol.cpp +index 1ba4137..5467988 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/12_mol.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/12_mol.cpp.dpatch @@ -0,0 +1,192 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## mol.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/Mol.cpp ++++ b/src/Mol.cpp +@@ -16,7 +16,7 @@ using namespace std; + #include "Mol.h" + #include "HardSettings.h" + +-#include "Progress.h" ++#include "progress.h" + #include "AtomColor.h" + + #include "MyCanvas.h" +@@ -112,12 +112,12 @@ bool Mol::ReassignTexture(int textsize) { + + + // assign texture positions +- for (int i=0; i2000; + +- if (showprogress) StartProgress("Locating Bonds",atom.size() ); ++ if (showprogress) StartProgress((char *)"Locating Bonds",atom.size() ); + + // Sort atoms per x coordinate + std::sort( atom.begin(), atom.end() ); + + + int st=0; // start interval +- for (int i=0; i px ) break; // no more atoms + else { +@@ -300,7 +300,7 @@ void Mol::FindBonds(){ + + + if (showprogress) EndProgress(); +- printf("%d bonds detected!\n",bond.size() ); ++ printf("%d bonds detected!\n", (int)bond.size() ); + } + + void Mol::SetSpaceFill(){ +@@ -309,7 +309,7 @@ void Mol::SetSpaceFill(){ + + ReassignTextureAutosize(); + +- for (int i=0; i &t, int texsize){ +- for (int i=0; i &v) + int startAtom=atoi( st.substr(6,5).c_str()); + // assert(startAtom >0 && (startAtom-1)6+i*5+4 && isdigit(st[6+i*5+4])) ++ while((int)st.size() > 6+i*5+4 && isdigit(st[6+i*5+4])) + { + // printf("'%s' -> '%s' (%c)\n",st.substr(6,5).c_str(),st.substr(6+i*5,5).c_str(),st[6+i*5+4]); + int secondAtom=atoi( st.substr(6+i*5,5).c_str()); +@@ -427,7 +427,7 @@ bool Mol::ReadPdb(const char *_filename){ + if (fseek(f, 0, SEEK_END)==0) size=ftell (f); + fseek (f, 0, SEEK_SET); + bool showprogress=(size==0) || (size>1000000); +- if (showprogress) StartProgress("Reading file", size); ++ if (showprogress) StartProgress((char *)"Reading file", size); + + char buf[82]; + buf[81]=0; +@@ -464,7 +464,7 @@ bool Mol::ReadPdb(const char *_filename){ + //printf("Found %d atoms!\n", atom.size() ); + + nhetatm=0; natm=0; +- for (int i=0; i0) ++ if (atom.size() < 1) ++ return; + x0=x1=atom[0].px; + y0=y1=atom[0].py; + z0=z1=atom[0].pz; +- for (int i=1; iatom[i].px) x1=atom[i].px; + if (y1>atom[i].py) y1=atom[i].py; + if (z1>atom[i].pz) z1=atom[i].pz; +@@ -591,12 +592,12 @@ void QAtom::UpdateColors(float mode){ + } + + void Mol::UpdateColors(){ +- for (int i=0; i +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/Mol.h ++++ b/src/Mol.h +@@ -165,22 +165,22 @@ public: + void Transform(const Point3f &ax,const Point3f &ay,const Point3f &az); + + void ScaleTransl(float scale){ +- for (int i=0; i &t, int siz){ +- for (int i=0; i &t, int siz){ +- for (int i=0; i +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/MyCanvas.cpp ++++ b/src/MyCanvas.cpp +@@ -26,7 +26,7 @@ bool MyCanvas::SetAsOutput(){ + return true; + } + +-bool MyCanvas::SetAsTexture(){ ++void MyCanvas::SetAsTexture(){ + glBindTexture( GL_TEXTURE_2D, textureID[ currentRes ] ); + } + +diff --git a/src/MyCanvas.h b/src/MyCanvas.h +index fe7f92e..3eba806 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/15_mycanvas.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/15_mycanvas.h.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## mycanvas.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/MyCanvas.h ++++ b/src/MyCanvas.h +@@ -10,7 +10,7 @@ public: + Kind kind; + + bool SetAsOutput(); +- bool SetAsTexture(); ++ void SetAsTexture(); + + bool Test(){return SetAsOutput();} + +diff --git a/src/MyTab.cpp b/src/MyTab.cpp +index e1f2e04..5d19b9d 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/16_mytab.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/16_mytab.cpp.dpatch @@ -0,0 +1,191 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## mytab.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ +diff -urNad qutemol~/src/MyTab.cpp qutemol/src/MyTab.cpp +--- qutemol~/src/MyTab.cpp 2008-01-30 19:53:18.000000000 +0100 ++++ qutemol/src/MyTab.cpp 2008-01-30 19:55:10.000000000 +0100 +@@ -28,7 +28,7 @@ + // GEOM TAB + //////////// + +-enum{ ID_SetBallnstick=500, ID_SetSpacefill, ID_SetLicorice, ++static enum { ID_SetBallnstick=500, ID_SetSpacefill, ID_SetLicorice, + ID_SetLicoriceRadius, ID_SetBallnstickRadius, + + ID_SetBallnstickSmoothcolor,ID_SetBallnstickBicolor, ID_SetBallnstickConstantcolor, +@@ -93,7 +93,8 @@ + static wxCheckBox *buttonSetHetatm; + + static wxSlider *sliderLicorice, *sliderBallnstick, +- *sliderSetBaseColor , *sliderShineSize, ++ //*sliderSetBaseColor , ++ *sliderShineSize, + *sliderAwaren , + *sliderSetBgbrightness, + *sliderLightBase, *sliderLighting, *sliderAO, +@@ -114,49 +115,49 @@ + const int NPreset=15; + static wxButton* preset[NPreset]; + +-static char* presetFile[NPreset] = { +- "presets//real.preset", +- "presets//real2.preset", +- "presets//direct.preset", ++static const char* presetFile[NPreset] = { ++ "real.preset", ++ "real2.preset", ++ "direct.preset", + +- "presets//illustr.preset", +- "presets//illustr_new.preset", +- "presets//illustr_motm.preset", ++ "illustr.preset", ++ "illustr_new.preset", ++ "illustr_motm.preset", + +- "presets//qutemol1.preset", +- "presets//qutemol2.preset", +- "presets//qutemol3.preset", ++ "qutemol1.preset", ++ "qutemol2.preset", ++ "qutemol3.preset", + +- "presets//coolb.preset", +- "presets//coold.preset", +- "presets//borders_cool.preset", ++ "coolb.preset", ++ "coold.preset", ++ "borders_cool.preset", + +- "presets//sem.preset", +- "presets//sem2.preset", +- "presets//shape.preset", ++ "sem.preset", ++ "sem2.preset", ++ "shape.preset", + }; + + +-static wxString presetName[NPreset]={ +- _T("Realistic\n1"), +- _T("Realistic\n2"), +- _T("Direct\nLight Only"), ++static const char* presetName[NPreset]={ ++ "Realistic 1", ++ "Realistic 2", ++ "Direct\nLight Only", + +- _T("Illustr-\native 1"), +- _T("Illustr-\native 2"), +- _T("Molecule of\nthe Month"), ++ "Illustr-\native 1", ++ "Illustr-\native 2", ++ "Molecule of\nthe Month", + +- _T("Mixed 1"), +- _T("Mixed 2"), +- _T("Mixed 3"), ++ "Mixed 1", ++ "Mixed 2", ++ "Mixed 3", + +- _T("Cool\n(bright)"), +- _T("Cool\n(dark)"), +- _T("Cool\nborders"), ++ "Cool\n(bright)", ++ "Cool\n(dark)", ++ "Cool\nborders", + +- _T("Simulated\nS.E.M. 1"), +- _T("Simulated\nS.E.M. 2"), +- _T("Shape\nPerception"), ++ "Simulated\nS.E.M. 1", ++ "Simulated\nS.E.M. 2", ++ "Shape\nPerception" + }; + + static bool presetEndOfLine[NPreset] = { +@@ -490,9 +491,9 @@ + default: + int pid=id-ID_FirstPreset; + if ( (pid>=0) && (pidSetMinSize(butSize); +- if (presetName[i]==wxEmptyString) preset[i]->Show(false); ++ //if (presetName[i]==wxEmptyString) preset[i]->Show(false); ++ if (!presetName[i]) preset[i]->Show(false); + if (thinButtons) { + if (!subSizer) subSizer=new wxBoxSizer(wxHORIZONTAL); + subSizer->Add( preset[i], 1, wxALIGN_CENTER|wxEXPAND|wxALL,4 ); +@@ -1016,7 +1031,7 @@ + sizer->Add(5,5,0); // spacer + sizer->Add(newAutoCheckBox( + this,ID_SetHetatm, +- _T("Show 'HET' atmos"), ++ _T("Show 'HET' atoms"), + &(geoSettings.showHetatm), + buttonSetHetatm, textSetHetatm, + AUTO_TEXT_ON_RIGHT --- qutemol-0.4.1~cvs20081111.orig/debian/patches/17_shadowmap.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/17_shadowmap.cpp.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## shadowmap.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/ShadowMap.cpp ++++ b/src/ShadowMap.cpp +@@ -178,7 +178,7 @@ extern CgUtil cgSettings; + glDisable(GL_BLEND); + + +- /*glActiveTextureARB(GL_TEXTURE0_ARB); glDisable(GL_TEXTURE_2D); ++ glActiveTextureARB(GL_TEXTURE0_ARB); glDisable(GL_TEXTURE_2D); + glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, shadowTexture);*/ + // glBindTexture(GL_TEXTURE_2D, shadowTexture); +@@ -367,7 +367,7 @@ void Mol::DrawOnTexture(){ + glDisable(GL_TEXTURE_2D); + + glBegin(GL_QUADS); +- for (int i=0; i +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/ShadowMap.h ++++ b/src/ShadowMap.h +@@ -12,7 +12,7 @@ public: + + + // adapt to current PVMatrix +- static void ShadowMap::GetCurrentPVMatrix(); ++ static void GetCurrentPVMatrix(); + + // feed parametmers to FP + static void FeedParameters(); +diff --git a/src/gifSave.cpp b/src/gifSave.cpp +index 621b19f..00049de 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/19_gifsave.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/19_gifsave.cpp.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## gifsave.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/gifSave.cpp ++++ b/src/gifSave.cpp +@@ -55,7 +55,7 @@ bool GifWrapper::AddFrame(Byte* data, int sx, int sy, float dt){ + Frame r(npix),g(npix),b(npix); + + // de-interlaeve +- for (int i=0, j=0; iColors; +@@ -154,7 +154,7 @@ bool GifWrapper::Save(const char* filename){ + + if (!AddLoop(GifFile)) return false; + +- for (int ni=0; ni +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -52,7 +52,10 @@ + # include + #endif + +-//#include "sample.xpm" ++#ifdef __linux__ ++#include "sample.xpm" ++typedef unsigned char byte; ++#endif + + typedef unsigned char Byte; + typedef unsigned int uint; +@@ -115,9 +118,9 @@ void downsample2x2NoAlpha(Byte * data, int sx, int sy); + + + wxBitmap *LoadPngImage(wxString st){ +-#ifdef __DARWIN__ +- wxString basePath = wxStandardPaths::Get().GetResourcesDir(); +- wxBitmap* res=new wxBitmap(basePath+_T("/image/")+st+_T(".png"),wxBITMAP_TYPE_PNG); ++#ifndef _WIN32 ++ wxString basePath = wxStandardPaths::Get().GetResourcesDir(); ++ wxBitmap* res=new wxBitmap(_T(PKGDATADIR"/image/")+st+_T(".png"),wxBITMAP_TYPE_PNG); + #else + wxBitmap* res=new wxBitmap(_T("image/")+st+_T(".png"),wxBITMAP_TYPE_PNG); + #endif +@@ -162,7 +165,7 @@ long int getTicks(){ + } + + void MyToolbar::SetTitleText(wxString s){ +-#ifndef __DARWIN__ ++#ifdef _WIN32 + titleText->SetLabel(s); + titleTextSizer->Layout(); + #endif +@@ -249,7 +252,7 @@ MyToolbar::MyToolbar(wxTopLevelWindow *_parent, wxWindowID id, + parent->SetBackgroundColour(notebook->GetBackgroundColour()); + } + +-#ifndef __DARWIN__ ++#ifdef _WIN32 + wxBitmapButton *snapButton = new wxBitmapButton(this, SnapButton, + *LoadPngImage(_T("snap_off2")), wxDefaultPosition, wxSize(48,48),0); + snapButton->SetBitmapSelected(*LoadPngImage(_T("snap_on"))); +@@ -280,7 +283,7 @@ MyToolbar::MyToolbar(wxTopLevelWindow *_parent, wxWindowID id, + titleText = new wxStaticText(this, wxID_ANY, wxT("")); + titleText->Disable(); + +-#ifndef __DARWIN__ ++#ifdef _WIN32 + wxSizer *linesizer1 = new wxBoxSizer(wxVERTICAL); + + linesizer1->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); +@@ -321,10 +324,10 @@ MyToolbar::MyToolbar(wxTopLevelWindow *_parent, wxWindowID id, + imgsizer->Add(gearS, 0, wxALL|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 2); // LOGO + + wxSizer *topRsizer = new wxBoxSizer(wxVERTICAL); +-#ifndef __DARWIN__ +- topRsizer->Add(titleTextSizer,0, wxALL| wxEXPAND, 0); ++#ifdef _WIN32 ++ topRsizer->Add(titleTextSizer,0, wxALL| wxEXPAND, 0); + #endif +- topRsizer->Add(imgsizer,1, wxALL| wxEXPAND, 0); ++ topRsizer->Add(imgsizer,1, wxALL| wxEXPAND, 0); + + topsizer = new wxBoxSizer(wxHORIZONTAL); + topsizer->Add(sizerButtons, 0, wxALL, 5); +@@ -359,7 +362,7 @@ bool MyApp::OnInit() + // Create the main frame window + MyFrame *frame = new MyFrame(NULL, wxT("QuteMol"), + // wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE //wxRESIZE_BORDER +-#ifdef __DARWIN__ ++#ifndef _WIN32 + wxDefaultPosition, wxDefaultSize,wxDEFAULT_FRAME_STYLE| wxRESIZE_BORDER + #else + wxDefaultPosition, wxDefaultSize,wxRESIZE_BORDER +@@ -411,7 +414,7 @@ bool MyApp::OnInit() + sizer->Add(frame->GetToolbar(), 0, wxGROW); + frame->SetSizer(sizer); + +- int tbsize=frame->GetToolbar()->GetBestFittingSize().x; ++ int tbsize=frame->GetToolbar()->GetEffectiveMinSize().x; + frame->GetToolbar()->SetSize(tbsize,winy); + frame->GetToolbar()->Layout(); + +@@ -454,7 +457,7 @@ bool MyApp::OnInit() + if (parser.Found(_T("a"),&artFilename)>0) { + if (!readArtFile(artFilename.ToAscii())) { + wxMessageBox( +- wxString(_T("Error reading art file \"") + artFilename +"\""), ++ wxString(_T("Error reading art file \"") + artFilename + _T("\"")), + _T("Error reading art file"), + wxOK | wxICON_EXCLAMATION, frame); + exit(0); +@@ -519,9 +522,12 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, + { + m_canvas = NULL; + m_tb= NULL; +-#ifndef __DARWIN__ +- SetIcon(wxIcon(_T("sample"),wxBITMAP_TYPE_ICO_RESOURCE,32,32)); ++#if WIN32 ++ SetIcon(wxIcon(_T("sample"),wxBITMAP_TYPE_ICO_RESOURCE,32,32)); ++#else ++ SetIcon(wxIcon(_T("sample_xpm"),wxBITMAP_TYPE_XPM,32,32)); + #endif ++ + resize_mode=NATURAL; + } + +@@ -576,7 +582,7 @@ void MyFrame::OnSize(wxSizeEvent& event){ + static int oldw=0,oldh=0; + + +- int w1=m_tb->GetBestFittingSize().x; ++ int w1=m_tb->GetEffectiveMinSize().x; + // + + int sx=w-w1, sy=h , s; +@@ -676,7 +682,9 @@ void TestGLCanvas::OnPaint( wxPaintEvent& event ) + } + } + ++#ifdef _WIN32 + if (!initdone) wxGLCanvas::OnPaint(event); else ++#endif + if (mol.IsReady()) { + if (mustDoHQ) { + drawFrame( hardSettings.STILL_QUALITY ); +@@ -714,15 +722,19 @@ void TestGLCanvas::OnSize(wxSizeEvent& event) + } + + ++#if defined(_WIN32) + void MyFrame::OnEraseBackground(wxEraseEvent& event) + { + wxFrame::OnEraseBackground(event); + /* Do nothing, to avoid flashing on MSW */ + } ++#endif + + void TestGLCanvas::OnEraseBackground(wxEraseEvent& event) + { ++#if defined(_WIN32) + if (!initdone) wxGLCanvas::OnEraseBackground(event); ++#endif + /* Do else do nothing, to avoid flashing on MSW */ + } + +@@ -737,17 +749,17 @@ extern int CSIZE; // number of texels for a patch of an aotm + + void TestGLCanvas::OnKeyDown( wxKeyEvent& event ){ + wxConsumeTrackBallEvent(event,true,track); +-#ifdef __DARWIN__ +- wxString path = wxStandardPaths::Get().GetResourcesDir() + "/presets/new.preset"; ++#ifndef _WIN32 ++ wxString path = wxStandardPaths::Get().GetResourcesDir() + _T("/presets/new.preset"); + #else + wxString path = "presets\\new.preset"; + #endif + if (event.GetKeyCode() == WXK_F7 ) { +- cgSettings.Save(path.c_str()); ++ cgSettings.Save((const char *)path.c_str()); + } + + if (event.GetKeyCode() == WXK_F6 ) { +- if (cgSettings.Load(path.c_str())) { ++ if (cgSettings.Load((const char *)path.c_str())) { + MyTab::UpdateAll(); + + cgSettings.ResetHalo(); +@@ -858,7 +870,7 @@ void MyFrame::OnSaveSnap (wxCommandEvent & event) + int jj=saveSnapDialog->GetFilterIndex(); + lastFilterIndex=jj; + +- Byte* snap; ++ Byte* snap = 0; + int AAMult=(hardSettings.SNAP_ANTIALIAS)?2:1; + bool useTransp=(hardSettings.PNG_TRANSPARENT==1) && (jj==0); + if (jj!=2) { +@@ -916,8 +928,8 @@ void MyFrame::OnSaveSnap (wxCommandEvent & event) + break; + case 2: { + GifWrapper gifw; +- int N; +- double totalTime; ++ int N = 0; ++ double totalTime = 0; + double subStepTime=0; + double startTime;startTime=hardSettings.GIF_INITIAL_PAUSE/1000.0; + if (hardSettings.GIF_ANIMATION_MODE==0) { +diff --git a/src/pngSave.cpp b/src/pngSave.cpp +index e6defa2..f9611da 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/21_pngsave.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/21_pngsave.cpp.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## pngsave.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/pngSave.cpp ++++ b/src/pngSave.cpp +@@ -15,7 +15,7 @@ + #include + using namespace std; + +-#include ++#include + + #include "progress.h" + +@@ -60,8 +60,8 @@ void trace(const char *st, const char *st2=NULL){ + fflush(f); + } + +-void donttrace(char*x){}; +-void donttrace( const char*x, const char*y){}; ++void donttrace(const char*x){}; ++void donttrace(const char*x, const char*y){}; + #define TRACE donttrace + //#define TRACE trace + void handle_error(struct png_struct_def *png,const char *error) { +diff --git a/src/progress.cpp b/src/progress.cpp +index 552ef2c..53b3f28 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/22_progress.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/22_progress.cpp.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## progress.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/progress.cpp ++++ b/src/progress.cpp +@@ -11,9 +11,9 @@ bool UpdateProgress(int i){ + return res; + } + +-void StartProgress(char* str, int N){ ++void StartProgress(const char* str, int N){ + EndProgress(); +- wxString st; st.Printf("QuteMol: %s...",str); ++ wxString st; st.Printf(_T("QuteMol: %s..."),str); + globalProgress= new wxProgressDialog( + //_T("QuteMol"), st, + st, _T(""), +diff --git a/src/progress.h b/src/progress.h +index ef68184..86af743 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/23_progress.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/23_progress.h.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## progress.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/progress.h ++++ b/src/progress.h +@@ -1,6 +1,6 @@ + + bool UpdateProgress(int i); + +-void StartProgress(char* str, int N); ++void StartProgress(const char* str, int N); + + void EndProgress(); +diff --git a/src/saveSnapDialog.cpp b/src/saveSnapDialog.cpp +index a80f6b9..d2aa5a5 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/24_savesnapdialog.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/24_savesnapdialog.cpp.dpatch @@ -0,0 +1,120 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## savesnapdialog.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/src/saveSnapDialog.cpp ++++ b/src/saveSnapDialog.cpp +@@ -3,15 +3,15 @@ + #endif + + #include +-#include "SaveSnapDialog.h" ++#include "saveSnapDialog.h" + #include "HardSettings.h" + + + enum{ ID_ResUp=500, ID_ResDown, ID_Res, ID_AntiAlias, ID_Alpha}; + +-static wxString title[]={"PNG snapshot options","JPG snapshot options","GIF animation options"}; +-static wxTextCtrl * resText; +-static wxCheckBox *wxCheckAntia, *wxTransp ; ++static wxString title[]={_T("PNG snapshot options"),_T("JPG snapshot options"),_T("GIF animation options")}; ++//static wxTextCtrl * resText; ++//static wxCheckBox *wxCheckAntia, *wxTransp ; + + class EventTableEntry{ + public: +@@ -132,16 +132,16 @@ public: + enableif=lastRadio=NULL; + } + +- bool EndEnableGroup(){ ++ void EndEnableGroup(){ + enableif=NULL; + } + +- bool StartEnableGroup(){ ++ void StartEnableGroup(){ + enableif=lastRadio; + } + + bool pressButton(wxWindowID x){ +- for (int i=0; iAdd( upper, 0, wxALIGN_CENTER|wxALL, 20 ); + if (mid) top->Add( mid ); +- top->Add( CreateSeparatedButtonSizer(wxOK|wxCANCEL), 0, wxALIGN_CENTER |wxALL, 20 ); ++ top->Add( wxDialog::CreateSeparatedButtonSizer(wxOK|wxCANCEL), 0, wxALIGN_CENTER |wxALL, 20 ); + SetSizerAndFit(top); + eventt.Enable(); + +diff --git a/vcg/vcg/math/matrix44.h b/vcg/vcg/math/matrix44.h +index 2ea0cd7..38e553b 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/25_matrix44.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/25_matrix44.h.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## matrix44.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/vcg/vcg/math/matrix44.h ++++ b/vcg/vcg/math/matrix44.h +@@ -903,7 +903,7 @@ template bool LinearSolve::Decompose() { + scaling[i] = (T)1.0 / largest; + } + +- int imax; ++ int imax = 0; + for(j = 0; j < 4; j++) { + for(i = 0; i < j; i++) { + T sum = this->ElementAt(i,j); +diff --git a/vcg/wrap/gui/trackmode.cpp b/vcg/wrap/gui/trackmode.cpp +index e824b12..98ce1b8 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/26_trackmode.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/26_trackmode.cpp.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## trackmode.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/vcg/wrap/gui/trackmode.cpp ++++ b/vcg/wrap/gui/trackmode.cpp +@@ -368,7 +368,8 @@ void PathMode::GetPoints(float state, Point3f & point, Point3f & prev_point, Poi + assert(state >= 0.0f); + assert(state <= 1.0f); + float remaining_norm=state; +- Point3f p0,p1; ++ Point3f p0(0,0,0), p1(0,0,0); ++ + unsigned int npts = int(points.size()); + for(unsigned int i = 1;i <= npts;i++){ + if( i == npts){ +@@ -646,8 +647,8 @@ Point3f AreaMode::Move(Point3f start,Point3f end) + bool p_on_side = false; + bool hit=false; + +- Point3f pside,phit; +- bool slide,mid_inside; ++ Point3f pside(0,0,0), phit(0,0,0); ++ bool slide = 0, mid_inside; + + int np = int(points.size()), i, j; + for (i = 0, j = np-1; i < np; j = i++) { +diff --git a/vcg/wrap/gui/trackutils.h b/vcg/wrap/gui/trackutils.h +index a169aac..c1e56ac 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/27_trackutils.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/27_trackutils.h.dpatch @@ -0,0 +1,22 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## trackutils.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: modification to source code + +@DPATCH@ + +--- a/vcg/wrap/gui/trackutils.h ++++ b/vcg/wrap/gui/trackutils.h +@@ -218,7 +218,7 @@ Point3f HitSphere (Trackball * tb, const Point3f & p) + Line3fN ln = tb->camera.ViewLineFromWindow (Point3f (p[0], p[1], 0)); + Point3f viewpoint = tb->camera.ViewPoint (); + Plane3f vp = GetViewPlane (tb->camera, tb->center); +- Point3f hit, hitPlane, hitSphere, hitSphere1, hitSphere2, hitHyper; ++ Point3f hit, hitPlane(0,0,0), hitSphere(0,0,0), hitSphere1, hitSphere2, hitHyper; + IntersectionLinePlane < float >(vp, ln, hitPlane); + + Sphere3f sphere (tb->center, tb->radius); +diff --git a/vcg/wrap/qt/checkGLError.h b/vcg/wrap/qt/checkGLError.h +old mode 100755 +new mode 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/28_mol.cpp.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/28_mol.cpp.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 28_mol.cpp.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Include string.h + +@DPATCH@ + +--- a/src/Mol.cpp ++++ b/src/Mol.cpp +@@ -2,6 +2,7 @@ + + typedef unsigned char Byte; + ++#include + #include + #include + #include +diff --git a/src/Mol.h b/src/Mol.h +index 4a8dedd..297e665 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/29_mol.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/29_mol.h.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 29_mol.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Include string + +@DPATCH@ + +--- a/src/Mol.h ++++ b/src/Mol.h +@@ -1,3 +1,4 @@ ++#include + + class MyString{ + public: +diff --git a/vcg/vcg/math/matrix33.h b/vcg/vcg/math/matrix33.h +index f1b0d7b..0fbc087 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/30_matrix33.h.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/30_matrix33.h.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 30_matrix33.h.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Include stdlib.h + +@DPATCH@ + +--- a/vcg/vcg/math/matrix33.h ++++ b/vcg/vcg/math/matrix33.h +@@ -95,6 +95,7 @@ created + #ifndef __VCGLIB_MATRIX33_H + #define __VCGLIB_MATRIX33_H + ++#include + #include + #include + #include +diff --git a/vcg/wrap/qt/checkGLError.h b/vcg/wrap/qt/checkGLError.h +old mode 100755 +new mode 100644 --- qutemol-0.4.1~cvs20081111.orig/debian/patches/31_reset_local_for_shaders.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/31_reset_local_for_shaders.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 31_reset_local_for_shaders.dpatch by Michael Banck +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Set locale to "C" before making shaders and reset it afterwards. + +@DPATCH@ + +--- ./src/Common.cpp.orig 2011-09-12 17:07:36.000000000 +0200 ++++ ./src/Common.cpp 2011-09-12 17:08:49.000000000 +0200 +@@ -4,6 +4,8 @@ + #include + #include "CgUtil.h" + ++#include ++ + //#include + #include + //#include +@@ -859,7 +861,13 @@ + + void drawFrame() { + ++ char* locale; ++ locale = setlocale(LC_ALL,NULL); ++ setlocale(LC_ALL,"C"); ++ + cgSettings.MakeShaders(); ++ ++ setlocale(LC_ALL,locale); + + if (mol.DoingAO()) { + // do at least one more step per rendering --- qutemol-0.4.1~cvs20081111.orig/debian/patches/32_stdio_includes.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/32_stdio_includes.dpatch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 32_stdio_includes.dpatch by Michael Banck +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add missing includes for + +@DPATCH@ + + +diff --exclude debian -Naur qutemol/src/AO.cpp qutemol-0.4.1~cvs20081111//src/AO.cpp +--- qutemol/src/AO.cpp 2011-09-12 17:17:17.000000000 +0200 ++++ qutemol-0.4.1~cvs20081111//src/AO.cpp 2011-09-12 15:31:42.000000000 +0200 +@@ -2,6 +2,7 @@ + typedef unsigned char Byte; + + #include ++#include + + #include + #include +diff --exclude debian -Naur qutemol/src/AtomColor.cpp qutemol-0.4.1~cvs20081111//src/AtomColor.cpp +--- qutemol/src/AtomColor.cpp 2011-09-12 17:17:17.000000000 +0200 ++++ qutemol-0.4.1~cvs20081111//src/AtomColor.cpp 2011-09-12 15:32:27.000000000 +0200 +@@ -1,3 +1,5 @@ ++#include ++ + #include + #include + using namespace std; +diff --exclude debian -Naur qutemol/src/Mol.cpp qutemol-0.4.1~cvs20081111//src/Mol.cpp +--- qutemol/src/Mol.cpp 2011-09-12 17:17:17.000000000 +0200 ++++ qutemol-0.4.1~cvs20081111//src/Mol.cpp 2011-09-12 15:32:57.000000000 +0200 +@@ -3,6 +3,7 @@ + typedef unsigned char Byte; + + #include ++#include + #include + #include + #include +diff --exclude debian -Naur qutemol/src/ShadowMap.cpp qutemol-0.4.1~cvs20081111//src/ShadowMap.cpp +--- qutemol/src/ShadowMap.cpp 2011-09-12 17:17:17.000000000 +0200 ++++ qutemol-0.4.1~cvs20081111//src/ShadowMap.cpp 2011-09-12 15:33:44.000000000 +0200 +@@ -3,6 +3,8 @@ + typedef unsigned char Byte; + typedef unsigned int uint; + ++#include ++ + #include + #include "CgUtil.h" + --- qutemol-0.4.1~cvs20081111.orig/debian/patches/33_format-security.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/33_format-security.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 33_format-security.dpatch by Ilya Barygin +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix warnings produced by -Werror=format-security + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' qutemol-0.4.1~cvs20081111~/src/pngSave.cpp qutemol-0.4.1~cvs20081111/src/pngSave.cpp +--- qutemol-0.4.1~cvs20081111~/src/pngSave.cpp 2011-11-01 20:27:07.000000000 +0400 ++++ qutemol-0.4.1~cvs20081111/src/pngSave.cpp 2011-11-01 20:28:16.000000000 +0400 +@@ -55,8 +55,8 @@ + void trace(const char *st, const char *st2=NULL){ + static FILE *f=NULL; + if (!f) f=fopen("trace.txt","wt"); +- fprintf(f,st); +- if (st2) fprintf(f,st2); ++ fprintf(f,"%s",st); ++ if (st2) fprintf(f,"%s",st2); + fflush(f); + } + --- qutemol-0.4.1~cvs20081111.orig/debian/patches/34_geometry_tab_sliders.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/34_geometry_tab_sliders.dpatch @@ -0,0 +1,36 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 34_geometry_tab_sliders.dpatch by Michael Banck +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix broken sliders in geometry tab + +@DPATCH@ +--- ./src/MyTab.cpp.orig 2013-10-06 16:57:34.878875265 +0200 ++++ ./src/MyTab.cpp 2013-10-06 16:56:23.506510069 +0200 +@@ -722,6 +722,9 @@ + wxSlider* tmpSlider; + wxCheckBox* tmpChk; + wxStaticText* tmpStaticText; ++ ++static int SLIDERSIZE=80; ++ + wxSizer *newLabelledSlider( wxWindow* parent, wxWindowID idSlider, + const wxString& labelString, + int pos , +@@ -730,15 +733,12 @@ + // + wxSizer *res = new wxBoxSizer(wxHORIZONTAL); + label=new wxStaticText(parent, wxID_ANY, labelString); +- slider=new wxSlider(parent,idSlider, pos, 0, 100, wxDefaultPosition, wxDefaultSize/*, wxNO_FULL_REPAINT_ON_RESIZE */ ); ++ slider=new wxSlider(parent,idSlider, pos, 0, 100, wxDefaultPosition, wxSize(SLIDERSIZE,wxDefaultSize.y), wxNO_FULL_REPAINT_ON_RESIZE ); + res->Add(label, 0); + res->Add(slider, 1, wxEXPAND); + return res; + } + +- +-static int SLIDERSIZE=80; +- + wxSizer *newAutoSlider( wxWindow* parent, wxWindowID idSlider, + const wxString& labelString, + float *pos , --- qutemol-0.4.1~cvs20081111.orig/debian/patches/35_gifsave_honor_umask.dpatch +++ qutemol-0.4.1~cvs20081111/debian/patches/35_gifsave_honor_umask.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 35_gifsave_honor_umask.dpatch by Michael Banck +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Honor umask when saving a gif animation by changing the permissions +## DP: accordingly afterwards. + +@DPATCH@ +--- ./src/gifSave.cpp.orig 2013-10-06 18:15:49.335167635 +0200 ++++ ./src/gifSave.cpp 2013-10-06 18:19:18.124244413 +0200 +@@ -9,6 +9,8 @@ + + #include + #include ++#include ++#include + + #include + +@@ -181,6 +183,10 @@ + + if (EGifCloseFile(GifFile) == GIF_ERROR) return false; + ++ mode_t mask = umask(0); ++ umask(mask); ++ chmod(filename, mask ^ 0666); ++ + return true; + } + --- qutemol-0.4.1~cvs20081111.orig/debian/qutemol.1 +++ qutemol-0.4.1~cvs20081111/debian/qutemol.1 @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH qutemol 1 "January 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +qutemol \- interactive visualization of macromolecules +.SH SYNOPSIS +.B qutemol + +.SH DESCRIPTION +This manual page documents briefly the +.B QuteMol +program. +.PP + +\fBQuteMol\fP is an open source (GPL), interactive, high quality molecular +visualization system. \FBQuteMol\FP exploits the current GPU capabilites through +OpenGL shaders to offers an array of innovative visual effects. \FBQuteMol\FP +visualization techniques are aimed at improving clarity and an easier +understanding of the 3D shape and structure of large molecules or complex +proteins. + +Real Time Ambient Occlusion +Depth Aware Silhouette Enhancement +Ball and Sticks, Space-Fill and Liquorice visualization modes +High resolution antialiased snapshots for creating publication quality +renderings +Automatic generation of animated gifs of rotating molecules for web pages +animations +Real-time rendering of large molecules and protein (>100k atoms) +Standard PDB input. + + + +.SH CITING QUTEMOL +If you use images made with \FBQuteMol\FP in a scientific paper or book, +please cite the paper that presented \FBQuteMol\FP: + +Marco Tarini, Paolo Cignoni, Claudio Montani (2006) +Ambient Occlusion and Edge Cueing for Enhancing Real Time Molecular Visualization, +\fIIEEE Transactions on Visualization and Computer Graphics \fB12\fR(5), 1237-1244. + +.SH AUTHOR +\fBQuteMol\fP was written by Marco Tarini and Paolo Cignoni of the Visual +Computing Lab at ISTI-CNR. + +.PP +This manual page was written by Morten Kjeldgaard , +for the Debian project (but may be used by others). --- qutemol-0.4.1~cvs20081111.orig/debian/qutemol.install +++ qutemol-0.4.1~cvs20081111/debian/qutemol.install @@ -0,0 +1,4 @@ +qutemol /usr/bin +qutemol.cfg /usr/share/qutemol +src/image/* /usr/share/qutemol/image +src/presets/* /usr/share/qutemol/presets --- qutemol-0.4.1~cvs20081111.orig/debian/qutemol.manpages +++ qutemol-0.4.1~cvs20081111/debian/qutemol.manpages @@ -0,0 +1 @@ +debian/qutemol.1 --- qutemol-0.4.1~cvs20081111.orig/debian/rules +++ qutemol-0.4.1~cvs20081111/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +# -*- mode: makefile; mode: font-lock -*- + +INCDIRS = -Ivcg -Isrc -I. +#OPTFLAGS = -Os -Wall -g + +CXXFLAGS = -DPKGDATADIR='\"/usr/share/qutemol\"' $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags` + +include /usr/share/cdbs/1/rules/dpatch.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/debhelper.mk + +clean:: + rm -f qutemol --- qutemol-0.4.1~cvs20081111.orig/debian/upstream +++ qutemol-0.4.1~cvs20081111/debian/upstream @@ -0,0 +1,13 @@ +Name: QuteMol +Homepage: http://qutemol.sourceforge.net +Reference: + - Author: Marco Tarini and Paolo Cignoni and Claudio Montani + Title: "Ambient Occlusion and Edge Cueing for Enhancing Real Time Molecular Visualization" + Journal: IEEE Transactions on Visualization and Computer Graphics + Year: 2006 + Volume: 12 + Number: 5 + Pages: 1237-1244 + URL: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=4015487 + eprint: http://vcg.isti.cnr.it/Publications/2006/TCM06/Tarini_FinalVersionElec.pdf + DOI: 10.1109/TVCG.2006.115