commit:     39f7beea6f0956479fb82b3d774ca0777cd0aae7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 10:22:57 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 28 16:28:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39f7beea

app-office/libreoffice: Fix build with KF6

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../libreoffice/files/libreoffice-24.2-kf6-buildfix.patch   | 13 +++++++++++++
 app-office/libreoffice/libreoffice-24.2.0.3.ebuild          |  7 +++++++
 2 files changed, 20 insertions(+)

diff --git a/app-office/libreoffice/files/libreoffice-24.2-kf6-buildfix.patch 
b/app-office/libreoffice/files/libreoffice-24.2-kf6-buildfix.patch
new file mode 100644
index 000000000000..7fefb4a51f7b
--- /dev/null
+++ b/app-office/libreoffice/files/libreoffice-24.2-kf6-buildfix.patch
@@ -0,0 +1,13 @@
+Source: 
https://raw.githubusercontent.com/OpenMandrivaAssociation/libreoffice/master/libreoffice-24.2-kf6-buildfix.patch
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -13465,7 +13465,7 @@ then
+         AC_MSG_ERROR([KF6 libraries not found.  Please specify the root of 
your KF6 installation by exporting KF6DIR before running "configure".])
+     fi
+ 
+-    KF6_CFLAGS="-I$kf6_incdir -I$kf6_incdir/KCoreAddons -I$kf6_incdir/KI18n 
-I$kf6_incdir/KConfigCore -I$kf6_incdir/KWindowSystem -I$kf6_incdir/KIO 
-I$kf6_incdir/KIOCore -I$kf6_incdir/KIOWidgets -I$kf6_incdir/KIOFileWidgets 
-I$qt6_incdir -I$qt6_incdir/QtCore -I$qt6_incdir/QtGui -I$qt6_incdir/QtWidgets 
-I$qt6_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT 
-DQT_NO_VERSION_TAGGING"
++    KF6_CFLAGS="-I$kf6_incdir -I$kf6_incdir/KCoreAddons -I$kf6_incdir/KI18n 
-I$kf6_incdir/KConfig -I$kf6_incdir/KConfigCore -I$kf6_incdir/KWindowSystem 
-I$kf6_incdir/KIO -I$kf6_incdir/KIOCore -I$kf6_incdir/KIOWidgets 
-I$kf6_incdir/KIOFileWidgets -I$qt6_incdir -I$qt6_incdir/QtCore 
-I$qt6_incdir/QtGui -I$qt6_incdir/QtWidgets -I$qt6_incdir/QtNetwork 
-DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+     KF6_LIBS="-L$kf6_libdir -lKF6CoreAddons -lKF6I18n -lKF6ConfigCore 
-lKF6WindowSystem -lKF6KIOCore -lKF6KIOWidgets -lKF6KIOFileWidgets 
-L$qt6_libdir -lQt6Core -lQt6Gui -lQt6Widgets -lQt6Network"
+     KF6_CFLAGS=$(printf '%s' "$KF6_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+ 

diff --git a/app-office/libreoffice/libreoffice-24.2.0.3.ebuild 
b/app-office/libreoffice/libreoffice-24.2.0.3.ebuild
index 27202c7f0efc..4c68aafe99c5 100644
--- a/app-office/libreoffice/libreoffice-24.2.0.3.ebuild
+++ b/app-office/libreoffice/libreoffice-24.2.0.3.ebuild
@@ -312,6 +312,13 @@ PATCHES=(
        "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
        "${FILESDIR}/${PN}-6.1-nomancompress.patch"
        "${FILESDIR}/${PN}-24.2-qtdetect.patch"
+
+       # not yet upstream, sourced from Mandriva
+       "${FILESDIR}/${PN}-24.2-kf6-buildfix.patch"
+
+       # maybe upstreamable
+       "${FILESDIR}/${PN}-7.5.8.2-icu-74-compatibility.patch"
+
 )
 
 S="${WORKDIR}/${PN}-${MY_PV}"

Reply via email to