From 0fd31b9dbb96e1ab86e0c9ee930790990a974bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 21 Dec 2021 15:55:52 +0800 Subject: [PATCH] [vcpkg baseline][ffmpeg] Fix dependency alsa (#22110) * [vcpkg baseline][ffmpeg] Fix dependency alsa * version * fix option name * version * Apply suggestion * version --- ports/ffmpeg/portfile.cmake | 7 +++++++ ports/ffmpeg/vcpkg.json | 16 +++++++++++++++- versions/baseline.json | 2 +- versions/f-/ffmpeg.json | 5 +++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 668f07e414874c..51180b10e265ab 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -12,6 +12,9 @@ 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) @@ -274,6 +277,10 @@ else() set(OPTIONS "${OPTIONS} --disable-ffprobe") endif() +if (NOT "alsa" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --disable-alsa") +endif() + if("avcodec" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-avcodec") set(ENABLE_AVCODEC ON) diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index ecfe5e38379ac4..c923f8c2db5245 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ffmpeg", "version": "4.4.1", - "port-version": 2, + "port-version": 3, "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." @@ -57,6 +57,14 @@ "zlib" ] }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "alsa" + ], + "platform": "linux" + }, { "name": "ffmpeg", "default-features": false, @@ -240,6 +248,12 @@ } ] }, + "alsa": { + "description": "Enable ALSA support", + "dependencies": [ + "alsa" + ] + }, "aom": { "description": "AV1 video encoding/decoding via libaom support in ffmpeg", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 47237fcf065172..28547ee8b17ef1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2142,7 +2142,7 @@ }, "ffmpeg": { "baseline": "4.4.1", - "port-version": 2 + "port-version": 3 }, "ffnvcodec": { "baseline": "11.1.5.0", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 3fd1fd6b8c5d3b..29d3cfa123e23a 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "00480edd2a451f2a3a55452779f524709ee52585", + "version": "4.4.1", + "port-version": 3 + }, { "git-tree": "7576aa6e0cfa9b2e58abe51484cab6fd16337465", "version": "4.4.1",