diff --git a/ports/sail/avif.patch b/ports/sail/avif.patch new file mode 100644 index 0000000000..bc245277a1 --- /dev/null +++ b/ports/sail/avif.patch @@ -0,0 +1,21 @@ +diff --git a/src/sail-codecs/avif/CMakeLists.txt b/src/sail-codecs/avif/CMakeLists.txt +index 3f36e0c8..7a24ad25 100644 +--- a/src/sail-codecs/avif/CMakeLists.txt ++++ b/src/sail-codecs/avif/CMakeLists.txt +@@ -1,7 +1,6 @@ +-find_library(AVIF_LIBRARY avif ${SAIL_CODEC_AVIF_REQUIRED_OPTION}) +-find_path(AVIF_INCLUDE_DIRS avif/avif.h ${SAIL_CODEC_AVIF_REQUIRED_OPTION}) ++find_package(libavif CONFIG ${SAIL_CODEC_AVIF_REQUIRED_OPTION}) + +-if (NOT AVIF_LIBRARY OR NOT AVIF_INCLUDE_DIRS) ++if (NOT libavif_FOUND) + return() + endif() + +@@ -18,5 +17,4 @@ set(SAIL_CODECS_FIND_DEPENDENCIES ${SAIL_CODECS_FIND_DEPENDENCIES} "find_depende + sail_codec(NAME avif + SOURCES helpers.h helpers.c io.h io.c avif.c + ICON avif.png +- DEPENDENCY_INCLUDE_DIRS ${AVIF_INCLUDE_DIRS} +- DEPENDENCY_LIBS ${AVIF_LIBRARY}) ++ DEPENDENCY_LIBS avif) diff --git a/ports/sail/portfile.cmake b/ports/sail/portfile.cmake index 6a4be5df7f..0c044149ae 100644 --- a/ports/sail/portfile.cmake +++ b/ports/sail/portfile.cmake @@ -4,6 +4,9 @@ vcpkg_from_github( REF v0.9.0-rc3 SHA512 5de94277d57b862d4ab99266c2608cd37d7ca9eb89ef753ddddf47e4cebffab54b2cfb9c28d0c3bb7721f0d24c1310377c4b42adab477568e6965bd7ebc55b17 HEAD_REF master + PATCHES + avif.patch + webp.patch ) # Enable selected codecs diff --git a/ports/sail/vcpkg.json b/ports/sail/vcpkg.json index 19a3fefffb..d0cabea6ce 100644 --- a/ports/sail/vcpkg.json +++ b/ports/sail/vcpkg.json @@ -1,7 +1,7 @@ { "name": "sail", "version-semver": "0.9.0-rc3", - "port-version": 1, + "port-version": 2, "description": "The missing small and fast image decoding library for humans (not for machines)", "homepage": "https://github.com/HappySeaFox/sail", "license": "MIT", diff --git a/ports/sail/webp.patch b/ports/sail/webp.patch new file mode 100644 index 0000000000..2fa105e21b --- /dev/null +++ b/ports/sail/webp.patch @@ -0,0 +1,39 @@ +diff --git a/src/sail-codecs/webp/CMakeLists.txt b/src/sail-codecs/webp/CMakeLists.txt +index 64d31e5a..40c33084 100644 +--- a/src/sail-codecs/webp/CMakeLists.txt ++++ b/src/sail-codecs/webp/CMakeLists.txt +@@ -1,28 +1,20 @@ +-find_library(WEBP_RELEASE_LIBRARY NAMES webp ${SAIL_CODEC_WEBP_REQUIRED_OPTION}) +-find_library(WEBP_DEBUG_LIBRARY NAMES webpd webp ${SAIL_CODEC_WEBP_REQUIRED_OPTION}) +-find_library(WEBP_DEMUX_RELEASE_LIBRARY NAMES webpdemux ${SAIL_CODEC_WEBP_REQUIRED_OPTION}) +-find_library(WEBP_DEMUX_DEBUG_LIBRARY NAMES webpdemuxd webpdemux ${SAIL_CODEC_WEBP_REQUIRED_OPTION}) +-find_path(WEBP_INCLUDE_DIRS webp/decode.h ${SAIL_CODEC_WEBP_REQUIRED_OPTION}) ++find_package(WebP CONFIG ${SAIL_CODEC_WEBP_REQUIRED_OPTION}) + +-if ((NOT WEBP_RELEASE_LIBRARY AND NOT WEBP_DEBUG_LIBRARY) OR (NOT WEBP_DEMUX_RELEASE_LIBRARY AND NOT WEBP_DEMUX_DEBUG_LIBRARY) OR NOT WEBP_INCLUDE_DIRS) ++if (NOT WebP_FOUND) + return() + endif() + + # This will add the following CMake rules to the CMake config for static builds so a client + # application links against the required dependencies: + # +-# find_library(webp_RELEASE_LIBRARY NAMES webp) +-# find_library(webp_DEBUG_LIBRARY NAMES webpd webp) +-# set_property(TARGET SAIL::sail-codecs APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<$:${webp_RELEASE_LIBRARY}> $<$:${webp_DEBUG_LIBRARY}>) ++# find_dependency(LIBWEBP REQUIRED) ++# set_property(TARGET SAIL::sail-codecs APPEND PROPERTY INTERFACE_LINK_LIBRARIES WebP::webp WebP::webpdecoder WebP::webpdemux) + # +-# Same to webpdemux. +-# +-set(SAIL_CODECS_FIND_DEPENDENCIES ${SAIL_CODECS_FIND_DEPENDENCIES} "find_library,webp,webpd" "find_library,webpdemux,webpdemuxd" PARENT_SCOPE) ++set(SAIL_CODECS_FIND_DEPENDENCIES ${SAIL_CODECS_FIND_DEPENDENCIES} "find_dependency,WEBP,WebP::webp WebP::webpdecoder WebP::webpdemux" PARENT_SCOPE) + + # Common codec configuration + # + sail_codec(NAME webp + SOURCES helpers.h helpers.c webp.c + ICON webp.png +- DEPENDENCY_INCLUDE_DIRS ${WEBP_INCLUDE_DIRS} +- DEPENDENCY_LIBS optimized ${WEBP_RELEASE_LIBRARY} debug ${WEBP_DEBUG_LIBRARY} optimized ${WEBP_DEMUX_RELEASE_LIBRARY} debug ${WEBP_DEMUX_DEBUG_LIBRARY}) ++ DEPENDENCY_LIBS WebP::webp WebP::webpdecoder WebP::webpdemux) diff --git a/versions/baseline.json b/versions/baseline.json index 95f7e9310f..bc3a17326c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7094,7 +7094,7 @@ }, "sail": { "baseline": "0.9.0-rc3", - "port-version": 1 + "port-version": 2 }, "sais": { "baseline": "2.4.1", diff --git a/versions/s-/sail.json b/versions/s-/sail.json index bd3b36a562..0d8c9aa5cd 100644 --- a/versions/s-/sail.json +++ b/versions/s-/sail.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0c604af0721281506a77f887d07abca30fe350c3", + "version-semver": "0.9.0-rc3", + "port-version": 2 + }, { "git-tree": "66576c788934d4684f862ba663b49f1bb80c4d4d", "version-semver": "0.9.0-rc3",