diff --git a/ports/sail/portfile.cmake b/ports/sail/portfile.cmake index 57ae5197624723..a0b17f847db512 100644 --- a/ports/sail/portfile.cmake +++ b/ports/sail/portfile.cmake @@ -6,11 +6,23 @@ vcpkg_from_github( HEAD_REF master ) +# Enable selected codecs +set(ONLY_CODECS "") + +foreach(CODEC avif bmp gif ico jpeg jpeg2000 pcx png 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) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DSAIL_COMBINE_CODECS=ON + -DSAIL_ONLY_CODECS=${ONLY_CODECS_ESCAPED} -DSAIL_BUILD_APPS=OFF -DSAIL_BUILD_EXAMPLES=OFF -DSAIL_BUILD_TESTS=OFF diff --git a/ports/sail/vcpkg.json b/ports/sail/vcpkg.json index ec9d7ba0c6fbe0..c902e6a9fa6606 100644 --- a/ports/sail/vcpkg.json +++ b/ports/sail/vcpkg.json @@ -1,18 +1,12 @@ { "name": "sail", "version-semver": "0.9.0-rc1", + "port-version": 1, "description": "The missing small and fast image decoding library for humans (not for machines)", "homepage": "https://github.com/HappySeaFox/sail", "license": "MIT", "supports": "!uwp", "dependencies": [ - "giflib", - "jasper", - "libavif", - "libjpeg-turbo", - "libpng", - "libwebp", - "tiff", { "name": "vcpkg-cmake", "host": true @@ -21,5 +15,154 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "default-features": [ + "high-priority" + ], + "features": { + "all": { + "description": "Enable all codecs", + "dependencies": [ + { + "name": "sail", + "features": [ + "avif", + "bmp", + "gif", + "ico", + "jpeg", + "jpeg2000", + "pcx", + "png", + "qoi", + "tga", + "tiff", + "wal", + "webp", + "xbm" + ] + } + ] + }, + "avif": { + "description": "Enable AVIF codec", + "dependencies": [ + "libavif" + ] + }, + "bmp": { + "description": "Enable BMP codec" + }, + "gif": { + "description": "Enable GIF codec", + "dependencies": [ + "giflib" + ] + }, + "high-priority": { + "description": "Enable high priority codecs such as JPEG or PNG", + "dependencies": [ + { + "name": "sail", + "features": [ + "bmp", + "gif", + "jpeg", + "png", + "tiff" + ] + } + ] + }, + "ico": { + "description": "Enable ICO codec" + }, + "jpeg": { + "description": "Enable JPEG codec", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "jpeg2000": { + "description": "Enable JPEG2000 codec", + "dependencies": [ + "jasper" + ] + }, + "low-priority": { + "description": "Enable low priority codecs such as TGA", + "dependencies": [ + { + "name": "sail", + "features": [ + "ico", + "pcx", + "qoi", + "tga" + ] + } + ] + }, + "lowest-priority": { + "description": "Enable lowest priority codecs such as XBM", + "dependencies": [ + { + "name": "sail", + "features": [ + "wal", + "xbm" + ] + } + ] + }, + "medium-priority": { + "description": "Enable medium priority codecs such as AVIF", + "dependencies": [ + { + "name": "sail", + "features": [ + "avif", + "jpeg2000", + "webp" + ] + } + ] + }, + "pcx": { + "description": "Enable PCX codec" + }, + "png": { + "description": "Enable PNG codec", + "dependencies": [ + "libpng" + ] + }, + "qoi": { + "description": "Enable QOI codec" + }, + "svg": { + "description": "Enable SVG codec" + }, + "tga": { + "description": "Enable TGA codec" + }, + "tiff": { + "description": "Enable TIFF codec", + "dependencies": [ + "tiff" + ] + }, + "wal": { + "description": "Enable WAL codec" + }, + "webp": { + "description": "Enable WEBP codec", + "dependencies": [ + "libwebp" + ] + }, + "xbm": { + "description": "Enable XBM codec" + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index 14f152dad13e6a..06ea785a7d3a8d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6614,7 +6614,7 @@ }, "sail": { "baseline": "0.9.0-rc1", - "port-version": 0 + "port-version": 1 }, "sais": { "baseline": "2.4.1", diff --git a/versions/s-/sail.json b/versions/s-/sail.json index 1ed673596d7843..440575b8ba7e92 100644 --- a/versions/s-/sail.json +++ b/versions/s-/sail.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "796491a7ff11bd4426bac390a26d740ad85e88dd", + "version-semver": "0.9.0-rc1", + "port-version": 1 + }, { "git-tree": "5a3beda67ffe57e68f882d59f7f5c33bf726f2c8", "version-semver": "0.9.0-rc1",