From ef16555bb250edde2a7b0922a9d774fa7eddb15a Mon Sep 17 00:00:00 2001 From: José Matos Date: Nov 29 2020 12:26:18 +0000 Subject: Apply upstream patch to solve #1773650 --- diff --git a/.gitignore b/.gitignore index c31f356..756d9f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ clog -/lyx-2.3.5.2.tar.xz +/lyx-2.3.6.tar.xz diff --git a/lyx-2.3.2-python3.patch b/lyx-2.3.2-python3.patch deleted file mode 100644 index acc414a..0000000 --- a/lyx-2.3.2-python3.patch +++ /dev/null @@ -1,192 +0,0 @@ -diff -ur lyx-2.3.2.orig/development/cmake/doc/ReplaceValues.py lyx-2.3.2/development/cmake/doc/ReplaceValues.py ---- lyx-2.3.2.orig/development/cmake/doc/ReplaceValues.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/cmake/doc/ReplaceValues.py 2018-12-11 11:15:32.527483449 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - - from __future__ import print_function - -diff -ur lyx-2.3.2.orig/development/cmake/po/cat.py lyx-2.3.2/development/cmake/po/cat.py ---- lyx-2.3.2.orig/development/cmake/po/cat.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/cmake/po/cat.py 2018-12-11 11:15:32.526483446 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - - from __future__ import print_function - -diff -ur lyx-2.3.2.orig/development/cmake/po/unix2dos.py lyx-2.3.2/development/cmake/po/unix2dos.py ---- lyx-2.3.2.orig/development/cmake/po/unix2dos.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/cmake/po/unix2dos.py 2018-12-11 11:15:32.526483446 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - - ############### - import sys -diff -ur lyx-2.3.2.orig/development/tools/generate_symbols_images.py lyx-2.3.2/development/tools/generate_symbols_images.py ---- lyx-2.3.2.orig/development/tools/generate_symbols_images.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/generate_symbols_images.py 2018-12-11 11:15:32.530483457 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file generate_symbols_images.py -diff -ur lyx-2.3.2.orig/development/tools/generate_symbols_list.py lyx-2.3.2/development/tools/generate_symbols_list.py ---- lyx-2.3.2.orig/development/tools/generate_symbols_list.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/generate_symbols_list.py 2018-12-11 11:15:32.528483451 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file generate_symbols_images.py -diff -ur lyx-2.3.2.orig/development/tools/gen_lfuns.py lyx-2.3.2/development/tools/gen_lfuns.py ---- lyx-2.3.2.orig/development/tools/gen_lfuns.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/gen_lfuns.py 2018-12-11 11:15:32.529483454 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file gen_lfuns.py -diff -ur lyx-2.3.2.orig/development/tools/mergepo.py lyx-2.3.2/development/tools/mergepo.py ---- lyx-2.3.2.orig/development/tools/mergepo.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/mergepo.py 2018-12-11 11:15:32.527483449 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file mergepo.py -diff -ur lyx-2.3.2.orig/development/tools/unicodesymbols.py lyx-2.3.2/development/tools/unicodesymbols.py ---- lyx-2.3.2.orig/development/tools/unicodesymbols.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/unicodesymbols.py 2018-12-11 11:15:32.529483454 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file unciodesymbols.py -diff -ur lyx-2.3.2.orig/development/tools/updatedocs.py lyx-2.3.2/development/tools/updatedocs.py ---- lyx-2.3.2.orig/development/tools/updatedocs.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/updatedocs.py 2018-12-11 11:15:32.529483454 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file updatedocs.py -diff -ur lyx-2.3.2.orig/development/tools/updatelayouts.py lyx-2.3.2/development/tools/updatelayouts.py ---- lyx-2.3.2.orig/development/tools/updatelayouts.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/development/tools/updatelayouts.py 2018-12-11 11:15:32.527483449 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file updatelayouts.py -diff -ur lyx-2.3.2.orig/lib/configure.py lyx-2.3.2/lib/configure.py ---- lyx-2.3.2.orig/lib/configure.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/configure.py 2018-12-11 11:15:32.536483473 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # - # file configure.py -diff -ur lyx-2.3.2.orig/lib/lyx2lyx/lyx2lyx lyx-2.3.2/lib/lyx2lyx/lyx2lyx ---- lyx-2.3.2.orig/lib/lyx2lyx/lyx2lyx 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/lyx2lyx/lyx2lyx 2018-12-11 11:15:32.537483475 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # Copyright (C) 2002-2011 The LyX Team - # Copyright (C) 2002-2007 José Matos -diff -ur lyx-2.3.2.orig/lib/lyx2lyx/profiling.py lyx-2.3.2/lib/lyx2lyx/profiling.py ---- lyx-2.3.2.orig/lib/lyx2lyx/profiling.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/lyx2lyx/profiling.py 2018-12-11 11:15:32.538483478 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # Copyright (C) 2004 José Matos - # -diff -ur lyx-2.3.2.orig/lib/scripts/gnuplot2pdf.py lyx-2.3.2/lib/scripts/gnuplot2pdf.py ---- lyx-2.3.2.orig/lib/scripts/gnuplot2pdf.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/scripts/gnuplot2pdf.py 2018-12-11 11:15:01.032400237 +0000 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - - from subprocess import Popen, PIPE - from sys import argv, stderr, exit -diff -ur lyx-2.3.2.orig/lib/scripts/listerrors lyx-2.3.2/lib/scripts/listerrors ---- lyx-2.3.2.orig/lib/scripts/listerrors 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/scripts/listerrors 2018-12-11 12:55:27.649147444 +0000 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - - # file listerrors - # This file is part of LyX, the document processor. -diff -ur lyx-2.3.2.orig/lib/scripts/svg2pdftex.py lyx-2.3.2/lib/scripts/svg2pdftex.py ---- lyx-2.3.2.orig/lib/scripts/svg2pdftex.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/scripts/svg2pdftex.py 2018-12-11 12:57:35.817461831 +0000 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file svg2pdftex.py -diff -ur lyx-2.3.2.orig/lib/scripts/svg2pstex.py lyx-2.3.2/lib/scripts/svg2pstex.py ---- lyx-2.3.2.orig/lib/scripts/svg2pstex.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/lib/scripts/svg2pstex.py 2018-12-11 12:57:08.881395754 +0000 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file svg2pstex.py -diff -ur lyx-2.3.2.orig/po/lyx_pot.py lyx-2.3.2/po/lyx_pot.py ---- lyx-2.3.2.orig/po/lyx_pot.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/po/lyx_pot.py 2018-12-11 12:54:59.674078823 +0000 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file lyx_pot.py -diff -ur lyx-2.3.2.orig/po/postats.py lyx-2.3.2/po/postats.py ---- lyx-2.3.2.orig/po/postats.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/po/postats.py 2018-12-11 11:15:32.532483462 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # Copyright (C) 2007 Michael Gerz - # Copyright (C) 2007 José Matos -diff -ur lyx-2.3.2.orig/src/graphics/GraphicsConverter.cpp lyx-2.3.2/src/graphics/GraphicsConverter.cpp ---- lyx-2.3.2.orig/src/graphics/GraphicsConverter.cpp 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/src/graphics/GraphicsConverter.cpp 2018-12-11 12:56:36.345315949 +0000 -@@ -287,7 +287,7 @@ - LYXERR(Debug::GRAPHICS, "build_script ... "); - typedef Graph::EdgePath EdgePath; - -- script << "#!/usr/bin/env python\n" -+ script << "#!/usr/bin/python3\n" - "# -*- coding: utf-8 -*-\n" - "import os, shutil, sys\n\n" - "def unlinkNoThrow(file):\n" -diff -ur lyx-2.3.2.orig/src/tex2lyx/test/runtests.py lyx-2.3.2/src/tex2lyx/test/runtests.py ---- lyx-2.3.2.orig/src/tex2lyx/test/runtests.py 2018-12-09 20:04:52.000000000 +0000 -+++ lyx-2.3.2/src/tex2lyx/test/runtests.py 2018-12-11 11:15:32.532483462 +0000 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file src/tex2lyx/test/runtests.py diff --git a/lyx-2.3.6-python3.patch b/lyx-2.3.6-python3.patch new file mode 100644 index 0000000..4dddd11 --- /dev/null +++ b/lyx-2.3.6-python3.patch @@ -0,0 +1,183 @@ +diff -ur lyx-2.3.2.orig/development/cmake/doc/ReplaceValues.py lyx-2.3.2/development/cmake/doc/ReplaceValues.py +--- lyx-2.3.2.orig/development/cmake/doc/ReplaceValues.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/cmake/doc/ReplaceValues.py 2018-12-11 11:15:32.527483449 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + + from __future__ import print_function + +diff -ur lyx-2.3.2.orig/development/cmake/po/cat.py lyx-2.3.2/development/cmake/po/cat.py +--- lyx-2.3.2.orig/development/cmake/po/cat.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/cmake/po/cat.py 2018-12-11 11:15:32.526483446 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + + from __future__ import print_function + +diff -ur lyx-2.3.2.orig/development/cmake/po/unix2dos.py lyx-2.3.2/development/cmake/po/unix2dos.py +--- lyx-2.3.2.orig/development/cmake/po/unix2dos.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/cmake/po/unix2dos.py 2018-12-11 11:15:32.526483446 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + + ############### + import sys +diff -ur lyx-2.3.2.orig/development/tools/generate_symbols_images.py lyx-2.3.2/development/tools/generate_symbols_images.py +--- lyx-2.3.2.orig/development/tools/generate_symbols_images.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/generate_symbols_images.py 2018-12-11 11:15:32.530483457 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file generate_symbols_images.py +diff -ur lyx-2.3.2.orig/development/tools/generate_symbols_list.py lyx-2.3.2/development/tools/generate_symbols_list.py +--- lyx-2.3.2.orig/development/tools/generate_symbols_list.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/generate_symbols_list.py 2018-12-11 11:15:32.528483451 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file generate_symbols_images.py +diff -ur lyx-2.3.2.orig/development/tools/gen_lfuns.py lyx-2.3.2/development/tools/gen_lfuns.py +--- lyx-2.3.2.orig/development/tools/gen_lfuns.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/gen_lfuns.py 2018-12-11 11:15:32.529483454 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file gen_lfuns.py +diff -ur lyx-2.3.2.orig/development/tools/mergepo.py lyx-2.3.2/development/tools/mergepo.py +--- lyx-2.3.2.orig/development/tools/mergepo.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/mergepo.py 2018-12-11 11:15:32.527483449 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file mergepo.py +diff -ur lyx-2.3.2.orig/development/tools/unicodesymbols.py lyx-2.3.2/development/tools/unicodesymbols.py +--- lyx-2.3.2.orig/development/tools/unicodesymbols.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/unicodesymbols.py 2018-12-11 11:15:32.529483454 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file unciodesymbols.py +diff -ur lyx-2.3.2.orig/development/tools/updatedocs.py lyx-2.3.2/development/tools/updatedocs.py +--- lyx-2.3.2.orig/development/tools/updatedocs.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/updatedocs.py 2018-12-11 11:15:32.529483454 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file updatedocs.py +diff -ur lyx-2.3.2.orig/development/tools/updatelayouts.py lyx-2.3.2/development/tools/updatelayouts.py +--- lyx-2.3.2.orig/development/tools/updatelayouts.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/development/tools/updatelayouts.py 2018-12-11 11:15:32.527483449 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file updatelayouts.py +diff -ur lyx-2.3.2.orig/lib/configure.py lyx-2.3.2/lib/configure.py +--- lyx-2.3.2.orig/lib/configure.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/configure.py 2018-12-11 11:15:32.536483473 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + # + # file configure.py +diff -ur lyx-2.3.2.orig/lib/lyx2lyx/lyx2lyx lyx-2.3.2/lib/lyx2lyx/lyx2lyx +--- lyx-2.3.2.orig/lib/lyx2lyx/lyx2lyx 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/lyx2lyx/lyx2lyx 2018-12-11 11:15:32.537483475 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + # Copyright (C) 2002-2011 The LyX Team + # Copyright (C) 2002-2007 José Matos +diff -ur lyx-2.3.2.orig/lib/lyx2lyx/profiling.py lyx-2.3.2/lib/lyx2lyx/profiling.py +--- lyx-2.3.2.orig/lib/lyx2lyx/profiling.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/lyx2lyx/profiling.py 2018-12-11 11:15:32.538483478 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + # Copyright (C) 2004 José Matos + # +diff -ur lyx-2.3.2.orig/lib/scripts/gnuplot2pdf.py lyx-2.3.2/lib/scripts/gnuplot2pdf.py +--- lyx-2.3.2.orig/lib/scripts/gnuplot2pdf.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/scripts/gnuplot2pdf.py 2018-12-11 11:15:01.032400237 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + from subprocess import Popen, PIPE + from sys import argv, stderr, exit +diff -ur lyx-2.3.2.orig/lib/scripts/listerrors lyx-2.3.2/lib/scripts/listerrors +--- lyx-2.3.2.orig/lib/scripts/listerrors 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/scripts/listerrors 2018-12-11 12:55:27.649147444 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # file listerrors + # This file is part of LyX, the document processor. +diff -ur lyx-2.3.2.orig/lib/scripts/svg2pdftex.py lyx-2.3.2/lib/scripts/svg2pdftex.py +--- lyx-2.3.2.orig/lib/scripts/svg2pdftex.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/scripts/svg2pdftex.py 2018-12-11 12:57:35.817461831 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file svg2pdftex.py +diff -ur lyx-2.3.2.orig/lib/scripts/svg2pstex.py lyx-2.3.2/lib/scripts/svg2pstex.py +--- lyx-2.3.2.orig/lib/scripts/svg2pstex.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/lib/scripts/svg2pstex.py 2018-12-11 12:57:08.881395754 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file svg2pstex.py +diff -ur lyx-2.3.2.orig/po/lyx_pot.py lyx-2.3.2/po/lyx_pot.py +--- lyx-2.3.2.orig/po/lyx_pot.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/po/lyx_pot.py 2018-12-11 12:54:59.674078823 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file lyx_pot.py +diff -ur lyx-2.3.2.orig/src/graphics/GraphicsConverter.cpp lyx-2.3.2/src/graphics/GraphicsConverter.cpp +--- lyx-2.3.2.orig/src/graphics/GraphicsConverter.cpp 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/src/graphics/GraphicsConverter.cpp 2018-12-11 12:56:36.345315949 +0000 +@@ -287,7 +287,7 @@ + LYXERR(Debug::GRAPHICS, "build_script ... "); + typedef Graph::EdgePath EdgePath; + +- script << "#!/usr/bin/env python\n" ++ script << "#!/usr/bin/python3\n" + "# -*- coding: utf-8 -*-\n" + "import os, shutil, sys\n\n" + "def unlinkNoThrow(file):\n" +diff -ur lyx-2.3.2.orig/src/tex2lyx/test/runtests.py lyx-2.3.2/src/tex2lyx/test/runtests.py +--- lyx-2.3.2.orig/src/tex2lyx/test/runtests.py 2018-12-09 20:04:52.000000000 +0000 ++++ lyx-2.3.2/src/tex2lyx/test/runtests.py 2018-12-11 11:15:32.532483462 +0000 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file src/tex2lyx/test/runtests.py diff --git a/lyx-2.3.6-wayland.patch b/lyx-2.3.6-wayland.patch new file mode 100644 index 0000000..dd9b177 --- /dev/null +++ b/lyx-2.3.6-wayland.patch @@ -0,0 +1,103 @@ +diff -ur a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp +--- a/src/frontends/qt4/GuiApplication.cpp 2020-11-27 17:21:02.000000000 +0000 ++++ b/src/frontends/qt4/GuiApplication.cpp 2020-11-28 20:26:51.765485771 +0000 +@@ -1111,6 +1111,29 @@ + } + + ++#if QT_VERSION < 0x050000 ++// Emulate platformName() for Qt4 ++ ++// FIXME: when ditching this method, remove all tests ++// platformName() == "qt4x11" ++// in the code ++QString GuiApplication::platformName() const ++{ ++# if defined(Q_WS_X11) ++ // Note that this one does not really exist ++ return "qt4x11"; ++# elif defined(Q_OS_MAC) ++ return "cocoa"; ++# elif defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN) ++ return "windows"; ++# else ++ LYXERR0("Unknown platform!"); ++ return "unknown"; ++# endif ++} ++#endif ++ ++ + double GuiApplication::pixelRatio() const + { + #if QT_VERSION >= 0x050000 +diff -ur a/src/frontends/qt4/GuiApplication.h b/src/frontends/qt4/GuiApplication.h +--- a/src/frontends/qt4/GuiApplication.h 2020-11-27 17:21:02.000000000 +0000 ++++ b/src/frontends/qt4/GuiApplication.h 2020-11-28 20:38:10.637468995 +0000 +@@ -154,6 +154,11 @@ + /// + GuiView & view(int id) const; + ++#if (QT_VERSION < 0x050000) ++ /// Emulate platformName() for Qt4 ++ QString platformName() const; ++#endif ++ + /// Current ratio between physical pixels and device-independent pixels + double pixelRatio() const; + +diff -ur a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp +--- a/src/frontends/qt4/GuiView.cpp 2020-11-27 17:21:02.000000000 +0000 ++++ b/src/frontends/qt4/GuiView.cpp 2020-11-28 20:35:49.592892826 +0000 +@@ -750,12 +750,11 @@ + settings.setValue("devel_mode", devel_mode_); + settings.beginGroup("views"); + settings.beginGroup(QString::number(id_)); +-#if defined(Q_WS_X11) || defined(QPA_XCB) +- settings.setValue("pos", pos()); +- settings.setValue("size", size()); +-#else +- settings.setValue("geometry", saveGeometry()); +-#endif ++ if (guiApp->platformName() == "qt4x11" || guiApp->platformName() == "xcb") { ++ settings.setValue("pos", pos()); ++ settings.setValue("size", size()); ++ } else ++ settings.setValue("geometry", saveGeometry()); + settings.setValue("layout", saveState(0)); + settings.setValue("icon_size", toqstr(d.iconSize(iconSize()))); + } +@@ -795,19 +794,20 @@ + //code below is skipped when when ~/.config/LyX is (re)created + setIconSize(d.iconSize(settings.value(icon_key).toString())); + +-#if defined(Q_WS_X11) || defined(QPA_XCB) +- QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint(); +- QSize size = settings.value("size", QSize(690, 510)).toSize(); +- resize(size); +- move(pos); +-#else +- // Work-around for bug #6034: the window ends up in an undetermined +- // state when trying to restore a maximized window when it is +- // already maximized. +- if (!(windowState() & Qt::WindowMaximized)) +- if (!restoreGeometry(settings.value("geometry").toByteArray())) +- setGeometry(50, 50, 690, 510); +-#endif ++ if (guiApp->platformName() == "qt4x11" || guiApp->platformName() == "xcb") { ++ QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint(); ++ QSize size = settings.value("size", QSize(690, 510)).toSize(); ++ resize(size); ++ move(pos); ++ } else { ++ // Work-around for bug #6034: the window ends up in an undetermined ++ // state when trying to restore a maximized window when it is ++ // already maximized. ++ if (!(windowState() & Qt::WindowMaximized)) ++ if (!restoreGeometry(settings.value("geometry").toByteArray())) ++ setGeometry(50, 50, 690, 510); ++ } ++ + // Make sure layout is correctly oriented. + setLayoutDirection(qApp->layoutDirection()); + diff --git a/lyx.spec b/lyx.spec index 291597b..33e769b 100644 --- a/lyx.spec +++ b/lyx.spec @@ -11,7 +11,7 @@ BuildRequires: fontpackages-devel %global _changelog_trimtime %(date +%s -d "1 year ago") Name: lyx -Version: 2.3.5.2 +Version: 2.3.6 Release: 2%{?dist} Summary: WYSIWYM (What You See Is What You Mean) document processor License: GPLv2+ @@ -24,13 +24,15 @@ Source1: lyxrc.dist Source20: %{fontname}.metainfo.xml ## upstreamable patches -# already in upstream git +# already present in development version +Patch01: lyx-2.3.6-wayland.patch # submitted, but upstream rejected it. we currently agree to disagree. Patch50: lyx-2.3.5-xdg_open.patch -# this should be on soon -Patch51: lyx-2.3.2-python3.patch +# workaround/fix cases of: #!/usr/bin/env python +# https://bugzilla.redhat.com/show_bug.cgi?id=1649919 +Patch51: lyx-2.3.6-python3.patch %if 0%{?autotools} BuildRequires: automake libtool @@ -158,13 +160,7 @@ A collection of Math symbol fonts for %{name}. %prep -%setup -q - -%patch50 -p1 -b .xdg_open - -# workaround/fix cases of: #!/usr/bin/env python -# https://bugzilla.redhat.com/show_bug.cgi?id=1649919 -%patch51 -p1 -b .python3 +%autosetup -p1 %if 0%{?autotools} ./autogen.sh @@ -269,8 +265,14 @@ texhash >& /dev/null %changelog -* Tue Jul 28 2020 Fedora Release Engineering - 2.3.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild +* Sat Nov 28 2020 José Matos - 2.3.6-2 +- Apply upstream patch to solve #1773650 + +* Fri Nov 27 2020 José Matos - 2.3.6-1 +- update to 2.3.6 + +* Thu Jul 2 2020 José Matos - 2.3.5.2-2 +- Add patch to show the application icon in Wayland (rhbz#1822478) (lyx#11847) * Wed Jul 1 2020 José Matos - 2.3.5.2-1 - update to 2.3.5.2 diff --git a/sources b/sources index 576d6d4..53ee7eb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lyx-2.3.5.2.tar.xz) = 90c5459ad0a77568d588e05a360482985988382927583b14914d6a23b788756e957d0237c18b9ab0681dfc2ad7aa34d21e97304e3a74d19ef047c38f692fba03 +SHA512 (lyx-2.3.6.tar.xz) = 48b7969d50f74c5423f324f276e45fa363eb6a7fce150add6f6d1e9e53fda2dfff9731898df017f345e89028876c686193e72c92a87964360195d56903e0c61f