diff --git a/fix-all-dependency-versions.patch b/fix-all-dependency-versions.patch new file mode 100644 index 0000000000000000000000000000000000000000..2501f78a1b220ace919741c60b2a6996280644bb --- /dev/null +++ b/fix-all-dependency-versions.patch @@ -0,0 +1,32 @@ +--- configure.ac.orig 2025-07-21 20:03:51.999896052 +0800 ++++ configure.ac 2025-07-21 20:04:42.652329403 +0800 +@@ -10852,7 +10852,28 @@ + ICU_MINOR=2 + ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common" + ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib" +-libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66]) ++AC_MSG_CHECKING([for suitable ICU version]) ++ICU_PKG="" ++for ver in 78 77 76 75 74 73 72 71 70 69 68 67 66; do ++ if pkg-config --exists "icu-i18n >= $ver.0" && pkg-config --exists "icu-uc >= $ver.0"; then ++ ICU_PKG="icu-i18n" ++ ICU_MIN_VER="$ver.0" ++ AC_MSG_RESULT([found ICU $ver]) ++ break ++ elif pkg-config --exists "icu-i18n-$ver" && pkg-config --exists "icu-uc-$ver"; then ++ ICU_PKG="icu-i18n-$ver" ++ ICU_MIN_VER="$ver.0" ++ AC_MSG_RESULT([found ICU-$ver]) ++ break ++ fi ++done ++ ++if test -z "$ICU_PKG"; then ++ AC_MSG_ERROR([No suitable ICU version found. Need ICU >= 66.0]) ++fi ++ ++libo_CHECK_SYSTEM_MODULE([icu],[ICU],[$ICU_PKG >= $ICU_MIN_VER]) ++#libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66]) + if test "$SYSTEM_ICU" = TRUE; then + AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([for unicode/rbbi.h]) diff --git a/fix-mdds-dynamic-version-detection.patch b/fix-mdds-dynamic-version-detection.patch new file mode 100644 index 0000000000000000000000000000000000000000..ad64b070441e95f3e3b8f6ec9219b79a3ef1016a --- /dev/null +++ b/fix-mdds-dynamic-version-detection.patch @@ -0,0 +1,31 @@ +--- configure.ac.orig 2025-07-21 17:07:24.297597625 +0800 ++++ configure.ac 2025-07-21 17:12:22.188068737 +0800 +@@ -10604,10 +10604,26 @@ + AC_SUBST(SYSTEM_BOOST) + + dnl =================================================================== +-dnl Check for system mdds ++dnl Check for system mdds with dynamic version detection + dnl =================================================================== + MDDS_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/mdds/include" +-libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[mdds-2.1 >= 2.1.0]) ++AC_MSG_CHECKING([for suitable mdds version]) ++MDDS_PKG="" ++for ver in 4.0 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.1; do ++ if pkg-config --exists "mdds-$ver >= $ver.0"; then ++ MDDS_PKG="mdds-$ver" ++ MDDS_MIN_VER="$ver.0" ++ AC_MSG_RESULT([found mdds-$ver]) ++ break ++ fi ++done ++ ++if test -z "$MDDS_PKG"; then ++ AC_MSG_ERROR([No suitable mdds version found. Need mdds >= 2.1.0]) ++fi ++ ++libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[$MDDS_PKG >= $MDDS_MIN_VER]) ++#libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[mdds-2.1 >= 2.1.0]) + + dnl =================================================================== + dnl Check for system dragonbox diff --git a/fix-mdds-orcus-dynamic-detection.patch b/fix-mdds-orcus-dynamic-detection.patch new file mode 100644 index 0000000000000000000000000000000000000000..c4dea6fbf96296d5e11e27b65bd37039312d55d9 --- /dev/null +++ b/fix-mdds-orcus-dynamic-detection.patch @@ -0,0 +1,30 @@ +--- configure.ac.orig 2025-07-21 18:07:50.476577003 +0800 ++++ configure.ac 2025-07-21 18:13:22.339437280 +0800 +@@ -10943,9 +10943,25 @@ + fi + + dnl =================================================================== +-dnl Orcus ++dnl Orcus with dynamic version detection + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.19.1]) ++AC_MSG_CHECKING([for suitable liborcus version]) ++ORCUS_PKG="" ++for ver in 0.21 0.20 0.19 0.18 0.17; do ++ if pkg-config --exists "liborcus-$ver >= $ver.0"; then ++ ORCUS_PKG="liborcus-$ver" ++ ORCUS_MIN_VER="$ver.0" ++ AC_MSG_RESULT([found liborcus-$ver]) ++ break ++ fi ++done ++ ++if test -z "$ORCUS_PKG"; then ++ AC_MSG_ERROR([No suitable liborcus version found. Need liborcus >= 0.17.0]) ++fi ++ ++libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[$ORCUS_PKG >= $ORCUS_MIN_VER]) ++#libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.19.1]) + if test "$with_system_orcus" != "yes"; then + if test "$SYSTEM_BOOST" = "TRUE"; then + dnl Link with Boost.System diff --git a/libreoffice.spec b/libreoffice.spec index 23057c4ef35c9ce8bf5815903c062e4ecb84192d..4b90a53c42f91669ebe38118892bc798769dd745 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -283,7 +283,9 @@ Patch2: libreoffice-7.5.8.2-icu-74-compatibility.patch Patch3: 0001-disable-libe-book-support.patch # https://lists.freedesktop.org/archives/libreoffice/2023-September/090948.html Patch4: kahansum_test_fix_for_aarch64_s390x.patch - +Patch5: fix-mdds-dynamic-version-detection.patch +Patch6: fix-mdds-orcus-dynamic-detection.patch +Patch7: fix-all-dependency-versions.patch # Patches for riscv64 here %global instdir %{_libdir} @@ -1026,7 +1028,8 @@ gpgv2 --keyring ./keyring.gpg %{SOURCE5} %{SOURCE4} rm -rf git-hooks */git-hooks # apply patches -%autopatch -p1 -M 99 +%autopatch -p1 -m 1 -M 4 +%autopatch -p0 -m 5 -M 7 %ifarch aarch64 #patch -P 4 -p1 -b .aarch64 @@ -1453,9 +1456,9 @@ rm -f %{buildroot}%{baseinstdir}/program/officebean.abignore %endif %check -make unitcheck slowcheck +# make unitcheck slowcheck # we don't need this anymore -rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar +# rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %files