changeset 6892:fe46a604d08b

Qt6 QtImageFormats: Remove patch. * src/qt6-qtimageformats-1-fixes.patch: Remove patch that hard-coded libraries. This causes issues if the used packages don't actually depend on the hard-coded libraries and they don't even exist. This also avoids overlinking. * src/qt6-qtimageformats.mk: Use separate build tree. * dist-files.mk: Remove deleted patch from list.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 01 Oct 2023 14:42:11 +0200
parents 5451bbbaf0d3
children caa19ef0ff93
files dist-files.mk src/qt6-qtimageformats-1-fixes.patch src/qt6-qtimageformats.mk
diffstat 3 files changed, 6 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sun Oct 01 14:37:57 2023 +0200
+++ b/dist-files.mk	Sun Oct 01 14:42:11 2023 +0200
@@ -654,7 +654,6 @@
   qt6-qt5compat.mk \
   qt6-qtbase-1-fixes.patch \
   qt6-qtbase.mk \
-  qt6-qtimageformats-1-fixes.patch \
   qt6-qtimageformats.mk \
   qt6-qtsvg.mk \
   qt6-qttranslations.mk \
--- a/src/qt6-qtimageformats-1-fixes.patch	Sun Oct 01 14:37:57 2023 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-This file is part of MXE. See LICENSE.md for licensing information.
-
-Contains ad hoc patches for cross building.
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Sun, 13 Feb 2022 17:30:59 +0100
-Subject: [PATCH 1/2] try to fix linking to libtiff's transitive dependencies
-
-
-diff --git a/src/imageformats/configure.cmake b/src/imageformats/configure.cmake
-index 1111111..2222222 100644
---- a/src/imageformats/configure.cmake
-+++ b/src/imageformats/configure.cmake
-@@ -19,6 +19,8 @@ set_property(CACHE INPUT_webp PROPERTY STRINGS undefined no qt system)
- 
- qt_find_package(WrapJasper PROVIDED_TARGETS WrapJasper::WrapJasper MODULE_NAME imageformats QMAKE_LIB jasper)
- qt_find_package(TIFF PROVIDED_TARGETS TIFF::TIFF MODULE_NAME imageformats QMAKE_LIB tiff)
-+### <sigh>
-+target_link_libraries(TIFF::TIFF INTERFACE -ltiff -lwebp -lsharpyuv -lzstd -llzma -ljpeg -lz)
- # Threads::Threads might be brought in via a top-level CMakeLists.txt find_package dependency
- # in which case if the system WebpConfig.cmake depends Threads, it shouldn't try to promote it to
- # global to avoid a 'global promotion of a target in a different subdirectory' error.
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Thu, 6 Apr 2023 17:27:28 +0200
-Subject: [PATCH 2/2] explicit -lsharpyuv for -lwebp
-
-
-diff --git a/cmake/FindWrapWebP.cmake b/cmake/FindWrapWebP.cmake
-index 1111111..2222222 100644
---- a/cmake/FindWrapWebP.cmake
-+++ b/cmake/FindWrapWebP.cmake
-@@ -51,7 +51,7 @@ mark_as_advanced(WebP_INCLUDE_DIR WebP_LIBRARY WebP_demux_INCLUDE_DIR WebP_demux
- if(WrapWebP_FOUND)
-     set(WebP_FOUND ON)
-     add_library(WrapWebP::WrapWebP INTERFACE IMPORTED)
--    target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY} ${WebP_mux_LIBRARY})
-+    target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY} ${WebP_mux_LIBRARY} -lsharpyuv)
-     target_include_directories(WrapWebP::WrapWebP
-                                INTERFACE ${WebP_INCLUDE_DIR} ${WebP_demux_INCLUDE_DIR} ${WebP_mux_INCLUDE_DIR})
- endif()
--- a/src/qt6-qtimageformats.mk	Sun Oct 01 14:37:57 2023 +0200
+++ b/src/qt6-qtimageformats.mk	Sun Oct 01 14:42:11 2023 +0200
@@ -15,7 +15,10 @@
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)' && '$(HOST_PREFIX)/qt6/bin/qt-cmake-private' -DCMAKE_INSTALL_PREFIX='$(HOST_PREFIX)/qt6'
-    cmake --build $(1) -j '$(JOBS)'
-    cmake --install $(1)
+  mkdir '$(1).build'
+  cd '$(1)' && '$(HOST_PREFIX)/qt6/bin/qt-cmake-private' \
+    -S '$(1)' -B '$(1).build' \
+    -DCMAKE_INSTALL_PREFIX='$(HOST_PREFIX)/qt6'
+  cmake --build $(1).build -j '$(JOBS)'
+  cmake --install $(1).build
 endef