* Import patches from upstream SVN to fix major bugs
authorD Haley <mycae@yahoo.com>
Mon, 26 Jul 2010 07:14:33 +0000 (17:14 +1000)
committerD Haley <mycae@yahoo.com>
Mon, 26 Jul 2010 07:14:33 +0000 (17:14 +1000)
- Bad SVG output
- large memleak for all C++ graphs

debian/patches/series
debian/patches/upstream-mgl-memleak.patch [new file with mode: 0644]
debian/patches/upstream-svg-namespace.patch [new file with mode: 0644]

index 1e698046cdf42aab2812ac458eb56756f9841546..599d111bc8d5c2cd803b4aeb88f163fe84f87dcd 100644 (file)
@@ -2,3 +2,5 @@
 examples-ldflags.patch
 mglview-ldflags.patch
 parallel-build-png.patch
+upstream-svg-namespace.patch
+upstream-mgl-memleak.patch
diff --git a/debian/patches/upstream-mgl-memleak.patch b/debian/patches/upstream-mgl-memleak.patch
new file mode 100644 (file)
index 0000000..c4052cd
--- /dev/null
@@ -0,0 +1,23 @@
+* import upstream SVN patch (r106) to fix large memleak in C++ graph object
+Index: mathgl-1.10.2.1/mgl/mgl_ab.cpp
+===================================================================
+--- mathgl-1.10.2.1.orig/mgl/mgl_ab.cpp        2010-07-26 17:12:49.000000000 +1000
++++ mathgl-1.10.2.1/mgl/mgl_ab.cpp     2010-07-26 17:13:04.000000000 +1000
+@@ -44,7 +44,7 @@
+ }\r
+ //-----------------------------------------------------------------------------\r
+ mglGraphAB::~mglGraphAB()\r
+-{     if(G)   {       delete []G;     delete []G4;    }       }\r
++{     if(G)   {       delete []G;     delete []G4;    delete []OI;    }       }\r
+ //-----------------------------------------------------------------------------\r
+ void mglGraphAB::Pop()\r
+ {\r
+@@ -370,7 +370,7 @@
+       if(font && strchr(font, 'a'))   {       Labelw(p.x, p.y, wcs,font,size,true);   return; }
+       wchar_t *wcl;
+-      int wn=0;
++      unsigned wn=0;
+       const wchar_t *wnl=0;
+       for(wn=0;wn<wcslen(wcs);wn++)
+               if(wcs[wn]=='\n' || (wcs[wn]=='\\' && wcs[wn+1]=='n'))
diff --git a/debian/patches/upstream-svg-namespace.patch b/debian/patches/upstream-svg-namespace.patch
new file mode 100644 (file)
index 0000000..b05829d
--- /dev/null
@@ -0,0 +1,14 @@
+Import upstream patch for SVG namespace (r 97)
+Index: mathgl-1.10.2.1/mgl/mgl_eps.cpp
+===================================================================
+--- mathgl-1.10.2.1.orig/mgl/mgl_eps.cpp       2010-07-26 17:10:06.000000000 +1000
++++ mathgl-1.10.2.1/mgl/mgl_eps.cpp    2010-07-26 17:10:16.000000000 +1000
+@@ -456,7 +456,7 @@
+       if(!fp)         {       SetWarn(mglWarnOpen,fname);     return; }\r
+       fprintf(fp,"<?xml version=\"1.0\" standalone=\"no\"?>\n");\r
+       fprintf(fp,"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20000303 Stylable//EN\" \"http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd\">\n");\r
+-      fprintf(fp,"<svg width=\"%d\" height=\"%d\">\n",Width,Height);\r
++      fprintf(fp,"<svg width=\"%d\" height=\"%d\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",Width,Height);\r
\r
+       fprintf(fp,"<!--Creator: MathGL library-->\n");\r
+       fprintf(fp,"<!--Title: %s-->\n<!--CreationDate: %s-->\n\n",descr?descr:fname,ctime(&now));\r