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] Warn/fail when selecting unsupported features. #17153

Merged
merged 27 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
188da5d
[ffmpeg] Warn/fail when selecting unsupported features.
Sibras Apr 8, 2021
d3f29fb
Merge branch 'master' into master
Sibras Apr 20, 2021
5f84a2e
Update ffmpeg.json
Sibras Apr 20, 2021
e00fa6f
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Apr 29, 2021
416a58a
Bump port-version
BillyONeal Apr 29, 2021
07a32cb
Merge branch 'master' into master
Sibras May 5, 2021
de98461
Update ffmpeg.json
Sibras May 5, 2021
8de1285
[ffmpeg] Check for gpl/nonfree aswell as all option.
Sibras May 5, 2021
96b9b9c
avisynth now support static linking
Sibras May 5, 2021
e3c0139
fixup typo
Sibras May 5, 2021
66a14ae
Merge branch 'master' into master
Sibras May 8, 2021
d91a2e0
Update ffmpeg.json
Sibras May 8, 2021
2942933
Revert to fatal error on even when all is selected
Sibras May 8, 2021
4dedff5
Update ffmpeg.json
Sibras May 8, 2021
6144958
Merge remote-tracking branch 'upstream/master'
Sibras May 26, 2021
84146ec
[ffmpeg] Disable openh264 on uwp
Sibras May 26, 2021
b419ad3
update
Sibras May 26, 2021
ccb8975
Update versions/f-/ffmpeg.json
JackBoosY May 26, 2021
a1cdee4
update
Sibras Jun 1, 2021
48fd08a
Merge branch 'master' of https://github.com/Sibras/vcpkg
Sibras Jun 1, 2021
eba9374
Update ffmpeg.json
Sibras Jun 1, 2021
fb6bd6d
Merge branch 'master' into master
Sibras Jun 4, 2021
86822be
update
Sibras Jun 4, 2021
f39ff37
Merge branch 'master' into master
Sibras Jun 10, 2021
1fee050
update
Sibras Jun 10, 2021
092dae8
Merge branch 'master' into master
Sibras Jun 12, 2021
3d0ebd5
Update
Sibras Jun 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 141 additions & 12 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,132 @@
#Check for unsupported features

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

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

if("ffprobe" IN_LIST FEATURES)
vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'ffprobe' does not support 'uwp'")
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))
message(FATAL_ERROR "Feature 'avisynthplus' does not support '!windows | arm | uwp'")
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("fdk-aac" IN_LIST FEATURES)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Feature 'fdk-aac' does not support 'uwp | arm'")
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 OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static"))
message(FATAL_ERROR "Feature 'modplug' does not support 'uwp | (windows & static)'")
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'")
endif()
endif()

if("opencl" IN_LIST FEATURES)
vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'opencl' does not support 'uwp'")
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 OR VCPKG_TARGET_IS_OSX)
message(FATAL_ERROR "Feature 'opengl' does not support 'uwp | (windows & arm) | osx'")
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'")
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'")
endif()
endif()

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

if(VCPKG_TARGET_IS_WINDOWS)
set(PATCHES 0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch) # https://trac.ffmpeg.org/ticket/9019
endif()
Expand Down Expand Up @@ -234,18 +363,6 @@ else()
set(OPTIONS "${OPTIONS} --disable-libdav1d")
endif()

if("iconv" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-iconv")
else()
set(OPTIONS "${OPTIONS} --disable-iconv")
endif()

if("ilbc" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libilbc")
else()
set(OPTIONS "${OPTIONS} --disable-libilbc")
endif()

if("fdk-aac" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libfdk-aac")
else()
Expand All @@ -270,6 +387,18 @@ else()
set(OPTIONS "${OPTIONS} --disable-libfribidi")
endif()

if("iconv" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-iconv")
else()
set(OPTIONS "${OPTIONS} --disable-iconv")
endif()

if("ilbc" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libilbc")
else()
set(OPTIONS "${OPTIONS} --disable-libilbc")
endif()

if("lzma" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-lzma")
else()
Expand Down
4 changes: 2 additions & 2 deletions ports/ffmpeg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ffmpeg",
"version": "4.4",
"port-version": 4,
"port-version": 5,
"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 @@ -183,7 +183,7 @@
"features": [
"avisynthplus"
],
"platform": "windows & !arm & !uwp & !static"
"platform": "windows & !arm & !uwp"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@
},
"ffmpeg": {
"baseline": "4.4",
"port-version": 4
"port-version": 5
},
"ffnvcodec": {
"baseline": "10.0.26.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": "234eb0e352d2a7be0a3b34fb9eb8a9f0417ffe94",
"version": "4.4",
"port-version": 5
},
{
"git-tree": "dfea2c203835c55baec68138cc7e8c65ebcce33a",
"version": "4.4",
Expand Down