diff --git a/ports/ffmpeg/0007-fix-mp3lame-linking.patch b/ports/ffmpeg/0007-fix-mp3lame-linking.patch new file mode 100644 index 00000000000000..d25f6039a970b3 --- /dev/null +++ b/ports/ffmpeg/0007-fix-mp3lame-linking.patch @@ -0,0 +1,12 @@ +diff --git a/configure b/configure +index d6c4388..75b96c3 100644 +--- a/configure ++++ b/configure +@@ -4378,6 +4378,7 @@ msvc_common_flags(){ + -march=*) ;; + -lz) echo zlib.lib ;; + -lx264) echo libx264.lib ;; ++ -lmp3lame) echo libmp3lame.lib ;; + -lstdc++) ;; + -l*) echo ${flag#-l}.lib ;; + -LARGEADDRESSAWARE) echo $flag ;; diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 18ed3ce717b440..33d9e88e319eb6 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 4.2-8 +Version: 4.2-9 Build-Depends: zlib Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. @@ -56,4 +56,12 @@ Description: Libav audio resampling library support in ffmpeg Feature: nvcodec Build-Depends: ffnvcodec, cuda -Description: Hardware accelerated codecs \ No newline at end of file +Description: Hardware accelerated codecs + +Feature: mp3lame +Build-Depends: mp3lame +Description: mp3lame support in ffmpeg + +Feature: opus +Build-Depends: opus +Description: opus support in ffmpeg diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index dc1bff6aeff927..abb2ca7a544333 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( 0004-fix-debug-build.patch 0005-fix-libvpx-linking.patch 0006-fix-StaticFeatures.patch + 0007-fix-mp3lame-linking.patch ) if (${SOURCE_PATH} MATCHES " ") @@ -38,7 +39,7 @@ if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) else() - vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make pkg-config) endif() set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) @@ -141,6 +142,18 @@ else() set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-cuvid --disable-libnpp") endif() +if("mp3lame" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libmp3lame") +else() + set(OPTIONS "${OPTIONS} --disable-libmp3lame") +endif() + +if("opus" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libopus") +else() + set(OPTIONS "${OPTIONS} --disable-libopus") +endif() + set(OPTIONS_CROSS "") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")