[SCM] UNNAMED PROJECT branch, debian-unstable, updated. f6525d76c3237e8df42818535012265667ad00f5
Drew Parsons
dparsons at debian.org
Fri Mar 27 05:53:42 UTC 2009
The following commit has been merged in the debian-unstable branch:
commit f6525d76c3237e8df42818535012265667ad00f5
Author: Drew Parsons <dparsons at debian.org>
Date: Fri Mar 27 16:44:54 2009 +1100
Unpack old deb diff file into upstream source patches.
Patches split into separate diffs in debian/patches.
diff --git a/debian/changelog b/debian/changelog
index 1511922..2509d90 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,17 @@ viewmol (2.4.1-15) UNRELEASED; urgency=low
* Transfer to group maintainership with Debian Science.
* Standards version: 3.8.1.
-
- -- Drew Parsons <dparsons at debian.org> Fri, 27 Mar 2009 16:01:35 +1100
+ * Build-Depends: quilt. debian/xsfbs borrowed from XSF (Xorg
+ packaging) to handle quilt patches. Source patches from previous
+ debian diff split into separate diffs in debian/patches:
+ 010_build_scripts.diff
+ 100_locale_exception.diff
+ 110_desktop_app.diff
+ 120_PyObject.diff
+ 130_DEFAULTPATH.diff
+ 140_bin_awk.diff
+
+ -- Drew Parsons <dparsons at debian.org> Fri, 27 Mar 2009 16:46:00 +1100
viewmol (2.4.1-14) unstable; urgency=low
diff --git a/debian/patches/010_build_scripts.diff b/debian/patches/010_build_scripts.diff
new file mode 100644
index 0000000..86851d6
--- /dev/null
+++ b/debian/patches/010_build_scripts.diff
@@ -0,0 +1,140 @@
+--- viewmol-2.4.1.orig/source/getmachine
++++ viewmol-2.4.1/source/getmachine
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #*******************************************************************************
+ # *
+ # Viewmol *
+@@ -63,11 +63,44 @@
+ then
+ processor=`uname -m`
+ fi
++
++ # for the Debian auto-build system, we identify the processor thus:
++ processor=`dpkg --print-architecture`
++
++ if [ "$processor" = "i386" -o "$processor" = "i686" -o "$processor" = "i586" ]
++ then
++ # Debian policy says ia32 (i386) binaries should be optimised
++ # for no more than i486.
++ # But this runs noticably slower on i686 (P-4 class), so I recommend you
++ # change it for your own system and recompile.
++ # Note I am deliberately excluded i386 machines, by upgrading them to i486.
++ # This is because `dpkg --print-architecture` always returns i386 on
++ # Pentium level systems, but I want to optimise for no less than i486.
++ processor=i486
++
++ # need the following to flag for -malign-double, which is Intel only.
++ processor_is_i386=true
++ fi
++
++ # or set the flag for true i486 too
++ if [ "$processor" = "i486" ]
++ then
++ processor_is_i386=true
++ fi
+ }
+
+ target=$1
+ os=`uname -s`
+
++case $os in
++ GNU/k*BSD | GNU)
++ # GNU variants are treated like Linux
++ os=Linux
++ ;;
++ *)
++ ;;
++esac
++
+ # Check, whether configuration file is up to date
+ if [ -f .config.$os ]
+ then
+@@ -179,7 +212,7 @@
+ echo "PYTHONINCLUDE = $pythoninclude" >> .config.$os
+ if [ "$version" != "" ]
+ then
+- pythonlib=`dirname \`find /usr -name "lib${version}*.a" -print 2> /dev/null | grep "$version/"\``
++ pythonlib=`dirname \`find /usr -name "lib${version}*.a" -print 2> /dev/null | grep "$version/" | xargs echo | awk '{print $1}'\``
+ else
+ givehint
+ echo -n "Please enter the name of the directory where the Python library can be found: "
+@@ -268,12 +301,26 @@
+ Linux) dir="$os"
+ makedir
+ cat ../.config.$os > makefile
+- use_icc=`type icc 2> /dev/null`
++# use_icc=`type icc 2> /dev/null`
++ use_icc=""
++ echo "using Linux and use_icc=\"${use_icc}\""
+ if [ "$use_icc" = "" ]
+ then
+ findProcessor
++ if [ "$processor_is_i386" ]
++ then
++ # -malign-double applies only to intel systems
++ machine_opts="-malign-double"
++ processor_opt="-march=$processor"
++ elif [ "$processor" == "powerpc" ]
++ then
++ # there is no -mcpu option for the more obscure
++ # architectures like arm, ia64, so we have to be selective.
++ # In fact, it only applies to i386 and powerpc.
++ processor_opt="-mcpu=$processor"
++ fi
+ echo 'COMPILER=gcc' >> makefile
+- echo "OPT=-O6 -mcpu=$processor -fomit-frame-pointer -ffast-math -malign-double" >> makefile
++ echo "OPT=-O6 $processor_opt -fomit-frame-pointer -ffast-math $machine_opts" >> makefile
+ echo 'CFLAGS=-Wall -I/usr/X11R6/include -DLINUX -Wno-strict-aliasing' >> makefile
+ echo "LDFLAGS=$LINKFORSHARED" >> makefile
+ else
+@@ -285,7 +332,7 @@
+ echo 'SCANDIR=' >> makefile
+ echo 'INCLUDE=$(TIFFINCLUDE) -I$(PNGINCLUDE) -I$(PYTHONINCLUDE)' >> makefile
+ echo 'LIBRARY=$(LIBTIFF) $(LIBPNG) -L$(LIBPYTHON)' >> makefile
+- echo 'LIBS=-L/usr/local/lib -l${PYTHONVERSION} -ltiff -lpng -lz -lGLU -lGL -L/usr/X11R6/lib -lXm -lXmu -lXp -lXi -lXext -lXt -lX11 -lpthread -lutil -ldl -lm' >> makefile
++ echo 'LIBS=-L/usr/local/lib -l${PYTHONVERSION} -ltiff -lpng -lGLU -lGL -L/usr/X11R6/lib -lXm -lXmu -lXi -lXt -lX11 -lm' >> makefile
+ ;;
+ #
+ # This is FreeBSD
+--- viewmol-2.4.1.orig/source/Makefile
++++ viewmol-2.4.1/source/Makefile
+@@ -144,11 +144,11 @@
+ viewmol : ; /bin/sh getmachine viewmol
+ viewmol_: $(OBJ) ; $(COMPILER) -o viewmol $(BAGGER) $(LDFLAGS) $(OBJ) $(LIBRARY) $(LIBS)
+ tm : ; /bin/sh getmachine tm
+-tm_ : tm.o readframe.o getmem.o ; $(COMPILER) -o tm $(LDFLAGS) tm.o readframe.o getmem.o -lm
++tm_ : tm.o readframe.o getmem.o ; $(COMPILER) -o tm $(LDFLAGS) tm.o readframe.o getmem.o
+ bio : ; /bin/sh getmachine bio
+ bio_ : bio.o readframe.o getmem.o ; $(COMPILER) -o bio $(LDFLAGS) bio.o readframe.o getmem.o
+ readgamess: ; /bin/sh getmachine readgamess
+-readgamess_: readgamess.o eof.o getmem.o ; $(COMPILER) -o readgamess $(LDFLAGS) readgamess.o eof.o getmem.o -lm
++readgamess_: readgamess.o eof.o getmem.o ; $(COMPILER) -o readgamess $(LDFLAGS) readgamess.o eof.o getmem.o
+ readgauss: ; /bin/sh getmachine readgauss
+ readgauss_: readgauss.o eof.o getmem.o ; $(COMPILER) -o readgauss $(LDFLAGS) readgauss.o eof.o getmem.o
+ readmopac: ; /bin/sh getmachine readmopac
+--- viewmol-2.4.1.orig/source/install
++++ viewmol-2.4.1/source/install
+@@ -40,6 +40,10 @@
+ IRIX*) dir="${os}_`hinv | awk '/CPU:/ {print $3}' | cut -d/ -f2`"
+ dirorig="IRIX_R5000"
+ ;;
++ GNU/k*BSD | GNU*)
++ dir=Linux
++ dirorig=Linux
++ ;;
+ *) dir="$os"
+ dirorig="$os"
+ ;;
+@@ -71,7 +75,9 @@
+ find $ROOT/lib/viewmol -type d -exec chmod a+rx {} \;
+ sed 's/\/source//g' viewmolrc > $ROOT/lib/viewmol/viewmolrc
+ chmod -R 644 $ROOT/lib/viewmol/viewmolrc
+-if [ -d /usr/X11R6/lib/X11/app-defaults ]
++# We do not want the code below to run for Debian;
++# the $ROOT/... reference keeps it from proceeding.
++if [ -d $ROOT/X11R6/lib/X11/app-defaults ]
+ then
+ locale=`echo $LANG | cut -c1-2`
+ if [ "$locale" = "en" ]
diff --git a/debian/patches/100_locale_exception.diff b/debian/patches/100_locale_exception.diff
new file mode 100644
index 0000000..96e1249
--- /dev/null
+++ b/debian/patches/100_locale_exception.diff
@@ -0,0 +1,16 @@
+--- viewmol-2.4.1.orig/scripts/setAtomColors.py
++++ viewmol-2.4.1/scripts/setAtomColors.py
+@@ -39,7 +39,12 @@
+ dir='/usr/local/viewmol'
+
+ #catalog=gettext.translation('Viewmol', localedir=dir + '/locale', languages=['en_US'])
+-catalog=gettext.translation('Viewmol', localedir=dir + '/locale')
++try:
++ catalog=gettext.translation('Viewmol', localedir=dir + '/locale')
++except IOError:
++ # gettext.translation will fail if the user's locale is not one that viewmol knows
++ # in which case fallback to en
++ catalog=gettext.translation('Viewmol', localedir=dir + '/locale', languages=['en'])
+ _ = catalog.gettext
+ def N_(message): return message
+
diff --git a/debian/patches/110_desktop_app.diff b/debian/patches/110_desktop_app.diff
new file mode 100644
index 0000000..bfe619b
--- /dev/null
+++ b/debian/patches/110_desktop_app.diff
@@ -0,0 +1,78 @@
+--- viewmol-2.4.1.orig/kde/install
++++ viewmol-2.4.1/kde/install
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-prgname=`/bin/basename $0`
++prgname=`/usr/bin/basename $0`
+
+ if [ "$KDEDIR" != "" ]
+ then
+@@ -53,25 +53,25 @@
+ echo -n "."
+ if [ "$prgname" = "install" ]
+ then
+- /bin/cp icons/32x32/mimetypes/*.png $DIR/share/icons/default.kde/32x32/mimetypes
+- /bin/cp icons/32x32/apps/*.png $DIR/share/icons/default.kde/32x32/apps
++ /bin/cp icons/32x32/mimetypes/*.png $DIR/share/icons/crystalsvg/32x32/mimetypes
++ /bin/cp icons/32x32/apps/*.png $DIR/share/icons/crystalsvg/32x32/apps
+ echo -n "."
+- /bin/cp icons/48x48/mimetypes/*.png $DIR/share/icons/default.kde/48x48/mimetypes
+- /bin/cp icons/48x48/apps/*.png $DIR/share/icons/default.kde/48x48/apps
++ /bin/cp icons/48x48/mimetypes/*.png $DIR/share/icons/crystalsvg/48x48/mimetypes
++ /bin/cp icons/48x48/apps/*.png $DIR/share/icons/crystalsvg/48x48/apps
+ echo -n "."
+- /bin/cp icons/64x64/mimetypes/*.png $DIR/share/icons/default.kde/64x64/mimetypes
+- /bin/cp icons/64x64/apps/*.png $DIR/share/icons/default.kde/64x64/apps
++ /bin/cp icons/64x64/mimetypes/*.png $DIR/share/icons/crystalsvg/64x64/mimetypes
++ /bin/cp icons/64x64/apps/*.png $DIR/share/icons/crystalsvg/64x64/apps
+ echo -n "."
+- /bin/cp icons/128x128/mimetypes/*.png $DIR/share/icons/default.kde/128x128/mimetypes
+- /bin/cp icons/128x128/apps/*.png $DIR/share/icons/default.kde/128x128/apps
++ /bin/cp icons/128x128/mimetypes/*.png $DIR/share/icons/crystalsvg/128x128/mimetypes
++ /bin/cp icons/128x128/apps/*.png $DIR/share/icons/crystalsvg/128x128/apps
+ echo -n "."
+ else
+ for i in 128x128 64x64 48x48 32x32
+ do
+- /bin/rm -f $DIR/share/icons/default.kde/${i}/mimetypes/solid.png \
+- $DIR/share/icons/default.kde/${i}/mimetypes/molecule.png \
+- $DIR/share/icons/default.kde/${i}/mimetypes/qc.png \
+- $DIR/share/icons/default.kde/${i}/apps/viewmol.png
++ /bin/rm -f $DIR/share/icons/crystalsvg/${i}/mimetypes/solid.png \
++ $DIR/share/icons/crystalsvg/${i}/mimetypes/molecule.png \
++ $DIR/share/icons/crystalsvg/${i}/mimetypes/qc.png \
++ $DIR/share/icons/crystalsvg/${i}/apps/viewmol.png
+ done
+ fi
+ echo -n "."
+@@ -85,10 +85,10 @@
+ /bin/rm -f $DIR/share/$APPLNK/Graphics/viewmol.desktop
+ fi
+ echo -n "."
+-if [ "$prgname" = "install" ]
+-then
+- /bin/mkdir -p /usr/local/lib/viewmol/kde/mimelnk
+- /bin/cp ./install /usr/local/lib/viewmol/kde/uninstall
+- /bin/cp mimelnk/magic /usr/local/lib/viewmol/kde/mimelnk
+-fi
++#if [ "$prgname" = "install" ]
++#then
++# /bin/mkdir -p /usr/local/lib/viewmol/kde/mimelnk
++# /bin/cp ./install /usr/local/lib/viewmol/kde/uninstall
++# /bin/cp mimelnk/magic /usr/local/lib/viewmol/kde/mimelnk
++#fi
+ echo " done."
+--- viewmol-2.4.1.orig/kde/applications/viewmol.desktop
++++ viewmol-2.4.1/kde/applications/viewmol.desktop
+@@ -6,8 +6,9 @@
+ MimeType=chemical/x-msi-car;chemical/x-dmol;chemical/x-mopac;chemical/x-gaussian-log;chemical/x-gulp;chemical/x-pdb;chemical/x-turbomole-control;chemical/x-turbomole-coord;
+ Comment=Viewmol
+ Type=Application
+-Exec=/usr/local/bin/viewmol %f
++Exec=/usr/bin/viewmol %f
+ Icon=viewmol.png
+ MiniIcon=
+ Path=$HOME
+ Terminal=0
++Categories=Education;Science;Chemistry;
diff --git a/debian/patches/120_PyObject.diff b/debian/patches/120_PyObject.diff
new file mode 100644
index 0000000..2bcc88d
--- /dev/null
+++ b/debian/patches/120_PyObject.diff
@@ -0,0 +1,99 @@
+--- viewmol-2.4.1.orig/source/historymodule.c
++++ viewmol-2.4.1/source/historymodule.c
+@@ -318,7 +318,7 @@
+ static void history_dealloc(PyHistorySpecObject *self)
+ {
+ if (!self) return;
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ quitHistory((Widget)0, (caddr_t)0, (XmAnyCallbackStruct *)0);
+ (void)checkInterrupt();
+ }
+--- viewmol-2.4.1.orig/source/spectrummodule.c
++++ viewmol-2.4.1/source/spectrummodule.c
+@@ -383,7 +383,7 @@
+ static void spectrum_dealloc(PySpectrumSpecObject *self)
+ {
+ if (!self) return;
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ quitSpectrum((Widget)0, (caddr_t)0, (XmAnyCallbackStruct *)0);
+ (void)checkInterrupt();
+ }
+--- viewmol-2.4.1.orig/source/input.c
++++ viewmol-2.4.1/source/input.c
+@@ -1603,7 +1603,7 @@
+ if (mol->exponents != NULL) fremem((void **)&(mol->exponents));
+ if (mol->addedBonds != NULL) fremem((void **)&(mol->addedBonds));
+ if (mol->deletedBonds != NULL) fremem((void **)&(mol->deletedBonds));
+-/* PyMem_DEL(mol->pyObject);*/
++/* PyObject_Del(mol->pyObject);*/
+
+ if (first != nmolecule-1)
+ {
+--- viewmol-2.4.1.orig/source/labelmodule.c
++++ viewmol-2.4.1/source/labelmodule.c
+@@ -217,7 +217,7 @@
+ static void label_dealloc(PyLabelSpecObject *self)
+ {
+ /* This has to be a dummy function, since labels are handled in Viewmol
+- PyMem_DEL(self); */
++ PyObject_Del(self); */
+ }
+
+ static PyObject *label_getattr(PyLabelSpecObject *self, char *name)
+--- viewmol-2.4.1.orig/source/atommodule.c
++++ viewmol-2.4.1/source/atommodule.c
+@@ -374,7 +374,7 @@
+ static void atom_dealloc(PyAtomSpecObject *self)
+ {
+ if (!self) return;
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *atom_getattr(PyAtomSpecObject *self, char *name)
+--- viewmol-2.4.1.orig/source/lightmodule.c
++++ viewmol-2.4.1/source/lightmodule.c
+@@ -134,7 +134,7 @@
+ static void light_dealloc(PyLightSpecObject *self)
+ {
+ if (!self) return;
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *light_getattr(PyLightSpecObject *self, char *name)
+--- viewmol-2.4.1.orig/source/energylevelmodule.c
++++ viewmol-2.4.1/source/energylevelmodule.c
+@@ -304,7 +304,7 @@
+ static void energylevels_dealloc(PyEnergyLevelSpecObject *self)
+ {
+ if (!self) return;
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ quitMODiagram((Widget)0, (caddr_t)0, (XmAnyCallbackStruct *)0);
+ (void)checkInterrupt();
+ }
+--- viewmol-2.4.1.orig/source/elementmodule.c
++++ viewmol-2.4.1/source/elementmodule.c
+@@ -369,7 +369,7 @@
+ static void element_dealloc(PyElementSpecObject *self)
+ {
+ if (!self) return;
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *element_getattr(PyElementSpecObject *self, char *name)
+--- viewmol-2.4.1.orig/source/moleculemodule.c
++++ viewmol-2.4.1/source/moleculemodule.c
+@@ -1017,7 +1017,7 @@
+ static void molecule_dealloc(PyMoleculeSpecObject *self)
+ {
+ /* A dummy function is required here to avoid crashing
+- PyMem_DEL(self); */
++ PyObject_Del(self); */
+ }
+
+ void initMoleculeModule(void)
diff --git a/debian/patches/130_DEFAULTPATH.diff b/debian/patches/130_DEFAULTPATH.diff
new file mode 100644
index 0000000..a94fe76
--- /dev/null
+++ b/debian/patches/130_DEFAULTPATH.diff
@@ -0,0 +1,11 @@
+--- viewmol-2.4.1.orig/source/getrc.c
++++ viewmol-2.4.1/source/getrc.c
+@@ -87,7 +87,7 @@
+
+ static char viewmolpath[MAXLENLINE];
+
+-#define DEFAULTPATH "/usr/local/lib/viewmol"
++#define DEFAULTPATH "/usr/lib/viewmol"
+
+ int getrc(void)
+ {
diff --git a/debian/patches/140_bin_awk.diff b/debian/patches/140_bin_awk.diff
new file mode 100644
index 0000000..f2ad33d
--- /dev/null
+++ b/debian/patches/140_bin_awk.diff
@@ -0,0 +1,7 @@
+--- viewmol-2.4.1.orig/readdmol.awk
++++ viewmol-2.4.1/readdmol.awk
+@@ -1,3 +1,4 @@
++#!/usr/bin/awk
+ #*******************************************************************************
+ # *
+ # Viewmol *
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5f1290c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,6 @@
+010_build_scripts.diff
+100_locale_exception.diff
+110_desktop_app.diff
+120_PyObject.diff
+130_DEFAULTPATH.diff
+140_bin_awk.diff
--
UNNAMED PROJECT
More information about the debian-science-commits
mailing list