From 4d9ee6e5339142b4b2662ccecf4bd4452782aa384c939616ffdba58a83638a54 Mon Sep 17 00:00:00 2001 From: Cor Blom Date: Wed, 1 Mar 2017 22:23:10 +0000 Subject: [PATCH] - Added Qt58.patch to fix build with Qt 5.8 OBS-URL: https://build.opensuse.org/package/show/Publishing/lyx?expand=0&rev=131 --- Qt58.patch | 19 +++++++++++++++++++ lyx.changes | 5 +++++ lyx.spec | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 Qt58.patch diff --git a/Qt58.patch b/Qt58.patch new file mode 100644 index 0000000..357e14f --- /dev/null +++ b/Qt58.patch @@ -0,0 +1,19 @@ +Index: src/frontends/qt4/GuiViewSource.cpp +=================================================================== +--- src/frontends/qt4/GuiViewSource.cpp (revision adb00dbcf803298651609c0afac02bc4cb3db003) ++++ src/frontends/qt4/GuiViewSource.cpp (revision 9f2fcf20a51af2b63161a3290cf5fb02474b42b9) +@@ -224,12 +224,7 @@ + // position-to-row is unavailable + // we jump to the first modification +- const QChar * oc = old.constData(); +- const QChar * nc = qcontent.constData(); ++ int length = min(old.length(), qcontent.length()); + int pos = 0; +- while (*oc != '\0' && *nc != '\0' && *oc == *nc) { +- ++oc; +- ++nc; +- ++pos; +- } ++ for (; pos < length && old.at(pos) == qcontent.at(pos); ++pos) {} + QTextCursor c = QTextCursor(viewSourceTV->document()); + //get some space below the cursor diff --git a/lyx.changes b/lyx.changes index 700d48a..3432e9d 100644 --- a/lyx.changes +++ b/lyx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 1 22:22:17 UTC 2017 - cornelis@solcon.nl + +- Added Qt58.patch to fix build with Qt 5.8 + ------------------------------------------------------------------- Sun Feb 19 15:06:07 UTC 2017 - mailaender@opensuse.org diff --git a/lyx.spec b/lyx.spec index ee138a1..7049c0d 100644 --- a/lyx.spec +++ b/lyx.spec @@ -27,6 +27,8 @@ Source: ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/lyx-%{version}.tar.xz Source1: lyxrc.dist Source2: lyx.keyring Source3: ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/lyx-%{version}.tar.xz.sig +# PATCH-FIX-UPSTREAM: fix for build with Qt 5.8 +Patch0: Qt58.patch #!BuildIgnore: lyx BuildRequires: autoconf BuildRequires: automake @@ -128,6 +130,7 @@ document under "Help" on the menubar. %prep %setup -q +%patch0 %build #./autogen.sh