From d0bd1348f32a5d42209cc8a47662f8377ae6b667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?= Date: Mon, 6 Feb 2023 15:39:54 -0300 Subject: [PATCH] Force the usage of the shared version of libzstd. libzstd provides both flavors, and the current code favorites the static version over the shared one. In this patch we **force** the usage of the shared library, as should be the case in Debian. --- debian/changelog | 1 + debian/patches/force_shared_libzstd.patch | 28 +++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+) create mode 100644 debian/patches/force_shared_libzstd.patch diff --git a/debian/changelog b/debian/changelog index ae4f13a..3e64657 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ qt6-base (6.4.2+dfsg-2) UNRELEASED; urgency=medium [ Lisandro Damián Nicanor Pérez Meyer ] * Update symbols files with buildd's logs. + * Force the usage of the shared version of libzstd (Closes: #1030546). -- Debian Qt/KDE Maintainers Mon, 06 Feb 2023 14:35:39 -0300 diff --git a/debian/patches/force_shared_libzstd.patch b/debian/patches/force_shared_libzstd.patch new file mode 100644 index 0000000..7c1ac1f --- /dev/null +++ b/debian/patches/force_shared_libzstd.patch @@ -0,0 +1,28 @@ +Description: force the usage of the shared libzstd library. + The library provides both versions, and the original code prefers the static + version over the shared, while on Debian it should always use the shared + version. +Author: Lisandro Damián Nicanor Pérez Meyer +Bug: https://bugreports.qt.io/browse/QTBUG-110978 +Forwarded: not-needed + +--- + cmake/FindWrapZSTD.cmake | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +--- a/cmake/FindWrapZSTD.cmake ++++ b/cmake/FindWrapZSTD.cmake +@@ -25,11 +25,8 @@ include(FindPackageHandleStandardArgs) + if(TARGET zstd::libzstd_static OR TARGET zstd::libzstd_shared) + find_package_handle_standard_args(WrapZSTD + REQUIRED_VARS zstd_VERSION VERSION_VAR zstd_VERSION) +- if(TARGET zstd::libzstd_static) +- set(zstdtargetsuffix "_static") +- else() +- set(zstdtargetsuffix "_shared") +- endif() ++ set(zstdtargetsuffix "_shared") ++ + if(NOT TARGET WrapZSTD::WrapZSTD) + add_library(WrapZSTD::WrapZSTD INTERFACE IMPORTED) + set_target_properties(WrapZSTD::WrapZSTD PROPERTIES diff --git a/debian/patches/series b/debian/patches/series index 2d27cc9..d946c1d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,6 +6,7 @@ upstream_Add-M68k-detection.patch remove_privacy_breaches.diff build_path_embedded_qtbuildinternalsextra_cmake.patch cross.patch +force_shared_libzstd.patch # Don't use yield on CPUs that might not support it armel-noyield.patch