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
This commit is contained in:
Cor Blom 2024-01-18 22:12:06 +00:00 committed by Git OBS Bridge
parent dc6dc822c5
commit 086779b730
8 changed files with 52 additions and 261 deletions

View File

@ -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 <jamatos@lyx.org>
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 <jamatos@lyx.org>
#
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:39be8864fb86b34e88310e70fb80e5e9e296601f0856cf161aa094171718d8ed
size 16158416

Binary file not shown.

3
lyx-2.4.0~RC1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:17659a696dbcb9d5a82ab0ca396b9fe16abbaff00ff5702dad50dfe5ed465eda
size 17738520

BIN
lyx-2.4.0~RC1.tar.xz.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jan 18 21:58:03 UTC 2024 - Cor Blom <cornelis@solcon.nl>
- 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 <gcomes.obs@gmail.com>

View File

@ -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

View File

@ -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"