From 78cc831caf0948061e493a45680f7216d91ee979025b92f919f693ed03242b8e Mon Sep 17 00:00:00 2001 From: Cor Blom Date: Sat, 14 May 2022 14:29:53 +0000 Subject: [PATCH] - Add lyx-2.3.6-fix-gcc12.patch to fix build with gcc-12 - Use autosetup OBS-URL: https://build.opensuse.org/package/show/Publishing/lyx?expand=0&rev=213 --- lyx-2.3.6-fix-gcc12.patch | 24 ++++++++++++++++++++++++ lyx.changes | 6 ++++++ lyx.spec | 8 ++++---- 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 lyx-2.3.6-fix-gcc12.patch diff --git a/lyx-2.3.6-fix-gcc12.patch b/lyx-2.3.6-fix-gcc12.patch new file mode 100644 index 0000000..5c819a3 --- /dev/null +++ b/lyx-2.3.6-fix-gcc12.patch @@ -0,0 +1,24 @@ +diff -ur lyx-2.3.6.1.orig/src/insets/InsetListings.cpp lyx-2.3.6.1/src/insets/InsetListings.cpp +--- lyx-2.3.6.1.orig/src/insets/InsetListings.cpp 2020-12-29 16:50:45.000000000 +0000 ++++ lyx-2.3.6.1/src/insets/InsetListings.cpp 2022-02-03 16:22:37.983196716 +0000 +@@ -44,6 +44,7 @@ + + #include "support/regex.h" + ++#include + #include + + using namespace std; +Only in lyx-2.3.6.1/src/insets: InsetListings.cpp~ +diff -ur lyx-2.3.6.1.orig/src/lyxfind.cpp lyx-2.3.6.1/src/lyxfind.cpp +--- lyx-2.3.6.1.orig/src/lyxfind.cpp 2020-12-29 16:50:45.000000000 +0000 ++++ lyx-2.3.6.1/src/lyxfind.cpp 2022-02-03 16:01:54.997152176 +0000 +@@ -52,6 +52,7 @@ + #include "support/lstrings.h" + + #include "support/regex.h" ++#include + + using namespace std; + using namespace lyx::support; +Only in lyx-2.3.6.1/src: lyxfind.cpp~ diff --git a/lyx.changes b/lyx.changes index 0cc7adb..64f3a58 100644 --- a/lyx.changes +++ b/lyx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat May 14 14:28:50 UTC 2022 - Cor Blom + +- Add lyx-2.3.6-fix-gcc12.patch to fix build with gcc-12 +- Use autosetup + ------------------------------------------------------------------- Mon May 31 19:30:43 UTC 2021 - Christophe Giboudeaux diff --git a/lyx.spec b/lyx.spec index 27dd1d7..966a5c7 100644 --- a/lyx.spec +++ b/lyx.spec @@ -1,7 +1,7 @@ # # spec file for package lyx # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,6 +36,8 @@ Patch0: correct-shebang.patch # PATCH-FIX-UPSTREAM remove_python_shebang.patch mcepl@suse.com # remove all instances of python2 shebang lines Patch1: remove_python_shebang.patch +# Fix build with gcc-12 +Patch2: lyx-2.3.6-fix-gcc12.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bc @@ -141,9 +143,7 @@ BuildArch: noarch A collection of Math symbol fonts for LyX. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -q %build #./autogen.sh