From 998da2497058f55118b2ec10539aee51a2846912baba2c567345bc9314405930 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 18 Jun 2024 04:51:09 +0000 Subject: [PATCH 1/2] Accepting request 1181364 from home:mschreiner:branches:LibreOffice:Factory - Add QT6 support to Tumbleweed/SLFO. Remaining builds still enable either QT5 (Leap or SLE 15-SP4 and newer) or GTK3 (all of them). OBS-URL: https://build.opensuse.org/request/show/1181364 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1167 --- libreoffice.changes | 7 ++++ libreoffice.spec | 81 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 81 insertions(+), 7 deletions(-) diff --git a/libreoffice.changes b/libreoffice.changes index e4e3f52..8507684 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jun 17 19:22:02 UTC 2024 - Martin Schreiner + +- Add QT6 support to Tumbleweed/SLFO. + Remaining builds still enable either QT5 (Leap or SLE 15-SP4 and + newer) or GTK3 (all of them). + ------------------------------------------------------------------- Thu Jun 6 15:20:45 UTC 2024 - Fridrich Strba diff --git a/libreoffice.spec b/libreoffice.spec index c2dc005..b684bc4 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -26,12 +26,26 @@ %else %bcond_with lto %endif -# Enable the kde integration on openSUSE and SLE15-SP4 or newer -%if 0%{?is_opensuse} || 0%{?sle_version} >= 150400 + +# Enable KDE integration with QT6 support on Tumbleweed/SLFO +%if 0%{?suse_version} >= 1600 +%bcond_without qt6 %bcond_without kdeintegration +%bcond_with qt5 %else +# Enable the KDE integration with QT5 support on openSUSE Leap and SLE15-SP4 or newer +%if 0%{?is_opensuse} || 0%{?sle_version} >= 150400 +%bcond_without qt5 +%bcond_without kdeintegration +%bcond_with qt6 +%else +# Disable KDE integration and QT support %bcond_with kdeintegration +%bcond_with qt5 +%bcond_with qt6 %endif +%endif + # Use system gpgme and curl on TW and SLE15-SP4 or newer %if 0%{?suse_version} > 1500 %bcond_without system_gpgme @@ -265,8 +279,11 @@ Requires: libreoffice-l10n-en = %{version} Requires: python3 Recommends: dejavu-fonts Recommends: google-carlito-fonts -%if %{with kdeintegration} -Recommends: (libreoffice-qt5 if lxqt-session) +%if %{with kdeintegration} && %{with qt5} +Recommends: libreoffice-qt5 +%endif +%if %{with kdeintegration} && %{with qt6} +Recommends: libreoffice-qt6 %endif Provides: %{name}-draw-extensions = %{version} Obsoletes: %{name}-draw-extensions < %{version} @@ -346,7 +363,7 @@ Provides: bundled(libgpg-error) = 1.47 %if %{with firebird} BuildRequires: pkgconfig(fbclient) %endif -%if %{with kdeintegration} +%if %{with kdeintegration} && %{with qt5} BuildRequires: libqt5-qtbase-common-devel BuildRequires: cmake(KF5Config) BuildRequires: cmake(KF5CoreAddons) @@ -365,6 +382,23 @@ Obsoletes: %{name}-kde4 < %{version} Provides: %{name}-qt5 = %{version} Obsoletes: %{name}-qt5 < %{version} %endif +%if %{with kdeintegration} && %{with qt6} +BuildRequires: qt6-base-common-devel +BuildRequires: qt6-base-devel +BuildRequires: cmake(KF6Config) +BuildRequires: cmake(KF6CoreAddons) +BuildRequires: cmake(KF6I18n) +BuildRequires: cmake(KF6KIO) +BuildRequires: cmake(KF6WindowSystem) +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Gui) +BuildRequires: pkgconfig(Qt6Network) +BuildRequires: pkgconfig(Qt6Widgets) +BuildRequires: pkgconfig(xcb-icccm) +%else +Provides: %{name}-qt6 = %{version} +Obsoletes: %{name}-qt6 < %{version} +%endif %description LibreOffice is a comprehensive office package featuring a word @@ -384,6 +418,7 @@ Some optional features are provided by extra packages, for example: - libreoffice-mailmerge - libreoffice-filters - libreoffice-qt5 +- libreoffice-qt6 - libreoffice-gnome Non-English localizations are provided by extra packages as well, for @@ -647,6 +682,16 @@ Obsoletes: %{name}-kde4 < %{version} %description qt5 This package contains Qt5/KDE Frameworks interface rendering options for LibreOffice. +%package qt6 +Summary: Qt6/KDE Frameworks interface for LibreOffice +Group: Productivity/Office/Suite +Requires: %{name} = %{version} +Supplements: (libreoffice and plasma6-workspace) +Obsoletes: %{name}-qt5 <= %{version} + +%description qt6 +This package contains Qt6/KDE Frameworks interface rendering options for LibreOffice. + %package sdk Summary: LibreOffice SDK Group: Documentation/HTML @@ -1110,6 +1155,11 @@ google_api_key="AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q" google_default_client_id="4139804441.apps.googleusercontent.com" google_default_client_secret="KDTRKEZk2jwT_7CDpcmMA--P" +%if %{with qt6} +export qt6_libexec_dirs="%{_libexecdir}/qt6" +export QT6DIR="%{_libdir}/qt6" +%endif + # do not run configure in autogen but use macro later export NOCONFIGURE=yes ./autogen.sh @@ -1139,13 +1189,24 @@ export NOCONFIGURE=yes --disable-online-update \ --enable-gstreamer-1-0 \ --enable-gtk3 \ -%if %{with kdeintegration} +%if %{with kdeintegration} && %{with qt6} + --enable-kf6 \ + --enable-qt6 \ + --disable-kf5 \ + --disable-qt5 \ +%else +%if %{with kdeintegration} && %{with qt5} --enable-gtk3-kde5 \ --enable-kf5 \ --enable-qt5 \ + --disable-kf6 \ + --disable-qt6 \ %else --disable-kf5 \ --disable-qt5 \ + --disable-kf6 \ + --disable-qt6 \ +%endif %endif --enable-introspection \ --with-doxygen \ @@ -1618,7 +1679,7 @@ exit 0 %files gtk3 %{_libdir}/libreoffice/program/libvclplug_gtk3lo.so -%if %{with kdeintegration} +%if %{with kdeintegration} && %{with qt5} %files -f file-lists/kde4_list.txt qt5 %{_libdir}/libreoffice/program/libkf5be1lo.so %{_libdir}/libreoffice/program/libvclplug_kf5lo.so @@ -1627,6 +1688,12 @@ exit 0 %{_libdir}/libreoffice/program/lo_kde5filepicker %endif +%if %{with kdeintegration} && %{with qt6} +%files -f file-lists/kde4_list.txt qt6 +%{_libdir}/libreoffice/program/libvclplug_kf6lo.so +%{_libdir}/libreoffice/program/libvclplug_qt6lo.so +%endif + %files -f file-lists/officebean_list.txt officebean %files -f file-lists/sdk_list.txt sdk From e0cc60c1e7bdfda04529f1e3baee9896aa2a59660eeea2415b99cf50d422124f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 18 Jun 2024 04:53:05 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1168 --- libreoffice.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libreoffice.spec b/libreoffice.spec index b684bc4..e956158 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -686,7 +686,11 @@ This package contains Qt5/KDE Frameworks interface rendering options for LibreOf Summary: Qt6/KDE Frameworks interface for LibreOffice Group: Productivity/Office/Suite Requires: %{name} = %{version} +%if 0%{suse_version} < 1500 +Supplements: packageand(libreoffice:plasma6-workspace) +%else Supplements: (libreoffice and plasma6-workspace) +%endif Obsoletes: %{name}-qt5 <= %{version} %description qt6