From 086779b73096f71ee1c2f67e4b5da9665ab0a82894f4da9962f2514ca13c9210 Mon Sep 17 00:00:00 2001 From: Cor Blom Date: Thu, 18 Jan 2024 22:12:06 +0000 Subject: [PATCH] Accepting request 1139815 from home:cornelisbb:branches:Publishing - Update to 2.4.0 RC 1 - Build Tumbleweed with Qt 6 - Swith buildsystem to cmake - Remove no longer necessary patches: * correct-shebang.patch * remove_python_shebang.patch OBS-URL: https://build.opensuse.org/request/show/1139815 OBS-URL: https://build.opensuse.org/package/show/Publishing/lyx?expand=0&rev=223 --- correct-shebang.patch | 54 ------------ lyx-2.3.7-1.tar.xz | 3 - lyx-2.3.7-1.tar.xz.sig | Bin 310 -> 0 bytes lyx-2.4.0~RC1.tar.xz | 3 + lyx-2.4.0~RC1.tar.xz.sig | Bin 0 -> 310 bytes lyx.changes | 10 +++ lyx.spec | 74 ++++++++-------- remove_python_shebang.patch | 169 ------------------------------------ 8 files changed, 52 insertions(+), 261 deletions(-) delete mode 100644 correct-shebang.patch delete mode 100644 lyx-2.3.7-1.tar.xz delete mode 100644 lyx-2.3.7-1.tar.xz.sig create mode 100644 lyx-2.4.0~RC1.tar.xz create mode 100644 lyx-2.4.0~RC1.tar.xz.sig delete mode 100644 remove_python_shebang.patch diff --git a/correct-shebang.patch b/correct-shebang.patch deleted file mode 100644 index 981fdc0..0000000 --- a/correct-shebang.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -ur a/lib/configure.py b/lib/configure.py ---- a/lib/configure.py 2020-01-12 19:58:38.000000000 +0100 -+++ b/lib/configure.py 2020-01-12 22:41:55.304000000 +0100 -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/python3 - # -*- coding: utf-8 -*- - # - # file configure.py -diff -ur a/lib/lyx2lyx/lyx2lyx b/lib/lyx2lyx/lyx2lyx ---- a/lib/lyx2lyx/lyx2lyx 2020-01-12 19:58:39.000000000 +0100 -+++ b/lib/lyx2lyx/lyx2lyx 2020-01-12 22:42:52.768000000 +0100 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - # -*- coding: utf-8 -*- - # Copyright (C) 2002-2011 The LyX Team - # Copyright (C) 2002-2007 José Matos -diff -ur a/lib/lyx2lyx/profiling.py b/lib/lyx2lyx/profiling.py ---- a/lib/lyx2lyx/profiling.py 2020-01-12 19:58:39.000000000 +0100 -+++ b/lib/lyx2lyx/profiling.py 2020-01-12 22:43:08.376000000 +0100 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - # -*- coding: utf-8 -*- - # Copyright (C) 2004 José Matos - # -diff -ur a/lib/scripts/listerrors b/lib/scripts/listerrors ---- a/lib/scripts/listerrors 2020-01-12 19:58:39.000000000 +0100 -+++ b/lib/scripts/listerrors 2020-01-12 22:44:09.728000000 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - - # file listerrors - # This file is part of LyX, the document processor. -diff -ur a/lib/scripts/svg2pdftex.py b/lib/scripts/svg2pdftex.py ---- a/lib/scripts/svg2pdftex.py 2020-01-12 19:58:39.000000000 +0100 -+++ b/lib/scripts/svg2pdftex.py 2020-01-12 22:44:42.588000000 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file svg2pdftex.py -diff -ur a/lib/scripts/svg2pstex.py b/lib/scripts/svg2pstex.py ---- a/lib/scripts/svg2pstex.py 2020-01-12 19:58:39.000000000 +0100 -+++ b/lib/scripts/svg2pstex.py 2020-01-12 22:45:07.324000000 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file svg2pstex.py diff --git a/lyx-2.3.7-1.tar.xz b/lyx-2.3.7-1.tar.xz deleted file mode 100644 index 72725b3..0000000 --- a/lyx-2.3.7-1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39be8864fb86b34e88310e70fb80e5e9e296601f0856cf161aa094171718d8ed -size 16158416 diff --git a/lyx-2.3.7-1.tar.xz.sig b/lyx-2.3.7-1.tar.xz.sig deleted file mode 100644 index 1bb26014beb16e72d983b05899fef27c4e4910662d80e73e08a3c0a842d7a4db..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S}0W$;u0SEvc79j-wW=9)CRhI{^+Syg!dPMri`#3EH0%NinFaQb(5Z-!3 z`p5e?ErNXq{TAodwNSYSxn5SpVFd3!|E(^OcxE`9uvK0?&F3Ni5X9SS0<@xgcO;+>=JLNBUQZ9pjSSRLV^g?j-t5<^OnY zEzN{X`pRE=5O+^wG&0;w^+2Gclixp0!moz~%t7NM&zj-46;mz^$XLDDS`*ACAR>Nx zf`>L_WD^+SugWD7{#&rqvL^3s6O`2?Tyi9PqDgEF2f$+>l*Ter^S^j@>LG>xPY4i( z($K>p2aX|}&0?24n9mLTzXw@(b;eOW6?#a#>0fw9ziq@@aH Iy?7HwzJ`sD00000 diff --git a/lyx-2.4.0~RC1.tar.xz b/lyx-2.4.0~RC1.tar.xz new file mode 100644 index 0000000..08b9b69 --- /dev/null +++ b/lyx-2.4.0~RC1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17659a696dbcb9d5a82ab0ca396b9fe16abbaff00ff5702dad50dfe5ed465eda +size 17738520 diff --git a/lyx-2.4.0~RC1.tar.xz.sig b/lyx-2.4.0~RC1.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..3010c1478dd3f23516b755479c4a26f93cad15368b9edd663088575b5124b193 GIT binary patch literal 310 zcmV-60m=S}0W$;u0SEvc79j-wW=9)CRhI{^+Syg!dPMri`#3EH0%f2Wk^l+`5Z-!3 z`p5e?E$mST|70Y2-}FPjr`2z(jrCgDtml1xy{sc) zZedRe#{y#&Z00)Ikkn{cy$UcSDY?U!LFb|oN8xWO~ zb8w9QR<0XM^h1iAzT4wo=C@T=^quMRnp!%B(etHFa_lrIEb&6Gpc7)DjFTh-DO7Wl zg2(6G!oNoYRbTmnB<e#p|s%`787hkFH+)q+DEF_~tzO?wyN&QT~ZGnvdScG)vz)3B;xEe>_v%Z Ip{ur2g0hF2RsaA1 literal 0 HcmV?d00001 diff --git a/lyx.changes b/lyx.changes index 6e816c1..2506962 100644 --- a/lyx.changes +++ b/lyx.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jan 18 21:58:03 UTC 2024 - Cor Blom + +- Update to 2.4.0 RC 1 +- Build Tumbleweed with Qt 6 +- Swith buildsystem to cmake +- Remove no longer necessary patches: + * correct-shebang.patch + * remove_python_shebang.patch + ------------------------------------------------------------------- Wed Dec 13 14:45:07 UTC 2023 - Giacomo Comes diff --git a/lyx.spec b/lyx.spec index ad0387c..6595d2e 100644 --- a/lyx.spec +++ b/lyx.spec @@ -1,7 +1,7 @@ # # spec file for package lyx # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,29 +16,24 @@ # +%if 0%{?suse_version} >= 1600 +%bcond_without qt6 +%endif + Name: lyx -Version: 2.3.7 +Version: 2.4.0~RC1 Release: 0 Summary: WYSIWYM (What You See Is What You Mean) document processor License: GPL-2.0-or-later Group: Productivity/Publishing/TeX/Frontends URL: http://www.lyx.org/ -Source: ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/lyx-%{version}-1.tar.xz +Source: http://ftp.lyx.org/pub/lyx/devel/lyx-2.4/lyx-%{version}.tar.xz Source1: lyxrc.dist Source2: lyx.keyring -Source3: ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/lyx-%{version}-1.tar.xz.sig +Source3: http://ftp.lyx.org/pub/lyx/devel/lyx-2.4/lyx-%{version}.tar.xz.sig Source4: README.SUSE -# PATCH-FIX-UPSTREAM to satisfy rpmlint - use #! /usr/bin/python as shebang -# See: https://www.lyx.org/trac/changeset/cac27076ead10684270520670adc6bd004793361/lyxgit -# Upstream also made change to python3 in master. Because 2.3.1 is compatible with both -# python2 and 3 we follow and switch to python3 -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 -BuildRequires: autoconf -BuildRequires: automake BuildRequires: bc +BuildRequires: cmake BuildRequires: enchant-devel BuildRequires: fdupes BuildRequires: file-devel @@ -51,6 +46,19 @@ BuildRequires: pkgconfig BuildRequires: python3 BuildRequires: update-desktop-files BuildRequires: zlib-devel +%if %{with qt6} +BuildRequires: qt6-gui-private-devel +BuildRequires: cmake(Qt6Concurrent) +BuildRequires: cmake(Qt6Core) +BuildRequires: cmake(Qt6Core5Compat) +BuildRequires: cmake(Qt6DBus) +BuildRequires: cmake(Qt6Gui) +BuildRequires: cmake(Qt6PrintSupport) +BuildRequires: cmake(Qt6Sql) +BuildRequires: cmake(Qt6Svg) +BuildRequires: cmake(Qt6Widgets) +BuildRequires: cmake(Qt6Xml) +%else BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) @@ -61,6 +69,7 @@ BuildRequires: pkgconfig(Qt5Sql) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Xml) +%endif #!BuildIgnore: lyx Requires: %{name}-fonts Requires: ImageMagick @@ -144,27 +153,25 @@ A collection of Math symbol fonts for LyX. %autosetup -p1 %build -#hack for tumbleweed and for 2.3.7 only: fix build failure -#to be removed with lyx 2.4 as it already contains the fix -%if 0%{?suse_version} > 1500 -if [[ %{version} = 2.3.7 ]]; then - sed -i '/static.*zoom_/s@static @@' src/frontends/qt4/GuiView.h -fi -%endif -#./autogen.sh TEXMF=%{_datadir}/texmf -%configure \ - --enable-build-type=rel \ - --enable-qt5 \ - --without-included-boost \ - --without-aspell \ - --with-hunspell \ - --with-enchant -make %{?_smp_mflags} +%cmake -DLYX_INSTALL=ON \ + -DLYX_REQUIRE_SPELLCHECK=ON \ + -DLYX_ENCHANT=ON \ + -DLYX_HUNSPELL=ON \ + -DLYX_RELEASE=ON \ +%if %{with qt6} + -DLYX_USE_QT=QT6 \ +%else + -DLYX_USE_QT=QT5 \ +%endif + -DLYX_PACKAGE_SUFFIX=OFF \ + -DLYX_PROGRAM_SUFFIX=OFF +%cmake_build %install TEXMF=%{_datadir}/texmf -make install DESTDIR=%{buildroot} TEXMF=$TEXMF +%cmake_install TEXMF=$TEXMF +%python3_fix_shebang # some defaults install -p -m644 -D %{SOURCE1} %{buildroot}%{_datadir}/lyx/lyxrc.dist @@ -190,8 +197,6 @@ install -m 0755 -d %{buildroot}%{_fontsdir}/lyx mv %{buildroot}%{_datadir}/lyx/fonts/*.ttf %{buildroot}%{_fontsdir}/lyx/ rm -rf %{buildroot}%{_datadir}/lyx/fonts -install -p -D -m 0644 lib/appdata.xml %{buildroot}%{_datadir}/appdata/lyx.appdata.xml - install -p -D -m 0644 lib/scripts/bash_completion %{buildroot}%{_datadir}/bash-completion/completions/lyx %suse_update_desktop_file lyx Office WordProcessor @@ -217,7 +222,7 @@ install -p -D -m 0644 lib/scripts/bash_completion %{buildroot}%{_datadir}/bash-c %{_bindir}/lyxclient %{_bindir}/tex2lyx %{_datadir}/applications/lyx.desktop -%{_datadir}/appdata/lyx.appdata.xml +%{_datadir}/metainfo/org.lyx.LyX.metainfo.xml %{_datadir}/icons/hicolor/*/apps/%{name}.* %dir %{_datadir}/texmf %dir %{_datadir}/texmf/tex @@ -233,6 +238,5 @@ install -p -D -m 0644 lib/scripts/bash_completion %{buildroot}%{_datadir}/bash-c %dir %{_fontsdir}/lyx %{_fontsdir}/lyx/*.ttf %doc lib/fonts/BaKoMaFontLicense.txt -%doc lib/fonts/ReadmeBaKoMa4LyX.txt %changelog diff --git a/remove_python_shebang.patch b/remove_python_shebang.patch deleted file mode 100644 index 8c170c4..0000000 --- a/remove_python_shebang.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- a/development/cmake/doc/ReplaceValues.py -+++ b/development/cmake/doc/ReplaceValues.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - - from __future__ import print_function - ---- a/development/cmake/po/cat.py -+++ b/development/cmake/po/cat.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - - from __future__ import print_function - ---- a/development/cmake/po/unix2dos.py -+++ b/development/cmake/po/unix2dos.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - - ############### - import sys ---- a/development/tools/gen_lfuns.py -+++ b/development/tools/gen_lfuns.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file gen_lfuns.py ---- a/development/tools/generate_symbols_images.py -+++ b/development/tools/generate_symbols_images.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file generate_symbols_images.py ---- a/development/tools/generate_symbols_list.py -+++ b/development/tools/generate_symbols_list.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file generate_symbols_images.py ---- a/development/tools/mergepo.py -+++ b/development/tools/mergepo.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file mergepo.py ---- a/development/tools/unicodesymbols.py -+++ b/development/tools/unicodesymbols.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file unciodesymbols.py ---- a/development/tools/updatedocs.py -+++ b/development/tools/updatedocs.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file updatedocs.py ---- a/development/tools/updatelayouts.py -+++ b/development/tools/updatelayouts.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file updatelayouts.py ---- a/po/Makefile.in -+++ b/po/Makefile.in -@@ -14,7 +14,7 @@ VERSION = 2.3.5-1 - PACKAGE_BUGREPORT = lyx-devel@lists.lyx.org - - # ADDED FOR LYX --PYTHON = /usr/bin/python -+PYTHON = /usr/bin/python3 - - SED = /usr/bin/sed - SHELL = /bin/sh ---- a/po/lyx_pot.py -+++ b/po/lyx_pot.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file lyx_pot.py ---- a/src/tex2lyx/test/runtests.py -+++ b/src/tex2lyx/test/runtests.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - # file src/tex2lyx/test/runtests.py ---- a/development/autotests/keytest.py -+++ b/development/autotests/keytest.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # This script generates hundreds of random keypresses per second, - # and sends them to the lyx window ---- a/development/keystest/cache-bisect.py -+++ b/development/keystest/cache-bisect.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - - import os ---- a/development/keystest/keytest.py -+++ b/development/keystest/keytest.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - # This script generates hundreds of random keypresses per second, - # and sends them to the lyx window ---- a/development/keystest/make_screenshot_html.py -+++ b/development/keystest/make_screenshot_html.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - import re - import os ---- a/lib/examples/listerrors.lyx -+++ b/lib/examples/listerrors.lyx -@@ -347,7 +347,7 @@ status open - - \begin_layout Plain Layout - --#!/usr/bin/python -tt -+#!/usr/bin/python3 -tt - \end_layout - - \begin_layout Plain Layout ---- a/lib/scripts/gnuplot2pdf.py -+++ b/lib/scripts/gnuplot2pdf.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - - from subprocess import Popen, PIPE - from sys import argv, stderr, exit ---- a/src/graphics/GraphicsConverter.cpp -+++ b/src/graphics/GraphicsConverter.cpp -@@ -287,7 +287,7 @@ static void build_script(string const & - 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"