[tiff] Fix zstd plus minor changes (#28530)

* Use official zstd config

* Require packages for features

* Test zstd in CI

* Enable libtiffxx on arm

* Update versions

* Assume ZSTD_decompressStream

* Don't put targets into TIFF_LIBRARIES

* [qt5-imageformats] Use libtiff-4.pc

* [zstd] Revise thread lib export

* Mark link libs with LINK_ONLY

* Revert "[zstd] Revise thread lib export"

This reverts commit a99e6378a6.

* [qt5-imageformats] Get all tiff lflags

* [gdk-pixbuf] Use libtiff-4 pc file for msvc

* [qtimageformat] Workaround for QTBUG-95052
This commit is contained in:
Kai Pastor 2022-12-31 10:30:53 +01:00 коммит произвёл GitHub
Родитель 40890304ca
Коммит b93bc1b81e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
16 изменённых файлов: 78 добавлений и 26 удалений

Просмотреть файл

@ -9,6 +9,7 @@ vcpkg_from_gitlab(
PATCHES PATCHES
fix_build_error_windows.patch fix_build_error_windows.patch
loaders-cache.patch loaders-cache.patch
use-libtiff-4-pkgconfig.patch
) )
if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_IS_WINDOWS)

Просмотреть файл

@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index b5280f3..4927ed5 100644
--- a/meson.build
+++ b/meson.build
@@ -333,7 +333,7 @@ tiff_opt = get_option('tiff')
if not tiff_opt.disabled() and not native_windows_loaders
# We currently don't have a fallback subproject, but this handles error
# reporting if tiff_opt is enabled.
- tiff_dep = dependency(is_msvc_like ? 'tiff' : 'libtiff-4', required: tiff_opt)
+ tiff_dep = dependency(false ? 'tiff' : 'libtiff-4', required: tiff_opt)
if tiff_dep.found()
enabled_loaders += 'tiff'

Просмотреть файл

@ -1,7 +1,7 @@
{ {
"name": "gdk-pixbuf", "name": "gdk-pixbuf",
"version": "2.42.9", "version": "2.42.9",
"port-version": 3, "port-version": 4,
"description": "Image loading library.", "description": "Image loading library.",
"homepage": "https://gitlab.gnome.org/GNOME/gdk-pixbuf", "homepage": "https://gitlab.gnome.org/GNOME/gdk-pixbuf",
"license": "LGPL-2.1-or-later", "license": "LGPL-2.1-or-later",

Просмотреть файл

@ -9,8 +9,8 @@ list(APPEND CORE_OPTIONS
-no-mng # must be explicitly disabled to not automatically pick up mng -no-mng # must be explicitly disabled to not automatically pick up mng
-verbose) -verbose)
find_library(TIFF_RELEASE NAMES tiff PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on lzma x_vcpkg_pkgconfig_get_modules(PREFIX tiff MODULES libtiff-4 LIBS)
find_library(TIFF_DEBUG NAMES tiffd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
@ -39,19 +39,15 @@ find_library(WEBPDECODER_DEBUG NAMES webpdecoder PATHS "${CURRENT_INSTALLED_DIR}
# Depends on opengl in default build but might depend on giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows) # Depends on opengl in default build but might depend on giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows)
# which would require extra libraries to be linked e.g. giflib freeglut sdl1 other ones are already linked # which would require extra libraries to be linked e.g. giflib freeglut sdl1 other ones are already linked
#Dependent libraries
find_library(LZMA_RELEASE lzma PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(LZMA_DEBUG lzma PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
if(NOT VCPKG_TARGET_IS_WINDOWS) if(NOT VCPKG_TARGET_IS_WINDOWS)
string(APPEND WEBP_RELEASE " -pthread") string(APPEND WEBP_RELEASE " -pthread")
string(APPEND WEBP_DEBUG " -pthread") string(APPEND WEBP_DEBUG " -pthread")
endif() endif()
set(OPT_REL "TIFF_LIBS=${TIFF_RELEASE} ${LZMA_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}" set(OPT_REL "TIFF_LIBS=${tiff_LIBS_RELEASE}"
"WEBP_LIBS=${WEBPDECODER_RELEASE} ${WEBPDEMUX_RELEASE} ${WEBPMUX_RELEASE} ${WEBP_RELEASE}" "WEBP_LIBS=${WEBPDECODER_RELEASE} ${WEBPDEMUX_RELEASE} ${WEBPMUX_RELEASE} ${WEBP_RELEASE}"
"JASPER_LIBS=${JASPER_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}") # This will still fail if LIBWEBP is installed with all available features due to the missing additional dependencies "JASPER_LIBS=${JASPER_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}") # This will still fail if LIBWEBP is installed with all available features due to the missing additional dependencies
set(OPT_DBG "TIFF_LIBS=${TIFF_DEBUG} ${LZMA_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}" set(OPT_DBG "TIFF_LIBS=${tiff_LIBS_DEBUG}"
"WEBP_LIBS=${WEBPDECODER_DEBUG} ${WEBPDEMUX_DEBUG} ${WEBPMUX_DEBUG} ${WEBP_DEBUG}" "WEBP_LIBS=${WEBPDECODER_DEBUG} ${WEBPDEMUX_DEBUG} ${WEBPMUX_DEBUG} ${WEBP_DEBUG}"
"JASPER_LIBS=${JASPER_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}") "JASPER_LIBS=${JASPER_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}")

Просмотреть файл

@ -1,6 +1,7 @@
{ {
"name": "qt5-imageformats", "name": "qt5-imageformats",
"version": "5.15.7", "version": "5.15.7",
"port-version": 1,
"description": "Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP", "description": "Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP",
"license": null, "license": null,
"dependencies": [ "dependencies": [
@ -10,6 +11,10 @@
"name": "qt5-base", "name": "qt5-base",
"default-features": false "default-features": false
}, },
"tiff" "tiff",
{
"name": "vcpkg-pkgconfig-get-modules",
"host": true
}
] ]
} }

Просмотреть файл

@ -35,6 +35,7 @@ list(APPEND FEATURE_OPTIONS -DINPUT_mng=no) # marked as FIXME
qt_install_submodule(PATCHES ${${PORT}_PATCHES} qt_install_submodule(PATCHES ${${PORT}_PATCHES}
CONFIGURE_OPTIONS CONFIGURE_OPTIONS
${FEATURE_OPTIONS} ${FEATURE_OPTIONS}
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON # Cf. QTBUG-95052
CONFIGURE_OPTIONS_RELEASE CONFIGURE_OPTIONS_RELEASE
CONFIGURE_OPTIONS_DEBUG CONFIGURE_OPTIONS_DEBUG
) )

Просмотреть файл

@ -1,6 +1,7 @@
{ {
"name": "qtimageformats", "name": "qtimageformats",
"version": "6.4.1", "version": "6.4.1",
"port-version": 1,
"description": "Additional Image Format plugins for Qt", "description": "Additional Image Format plugins for Qt",
"homepage": "https://www.qt.io/", "homepage": "https://www.qt.io/",
"license": null, "license": null,

Просмотреть файл

@ -15,11 +15,16 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES FEATURES
cxx cxx cxx cxx
jpeg jpeg jpeg jpeg
jpeg CMAKE_REQUIRE_FIND_PACKAGE_JPEG
lzma lzma lzma lzma
lzma CMAKE_REQUIRE_FIND_PACKAGE_LibLZMA
tools tiff-tools tools tiff-tools
webp webp webp webp
webp CMAKE_REQUIRE_FIND_PACKAGE_WebP
zip zlib zip zlib
zip CMAKE_REQUIRE_FIND_PACKAGE_ZLIB
zstd zstd zstd zstd
zstd CMAKE_REQUIRE_FIND_PACKAGE_ZSTD
) )
vcpkg_cmake_configure( vcpkg_cmake_configure(
@ -35,8 +40,11 @@ vcpkg_cmake_configure(
-Dlerc=OFF -Dlerc=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON
-DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON -DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON
-DZSTD_HAVE_DECOMPRESS_STREAM=ON
OPTIONS_DEBUG OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d # tiff sets "d" for MSVC only. -DCMAKE_DEBUG_POSTFIX=d # tiff sets "d" for MSVC only.
MAYBE_UNUSED_VARIABLES
ZSTD_HAVE_DECOMPRESS_STREAM
) )
vcpkg_cmake_install() vcpkg_cmake_install()
@ -56,6 +64,7 @@ file(REMOVE_RECURSE
) )
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
file(COPY "${SOURCE_PATH}/cmake/FindZSTD.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
if ("tools" IN_LIST FEATURES) if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES vcpkg_copy_tools(TOOL_NAMES

Просмотреть файл

@ -16,32 +16,35 @@ if(TIFF_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
set(z_vcpkg_tiff_libraries "") set(z_vcpkg_tiff_libraries "")
if("@webp@") if("@webp@")
find_package(WebP CONFIG ${z_vcpkg_tiff_find_options}) find_package(WebP CONFIG ${z_vcpkg_tiff_find_options})
list(APPEND z_vcpkg_tiff_link_libraries WebP::WebP) list(APPEND z_vcpkg_tiff_link_libraries "\$<LINK_ONLY:WebP::WebP>")
list(APPEND z_vcpkg_tiff_libraries ${WebP_LIBRARIES}) list(APPEND z_vcpkg_tiff_libraries ${WebP_LIBRARIES})
endif() endif()
if("@lzma@") if("@lzma@")
find_package(LibLZMA ${z_vcpkg_tiff_find_options}) find_package(LibLZMA ${z_vcpkg_tiff_find_options})
list(APPEND z_vcpkg_tiff_link_libraries LibLZMA::LibLZMA) list(APPEND z_vcpkg_tiff_link_libraries "\$<LINK_ONLY:LibLZMA::LibLZMA>")
list(APPEND z_vcpkg_tiff_libraries ${LIBLZMA_LIBRARIES}) list(APPEND z_vcpkg_tiff_libraries ${LIBLZMA_LIBRARIES})
endif() endif()
if("@jpeg@") if("@jpeg@")
find_package(JPEG ${z_vcpkg_tiff_find_options}) find_package(JPEG ${z_vcpkg_tiff_find_options})
list(APPEND z_vcpkg_tiff_link_libraries JPEG::JPEG) list(APPEND z_vcpkg_tiff_link_libraries "\$<LINK_ONLY:JPEG::JPEG>")
list(APPEND z_vcpkg_tiff_libraries ${JPEG_LIBRARIES}) list(APPEND z_vcpkg_tiff_libraries ${JPEG_LIBRARIES})
endif() endif()
if("@zstd@") if("@zstd@")
find_package(ZSTD CONFIG ${z_vcpkg_tiff_find_options}) find_package(zstd CONFIG ${z_vcpkg_tiff_find_options})
if(TARGET zstd::libzstd_shared) if(TARGET zstd::libzstd_shared)
set(z_vcpkg_tiff_zstd zstd::libzstd_shared) set(z_vcpkg_tiff_zstd "\$<LINK_ONLY:zstd::libzstd_shared>")
else() else()
set(z_vcpkg_tiff_zstd zstd::libzstd_static) set(z_vcpkg_tiff_zstd "\$<LINK_ONLY:zstd::libzstd_static>")
endif() endif()
list(APPEND z_vcpkg_tiff_link_libraries ${z_vcpkg_tiff_zstd}) list(APPEND z_vcpkg_tiff_link_libraries ${z_vcpkg_tiff_zstd})
list(APPEND z_vcpkg_tiff_libraries ${z_vcpkg_tiff_zstd}) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
find_package(ZSTD MODULE ${z_vcpkg_tiff_find_options})
list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
list(APPEND z_vcpkg_tiff_libraries ${ZSTD_LIBRARIES})
endif() endif()
if("@zlib@") if("@zlib@")
find_package(ZLIB ${z_vcpkg_tiff_find_options}) find_package(ZLIB ${z_vcpkg_tiff_find_options})
list(APPEND z_vcpkg_tiff_link_libraries ZLIB::ZLIB) list(APPEND z_vcpkg_tiff_link_libraries "\$<LINK_ONLY:ZLIB::ZLIB>")
list(APPEND z_vcpkg_tiff_libraries ${ZLIB_LIBRARIES}) list(APPEND z_vcpkg_tiff_libraries ${ZLIB_LIBRARIES})
endif() endif()
if(UNIX) if(UNIX)

Просмотреть файл

@ -1,6 +1,7 @@
{ {
"name": "tiff", "name": "tiff",
"version": "4.5.0", "version": "4.5.0",
"port-version": 1,
"description": "A library that supports the manipulation of TIFF image files", "description": "A library that supports the manipulation of TIFF image files",
"homepage": "https://libtiff.gitlab.io/libtiff/", "homepage": "https://libtiff.gitlab.io/libtiff/",
"license": null, "license": null,
@ -21,8 +22,7 @@
], ],
"features": { "features": {
"cxx": { "cxx": {
"description": "Build C++ libtiffxx library", "description": "Build C++ libtiffxx library"
"supports": "!arm"
}, },
"jpeg": { "jpeg": {
"description": "Support JPEG compression in TIFF image files", "description": "Support JPEG compression in TIFF image files",

Просмотреть файл

@ -122,14 +122,17 @@
}, },
{ {
"$package": "SQLite3", "$package": "SQLite3",
"name": "sqlite3",
"$since": "3.14", "$since": "3.14",
"name": "sqlite3",
"default-features": false "default-features": false
}, },
{ {
"$package": "TIFF", "$package": "TIFF",
"name": "tiff", "name": "tiff",
"default-features": false "default-features": false,
"features": [
"zstd"
]
}, },
{ {
"$package": "wxWidgets", "$package": "wxWidgets",

Просмотреть файл

@ -2578,7 +2578,7 @@
}, },
"gdk-pixbuf": { "gdk-pixbuf": {
"baseline": "2.42.9", "baseline": "2.42.9",
"port-version": 3 "port-version": 4
}, },
"gemmlowp": { "gemmlowp": {
"baseline": "2021-09-28", "baseline": "2021-09-28",
@ -6174,7 +6174,7 @@
}, },
"qt5-imageformats": { "qt5-imageformats": {
"baseline": "5.15.7", "baseline": "5.15.7",
"port-version": 0 "port-version": 1
}, },
"qt5-location": { "qt5-location": {
"baseline": "5.15.7", "baseline": "5.15.7",
@ -6346,7 +6346,7 @@
}, },
"qtimageformats": { "qtimageformats": {
"baseline": "6.4.1", "baseline": "6.4.1",
"port-version": 0 "port-version": 1
}, },
"qtinterfaceframework": { "qtinterfaceframework": {
"baseline": "6.4.1", "baseline": "6.4.1",
@ -7482,7 +7482,7 @@
}, },
"tiff": { "tiff": {
"baseline": "4.5.0", "baseline": "4.5.0",
"port-version": 0 "port-version": 1
}, },
"tinkerforge": { "tinkerforge": {
"baseline": "2.1.25", "baseline": "2.1.25",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "830adc727c34a71a305d01d1cb77ae16d41e289a",
"version": "2.42.9",
"port-version": 4
},
{ {
"git-tree": "b1a623b67b4de018a0550b7d8cd60a21569972b0", "git-tree": "b1a623b67b4de018a0550b7d8cd60a21569972b0",
"version": "2.42.9", "version": "2.42.9",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "d1d145a3a466d0ace1fc3d79c9c255b239d0ca6e",
"version": "5.15.7",
"port-version": 1
},
{ {
"git-tree": "019d2b693d40b53785d13277801a8e71322509e4", "git-tree": "019d2b693d40b53785d13277801a8e71322509e4",
"version": "5.15.7", "version": "5.15.7",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "a1c2ace68dcaa899f934673aab72d54fe3924f12",
"version": "6.4.1",
"port-version": 1
},
{ {
"git-tree": "a2c32b799e5b3ef2d6f7d43c0d8101aec38d1784", "git-tree": "a2c32b799e5b3ef2d6f7d43c0d8101aec38d1784",
"version": "6.4.1", "version": "6.4.1",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "b4c6d03a0a9be7b7c7b64a41d1a9f4e751e9746f",
"version": "4.5.0",
"port-version": 1
},
{ {
"git-tree": "e1bb817eb3c58fcbe28f9d5217cb1b594493003f", "git-tree": "e1bb817eb3c58fcbe28f9d5217cb1b594493003f",
"version": "4.5.0", "version": "4.5.0",