[openh264] Update to version 2.5.0 (#42966)

Co-authored-by: tartanpaint <35690467+tartanpaint@users.noreply.github.com>
This commit is contained in:
Kai Pastor 2025-01-03 18:39:55 +01:00 committed by GitHub
parent 976ebb8920
commit 65be701994
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 51 additions and 86 deletions

View File

@ -1,57 +0,0 @@
From 328b15a962caa928373b55d85f9911f45442886e Mon Sep 17 00:00:00 2001
From: Xavier Claessens <xavier.claessens@collabora.com>
Date: Mon, 19 Oct 2020 17:03:25 -0400
Subject: [PATCH] meson: Respect default_library option
When using library() instead of shared_library() and static_library,
meson will build shared, static, or both depending on the
value of static_library option.
As far as I know extract_all_objects() was uses as workaround for Meson
bugs fixed a while ago when using not installed static libraries.
---
meson.build | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/meson.build b/meson.build
index 283413375b..65641508de 100644
--- a/meson.build
+++ b/meson.build
@@ -184,26 +184,13 @@ api_header_deps = []
subdir ('codec')
subdir ('test')
-all_objects = [
- libcommon.extract_all_objects(),
- libprocessing.extract_all_objects(),
- libencoder.extract_all_objects(),
- libdecoder.extract_all_objects()
-]
-
-libopenh264_shared = shared_library('openh264',
- objects: all_objects,
+libopenh264 = library('openh264',
+ link_whole: [libcommon, libprocessing, libencoder, libdecoder],
install: true,
soversion: major_version,
- version: meson.project_version(),
vs_module_defs: 'openh264.def',
dependencies: deps)
-libopenh264_static = static_library('openh264',
- objects: all_objects,
- install: true,
- dependencies: deps)
-
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
foreach t : ['', '-static']
@@ -235,7 +222,7 @@ foreach t : ['', '-static']
endforeach
openh264_dep = declare_dependency(
- link_with: libopenh264_shared,
+ link_with: libopenh264,
include_directories: include_directories('include'),
dependencies: deps + api_header_deps)

View File

@ -1,42 +1,56 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cisco/openh264
REF f15f940425eebf24ce66984db2445733cf500b7b
SHA512 361003296e9cef2956aeff76ae4df7a949a585710facd84a92c1b4164c5a4522d6615fcc485ebc2e50be8a13feb942b870efdd28837307467081cb1eba1f17d2
PATCHES
0001-respect-default-library-option.patch # https://github.com/cisco/openh264/pull/3351
REF v${VERSION}
SHA512 cb6d3ca8d5277325dd64dec399421c4c62bc1fd012fe1521d7195e95ce7f59527919cf698829044dca3d9b1d8288c49b49111d01c9d2896c819da806492af838
)
set(cxx_link_libraries "")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
block(PROPAGATE cxx_link_libraries)
vcpkg_list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_DEFAULT_VARS_TO_CHECK=CMAKE_C_IMPLICIT_LINK_LIBRARIES;CMAKE_CXX_IMPLICIT_LINK_LIBRARIES")
vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
list(REMOVE_ITEM VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_LIBRARIES ${VCPKG_DETECTED_CMAKE_C_IMPLICIT_LINK_LIBRARIES})
list(TRANSFORM VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_LIBRARIES PREPEND "-l")
string(JOIN " " cxx_link_libraries ${VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
endblock()
endif()
vcpkg_list(SET additional_binaries)
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})
vcpkg_list(APPEND additional_binaries "nasm = ['${NASM}']")
elseif(VCPKG_TARGET_IS_WINDOWS)
vcpkg_find_acquire_program(GASPREPROCESSOR)
foreach(GAS_PATH ${GASPREPROCESSOR})
get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY)
vcpkg_add_to_path(${GAS_ITEM_PATH})
endforeach(GAS_PATH)
list(JOIN GASPREPROCESSOR "','" gaspreprocessor)
vcpkg_list(APPEND additional_binaries "gas-preprocessor.pl = ['${gaspreprocessor}']")
endif()
vcpkg_configure_meson(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -Dtests=disabled
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Dtests=disabled
ADDITIONAL_BINARIES
${additional_binaries}
)
vcpkg_install_meson()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/openh264.pc" " -lstdc++" "")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/openh264.pc" " -lstdc++" "")
endif()
if(cxx_link_libraries)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/openh264.pc"
"(Libs:[^\r\n]*)"
"\\1 ${cxx_link_libraries}"
REGEX
)
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/openh264.pc"
"(Libs:[^\r\n]*)"
"\\1 ${cxx_link_libraries}"
REGEX
)
endif()
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,11 +1,14 @@
{
"name": "openh264",
"version-date": "2021-03-16",
"port-version": 4,
"version": "2.5.0",
"description": "OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.",
"homepage": "https://www.openh264.org/",
"supports": "!uwp",
"license": "BSD-2-Clause",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-tool-meson",
"host": true

View File

@ -20,6 +20,7 @@
"lzma",
"mp3lame",
"nonfree",
"openh264",
"openjpeg",
"openmpt",
"openssl",
@ -73,7 +74,6 @@
"fribidi",
"modplug",
"opencl",
"openh264",
"srt"
],
"platform": "!uwp"

View File

@ -6713,8 +6713,8 @@
"port-version": 1
},
"openh264": {
"baseline": "2021-03-16",
"port-version": 4
"baseline": "2.5.0",
"port-version": 0
},
"openigtlink": {
"baseline": "3.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "91cf19eb2e0e9de617f43708201c69dbf097b649",
"version": "2.5.0",
"port-version": 0
},
{
"git-tree": "34faf5afdf562b2dff8472e4101d3a01f51d3372",
"version-date": "2021-03-16",