Skip to content

Commit

Permalink
[ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modpl…
Browse files Browse the repository at this point in the history
…ug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (#15787)

* [tesseract] Use vcpkg_fixup_pkgconfig.

* [libxml2] Correct pkgconfig lib name.

* [libwebp] Use vcpkg_fixup_pkgconfig.

* [libssh] Export pkgconfig on windows.

Also move to using git to get source.

* [modplug] Export pkgconfig on windows.

* [ffmpeg] Add support for fontconfig,freetype,fribidi,modplug,openjpeg,libssh,tesseract,libxml2 dependencies.

* [openjpeg] Correct required static link libs in pkgconfig.

* [modplug] Combine vcpkg_from_github using variable.

* Update ports/libssh/CONTROL

* Improve portfile.cmake

* update version records.

* [openjpeg] Update libs in pkgcfg.

Co-authored-by: Jack·Boos·Yu <[email protected]>

* update version records

* [libssh] Add pthread to pkgconfig when using mbedtls.

* [libssh] Correct pthread naming on windows.

* [fontconfig] Add libintl to pkgconfig on windows.

* update version records

* [ffmpeg] Fixup FindFFmpeg.

* [ffmpeg] speex now supports non-windows.

* [ffmpeg] Add feature libass.

* [ffmpeg] Add dav1d feature.

* [ffmpeg] Add feature ilbc.

* [ffmpeg] Add tensorflow feature.

* [ffmpeg] update version record.

* [ffmpeg] Add CI feature test.

* [ffmpeg] Limit features based on CI failures.

* [ffmpeg] Update version record.

* [ffmpeg] limit features based on ci.baseline.

* [various ports] Update supports field.

* [ffmpeg] Limit features more based on CI.

* update version records.

* [ffmpeg] Add detection of additional non target deps..

select_library_configurations_from_names currently detects the debug libs even for release builds as  _IMPORT_PREFIX was not being set.

* [aubio] Silence warning about FindFFMPEG.

* [pangolin] Use vcpkg supplied FindFFMPEG.

* update version files.

* [ffnvcodec] Set as not supporting uwp.

ffnvcodec will build under uwp as its a header only lib, but it can not be used as it requires dynamic dll loading.

* [ffmpeg] Update feature all.

* update version records

* [tesseract] Wrap debug pkgcfg update.

* [libssh,libxml2,openjpeg,fontconfig] Fix pkg-config for release only triplets.

* [libssh] Correct port version after merge.

* [ffmpeg] Fixup after merge.

* Update version files.

* [ffmpeg] Add opengl support.

* [ffmpeg] Update package version.

* [ffmpeg] Fix ffnvcodec support.

* [ffmpeg] Fix x265 detection on osx.

* [libvpx] Enable arm-uwp build.

* [ffmpeg] Fixup x265 patch.

* trigger sdl rebuild

* [ffmpeg] Disable opengl on osx.

* Revert "trigger sdl rebuild"

This reverts commit 94065bf.

* [ffmpeg] Disable failing features on osx.

* Update ports/ffmpeg/FindFFMPEG.cmake.in

Co-authored-by: Matthias C. M. Troffaes <[email protected]>

* [ffmpeg] Add ass dependencies to FindFFmpeg.

* Update ports/ffmpeg/FindFFMPEG.cmake.in

Co-authored-by: Matthias C. M. Troffaes <[email protected]>

* update version

* [fontconfig] disable pthread/json as they are not needed for lib builds.

Only used for tests.

* [ffmpeg] Enable fontconfig on static+windows.

* update versions

* update versions.

* Fix incorrectly included commits

* revert pangolin commit

Reverts most of 2543be2

* update versions

* Correct port version after merge.

* update versions.

* [ffmpeg] Fix cmake dependency detection on non-windows.

* Revert "revert pangolin commit"

This reverts commit f59bc5a.

* [ffmpeg] Fix dependency loading that does not define separate debug/release libs.

* update versions.

* [ffmpeg] set CMP0072 policy.

* [wavpack] Fix cmake config export.

* [ffmpeg] Add optional system dependent libraries.

* update versions after merge.

* update versions.

Co-authored-by: Jack·Boos·Yu <[email protected]>
Co-authored-by: JackBoosY <[email protected]>
Co-authored-by: Matthias C. M. Troffaes <[email protected]>
  • Loading branch information
4 people authored Apr 7, 2021
1 parent 4278a5f commit 85a48c1
Show file tree
Hide file tree
Showing 52 changed files with 682 additions and 129 deletions.
4 changes: 3 additions & 1 deletion ports/fdk-aac/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Source: fdk-aac
Version: 2018-07-08-2
Version: 2018-07-08
Port-Version: 3
Homepage: https://github.com/mstorsjo/fdk-aac
Description: A standalone library of the Fraunhofer FDK AAC code
Supports: !(uwp | arm)
5 changes: 3 additions & 2 deletions ports/ffmpeg/0011-Fix-x265-detection.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ diff --git a/configure b/configure
index 34a2e644c4..0ea64bd306 100755
--- a/configure
+++ b/configure
@@ -6447,7 +6447,9 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x
@@ -6447,7 +6447,10 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x
warn "using libx264 without pkg-config"; } } &&
require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
check_cpp_condition libx262 x264.h "X264_MPEG2"
-enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
+enabled libx265 && { check_pkg_config libx265 x265 x265.h x265_api_get ||
+ { require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" &&
+ { { check_lib libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" ||
+ require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++"; } &&
+ warn "using libx265 without pkg-config"; } } &&
require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
Expand Down
17 changes: 17 additions & 0 deletions ports/ffmpeg/0015-Fix-xml2-detection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 900505756b..8d1388a347 100755
--- a/configure
+++ b/configure
@@ -6476,7 +6476,7 @@ enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h z
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
{ test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
-enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
+enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml/xmlversion.h xmlCheckVersion
enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||

140 changes: 104 additions & 36 deletions ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,139 +1,207 @@
Source: ffmpeg
Version: 4.3.2
Port-Version: 1
Port-Version: 2
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.
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.
Default-Features: avresample, avcodec, avformat, avdevice, avfilter, postproc, swresample, swscale

Feature: ffmpeg
Build-Depends: ffmpeg[core,avcodec,avfilter,avformat]
Description: build the ffmpeg.exe application
Description: Build the ffmpeg application

Feature: ffplay
Build-Depends: ffmpeg[core,avcodec,avfilter,avformat,swscale,swresample,sdl2]
Description: ffplay application support in ffmpeg
Description: Build the ffplay application

Feature: ffprobe
Build-Depends: ffmpeg[core,avcodec,avformat]
Description: ffprobe application support in ffmpeg
Description: Build the ffprobe application

Feature: avcodec
Description: Codec support in ffmpeg
Description: Build the avcodec library

Feature: avformat
Build-Depends: ffmpeg[core,avcodec]
Description: Format support in ffmpeg
Description: Build the avformat library

Feature: avdevice
Build-Depends: ffmpeg[core,avcodec,avformat]
Description: Device support in ffmpeg
Description: Build the avdevice library

Feature: avfilter
Description: Filter support in ffmpeg
Description: Build the avfilter library

Feature: postproc
Build-Depends: ffmpeg[core,gpl]
Description: Postproc support in ffmpeg
Description: Build the postproc library

Feature: swresample
Description: Swresample support in ffmpeg
Description: Build the swresample library

Feature: swscale
Description: Swscale support in ffmpeg
Description: Build the swscale library

Feature: avresample
Description: Libav audio resampling library support in ffmpeg
Description: Build the avresample library

Feature: nonfree
Description: allow nonfree and unredistributable libraries
Description: Allow use of nonfree code, the resulting libs and binaries will be unredistributable

Feature: gpl
Description: allow GPL licensed libraries
Description: Allow use of GPL code, the resulting libs and binaries will be under GPL

Feature: version3
Description: upgrade (L)GPL to version 3
Description: Upgrade (L)GPL to version 3

Feature: all
Build-Depends: ffmpeg[bzip2,iconv,freetype,lzma,mp3lame,openjpeg,opus,snappy,soxr,speex,theora,vorbis,vpx,webp,zlib], ffmpeg[ass] (!(uwp | arm)), ffmpeg[dav1d] (!(uwp | arm | x86 | osx)), ffmpeg[fontconfig] (!(windows & static) & !(uwp | arm)), ffmpeg[fribidi] (!(uwp | arm)), ffmpeg[ilbc] (!(arm & uwp)), ffmpeg[modplug] (!(windows & static) & !uwp), ffmpeg[nvcodec] ((windows | linux) & !uwp & !arm), ffmpeg[opencl] (!uwp), ffmpeg[ssh] (!(uwp | arm) & !static), ffmpeg[opengl] (!uwp & !(windows & arm) & !osx), ffmpeg[sdl2] (!osx), ffmpeg[tensorflow] (!(x86 | arm | uwp) & !static), ffmpeg[tesseract] (!uwp & !(windows & arm) & !static), ffmpeg[wavpack] (!arm), ffmpeg[xml2] (!static)
Description: Build with all allowed dependencies selected that are compatible with the lgpl license

Feature: all-gpl
Build-Depends: ffmpeg[gpl,all], ffmpeg[avisynthplus] (windows & !arm & !uwp & !static), ffmpeg[x264] (!arm), ffmpeg[x265] (!arm & !uwp)
Description: Build with all allowed dependencies selected that are compatible with the gpl license

Feature: all-nonfree
Build-Depends: ffmpeg[nonfree,all-gpl,openssl], ffmpeg[fdk-aac] (!arm & !uwp)
Description: Build with all allowed dependencies selected with a non-redistributable license

Feature: ass
Build-Depends: libass
Description: Libass subtitles rendering, needed for subtitles and ass filter support in ffmpeg

Feature: avisynthplus
Build-Depends: avisynthplus, ffmpeg[core,gpl]
Description: avisynthplus support in ffmpeg
Description: Reading of AviSynth script files

Feature: bzip2
Build-Depends: bzip2
Description: bzip2 support in ffmpeg
Description: Bzip2 support

Feature: dav1d
Build-Depends: dav1d
Description: AV1 decoding via libdav1d

Feature: iconv
Build-Depends: libiconv
Description: iconv support in ffmpeg
Description: Iconv support

Feature: ilbc
Build-Depends: libilbc
Description: iLBC de/encoding via libilbc

Feature: fdk-aac
Build-Depends: fdk-aac, ffmpeg[core,nonfree]
Description: AAC de/encoding via libfdk-aac support in ffmpeg
Description: AAC de/encoding via libfdk-aac

Feature: fontconfig
Build-Depends: fontconfig
Description: Useful for drawtext filter

Feature: freetype
Build-Depends: freetype
Description: Needed for drawtext filter

Feature: fribidi
Build-Depends: fribidi
Description: Improves drawtext filter

Feature: lzma
Build-Depends: liblzma
Description: lzma support in ffmpeg
Description: lzma support

Feature: modplug
Build-Depends: libmodplug
Description: ModPlug via libmodplug

Feature: mp3lame
Build-Depends: mp3lame
Description: MP3 encoding via libmp3lame support in ffmpeg
Description: MP3 encoding via libmp3lame

Feature: nvcodec
Build-Depends: ffnvcodec
Description: Hardware accelerated codecs
Description: Nvidia video decoding/encoding acceleration

Feature: opencl
Build-Depends: opencl
Description: OpenCL processing support in ffmpeg
Description: OpenCL processing

Feature: opengl
Build-Depends: opengl, opengl-registry
Description: OpenGL rendering

Feature: openjpeg
Build-Depends: openjpeg
Description: JPEG 2000 de/encoding via OpenJPEG

Feature: openssl
Build-Depends: openssl, ffmpeg[core,nonfree]
Description: openssl support in ffmpeg
Description: Needed for https support if gnutls, libtls or mbedtls is not used

Feature: opus
Build-Depends: opus
Description: Opus de/encoding via libopus support in ffmpeg
Description: Opus de/encoding via libopus

Feature: sdl2
Build-Depends: sdl2
Description: sdl2 support in ffmpeg
Description: Sdl2 support

Feature: snappy
Build-Depends: snappy
Description: Snappy compression, needed for hap encoding support in ffmpeg
Description: Snappy compression, needed for hap encoding

Feature: soxr
Build-Depends: soxr
Description: libsoxr resampling support in ffmpeg
Description: Include libsoxr resampling

Feature: speex
Build-Depends: speex
Description: Speex de/encoding via libspeex support in ffmpeg
Description: Speex de/encoding via libspeex

Feature: ssh
Build-Depends: libssh
Description: SFTP protocol via libssh

Feature: tensorflow
Build-Depends: tensorflow
Description: TensorFlow as a DNN module backend for DNN based filters like sr

Feature: tesseract
Build-Depends: tesseract
Description: Tesseract, needed for ocr filter

Feature: theora
Build-Depends: libtheora
Description: Theora encoding via libtheora support in ffmpeg
Description: Theora encoding via libtheora

Feature: vorbis
Build-Depends: libvorbis
Description: Vorbis en/decoding via libvorbis support in ffmpeg
Description: Vorbis en/decoding via libvorbis, native implementation exists

Feature: vpx
Build-Depends: libvpx
Description: VP8 and VP9 de/encoding via libvpx support in ffmpeg
Description: VP8 and VP9 de/encoding via libvpx

Feature: wavpack
Build-Depends: wavpack
Description: wavpack encoding via libwavpack support in ffmpeg
Description: Wavpack encoding via libwavpack

Feature: webp
Build-Depends: libwebp
Description: WebP encoding via libwebp

Feature: x264
Build-Depends: x264, ffmpeg[core,gpl]
Description: H.264 encoding via x264 support in ffmpeg
Description: H.264 encoding via x264

Feature: x265
Build-Depends: x265, ffmpeg[core,gpl]
Description: HEVC encoding via x265 support in ffmpeg
Description: HEVC encoding via x265

Feature: xml2
Build-Depends: libxml2
Description: XML parsing using the C library libxml2, needed for dash demuxing support

Feature: zlib
Build-Depends: zlib
Description: zlib support in ffmpeg
Description: zlib support
Loading

0 comments on commit 85a48c1

Please sign in to comment.