diff --git a/ports/aubio/ffmpeg7.patch b/ports/aubio/0001-ffmpeg-deprecated.patch similarity index 65% rename from ports/aubio/ffmpeg7.patch rename to ports/aubio/0001-ffmpeg-deprecated.patch index cf0fe6ed68..5b2857cc4b 100644 --- a/ports/aubio/ffmpeg7.patch +++ b/ports/aubio/0001-ffmpeg-deprecated.patch @@ -1,8 +1,18 @@ diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c -index 71ea8b5f..ad91f5eb 100644 +index 71ea8b5..e4bd848 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c -@@ -345,8 +345,8 @@ void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s) +@@ -67,6 +67,9 @@ + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE + #else ++ #ifndef AV_INPUT_BUFFER_MIN_SIZE ++ #define AV_INPUT_BUFFER_MIN_SIZE 16384 ++ #endif + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE + #endif + +@@ -345,8 +348,8 @@ void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s) av_channel_layout_default(&input_layout, s->input_channels); av_channel_layout_default(&output_layout, s->input_channels); diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 59128ae790..b2657c7ced 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_from_github( SHA512 923529eb27e460293bd2b8b8c53d5eb96553e3e1ece7071904808d8f20f86b7af70bde97d271da9a07ee1898d0840190f265e326e67f48c6f5cadefa034abf0f HEAD_REF master PATCHES - ffmpeg7.patch + 0001-ffmpeg-deprecated.patch ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") diff --git a/ports/aubio/vcpkg.json b/ports/aubio/vcpkg.json index 04188776c1..010c37beda 100644 --- a/ports/aubio/vcpkg.json +++ b/ports/aubio/vcpkg.json @@ -1,6 +1,7 @@ { "name": "aubio", "version-date": "2024-01-03", + "port-version": 1, "description": "Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.", "homepage": "https://github.com/aubio/aubio", "license": "GPL-3.0-or-later", diff --git a/ports/avcpp/vcpkg.json b/ports/avcpp/vcpkg.json index d750281c25..18108da95e 100644 --- a/ports/avcpp/vcpkg.json +++ b/ports/avcpp/vcpkg.json @@ -1,6 +1,7 @@ { "name": "avcpp", "version": "2.7.1", + "port-version": 1, "description": "Wrapper for the FFmpeg that simplify usage it from C++ projects.", "homepage": "https://github.com/h4tr3d/avcpp", "license": "LGPL-2.1-only OR BSD-3-Clause", @@ -13,7 +14,6 @@ "avdevice", "avfilter", "avformat", - "postproc", "swresample", "swscale" ] diff --git a/ports/ffmpeg-bin2c/CMakeLists.txt b/ports/ffmpeg-bin2c/CMakeLists.txt new file mode 100644 index 0000000000..e8ae742eb6 --- /dev/null +++ b/ports/ffmpeg-bin2c/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10) +project(ffmpeg-bin2c C) + +# Create the executable from the source file +add_executable(bin2c bin2c.c) + +# Install rule to put it into the standard bin directory +install(TARGETS bin2c DESTINATION manual-tools/ffmpeg-bin2c) diff --git a/ports/ffmpeg-bin2c/portfile.cmake b/ports/ffmpeg-bin2c/portfile.cmake new file mode 100644 index 0000000000..286055bdd3 --- /dev/null +++ b/ports/ffmpeg-bin2c/portfile.cmake @@ -0,0 +1,21 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +set(VCPKG_BUILD_TYPE release) # host tool for building ffmpeg + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ffmpeg/ffmpeg + REF "n${VERSION}" + SHA512 f31769a7ed52865165e7db4a03e9378b3376012b7aaf0bbc022aa76c3e999e71c3927e6eb8639d8681e04e33362dd73eafa9e7c62a3c71599ff78da09f5cee0a + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/ffbuild") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/ffbuild" +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.LGPLv2.1") diff --git a/ports/ffmpeg-bin2c/vcpkg.json b/ports/ffmpeg-bin2c/vcpkg.json new file mode 100644 index 0000000000..b0d231f01f --- /dev/null +++ b/ports/ffmpeg-bin2c/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "ffmpeg-bin2c", + "version": "8.0.1", + "description": "Host tool bin2c for FFmpeg build", + "license": "LGPL-2.1-or-later", + "supports": "native", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/ffmpeg/0004-dependencies.patch b/ports/ffmpeg/0004-dependencies.patch index f1f6e72bee..03588a02d1 100644 --- a/ports/ffmpeg/0004-dependencies.patch +++ b/ports/ffmpeg/0004-dependencies.patch @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index a8b74e0..c99f41c 100755 +index 4a9534a..1f0cb43 100644 --- a/configure +++ b/configure -@@ -6633,7 +6633,7 @@ fi +@@ -6973,7 +6973,7 @@ fi enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion || check_lib zlib zlib.h zlibVersion -lz; } @@ -11,17 +11,17 @@ index a8b74e0..c99f41c 100755 enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma enabled zlib && test_exec $zlib_extralibs <= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs +enabled libmp3lame && { check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs || -+ require libmp3lame lame/lame.h lame_set_VBR_quality -llibmp3lame-static -llibmpghip-static $libm_extralibs; } ++ require libmp3lame lame/lame.h lame_set_VBR_quality -llibmp3lame-static -llibmpghip-static $libm_extralibs; } enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine || require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; } enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif || -@@ -6772,7 +6773,7 @@ require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } +@@ -7125,7 +7126,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h && enabled libopenh264 && require_pkg_config libopenh264 "openh264 >= 1.3.0" wels/codec_api.h WelsGetCodecVersion enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version || { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } @@ -30,7 +30,7 @@ index a8b74e0..c99f41c 100755 enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } || { check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version || require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } } -@@ -6796,8 +6797,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019. +@@ -7151,8 +7152,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019. enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init || require libsmbclient libsmbclient.h smbc_init -lsmbclient; } @@ -41,17 +41,17 @@ index a8b74e0..c99f41c 100755 enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket -@@ -6880,6 +6881,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" +@@ -7246,6 +7247,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel "-framework OpenCL" || check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || -+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32|| -+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl || ++ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32|| ++ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl || die "ERROR: opencl not found"; } && { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || -@@ -7204,10 +7207,10 @@ enabled amf && - "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400210000" +@@ -7578,10 +7581,10 @@ enabled amf && + "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400240000" # Funny iconv installations are not unusual, so check it after all flags have been set -if enabled libc_iconv; then diff --git a/ports/ffmpeg/0005-fix-nasm.patch b/ports/ffmpeg/0005-fix-nasm.patch index 68b7503b24..b1fb885b4a 100644 --- a/ports/ffmpeg/0005-fix-nasm.patch +++ b/ports/ffmpeg/0005-fix-nasm.patch @@ -1,3 +1,19 @@ +diff --git a/libavcodec/x86/apv_dsp.asm b/libavcodec/x86/apv_dsp.asm +index 60e0f03..12668d3 100644 +--- a/libavcodec/x86/apv_dsp.asm ++++ b/libavcodec/x86/apv_dsp.asm +@@ -18,7 +18,10 @@ + + %include "libavutil/x86/x86util.asm" + +-%if ARCH_X86_64 ++%ifn ARCH_X86_64 ++SECTION .rdata ++apv_dsp_placeholder: times 4 db 0 ++%else + + SECTION_RODATA 32 + diff --git a/libavcodec/x86/mlpdsp.asm b/libavcodec/x86/mlpdsp.asm index 3dc641e..609b834 100644 --- a/libavcodec/x86/mlpdsp.asm @@ -29,10 +45,42 @@ index 65c9fad..5ad73f3 100644 SECTION_RODATA -diff --git a/libavcodec/x86/vvc/vvc_mc.asm b/libavcodec/x86/vvc/vvc_mc.asm +diff --git a/libavcodec/x86/vp9itxfm_16bpp_avx512.asm b/libavcodec/x86/vp9itxfm_16bpp_avx512.asm +index 1924233..17a0ce4 100644 +--- a/libavcodec/x86/vp9itxfm_16bpp_avx512.asm ++++ b/libavcodec/x86/vp9itxfm_16bpp_avx512.asm +@@ -22,7 +22,10 @@ + + %include "libavutil/x86/x86util.asm" + +-%if ARCH_X86_64 && HAVE_AVX512ICL_EXTERNAL ++%ifn ARCH_X86_64 && HAVE_AVX512ICL_EXTERNAL ++SECTION .rdata ++vp9itxfm_16bpp_avx512_placeholder: times 4 db 0 ++%else + + SECTION_RODATA 64 + +diff --git a/libavcodec/x86/vp9itxfm_avx512.asm b/libavcodec/x86/vp9itxfm_avx512.asm +index d51c507..1f16ba2 100644 +--- a/libavcodec/x86/vp9itxfm_avx512.asm ++++ b/libavcodec/x86/vp9itxfm_avx512.asm +@@ -22,7 +22,10 @@ + + %include "libavutil/x86/x86util.asm" + +-%if ARCH_X86_64 && HAVE_AVX512ICL_EXTERNAL ++%ifn ARCH_X86_64 && HAVE_AVX512ICL_EXTERNAL ++SECTION .rdata ++vp9itxfm_avx512_placeholder: times 4 db 0 ++%else + + SECTION_RODATA 64 + +diff --git a/libavcodec/x86/vvc/mc.asm b/libavcodec/x86/vvc/mc.asm index 30aa97c..3975f98 100644 ---- a/libavcodec/x86/vvc/vvc_mc.asm -+++ b/libavcodec/x86/vvc/vvc_mc.asm +--- a/libavcodec/x86/vvc/mc.asm ++++ b/libavcodec/x86/vvc/mc.asm @@ -31,7 +31,9 @@ SECTION_RODATA 32 diff --git a/ports/ffmpeg/0041-add-const-for-opengl-definition.patch b/ports/ffmpeg/0041-add-const-for-opengl-definition.patch deleted file mode 100644 index b22b40d1f3..0000000000 --- a/ports/ffmpeg/0041-add-const-for-opengl-definition.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c -index b2ac6eb..6351614 100644 ---- a/libavdevice/opengl_enc.c -+++ b/libavdevice/opengl_enc.c -@@ -116,7 +116,7 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad - typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type); - typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader); - typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader); --typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length); -+typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length); - typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); - typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog); - diff --git a/ports/ffmpeg/0043-fix-miss-head.patch b/ports/ffmpeg/0043-fix-miss-head.patch deleted file mode 100644 index bad42798c8..0000000000 --- a/ports/ffmpeg/0043-fix-miss-head.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c -index ef658d0..c61b0ad 100644 ---- a/libavfilter/textutils.c -+++ b/libavfilter/textutils.c -@@ -31,6 +31,7 @@ - #include "libavutil/file.h" - #include "libavutil/mem.h" - #include "libavutil/time.h" -+#include "libavutil/time_internal.h" - - static int ff_expand_text_function_internal(FFExpandTextContext *expand_text, AVBPrint *bp, - char *name, unsigned argc, char **argv) diff --git a/ports/ffmpeg/0045-use-prebuilt-bin2c.patch b/ports/ffmpeg/0045-use-prebuilt-bin2c.patch new file mode 100644 index 0000000000..b18212650d --- /dev/null +++ b/ports/ffmpeg/0045-use-prebuilt-bin2c.patch @@ -0,0 +1,24 @@ +diff --git a/ffbuild/common.mak b/ffbuild/common.mak +index ddf4892..7d9f311 100644 +--- a/ffbuild/common.mak ++++ b/ffbuild/common.mak +@@ -12,8 +12,7 @@ endif + + ifndef SUBDIR + +-BIN2CEXE = ffbuild/bin2c$(HOSTEXESUF) +-BIN2C = $(BIN2CEXE) ++BIN2C = bin2c + + ifndef V + Q = @ +@@ -112,9 +111,6 @@ COMPILE_LASX = $(call COMPILE,CC,LASXFLAGS) + %.h.c: + $(Q)echo '#include "$*.h"' >$@ + +-$(BIN2CEXE): ffbuild/bin2c_host.o +- $(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $^ $(HOSTEXTRALIBS) +- + %.metal.air: %.metal + $(METALCC) $< -o $@ + diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index 7461a3cec6..f4483e9519 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -109,9 +109,6 @@ endif() if(@ENABLE_AVCODEC@) FFMPEG_FIND(libavcodec avcodec avcodec.h) endif() -if(@ENABLE_POSTPROC@) - FFMPEG_FIND(libpostproc postproc postprocess.h) -endif() if(@ENABLE_SWRESAMPLE@) FFMPEG_FIND(libswresample swresample swresample.h) endif() diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 8ec67bc2e4..673b19c603 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ffmpeg/ffmpeg REF "n${VERSION}" - SHA512 8411c45f71d2d61184b11e2a786137044a80d9b979a7e2e8513efc5e716b3360bff4533a13875dd4bca492b97b97f0384f7fb4f3d796802e81981b0857d18a2b + SHA512 f31769a7ed52865165e7db4a03e9378b3376012b7aaf0bbc022aa76c3e999e71c3927e6eb8639d8681e04e33362dd73eafa9e7c62a3c71599ff78da09f5cee0a HEAD_REF master PATCHES 0001-create-lib-libraries.patch @@ -15,22 +15,23 @@ vcpkg_from_github( 0020-fix-aarch64-libswscale.patch 0024-fix-osx-host-c11.patch 0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium - 0041-add-const-for-opengl-definition.patch - 0043-fix-miss-head.patch 0044-fix-vulkan-debug-callback-abi.patch + 0045-use-prebuilt-bin2c.patch ) if(SOURCE_PATH MATCHES " ") message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces") endif() +vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/ffmpeg-bin2c") + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY) vcpkg_add_to_path("${NASM_EXE_PATH}") endif() -set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect") +set(OPTIONS "--enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect") if(VCPKG_TARGET_IS_MINGW) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") @@ -62,7 +63,6 @@ endif() vcpkg_cmake_get_vars(cmake_vars_file) include("${cmake_vars_file}") if(VCPKG_DETECTED_MSVC) - string(APPEND OPTIONS " --disable-inline-asm") # clang-cl has inline assembly but this leads to undefined symbols. set(OPTIONS "--toolchain=msvc ${OPTIONS}") # This is required because ffmpeg depends upon optimizations to link correctly string(APPEND VCPKG_COMBINED_C_FLAGS_DEBUG " -O2") @@ -83,7 +83,6 @@ if(VCPKG_DETECTED_CMAKE_C_COMPILER) get_filename_component(CC_filename "${VCPKG_DETECTED_CMAKE_C_COMPILER}" NAME) set(ENV{CC} "${CC_filename}") string(APPEND OPTIONS " --cc=${CC_filename}") - string(APPEND OPTIONS " --host_cc=${CC_filename}") list(APPEND prog_env "${CC_path}") endif() @@ -92,7 +91,6 @@ if(VCPKG_DETECTED_CMAKE_CXX_COMPILER) get_filename_component(CXX_filename "${VCPKG_DETECTED_CMAKE_CXX_COMPILER}" NAME) set(ENV{CXX} "${CXX_filename}") string(APPEND OPTIONS " --cxx=${CXX_filename}") - #string(APPEND OPTIONS " --host_cxx=${CC_filename}") list(APPEND prog_env "${CXX_path}") endif() @@ -109,7 +107,6 @@ if(VCPKG_DETECTED_CMAKE_LINKER AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_ get_filename_component(LD_filename "${VCPKG_DETECTED_CMAKE_LINKER}" NAME) set(ENV{LD} "${LD_filename}") string(APPEND OPTIONS " --ld=${LD_filename}") - #string(APPEND OPTIONS " --host_ld=${LD_filename}") list(APPEND prog_env "${LD_path}") endif() @@ -240,15 +237,6 @@ else() set(ENABLE_AVFILTER OFF) endif() -if("postproc" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} --enable-postproc") - set(ENABLE_POSTPROC ON) - list(APPEND FFMPEG_PKGCONFIG_MODULES libpostproc) -else() - set(OPTIONS "${OPTIONS} --disable-postproc") - set(ENABLE_POSTPROC OFF) -endif() - if("swresample" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-swresample") set(ENABLE_SWRESAMPLE ON) @@ -634,7 +622,7 @@ if(VCPKG_TARGET_IS_UWP) set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") string(APPEND OPTIONS " --disable-programs") string(APPEND OPTIONS " --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") - string(APPEND OPTIONS " --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") + string(APPEND OPTIONS " --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib --extra-ldflags=dxguid.lib") endif() if (VCPKG_TARGET_IS_IOS) @@ -696,7 +684,7 @@ if (VCPKG_TARGET_IS_IOS) set(OPTIONS "${OPTIONS} --extra-ldflags=-isysroot\"${vcpkg_osx_sysroot}\"") endif () -set(OPTIONS_DEBUG "--disable-optimizations") +set(OPTIONS_DEBUG "--disable-optimizations --enable-debug") set(OPTIONS_RELEASE "--enable-optimizations") set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") @@ -711,7 +699,12 @@ elseif(VCPKG_TARGET_IS_WINDOWS) set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") endif() -set(maybe_needed_libraries -lm) +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(maybe_needed_libraries -lm) +else() + set(maybe_needed_libraries "") +endif() + separate_arguments(standard_libraries NATIVE_COMMAND "${VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES}") foreach(item IN LISTS standard_libraries) if(item IN_LIST maybe_needed_libraries) @@ -911,7 +904,6 @@ function(append_dependencies_from_libs out) list(FILTER contents EXCLUDE REGEX "^avdevice$") list(FILTER contents EXCLUDE REGEX "^avfilter$") list(FILTER contents EXCLUDE REGEX "^avformat$") - list(FILTER contents EXCLUDE REGEX "^postproc$") list(FILTER contents EXCLUDE REGEX "^swresample$") list(FILTER contents EXCLUDE REGEX "^swscale$") if(VCPKG_TARGET_IS_WINDOWS) diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index c769a95fc2..e9067abe33 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -1,7 +1,6 @@ { "name": "ffmpeg", - "version": "7.1.2", - "port-version": 5, + "version": "8.0.1", "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." @@ -9,6 +8,10 @@ "homepage": "https://ffmpeg.org", "license": null, "dependencies": [ + { + "name": "ffmpeg-bin2c", + "host": true + }, { "name": "vcpkg-cmake-get-vars", "host": true @@ -214,8 +217,7 @@ "default-features": false, "features": [ "all", - "gpl", - "postproc" + "gpl" ] }, { @@ -549,18 +551,6 @@ "opus" ] }, - "postproc": { - "description": "Build the postproc library", - "dependencies": [ - { - "name": "ffmpeg", - "default-features": false, - "features": [ - "gpl" - ] - } - ] - }, "qsv": { "description": "Intel QSV Codec", "dependencies": [ diff --git a/ports/opencv4/0023-ffmpeg8-support.patch b/ports/opencv4/0023-ffmpeg8-support.patch new file mode 100644 index 0000000000..ec0b763149 --- /dev/null +++ b/ports/opencv4/0023-ffmpeg8-support.patch @@ -0,0 +1,37 @@ +diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp +index d2359b0..bf5832f 100644 +--- a/modules/videoio/src/cap_ffmpeg_impl.hpp ++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp +@@ -685,7 +685,10 @@ void CvCapture_FFMPEG::close() + if( video_st ) + { + #ifdef CV_FFMPEG_CODECPAR ++// avcodec_close removed in FFmpeg release 8.0 ++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100)) + avcodec_close( context ); ++# endif + #endif + video_st = NULL; + } +@@ -2005,7 +2008,21 @@ void CvCapture_FFMPEG::get_rotation_angle() + rotation_angle = 0; + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(57, 68, 100) + const uint8_t *data = 0; ++ // av_stream_get_side_data removed in FFmpeg release 8.0 ++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100)) + data = av_stream_get_side_data(video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL); ++# else ++ AVPacketSideData* sd = video_st->codecpar->coded_side_data; ++ int nb_sd = video_st->codecpar->nb_coded_side_data; ++ if (sd && nb_sd > 0) ++ { ++ const AVPacketSideData* mtx = av_packet_side_data_get(sd, nb_sd, AV_PKT_DATA_DISPLAYMATRIX); ++ if (mtx) ++ { ++ data = mtx->data; ++ } ++ } ++# endif + if (data) + { + rotation_angle = -cvRound(av_display_rotation_get((const int32_t*)data)); diff --git a/ports/opencv4/portfile.cmake b/ports/opencv4/portfile.cmake index 2b0b99dbc9..bd73dac657 100644 --- a/ports/opencv4/portfile.cmake +++ b/ports/opencv4/portfile.cmake @@ -29,6 +29,7 @@ vcpkg_from_github( 0020-fix-narrow-filesystem.diff 0021-fix-qt-gen-def.patch 0022-android-use-vcpkg-cpu-features.patch + 0023-ffmpeg8-support.patch "${PATCH1_FILE}" ) # Disallow accidental build of vendored copies diff --git a/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json b/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json index 27dc9ec9e6..9bf6cf49f6 100644 --- a/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json @@ -41,7 +41,6 @@ "openmpt", "openssl", "opus", - "postproc", "snappy", "soxr", "speex", diff --git a/versions/a-/aubio.json b/versions/a-/aubio.json index 18ffdd57fb..23dc2f1b7b 100644 --- a/versions/a-/aubio.json +++ b/versions/a-/aubio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b5f414308d7e12254ed56a880f77b4218c163a5b", + "version-date": "2024-01-03", + "port-version": 1 + }, { "git-tree": "31db883042c73ae81e74c010dca29c7fc4e273f9", "version-date": "2024-01-03", diff --git a/versions/a-/avcpp.json b/versions/a-/avcpp.json index 3587044ffc..cc53fe0d1d 100644 --- a/versions/a-/avcpp.json +++ b/versions/a-/avcpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f4db5544afbb5ede33ce98bb106ec9eee6f9f6eb", + "version": "2.7.1", + "port-version": 1 + }, { "git-tree": "1b984de5f1030515978eb4e5edf01a02cf384e73", "version": "2.7.1", diff --git a/versions/baseline.json b/versions/baseline.json index 928cbc9968..b653ce314c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -386,7 +386,7 @@ }, "aubio": { "baseline": "2024-01-03", - "port-version": 0 + "port-version": 1 }, "audioengine": { "baseline": "1.3", @@ -418,7 +418,7 @@ }, "avcpp": { "baseline": "2.7.1", - "port-version": 0 + "port-version": 1 }, "avir": { "baseline": "3.1", @@ -2929,8 +2929,12 @@ "port-version": 0 }, "ffmpeg": { - "baseline": "7.1.2", - "port-version": 5 + "baseline": "8.0.1", + "port-version": 0 + }, + "ffmpeg-bin2c": { + "baseline": "8.0.1", + "port-version": 0 }, "ffnvcodec": { "baseline": "13.0.19.0", diff --git a/versions/f-/ffmpeg-bin2c.json b/versions/f-/ffmpeg-bin2c.json new file mode 100644 index 0000000000..42345c4fa7 --- /dev/null +++ b/versions/f-/ffmpeg-bin2c.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "ed013f9d8e1da9dd235af3dc379163581bb0ca71", + "version": "8.0.1", + "port-version": 0 + } + ] +} diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 29a5fe7509..b229d7f8d1 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "109d41404a6701389e5fedf92ff1c903798aff54", + "version": "8.0.1", + "port-version": 0 + }, { "git-tree": "bf414f1e4f2a63ff7410444dc4eabb5b392f6d16", "version": "7.1.2", diff --git a/versions/o-/opencv4.json b/versions/o-/opencv4.json index 4aa56b5972..79598c8535 100644 --- a/versions/o-/opencv4.json +++ b/versions/o-/opencv4.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2dd9b5e8ea99670d3fcb0e45303aa7dc66a1a8f5", + "git-tree": "e911d4fa082b6d5a45197b6c6abe1d232b1fe90f", "version": "4.12.0", "port-version": 1 },