[Pkg-octave-commit] r2724 - in octave/trunk/debian: . in patches

Rafael Laboissiere rafael at alioth.debian.org
Sat Mar 14 11:22:00 UTC 2009


tags 519572 pending
thanks

Author: rafael
Date: 2009-03-14 11:22:00 +0000 (Sat, 14 Mar 2009)
New Revision: 2724

Added:
   octave/trunk/debian/patches/pretty-png-svg-print.dpatch
Modified:
   octave/trunk/debian/changelog
   octave/trunk/debian/in/00list
Log:
Add patch

Modified: octave/trunk/debian/changelog
===================================================================
--- octave/trunk/debian/changelog	2009-03-12 22:33:43 UTC (rev 2723)
+++ octave/trunk/debian/changelog	2009-03-14 11:22:00 UTC (rev 2724)
@@ -3,6 +3,9 @@
   * debian/in/PACKAGE.conf: Use strsplit instead of the deprecated split
     when checking the path (closes: #519429).  Thanks to Francesco Potortì
     for the patch.
+  * patches/pretty-png-svg-print.dpatch: Restore pretty printing in png
+    and svg formats (closes: #519572).  Thanks to Ben Abbott for the
+    patch.
 
  -- Rafael Laboissiere <rafael at debian.org>  Thu, 12 Mar 2009 23:32:03 +0100
 

Modified: octave/trunk/debian/in/00list
===================================================================
--- octave/trunk/debian/in/00list	2009-03-12 22:33:43 UTC (rev 2723)
+++ octave/trunk/debian/in/00list	2009-03-14 11:22:00 UTC (rev 2724)
@@ -12,4 +12,5 @@
 dont_set_helvetica-3.1.dpatch
 normal-markersize.dpatch
 remove-y.tab.h-in-maintainer-clean.dpatch
+pretty-png-svg-print.dpatch
 :]

Added: octave/trunk/debian/patches/pretty-png-svg-print.dpatch
===================================================================
--- octave/trunk/debian/patches/pretty-png-svg-print.dpatch	                        (rev 0)
+++ octave/trunk/debian/patches/pretty-png-svg-print.dpatch	2009-03-14 11:22:00 UTC (rev 2724)
@@ -0,0 +1,60 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## -*- diff -*-
+## pretty-png-svg-print.dpatch by Rafael Laboissiere <rafael at debian.org>
+##
+## DP: Restore pretty printing in png and svg formats (closes: Bug#519572).
+## DP: Thanks to Ben Abbott for the patch.
+
+ at DPATCH@
+# HG changeset patch
+# User Ben Abbott <bpabbott at mac.com>
+# Date 1236938898 -28800
+# Node ID 258596f5071a4c350450f289116053582a2699d0
+# Parent  3ecbc236e2e0dc9c435e2b76667715c998fc5714
+print.m: Revert to old behavior for -S<num>,<num>.
+
+diff -r 3ecbc236e2e0 -r 258596f5071a scripts/plot/print.m
+--- a/scripts/plot/print.m	Tue Mar 10 21:54:49 2009 -0400
++++ b/scripts/plot/print.m	Fri Mar 13 18:08:18 2009 +0800
+@@ -427,11 +427,36 @@
+     endif
+     set (gcf, "__pixels_per_inch__", resolution)
+ 
+-    if (debug)
+-      drawnow (new_terminal, name, mono, debug_file);
+-    else
+-      drawnow (new_terminal, name, mono);
+-    endif
++    unwind_protect
++      if (! isempty (size))
++        size_in_pixels = sscanf (size ,"%d, %d");
++        size_in_pixels = reshape (size_in_pixels, [1, numel(size_in_pixels)]);
++        size_in_inches = size_in_pixels ./ resolution;
++        p.paperunits = get (gcf, "paperunits");
++        p.papertype = get (gcf, "papertype");
++        p.papersize = get (gcf, "papersize");
++        p.paperposition = get (gcf, "paperposition");
++        p.paperpositionmode = get (gcf, "paperpositionmode");
++        set (gcf, "paperunits", "inches");
++        set (gcf, "papertype", "<custom>");
++        set (gcf, "papersize", size_in_inches);
++        set (gcf, "paperposition", [0, 0, size_in_inches]);
++        set (gcf, "paperpositionmode", "manual");
++      endif
++      if (debug)
++        drawnow (new_terminal, name, mono, debug_file);
++      else
++        drawnow (new_terminal, name, mono);
++      endif
++    unwind_protect_cleanup
++      ## FIXME - it would be preferred to delete the added properties here.
++      if (! isempty (size))
++        props = fieldnames (p);
++        for n = 1:numel(props)
++          set (gcf, props{n}, p.(props{n}))
++        endfor
++      endif
++    end_unwind_protect
+ 
+     if (! isempty (convertname))
+       command = sprintf ("convert '%s' '%s'", name, convertname);




More information about the Pkg-octave-commit mailing list