[Pkg-lyx-devel] [lyx] 01/02: Add workaround-gcc5-bug.patch: Workaround bug in GCC 5 which makes LyX crash when cutting emphasized text (for example). Closes: #799091.

Per Olofsson pelle at moszumanska.debian.org
Thu Sep 17 03:25:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

pelle pushed a commit to branch master
in repository lyx.

commit 24343733b81fcdc73e5ee576b57fd09dc6b2b63d
Author: Per Olofsson <pelle at pqz.se>
Date:   Thu Sep 17 04:51:44 2015 +0200

    Add workaround-gcc5-bug.patch: Workaround bug in GCC 5 which makes LyX crash when cutting emphasized text (for example). Closes: #799091.
---
 debian/changelog                         |   3 +
 debian/patches/series                    |   1 +
 debian/patches/workaround-gcc5-bug.patch | 114 +++++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7540e11..bc7d9fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 lyx (2.1.4-2) UNRELEASED; urgency=medium
 
   * Build-depend on dh-python.
+  * Add workaround-gcc5-bug.patch: Workaround bug in GCC 5 which makes
+    LyX crash when cutting emphasized text (for example). Closes:
+    #799091.
 
  -- Per Olofsson <pelle at debian.org>  Tue, 08 Sep 2015 08:00:37 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
index 3e16998..69f5d03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+workaround-gcc5-bug.patch
 prefer-xdg-open
diff --git a/debian/patches/workaround-gcc5-bug.patch b/debian/patches/workaround-gcc5-bug.patch
new file mode 100644
index 0000000..0a85ac4
--- /dev/null
+++ b/debian/patches/workaround-gcc5-bug.patch
@@ -0,0 +1,114 @@
+Description: Work around a GCC 5 bug
+Author: Georg Baum <baum at lyx.org>
+Origin: upstream, http://www.lyx.org/trac/changeset/12ab5dd81/lyxgit
+Bug: http://www.lyx.org/trac/ticket/9771
+Bug-Debian: https://bugs.debian.org/799091
+Applied-Upstream: 12ab5dd810d8f95273dae2ba1e9ea699d54bab67
+Last-Update: 2015-09-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/output_xhtml.cpp
++++ b/src/output_xhtml.cpp
+@@ -205,7 +205,7 @@ docstring CompTag::writeTag() const
+ namespace {
+ 
+ string fontToTag(html::FontTypes type)
+- {
++{
+ 	switch(type) {
+ 	case FT_EMPH:
+ 		return "em";
+@@ -245,68 +245,66 @@ string fontToTag(html::FontTypes type)
+ 	return "";
+ }
+ 
+-StartTag fontToStartTag(html::FontTypes type)
+- {
+-	string tag = fontToTag(type);
++string fontToAttribute(html::FontTypes type)
++{
+ 	switch(type) {
+ 	case FT_EMPH:
+-		return html::StartTag(tag);
+ 	case FT_BOLD:
+-		return html::StartTag(tag);
++		return "";
+ 	case FT_NOUN:
+-		return html::StartTag(tag, "class='lyxnoun'");
++		return "class='lyxnoun'";
+ 	case FT_UBAR:
+-		return html::StartTag(tag);
++		return "";
+ 	case FT_DBAR:
+-		return html::StartTag(tag, "class='dline'");
++		return "class='dline'";
+ 	case FT_SOUT:
+-		return html::StartTag(tag, "class='strikeout'");
++		return "class='strikeout'";
+ 	case FT_WAVE:
+-		return html::StartTag(tag, "class='wline'");
++		return "class='wline'";
+ 	case FT_ITALIC:
+-		return html::StartTag(tag);
++		return "";
+ 	case FT_UPRIGHT:
+-		return html::StartTag(tag, "style='font-style:normal;'");
++		return "style='font-style:normal;'";
+ 	case FT_SLANTED:
+-		return html::StartTag(tag, "style='font-style:oblique;'");
++		return "style='font-style:oblique;'";
+ 	case FT_SMALLCAPS:
+-		return html::StartTag(tag, "style='font-variant:small-caps;'");
++		return "style='font-variant:small-caps;'";
+ 	case FT_ROMAN:
+-		return html::StartTag(tag, "style='font-family:serif;'");
++		return "style='font-family:serif;'";
+ 	case FT_SANS:
+-		return html::StartTag(tag, "style='font-family:sans-serif;'");
++		return "style='font-family:sans-serif;'";
+ 	case FT_TYPE:
+-		return html::StartTag(tag, "style='font-family:monospace;'");
++		return "style='font-family:monospace;'";
+ 	case FT_SIZE_TINY:
+ 	case FT_SIZE_SCRIPT:
+ 	case FT_SIZE_FOOTNOTE:
+-		return html::StartTag(tag, "style='font-size:x-small;'");
++		return "style='font-size:x-small;'";
+ 	case FT_SIZE_SMALL:
+-		return html::StartTag(tag, "style='font-size:small;'");
++		return "style='font-size:small;'";
+ 	case FT_SIZE_NORMAL:
+-		return html::StartTag(tag, "style='font-size:normal;'");
++		return "style='font-size:normal;'";
+ 	case FT_SIZE_LARGE:
+-		return html::StartTag(tag, "style='font-size:large;'");
++		return "style='font-size:large;'";
+ 	case FT_SIZE_LARGER:
+ 	case FT_SIZE_LARGEST:
+-		return html::StartTag(tag, "style='font-size:x-large;'");
++		return "style='font-size:x-large;'";
+ 	case FT_SIZE_HUGE:
+ 	case FT_SIZE_HUGER:
+-		return html::StartTag(tag, "style='font-size:xx-large;'");
++		return "style='font-size:xx-large;'";
+ 	case FT_SIZE_INCREASE:
+-		return html::StartTag(tag, "style='font-size:larger;'");
++		return "style='font-size:larger;'";
+ 	case FT_SIZE_DECREASE:
+-		return html::StartTag(tag, "style='font-size:smaller;'");
++		return "style='font-size:smaller;'";
+ 	}
+ 	// kill warning
+-	return StartTag("");
++	return "";
+ }
+ 
+ } // end anonymous namespace
+ 
+ 
+ FontTag::FontTag(FontTypes type)
+-  : StartTag(fontToStartTag(type)), font_type_(type)
++  : StartTag(fontToTag(type), fontToAttribute(type)), font_type_(type)
+ {}
+ 
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-lyx/lyx.git



More information about the Pkg-lyx-devel mailing list