From 4232febcc2e9e1300da9cb39246eead910126202 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 5 Jul 2024 08:31:20 +0200 Subject: [PATCH 1/8] [vcpkg-ci-ffmpeg] Require pass on all CI triplets --- scripts/ci.baseline.txt | 5 ++++ scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json | 23 ++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index f7321114ef2db3..305b9cb49a948c 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1292,9 +1292,14 @@ vcpkg-ci-curl:x64-windows-static-md=pass vcpkg-ci-curl:x64-windows-static=pass vcpkg-ci-curl:x64-windows=pass vcpkg-ci-curl:x86-windows=pass +vcpkg-ci-ffmpeg:arm-neon-android=pass +vcpkg-ci-ffmpeg:arm64-android=pass +vcpkg-ci-ffmpeg:arm64-osx=pass vcpkg-ci-ffmpeg:arm64-uwp=pass vcpkg-ci-ffmpeg:arm64-windows=pass +vcpkg-ci-ffmpeg:x64-android=pass vcpkg-ci-ffmpeg:x64-linux=pass +vcpkg-ci-ffmpeg:x64-osx=pass vcpkg-ci-ffmpeg:x64-uwp=pass vcpkg-ci-ffmpeg:x64-windows-static-md=pass vcpkg-ci-ffmpeg:x64-windows-static=pass diff --git a/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json b/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json index b43b1048c99717..a5721f8ab1d0da 100644 --- a/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json @@ -15,7 +15,6 @@ "avformat", "avresample", "bzip2", - "fdk-aac", "freetype", "gpl", "iconv", @@ -70,6 +69,14 @@ ], "platform": "!uwp" }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "fdk-aac" + ], + "platform": "!android" + }, { "name": "ffmpeg", "default-features": false, @@ -122,25 +129,25 @@ "name": "ffmpeg", "default-features": false, "features": [ - "opengl" + "avisynthplus" ], - "platform": "!uwp & !(arm64 & windows)" + "platform": "windows & !arm & !uwp & !static" }, { "name": "ffmpeg", "default-features": false, "features": [ - "avisynthplus" + "tesseract" ], - "platform": "windows & !arm & !uwp & !static" + "platform": "!(windows & arm) & !static & !uwp" }, { "name": "ffmpeg", "default-features": false, "features": [ - "tesseract" + "opengl" ], - "platform": "!(windows & arm) & !static & !uwp" + "platform": "!uwp & !(arm64 & windows) & !android" }, { "name": "ffmpeg", @@ -148,7 +155,7 @@ "features": [ "nvcodec" ], - "platform": "linux | (!osx & !uwp & !(arm64 & windows))" + "platform": "!android & !osx & !uwp & !(arm64 & windows)" } ] } From e865a5bedfb32c0d7f29555a179239750d5433b9 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 6 Jul 2024 09:02:27 +0200 Subject: [PATCH 2/8] [vcpkg-ci-ffmpeg] Build a tool --- scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json b/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json index a5721f8ab1d0da..675db85c30ef9f 100644 --- a/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json @@ -60,6 +60,7 @@ "default-features": false, "features": [ "ass", + "ffmpeg", "fontconfig", "fribidi", "modplug", From 917200bfb41de9ee3d9b58112edfc3b25f720572 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 6 Jul 2024 08:56:37 +0200 Subject: [PATCH 3/8] [ffmpeg] Use selected CMAKE_C_STANDARD_LIBARIES For improving portability of interaction with cmake based dependencies such as libwebp, apply standard libaries as cmake does: Use them for linking, but do not output them in exported config. --- ports/ffmpeg/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 3eaa354165b274..4d1b9c716f4d0b 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -672,6 +672,14 @@ elseif(VCPKG_TARGET_IS_WINDOWS) set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") endif() +set(maybe_needed_libraries -lm) +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) + set(OPTIONS "${OPTIONS} \"--extra-libs=${item}\"") + endif() +endforeach() + vcpkg_find_acquire_program(PKGCONFIG) set(OPTIONS "${OPTIONS} --pkg-config=${PKGCONFIG}") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 2d8ccce0152a5a199ee001e6b298efec04e307d7 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 6 Jul 2024 11:48:17 +0200 Subject: [PATCH 4/8] [libmodplug] Fix export of C++ linkage --- ports/libmodplug/004-export-pkgconfig.patch | 40 ++++++++++++--------- ports/libmodplug/portfile.cmake | 2 +- ports/libmodplug/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libmodplug.json | 5 +++ 5 files changed, 31 insertions(+), 20 deletions(-) diff --git a/ports/libmodplug/004-export-pkgconfig.patch b/ports/libmodplug/004-export-pkgconfig.patch index eb59ca111b1246..97509b5c39477e 100644 --- a/ports/libmodplug/004-export-pkgconfig.patch +++ b/ports/libmodplug/004-export-pkgconfig.patch @@ -1,18 +1,14 @@ -From 6a3e539ea26eec1bfc2a6e722e923bd5221f8d26 Mon Sep 17 00:00:00 2001 -From: "Matthias C. M. Troffaes" -Date: Thu, 8 Jul 2021 10:47:30 +0100 -Subject: [PATCH] Fix Libs.private in .pc file. - ---- - CMakeLists.txt | 7 +++++-- - libmodplug.pc.in | 2 +- - 2 files changed, 6 insertions(+), 3 deletions(-) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index 468f1a3..3164fc6 100644 +index 2ada51b..a0a28d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -141,7 +141,11 @@ if(HAVE_SINF) +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8.0) ++cmake_minimum_required(VERSION 3.5) + + project(libmodplug) + add_definitions(-DMODPLUG_BUILD) +@@ -131,7 +131,24 @@ if(HAVE_SINF) add_definitions(-DHAVE_SINF) endif(HAVE_SINF) @@ -20,12 +16,25 @@ index 468f1a3..3164fc6 100644 +if(WIN32) + set(LIBS_PRIVATE "-luser32") +else(WIN32) -+ set(LIBS_PRIVATE "-lstdc++ -lm") ++ set(FAKE_CXX_LINKAGE "") ++ foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES) ++ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES) ++ continue() ++ elseif(EXISTS "${lib}") ++ string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}") ++ else() ++ string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}") ++ endif() ++ endforeach() ++ set(LIBS_PRIVATE " ${FAKE_CXX_LINKAGE} ") ++ if(NOT LIBS_PRIVATE MATCHES " -lm ") ++ string(APPEND LIBS_PRIVATE "-lm") ++ endif() +endif(WIN32) set(prefix "${CMAKE_INSTALL_PREFIX}") set(exec_prefix "${CMAKE_INSTALL_PREFIX}") set(libdir "${CMAKE_INSTALL_PREFIX}/lib") -@@ -152,4 +156,3 @@ if (NOT WIN32) +@@ -142,4 +159,3 @@ if (NOT WIN32) install(FILES "${PROJECT_BINARY_DIR}/libmodplug.pc" DESTINATION lib/pkgconfig ) @@ -41,6 +50,3 @@ index bbf05f9..e4a43cc 100644 -Libs.private: -lstdc++ -lm +Libs.private: @LIBS_PRIVATE@ Cflags: -I${includedir} --- -2.21.0.windows.1 - diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index da9035210c8a86..c792ca03d897f9 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -13,7 +13,7 @@ vcpkg_from_github( ${STATIC_PATCH} 002-detect_sinf.patch 003-use-static-cast-for-ctype.patch - 004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59 + 004-export-pkgconfig.patch 005-fix-install-paths.patch # https://github.com/Konstanty/libmodplug/pull/61 ) diff --git a/ports/libmodplug/vcpkg.json b/ports/libmodplug/vcpkg.json index 457f9592a973a5..c958350745b5f4 100644 --- a/ports/libmodplug/vcpkg.json +++ b/ports/libmodplug/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libmodplug", "version": "0.8.9.0", - "port-version": 12, + "port-version": 13, "description": "The ModPlug mod file playing library.", "homepage": "https://github.com/Konstanty/libmodplug", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index e29aba45a018bc..b88f20a8b0a5ee 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4714,7 +4714,7 @@ }, "libmodplug": { "baseline": "0.8.9.0", - "port-version": 12 + "port-version": 13 }, "libmorton": { "baseline": "0.2.12", diff --git a/versions/l-/libmodplug.json b/versions/l-/libmodplug.json index 3008435d2b8be3..87c6123f63f21e 100644 --- a/versions/l-/libmodplug.json +++ b/versions/l-/libmodplug.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "24e042bf1e6d517ef9bbb83229c541d3e1cdaf3c", + "version": "0.8.9.0", + "port-version": 13 + }, { "git-tree": "840fa5f79ab3d2f289308845958294759213d69e", "version": "0.8.9.0", From b1ef46ae43bc5bd322975f3e6f8fd61292b6c50f Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 6 Jul 2024 12:05:40 +0200 Subject: [PATCH 5/8] [ffmpeg] Don't enforce libstdc++ on libopenmpt --- ports/ffmpeg/0004-dependencies.patch | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/ports/ffmpeg/0004-dependencies.patch b/ports/ffmpeg/0004-dependencies.patch index e2d929a7a79de3..1c404451390b83 100644 --- a/ports/ffmpeg/0004-dependencies.patch +++ b/ports/ffmpeg/0004-dependencies.patch @@ -1,6 +1,8 @@ diff --git a/configure b/configure -index 3243e23021..6d3f31fc95 100755 -@@ -6630,7 +6630,7 @@ fi +index a8b74e0..c99f41c 100755 +--- a/configure ++++ b/configure +@@ -6633,7 +6633,7 @@ fi enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion || check_lib zlib zlib.h zlibVersion -lz; } @@ -19,7 +21,16 @@ index 3243e23021..6d3f31fc95 100755 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 || -@@ -6793,8 +6794,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019. +@@ -6772,7 +6773,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h && + enabled libopenh264 && require_pkg_config libopenh264 openh264 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; } } +-enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" ++enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create + 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. 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; } @@ -30,7 +41,7 @@ index 3243e23021..6d3f31fc95 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 -@@ -6884,6 +6885,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" +@@ -6880,6 +6881,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 -Wl,-framework,OpenCL || check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || @@ -39,7 +50,7 @@ index 3243e23021..6d3f31fc95 100755 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)" || -@@ -7208,10 +7211,10 @@ enabled amf && +@@ -7204,10 +7207,10 @@ enabled amf && "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x00010004001d0000" # Funny iconv installations are not unusual, so check it after all flags have been set From 5fcd3015057af4132c9cde5c25a24a679986510b Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 6 Jul 2024 10:48:04 +0200 Subject: [PATCH 6/8] [libopenmpt] Export C++ linkage --- ports/libopenmpt/CMakeLists.txt | 12 +++++++++++- ports/libopenmpt/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/l-/libopenmpt.json | 5 +++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ports/libopenmpt/CMakeLists.txt b/ports/libopenmpt/CMakeLists.txt index e33601cc0bbfb9..72234263be37c6 100644 --- a/ports/libopenmpt/CMakeLists.txt +++ b/ports/libopenmpt/CMakeLists.txt @@ -75,8 +75,18 @@ target_link_libraries( ZLIB::ZLIB ) +set(FAKE_CXX_LINKAGE "") +foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES) + if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES) + continue() + elseif(EXISTS "${lib}") + string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}") + else() + string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}") + endif() +endforeach() +set(LIBOPENMPT_LIBS_PRIVATE "${FAKE_CXX_LINKAGE}") set(LIBOPENMPT_REQUIRES_PRIVATE "zlib vorbis vorbisfile libmpg123") -set(LIBOPENMPT_LIBS_PRIVATE "") set(prefix "${CMAKE_INSTALL_PREFIX}") set(exec_prefix [[${prefix}]]) set(includedir [[${prefix}/include]]) diff --git a/ports/libopenmpt/vcpkg.json b/ports/libopenmpt/vcpkg.json index 7dde386d43a39f..c6fcc4b3c97d3b 100644 --- a/ports/libopenmpt/vcpkg.json +++ b/ports/libopenmpt/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libopenmpt", "version": "0.7.4", + "port-version": 1, "description": "A cross-platform C++ and C library to decode tracked music files (modules) into a raw PCM audio stream.", "homepage": "https://openmpt.org/", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index b88f20a8b0a5ee..ad1891291f3c03 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4798,7 +4798,7 @@ }, "libopenmpt": { "baseline": "0.7.4", - "port-version": 0 + "port-version": 1 }, "libopensp": { "baseline": "1.5.2", diff --git a/versions/l-/libopenmpt.json b/versions/l-/libopenmpt.json index 96b38858ec04a7..f471e5713b8312 100644 --- a/versions/l-/libopenmpt.json +++ b/versions/l-/libopenmpt.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "42b5aedfd10f2b5c2882e3a7936912d2991a4e3b", + "version": "0.7.4", + "port-version": 1 + }, { "git-tree": "79775a42db4e2fc9059cd96568f2dda292ee46d0", "version": "0.7.4", From 44dc8474b4e24c3ab81a2c21974d4c0c4c0c9c08 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 6 Jul 2024 15:49:42 +0200 Subject: [PATCH 7/8] [ffmpeg] Update FindFFMPEG.cmake.in --- ports/ffmpeg/FindFFMPEG.cmake.in | 29 ++++++++++++++++------------- ports/ffmpeg/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/f-/ffmpeg.json | 5 +++++ 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index 8a7237fc43421a..ca63135cf05f1a 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -50,19 +50,22 @@ function(append_dependencies out) set(config RELEASE) set(path "${CURRENT_INSTALLED_DIR}/lib/") endif() - foreach(lib_name ${arg_NAMES}) - if("${lib_name}" STREQUAL "-pthread") - list(APPEND ${out} "-pthread") - elseif("${lib_name}" STREQUAL "-pthreads") - list(APPEND ${out} "-pthreads") - elseif("${lib_name}" STREQUAL "gcc") - list(APPEND ${out} "-lgcc") - elseif("${lib_name}" STREQUAL "gcc_s") - list(APPEND ${out} "-lgcc_s") - elseif("${lib_name}" STREQUAL "stdc++") - list(APPEND ${out} "-lstdc++") - elseif("${lib_name}" STREQUAL "atomic") - list(APPEND ${out} "-latomic") + if("${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}" STREQUAL "") + enable_language(CXX) + endif() + set(pass_through + ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} + bcrypt gdi32 mfuuid ole32 oleaut32 psapi secur32 shlwapi strmiids user32 uuid vfw32 ws2_32 + -pthread -pthreads pthread atomic m + ) + cmake_policy(SET CMP0057 NEW) + foreach(lib_name IN LISTS arg_NAMES) + if(lib_name IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES) + continue() # implicit even for C + elseif(lib_name IN_LIST pass_through) + list(APPEND ${out} "${lib_name}") + elseif(EXISTS "${lib_name}") + list(APPEND ${out} "${lib_name}") else() # first look in ${path} specifically to ensure we find the right release/debug variant find_library(FFMPEG_DEPENDENCY_${lib_name}_${config} NAMES "${lib_name}" PATHS "${path}" NO_DEFAULT_PATH) diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index 82610a0a34bc9d..0746fafd1d5872 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ffmpeg", "version": "6.1.1", - "port-version": 10, + "port-version": 11, "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." diff --git a/versions/baseline.json b/versions/baseline.json index ad1891291f3c03..6ac97d40c987e0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2694,7 +2694,7 @@ }, "ffmpeg": { "baseline": "6.1.1", - "port-version": 10 + "port-version": 11 }, "ffnvcodec": { "baseline": "12.1.14.0", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 27746bb2e4cf34..f5e34b544cd32a 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a8db1fbf3030c47e207c5c8f23a2a76a30508954", + "version": "6.1.1", + "port-version": 11 + }, { "git-tree": "d72e74de0c3755edace24452e7bc74e0f419d65e", "version": "6.1.1", From 839ca577298e145afb221d09432de8dc124d01cc Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sun, 7 Jul 2024 11:08:52 +0200 Subject: [PATCH 8/8] [ffmpeg] Avoid redundant export fixup --- ports/ffmpeg/FindFFMPEG.cmake.in | 2 ++ ports/ffmpeg/vcpkg-cmake-wrapper.cmake | 17 ++++++++++++++--- versions/f-/ffmpeg.json | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index ca63135cf05f1a..1b36f1779101b3 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -161,4 +161,6 @@ endif() find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS) +set(z_vcpkg_using_vcpkg_find_ffmpeg ${FFMPEG_FOUND}) + endif() diff --git a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake index e99f98bc156f42..eaa4f359af8772 100644 --- a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake +++ b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake @@ -1,10 +1,12 @@ set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -include(SelectLibraryConfigurations) - cmake_policy(SET CMP0012 NEW) +# Detect if we use "our" find module or a vendored one +set(z_vcpkg_using_vcpkg_find_ffmpeg OFF) + +# Detect targets created e.g. by VTK/CMake/FindFFMPEG.cmake set(vcpkg_no_avcodec_target ON) set(vcpkg_no_avformat_target ON) set(vcpkg_no_avutil_target ON) @@ -24,6 +26,11 @@ endif() _find_package(${ARGS}) +# Fixup of variables and targets for (some) vendored find modules +if(NOT z_vcpkg_using_vcpkg_find_ffmpeg) + +include(SelectLibraryConfigurations) + if(WIN32) set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/../../../@_HOST_TRIPLET@/tools/pkgconf/pkgconf.exe" CACHE STRING "" FORCE) endif() @@ -282,10 +289,14 @@ if(@WITH_OPENCL@) endif() endif() +endif(NOT z_vcpkg_using_vcpkg_find_ffmpeg) +unset(z_vcpkg_using_vcpkg_find_ffmpeg) + set(FFMPEG_LIBRARY ${FFMPEG_LIBRARIES}) set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH}) -unset(vcpkg_no_avformat_target) unset(vcpkg_no_avcodec_target) +unset(vcpkg_no_avformat_target) unset(vcpkg_no_avutil_target) +unset(vcpkg_no_swresample_target) diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index f5e34b544cd32a..dbec2ed1c725b9 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a8db1fbf3030c47e207c5c8f23a2a76a30508954", + "git-tree": "15b90b33b76e69c2d9b876b32c4c9b47c97846ed", "version": "6.1.1", "port-version": 11 },