[sail] Bump to 0.9.10 (#47967)

This commit is contained in:
Dzmitry Baryshau
2025-10-29 00:22:28 +02:00
committed by GitHub
parent 39ded8fd4f
commit 4f448ed180
6 changed files with 167 additions and 93 deletions

13
ports/sail/fix-heif.patch Normal file
View File

@@ -0,0 +1,13 @@
diff --git a/src/sail-codecs/heif/CMakeLists.txt b/src/sail-codecs/heif/CMakeLists.txt
index d9c34f85..87981930 100644
--- a/src/sail-codecs/heif/CMakeLists.txt
+++ b/src/sail-codecs/heif/CMakeLists.txt
@@ -31,7 +31,7 @@ cmake_push_check_state(RESET)
set(TEST_CHROMA "heif_chroma_444")
endif()
- check_c_source_runs(
+ check_c_source_compiles(
"
#include <libheif/heif.h>
int main() {

View File

@@ -1,67 +1,86 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO HappySeaFox/sail
REF "v${VERSION}"
SHA512 755e028b0cb0a2bb3ec97bfbc888a8afbf73923a36da2a0d32c535bd268c8e087404f44f233a6ef186234df108232d9315d71b7efd9abd2f088d988d4360320d
HEAD_REF master
PATCHES
fix-include-directory.patch
)
# Enable selected codecs
set(ONLY_CODECS "")
foreach(CODEC avif bmp gif ico jpeg jpeg2000 jpegxl pcx png psd qoi svg tga tiff wal webp xbm)
if (${CODEC} IN_LIST FEATURES)
list(APPEND ONLY_CODECS ${CODEC})
endif()
endforeach()
list(JOIN ONLY_CODECS "\;" ONLY_CODECS_ESCAPED)
# Enable OpenMP
if ("openmp" IN_LIST FEATURES)
set(SAIL_ENABLE_OPENMP ON)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DSAIL_COMBINE_CODECS=ON
-DSAIL_ENABLE_OPENMP=${SAIL_ENABLE_OPENMP}
-DSAIL_ONLY_CODECS=${ONLY_CODECS_ESCAPED}
-DSAIL_BUILD_APPS=OFF
-DSAIL_BUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
# Remove duplicate files
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share")
# Move cmake configs
vcpkg_cmake_config_fixup(PACKAGE_NAME sail CONFIG_PATH lib/cmake/sail DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcodecs CONFIG_PATH lib/cmake/sailcodecs DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcommon CONFIG_PATH lib/cmake/sailcommon DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailc++ CONFIG_PATH lib/cmake/sailc++ DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailmanip CONFIG_PATH lib/cmake/sailmanip DO_NOT_DELETE_PARENT_CONFIG_PATH)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake"
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
# Fix pkg-config files
vcpkg_fixup_pkgconfig()
# Unused because SAIL_COMBINE_CODECS is ON, removes an absolute path from the output
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sail-common/config.h" "#define SAIL_CODECS_PATH [^\r\n]+[\r\n]*" "" REGEX)
# Handle usage
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO HappySeaFox/sail
REF "v${VERSION}"
SHA512 0e6bd4fb7910eda29e0cd6d96e31ff9a476d5836055e4653d6401ab72209eccd3624b8c1e92b7cd0d22ecdaa8ffde44b155da36da61c99ec0c06e1d388bd1d67
HEAD_REF master
PATCHES
fix-heif.patch
fix-include-directory.patch
)
# Enable selected codecs
set(ONLY_CODECS "")
# List of codecs copy-pased from SAIL
set(HIGHEST_PRIORITY_CODECS gif jpeg png svg webp)
set(HIGH_PRIORITY_CODECS avif ico)
set(MEDIUM_PRIORITY_CODECS heif openexr psd tiff)
set(LOW_PRIORITY_CODECS bmp hdr jpeg2000 jpegxl pnm qoi tga)
set(LOWEST_PRIORITY_CODECS jbig pcx wal xbm xpm xwd)
foreach(CODEC ${HIGHEST_PRIORITY_CODECS} ${HIGH_PRIORITY_CODECS} ${MEDIUM_PRIORITY_CODECS} ${LOW_PRIORITY_CODECS} ${LOWEST_PRIORITY_CODECS})
if (CODEC IN_LIST FEATURES)
list(APPEND ONLY_CODECS "${CODEC}")
endif()
endforeach()
list(JOIN ONLY_CODECS "\;" ONLY_CODECS_ESCAPED)
# Enable OpenMP
if ("openmp" IN_LIST FEATURES)
set(SAIL_ENABLE_OPENMP ON)
endif()
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if (VCPKG_CRT_LINKAGE STREQUAL "dynamic")
set(SAIL_WINDOWS_STATIC_CRT_FLAG "-DSAIL_WINDOWS_STATIC_CRT=OFF")
else()
set(SAIL_WINDOWS_STATIC_CRT_FLAG "-DSAIL_WINDOWS_STATIC_CRT=ON")
endif()
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DSAIL_COMBINE_CODECS=ON
-DSAIL_ENABLE_OPENMP=${SAIL_ENABLE_OPENMP}
-DSAIL_ONLY_CODECS=${ONLY_CODECS_ESCAPED}
-DSAIL_BUILD_APPS=OFF
-DSAIL_BUILD_EXAMPLES=OFF
${SAIL_WINDOWS_STATIC_CRT_FLAG}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
# Remove duplicate files
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share")
# Move cmake configs
vcpkg_cmake_config_fixup(PACKAGE_NAME sail CONFIG_PATH lib/cmake/sail DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcodecs CONFIG_PATH lib/cmake/sailcodecs DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcommon CONFIG_PATH lib/cmake/sailcommon DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailc++ CONFIG_PATH lib/cmake/sailc++ DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailmanip CONFIG_PATH lib/cmake/sailmanip DO_NOT_DELETE_PARENT_CONFIG_PATH)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake"
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
# Fix pkg-config files
vcpkg_fixup_pkgconfig()
# Unused because SAIL_COMBINE_CODECS is ON, removes an absolute path from the output
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sail-common/config.h" "#define SAIL_CODECS_PATH [^\r\n]+[\r\n]*" "" REGEX)
# Handle usage
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

View File

@@ -1,11 +1,11 @@
The package sail provides CMake targets:
C libraries:
find_package(Sail CONFIG REQUIRED)
target_link_libraries(main PRIVATE SAIL::sail)
C++ bindings:
find_package(SailC++ CONFIG REQUIRED)
target_link_libraries(main PRIVATE SAIL::sail-c++)
The package sail provides CMake targets:
C libraries:
find_package(Sail CONFIG REQUIRED)
target_link_libraries(main PRIVATE SAIL::sail)
C++ bindings:
find_package(SailC++ CONFIG REQUIRED)
target_link_libraries(main PRIVATE SAIL::sail-c++)

View File

@@ -1,6 +1,6 @@
{
"name": "sail",
"version-semver": "0.9.9",
"version-semver": "0.9.10",
"description": "The missing small and fast image decoding library for humans (not for machines)",
"homepage": "https://github.com/HappySeaFox/sail",
"license": "MIT",
@@ -49,14 +49,23 @@
"giflib"
]
},
"hdr": {
"description": "Enable HDR codec"
},
"heif": {
"description": "Enable HEIF codec",
"dependencies": [
"libheif"
]
},
"high-priority-codecs": {
"description": "Enable high priority codecs such as BMP",
"description": "Enable high priority codecs such as AVIF",
"dependencies": [
{
"name": "sail",
"features": [
"bmp",
"svg"
"avif",
"ico"
]
}
]
@@ -70,7 +79,8 @@
"gif",
"jpeg",
"png",
"tiff"
"svg",
"webp"
]
}
]
@@ -78,6 +88,12 @@
"ico": {
"description": "Enable ICO codec"
},
"jbig": {
"description": "Enable JBIG codec",
"dependencies": [
"jbigkit"
]
},
"jpeg": {
"description": "Enable JPEG codec",
"dependencies": [
@@ -87,7 +103,7 @@
"jpeg2000": {
"description": "Enable JPEG2000 codec",
"dependencies": [
"jasper"
"openjpeg"
]
},
"jpegxl": {
@@ -102,9 +118,11 @@
{
"name": "sail",
"features": [
"ico",
"pcx",
"psd",
"bmp",
"hdr",
"jpeg2000",
"jpegxl",
"pnm",
"qoi",
"tga"
]
@@ -117,8 +135,12 @@
{
"name": "sail",
"features": [
"jbig",
"pcx",
"wal",
"xbm"
"xbm",
"xpm",
"xwd"
]
}
]
@@ -129,14 +151,20 @@
{
"name": "sail",
"features": [
"avif",
"jpeg2000",
"jpegxl",
"webp"
"heif",
"openexr",
"psd",
"tiff"
]
}
]
},
"openexr": {
"description": "Enable OPENEXR codec",
"dependencies": [
"openexr"
]
},
"openmp": {
"description": "Enable OpenMP support"
},
@@ -149,6 +177,9 @@
"libpng"
]
},
"pnm": {
"description": "Enable PNM codec"
},
"psd": {
"description": "Enable PSD codec"
},
@@ -184,6 +215,12 @@
},
"xbm": {
"description": "Enable XBM codec"
},
"xpm": {
"description": "Enable XPM codec"
},
"xwd": {
"description": "Enable XWD codec"
}
}
}

View File

@@ -8673,7 +8673,7 @@
"port-version": 0
},
"sail": {
"baseline": "0.9.9",
"baseline": "0.9.10",
"port-version": 0
},
"sajson": {

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7102d490a2126e7820cc9a15530a57b9fd326aaa",
"version-semver": "0.9.10",
"port-version": 0
},
{
"git-tree": "fceb2ea21ecd1fed3e5482b6691305fb2c0e9a8a",
"version-semver": "0.9.9",