Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffmpeg] Update dependency support for recent changes. #21980

Merged
merged 13 commits into from
Dec 30, 2021
104 changes: 10 additions & 94 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,61 +12,15 @@ if("ffprobe" IN_LIST FEATURES)
vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'ffprobe' does not support 'uwp'")
endif()

if ("alsa" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_LINUX)
message(FATAL_ERROR "Feature 'alsa' only support 'linux'")
endif()

if("aom" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'aom' does not support 'uwp | arm'")
endif()
endif()

if("ass" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'ass' does not support 'uwp | arm'")
endif()
endif()

if("avisynthplus" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (NOT VCPKG_TARGET_IS_WINDOWS) OR (VCPKG_LIBRARY_LINKAGE STREQUAL "static"))
message(FATAL_ERROR "Feature 'avisynthplus' does not support '!windows | arm | uwp | static'")
if ((NOT VCPKG_TARGET_IS_WINDOWS) OR (VCPKG_LIBRARY_LINKAGE STREQUAL "static"))
message(FATAL_ERROR "Feature 'avisynthplus' does not support '!windows | static'")
endif()
endif()

if("dav1d" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_OSX)
message(FATAL_ERROR "Feature 'dav1d' does not support 'uwp | arm | x86 | osx'")
endif()
endif()

if("fontconfig" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static"))
message(FATAL_ERROR "Feature 'fontconfig' does not support 'uwp | arm | (windows & static)'")
endif()
endif()

if("fribidi" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'fribidi' does not support 'uwp | arm'")
endif()
endif()

if("ilbc" IN_LIST FEATURES)
if ((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'ilbc' does not support 'uwp & arm'")
endif()
endif()

if("modplug" IN_LIST FEATURES)
if (VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'modplug' does not support 'uwp'")
endif()
endif()

if("nvcodec" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR ((NOT VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_LINUX)))
message(FATAL_ERROR "Feature 'nvcodec' does not support '!(windows | linux) | uwp | arm'")
if (VCPKG_TARGET_IS_OSX)
message(FATAL_ERROR "Feature 'dav1d' does not support 'osx'")
endif()
endif()

Expand All @@ -75,58 +29,20 @@ if("opencl" IN_LIST FEATURES)
endif()

if("opengl" IN_LIST FEATURES)
if (((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_WINDOWS) OR VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'opengl' does not support 'uwp | (windows & arm)")
endif()
endif()

if("openh264" IN_LIST FEATURES)
vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'openh264' does not support 'uwp'")
endif()

if("sdl2" IN_LIST FEATURES)
vcpkg_fail_port_install(ON_TARGET "OSX" MESSAGE "Feature 'sdl2' does not support 'osx'")
endif()

if("ssh" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP OR VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "Feature 'ssh' does not support 'uwp | arm | static'")
endif()
endif()

if("tensorflow" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP OR VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
message(FATAL_ERROR "Feature 'tensorflow' does not support 'x86 | arm | uwp | static'")
if (VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'opengl' does not support 'uwp")
endif()
endif()

if("tesseract" IN_LIST FEATURES)
if (((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_WINDOWS) OR VCPKG_TARGET_IS_UWP OR VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "Feature 'tesseract' does not support 'uwp | (windows & arm) | static'")
endif()
endif()

if("wavpack" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
message(FATAL_ERROR "Feature 'wavpack' does not support 'arm'")
endif()
endif()

if("x264" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
message(FATAL_ERROR "Feature 'x264' does not support 'arm'")
endif()
endif()

if("x265" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'x265' does not support 'uwp | arm'")
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "Feature 'tesseract' does not support 'static'")
endif()
endif()

if("xml2" IN_LIST FEATURES)
if("tensorflow" IN_LIST FEATURES)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "Feature 'xml2' does not support 'static'")
message(FATAL_ERROR "Feature 'tensorflow' does not support 'static'")
endif()
endif()

Expand Down
73 changes: 26 additions & 47 deletions ports/ffmpeg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ffmpeg",
"version": "4.4.1",
"port-version": 3,
"port-version": 4,
"description": [
"a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.",
"FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations."
Expand Down Expand Up @@ -33,12 +33,14 @@
"name": "ffmpeg",
"default-features": false,
"features": [
"ass",
"avcodec",
"avdevice",
"avfilter",
"avformat",
"avresample",
"bzip2",
"fontconfig",
"freetype",
"iconv",
"lzma",
Expand All @@ -54,6 +56,7 @@
"vorbis",
"vpx",
"webp",
"xml2",
"zlib"
]
},
Expand All @@ -77,121 +80,97 @@
"name": "ffmpeg",
"default-features": false,
"features": [
"modplug"
"fribidi"
],
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"opencl"
"modplug"
],
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"openh264"
"opencl"
],
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"xml2"
],
"platform": "!static"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"ilbc"
],
"platform": "!(arm & uwp)"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"aom"
"opengl"
],
"platform": "!(uwp | arm)"
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"ass"
"openh264"
],
"platform": "!(uwp | arm)"
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"fribidi"
"tensorflow"
],
"platform": "!(uwp | arm)"
"platform": "!static"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"dav1d"
"ilbc"
],
"platform": "!(uwp | arm | x86 | osx)"
"platform": "!(arm & uwp)"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"ssh"
],
"platform": "!(uwp | arm) & !static"
"platform": "!(uwp | arm)"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"opengl"
"aom"
],
"platform": "!uwp & !(windows & arm)"
"platform": "!(windows & arm & !uwp)"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"tensorflow"
"dav1d"
],
"platform": "!(x86 | arm | uwp) & !static"
"platform": "!(uwp | arm | x86 | osx)"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"nvcodec"
],
"platform": "(windows | linux) & !uwp & !arm"
"platform": "(windows | linux) & !uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"tesseract"
],
"platform": "!uwp & !(windows & arm) & !static"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"fontconfig"
],
"platform": "!(windows & static) & !(uwp | arm)"
"platform": "!(windows & arm) & !static"
}
]
},
Expand All @@ -211,17 +190,17 @@
"name": "ffmpeg",
"default-features": false,
"features": [
"x264"
"x265"
],
"platform": "!arm"
"platform": "!(uwp | arm)"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"x265"
"x264"
],
"platform": "!arm & !uwp"
"platform": "!(arm & windows)"
},
{
"name": "ffmpeg",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,7 @@
},
"ffmpeg": {
"baseline": "4.4.1",
"port-version": 3
"port-version": 4
},
"ffnvcodec": {
"baseline": "11.1.5.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/ffmpeg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d7e12377ceb86caf3720807cb4be9f0f51c93798",
"version": "4.4.1",
"port-version": 4
},
{
"git-tree": "00480edd2a451f2a3a55452779f524709ee52585",
"version": "4.4.1",
Expand Down