From 2753c0f73336efc57bc64b1ebe1251f45db6e840 Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Sun, 29 Mar 2020 01:12:36 +1000 Subject: [PATCH 1/3] Requires libcxxabi-devel to build with clang, also adjust build flags for clang to use libc++ as stdlib --- libreoffice.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libreoffice.spec b/libreoffice.spec index 3a84464..bad9017 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -110,6 +110,7 @@ BuildRequires: ccache BuildRequires: clang BuildRequires: clang-devel BuildRequires: libcxx-devel +BuildRequires: libcxxabi-devel %endif BuildRequires: desktop-file-utils BuildRequires: doxygen >= 1.8.4 @@ -2961,11 +2962,13 @@ export CCACHE_DIR=%{ccachedir} %endif %if %{with clang} -%global optflags $(echo %optflags | sed -e 's/-fvar-tracking-assignments//g' -e 's/-frecord-gcc-switches//g' -e 's/-ffat-lto-objects//g') +%global optflags $(echo %{optflags} | sed -e 's/-fvar-tracking-assignments//g' -e 's/-frecord-gcc-switches//g' -e 's/-ffat-lto-objects//g') +%global optflags %{optflags} -stdlib=libc++ -nostdinc++ -I/include/c++/v1 +%global ldflags %{ldflags} -stdlib=libc++ -nostdinc++ -lc++ -lc++abi %clang_gcc_wrapper export CPP="" %else -%global optflags %optflags -Wstrict-aliasing=0 +%global optflags %{optflags} -Wstrict-aliasing=0 export ARCH_FLAGS="%{optflags} -fno-omit-frame-pointer -fno-strict-aliasing" export ARCH_FLAGS_CC="%{optflags} -fno-omit-frame-pointer -fno-strict-aliasing" export ARCH_FLAGS_CXX="%{optflags} -fno-omit-frame-pointer -fno-strict-aliasing -fpermissive -fvisibility-inlines-hidden" From a7b3d2dd63d76bb8390e7d1bbba759d0d07912e1 Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Sun, 29 Mar 2020 18:22:54 +1000 Subject: [PATCH 2/3] Update KDE4-detection patch to show KDE instead of Qt dialogs in KDE4 --- libreoffice-6.3.5.2-kde4-detection.patch | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/libreoffice-6.3.5.2-kde4-detection.patch b/libreoffice-6.3.5.2-kde4-detection.patch index 6918038..85da606 100644 --- a/libreoffice-6.3.5.2-kde4-detection.patch +++ b/libreoffice-6.3.5.2-kde4-detection.patch @@ -168,3 +168,36 @@ diff -urN libreoffice-6.3.5.2/vcl/unx/generic/desktopdetect/desktopdetector.cxx XCloseDisplay( pDisplay ); +diff -urN libreoffice-6.3.5.2/vcl/unx/gtk3_kde5/kde5_filepicker.cxx libreoffice-6.3.5.2-patched/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +--- libreoffice-6.3.5.2/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 2020-02-11 22:14:56.000000000 +1000 ++++ libreoffice-6.3.5.2-patched/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 2020-03-29 18:18:56.397261034 +1000 +@@ -248,7 +248,7 @@ + // dialog there in order not to lose the custom controls and insert the custom + // widget in the layout returned by QFileDialog::layout() + // (which returns nullptr for native file dialogs) +- if (Application::GetDesktopEnvironment() == "KDE5") ++ if (Application::GetDesktopEnvironment() == "KDE5" || Application::GetDesktopEnvironment() == "KDE4") + { + qApp->installEventFilter(this); + } +diff -urN libreoffice-6.3.5.2/vcl/unx/kde5/KDE5SalInstance.cxx libreoffice-6.3.5.2-patched/vcl/unx/kde5/KDE5SalInstance.cxx +--- libreoffice-6.3.5.2/vcl/unx/kde5/KDE5SalInstance.cxx 2020-02-11 22:14:56.000000000 +1000 ++++ libreoffice-6.3.5.2-patched/vcl/unx/kde5/KDE5SalInstance.cxx 2020-03-29 18:16:44.371267490 +1000 +@@ -52,7 +52,7 @@ + + bool KDE5SalInstance::hasNativeFileSelection() const + { +- if (Application::GetDesktopEnvironment() == "KDE5") ++ if (Application::GetDesktopEnvironment() == "KDE5" || Application::GetDesktopEnvironment() == "KDE4") + return true; + return Qt5Instance::hasNativeFileSelection(); + } +@@ -73,7 +73,7 @@ + // In order to insert custom controls, KDE5FilePicker currently relies on KFileWidget + // being used in the native file picker, which is only the case for KDE Plasma. + // Therefore, return the plain qt5 one in order to not lose custom controls. +- if (Application::GetDesktopEnvironment() == "KDE5") ++ if (Application::GetDesktopEnvironment() == "KDE5" || Application::GetDesktopEnvironment() == "KDE4") + return new KDE5FilePicker(context, eMode); + return Qt5Instance::createPicker(context, eMode); + } From 05ac125bc35a13535e8dba9d40c37fb90e982a95 Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Sun, 29 Mar 2020 18:23:24 +1000 Subject: [PATCH 3/3] Bump release --- libreoffice.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libreoffice.spec b/libreoffice.spec index bad9017..33bd0ed 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -49,7 +49,7 @@ Summary: Office suite Name: libreoffice Epoch: 1 Version: 6.3.5 -Release: 2 +Release: 5 License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic Group: Office Url: http://www.libreoffice.org