diff options
| author | Matthew Oliver <protogonoi@gmail.com> | 2021-06-18 06:12:58 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-17 13:12:58 -0700 |
| commit | 6e024e744e7717c06ddacd5089401109c6298553 (patch) | |
| tree | 9fbe9691488b9869f9c036d96fea97086526904f | |
| parent | a94c58dcdc7ded8d8a1291324876c433769cb348 (diff) | |
| download | vcpkg-6e024e744e7717c06ddacd5089401109c6298553.tar.gz vcpkg-6e024e744e7717c06ddacd5089401109c6298553.zip | |
[ffmpeg] Warn/fail when selecting unsupported features. (#17153)
* [ffmpeg] Warn/fail when selecting unsupported features.
* Update ffmpeg.json
* Bump port-version
* Update ffmpeg.json
* [ffmpeg] Check for gpl/nonfree aswell as all option.
* avisynth now support static linking
* fixup typo
* Update ffmpeg.json
* Revert to fatal error on even when all is selected
* Update ffmpeg.json
* [ffmpeg] Disable openh264 on uwp
* update
* Update versions/f-/ffmpeg.json
* update
* Update ffmpeg.json
* update
* update
* Update
Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
| -rw-r--r-- | ports/ffmpeg/portfile.cmake | 153 | ||||
| -rw-r--r-- | ports/ffmpeg/vcpkg.json | 4 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/f-/ffmpeg.json | 5 |
4 files changed, 149 insertions, 15 deletions
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index c905401c1..0f3121bf4 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -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() @@ -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() @@ -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() diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index d64ac5bb1..fe16cfed1 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -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." @@ -183,7 +183,7 @@ "features": [ "avisynthplus" ], - "platform": "windows & !arm & !uwp & !static" + "platform": "windows & !arm & !uwp" } ] }, diff --git a/versions/baseline.json b/versions/baseline.json index 1d19fbd84..80fa1b421 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1982,7 +1982,7 @@ }, "ffmpeg": { "baseline": "4.4", - "port-version": 4 + "port-version": 5 }, "ffnvcodec": { "baseline": "10.0.26.0", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 3691438cc..a39b1d79a 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "234eb0e352d2a7be0a3b34fb9eb8a9f0417ffe94", + "version": "4.4", + "port-version": 5 + }, + { "git-tree": "dfea2c203835c55baec68138cc7e8c65ebcce33a", "version": "4.4", "port-version": 4 |
