libreoffice has gtk4 support since some time. Please add it in the ebuilds. gtk4 in IUSE additional dependency: gui-libs/gtk[X] $(use_enable gtk4 gtk4) Since about one year I don't have related build errors with enabled gtk4 (using libreoffice-9999). Should be useable with all libreoffice ebuilds in Gentoo. Next big thing will be --enable-qt6 at least when the kde ebuilds are ready for qt6.
A week ago the qt6 flag was added to 24.2 and 9999 ebuilds. So it would be great to have parity and see the gtk4 flag enabled.
Created attachment 885660 [details, diff] gtk4 patch for libreoffice-9999.ebuild renamed gtk USEflag to gtk3, removed the "+" configure.ac says "introspection" needs gtk3 enabled, so not for gtk4? You can see what vclplugin is used in Help>about Use for example "SAL_USE_VCLPLUGIN=gtk4 lowriter" to start with another. If libreoffice is built without gtk,kde,qt vclplugins then it starts with the "gen" backend for x11. We still need the ICU_74.1.patch for the live ebuild to compile.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c7f26240f9eae60febdf11f58b8915f1bc9aa13 commit 9c7f26240f9eae60febdf11f58b8915f1bc9aa13 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-02-22 22:24:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-02-22 22:24:52 +0000 app-office/libreoffice: USE="gtk3 gtk4" => USE="gtk" We don't want to support older toolkits where unnecessary and the UX isn't ideal for it anyway with how you express user preference (similar to USE=gui vs USE=X etc). Bug: https://bugs.gentoo.org/902031 Signed-off-by: Sam James <sam@gentoo.org> app-office/libreoffice/libreoffice-9999.ebuild | 30 ++++++++++---------------- 1 file changed, 11 insertions(+), 19 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=398d7c9a0098183c0ee5656417f93d8aaace8219 commit 398d7c9a0098183c0ee5656417f93d8aaace8219 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-02-22 20:50:15 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-02-22 22:22:16 +0000 app-office/libreoffice: update 9999 * As for bug #916435, accept defeat (not ideal) and filter -Werror=odr given it's "only" in the Vulkan bits (as in FF). * With regard to bug #902031, go with the suggested USE="gtk3 gtk4" for now but I rather suspect we'll change this in short-order to USE=gtk => gtk4. Thanks to jospezial for rebasing the build system patch and providing the starting diff for 9999. Bug: https://bugs.gentoo.org/902031 Bug: https://bugs.gentoo.org/946921 Closes: https://bugs.gentoo.org/916435 Closes: https://bugs.gentoo.org/942831 Signed-off-by: Sam James <sam@gentoo.org> app-office/libreoffice/Manifest | 4 +- .../files/libreoffice-25.2-unused-qt6network.patch | 45 +++++++++++++++++++++ app-office/libreoffice/libreoffice-9999.ebuild | 46 ++++++++++++++++------ 3 files changed, 81 insertions(+), 14 deletions(-)