commit:     ceac275be229f4e866cbfe8fbebdc5c518ae919e
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Mon Mar  3 09:08:52 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar  3 11:04:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ceac275b

app-office/libreoffice: split USE=gtk back into gtk3/4

Commit 9c7f26240f9e unified the gtk USE flags, but it seems that was
a bit premature since using only gtk4 still seems to cause many problems.
Revert back to split use flags and enable gtk3 by default while still
allowing gtk4 and qt6.

Closes: https://bugs.gentoo.org/950170
Closes: https://bugs.gentoo.org/950270
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libreoffice/libreoffice-25.2.9999.ebuild       | 28 ++++++++++++++--------
 app-office/libreoffice/metadata.xml                |  2 ++
 2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/app-office/libreoffice/libreoffice-25.2.9999.ebuild 
b/app-office/libreoffice/libreoffice-25.2.9999.ebuild
index cb7e3758977d..4aa0325d3bb9 100644
--- a/app-office/libreoffice/libreoffice-25.2.9999.ebuild
+++ b/app-office/libreoffice/libreoffice-25.2.9999.ebuild
@@ -93,7 +93,7 @@ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 
~amd64-linux"
 LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
 
 IUSE="accessibility base bluetooth +branding clang coinmp +cups custom-cflags 
+dbus debug eds
-googledrive gstreamer gtk kde ldap +mariadb odk pdfimport postgres qt6 test 
valgrind vulkan
+googledrive gstreamer +gtk3 gtk4 kde ldap +mariadb odk pdfimport postgres qt6 
test valgrind vulkan
 $(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}
@@ -194,12 +194,20 @@ COMMON_DEPEND="${PYTHON_DEPS}
                media-libs/gstreamer:1.0
                media-libs/gst-plugins-base:1.0
        )
-       gtk? (
+       gtk3? (
                app-accessibility/at-spi2-core:2
                dev-libs/glib:2
                gnome-base/dconf
                media-libs/mesa[egl(+)]
-               gui-libs/gtk[X]
+               x11-libs/gtk+:3[X]
+               x11-libs/pango
+       )
+       gtk4? (
+               app-accessibility/at-spi2-core:2
+               dev-libs/glib:2
+               gnome-base/dconf
+               media-libs/mesa[egl(+)]
+               gui-libs/gtk:4[X]
                x11-libs/pango
        )
        kde? (
@@ -538,7 +546,6 @@ src_configure() {
                --disable-epm
                --disable-fetch-external
                --disable-firebird-sdbc
-               --disable-gtk3
                --disable-gtk3-kde5
                # Covered by our own toolchain defaults
                --disable-hardening-flags
@@ -583,7 +590,8 @@ src_configure() {
                $(use_enable debug)
                $(use_enable eds evolution2)
                $(use_enable gstreamer gstreamer-1-0)
-               $(use_enable gtk gtk4)
+               $(use_enable gtk3)
+               $(use_enable gtk4)
                $(use_enable kde kf6)
                $(use_enable ldap)
                $(use_enable odk)
@@ -600,7 +608,7 @@ src_configure() {
                $(use_with valgrind)
        )
 
-       if use eds || use gtk ; then
+       if use eds || use gtk3 || use gtk4 ; then
                myeconfargs+=( --enable-dconf --enable-gio )
        else
                myeconfargs+=( --disable-dconf --disable-gio )
@@ -657,10 +665,10 @@ src_install() {
 
        # TODO: still relevant for gtk4?
        # bug #593514
-       #if use gtk3; then
-       #       dosym libreoffice/program/liblibreofficekitgtk.so \
-       #               /usr/$(get_libdir)/liblibreofficekitgtk.so
-       #fi
+       if use gtk3; then
+               dosym libreoffice/program/liblibreofficekitgtk.so \
+                       /usr/$(get_libdir)/liblibreofficekitgtk.so
+       fi
 
        # bash completion aliases
        bashcomp_alias \

diff --git a/app-office/libreoffice/metadata.xml 
b/app-office/libreoffice/metadata.xml
index 45aa15b30230..b2c339091a59 100644
--- a/app-office/libreoffice/metadata.xml
+++ b/app-office/libreoffice/metadata.xml
@@ -14,6 +14,8 @@ version</longdescription>
     <flag name="base">Enable full support for LibreOffice Base databases 
(involves additional bundled libs)</flag>
     <flag name="clang">Use Clang compiler instead of GCC</flag>
     <flag name="coinmp">Use <pkg>sci-libs/coinor-mp</pkg> as alternative 
solver</flag>
+    <flag name="gtk3">Enable support for <pkg>x11-libs/gtk+</pkg>:3</flag>
+    <flag name="gtk4">Enable support for <pkg>gui-libs/gtk</pkg>:4</flag>
     <flag name="googledrive">Enable support for remote files on Google 
Drive</flag>
     <flag name="mariadb">Prefer mariadb connector over mysql connector</flag>
     <flag name="odk">Build the Office Development Kit</flag>

Reply via email to