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 diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index 8a7237fc43421a..1b36f1779101b3 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) @@ -158,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/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") 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/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/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/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/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..675db85c30ef9f 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", @@ -61,6 +60,7 @@ "default-features": false, "features": [ "ass", + "ffmpeg", "fontconfig", "fribidi", "modplug", @@ -70,6 +70,14 @@ ], "platform": "!uwp" }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "fdk-aac" + ], + "platform": "!android" + }, { "name": "ffmpeg", "default-features": false, @@ -122,25 +130,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 +156,7 @@ "features": [ "nvcodec" ], - "platform": "linux | (!osx & !uwp & !(arm64 & windows))" + "platform": "!android & !osx & !uwp & !(arm64 & windows)" } ] } diff --git a/versions/baseline.json b/versions/baseline.json index e29aba45a018bc..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", @@ -4714,7 +4714,7 @@ }, "libmodplug": { "baseline": "0.8.9.0", - "port-version": 12 + "port-version": 13 }, "libmorton": { "baseline": "0.2.12", @@ -4798,7 +4798,7 @@ }, "libopenmpt": { "baseline": "0.7.4", - "port-version": 0 + "port-version": 1 }, "libopensp": { "baseline": "1.5.2", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 27746bb2e4cf34..dbec2ed1c725b9 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "15b90b33b76e69c2d9b876b32c4c9b47c97846ed", + "version": "6.1.1", + "port-version": 11 + }, { "git-tree": "d72e74de0c3755edace24452e7bc74e0f419d65e", "version": "6.1.1", 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", 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",