Control: tags -1 + patch

On Fri, Apr 15, 2016 at 10:01:05AM -0700, Mike Miller wrote:
> On Wed, Apr 13, 2016 at 20:00:22 +0200, Agustin Martin wrote:
> > Dear Maintainer,
> > 
> > I have noticed a problem when rotated text is processed to a tikz file.
> > Seems that (noticed only in this case) an ending curly brace is missing.
> > 
> > I am attaching some files for a minimal example about this
> > 
> >  * minimal-tikz-bug.m:       A minimal octave example
> >  * minimal-tikz-bug.tikz:    Buggy tikz output from above file.
> >  * minimal-tikz-bug.tikz.ok: tikz file fixed with an editor
> >  * minimal-tikz-bug.diff:    diff between last two files
> > 
> > Thanks for caring of this,
> 
> Confirmed, this is actually a bug in the gl2ps library that should be
> fixed when version 1.3.9 is packaged (untested).
> 
> Refer to the gl2ps upstream bug report [1] and patch [2]. As there's
> nothing to be done in octave, I've reassigned to the libgl2ps0 package
> which is still at 1.3.8.
> 
> [1]: https://geuz.org/trac/gl2ps/ticket/11
> [2]: https://geuz.org/trac/gl2ps/changeset/601

Hi, maintainer,

Since gl2ps 1.3.9 seems to involve a transition, I have extracted the part
that is relevant to this bug report. Please see attached patch, minimally
tested in my system.

Please let me know what do you think about the change. Otherwise I will
upload a NMU with it.

Regards,

-- 
Agustin
>From ff726b26ab86de8688b5bef1aba36b9292b7f97e Mon Sep 17 00:00:00 2001
From: Agustin Martin Domingo <agmar...@debian.org>
Date: Thu, 5 May 2016 15:36:11 +0200
Subject: [PATCH] 1000_gl2ps_tikz-fix-rotated-text.patch: Make sure brace is
 closed for rotated text (Closes: #820930).

---
 debian/changelog                                   |  9 +++++-
 .../patches/1000_gl2ps_tikz-fix-rotated-text.patch | 32 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/1000_gl2ps_tikz-fix-rotated-text.patch

diff --git a/debian/changelog b/debian/changelog
index f3fb3b1..abbb9e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+gl2ps (1.3.8-1.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * 1000_gl2ps_tikz-fix-rotated-text.patch: Make sure brace is closed for
+    rotated text (Closes: #820930).
+
+ -- Agustin Martin Domingo <agmar...@debian.org>  Thu, 05 May 2016 15:31:44 +0200
+
 gl2ps (1.3.8-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -63,4 +71,3 @@ gl2ps (1.3.4-1) unstable; urgency=low
   * Initial release (Closes: #550369)
 
  -- Sylvestre Ledru <sylves...@debian.org>  Fri, 09 Oct 2009 16:44:27 +0200
-
diff --git a/debian/patches/1000_gl2ps_tikz-fix-rotated-text.patch b/debian/patches/1000_gl2ps_tikz-fix-rotated-text.patch
new file mode 100644
index 0000000..9836dbe
--- /dev/null
+++ b/debian/patches/1000_gl2ps_tikz-fix-rotated-text.patch
@@ -0,0 +1,32 @@
+Author: Felix
+Description: gl2psPrintPGFPrimitive misses closing braces for rotated text
+Bug: https://geuz.org/trac/gl2ps/ticket/11
+Upstream-Commit: https://geuz.org/trac/gl2ps/changeset/601
+Bug-Debian: https://bugs.debian.org/820930
+
+ In function gl2psPrintPGFPrimitive, switch case GL2PS_TEXT opens a curly
+ brace which is never closed again, if the text is rotated: I discovered
+ the problem when trying to produce tikz output with octave, which produced
+ broken output when inserting labels to the y -axis.
+
+Hopes this helps, with kind regards,
+Felix
+
+Note: user and password gl2ps for "ro" access to upstream svn repo.
+
+--- a/gl2ps.c
++++ b/gl2ps.c
+@@ -5447,7 +5447,12 @@
+             prim->verts[0].rgba[0], prim->verts[0].rgba[1],
+             prim->verts[0].rgba[2], prim->data.text->str);
+ 
+-    fprintf(gl2ps->stream, "}{}{\\pgfusepath{discard}}}\n");
++    fprintf(gl2ps->stream, "}{}{\\pgfusepath{discard}}}");
++
++    if(prim->data.text->angle)
++       fprintf(gl2ps->stream, "}");
++
++    fprintf(gl2ps->stream, "\n");
+     break;
+   case GL2PS_SPECIAL :
+     /* alignment contains the format for which the special output text
diff --git a/debian/patches/series b/debian/patches/series
index f5fd249..345dd3b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 buildsys.diff
 linkGL.diff
 undef.patch
+1000_gl2ps_tikz-fix-rotated-text.patch
-- 
2.8.1

Reply via email to