From 2bc10eae2fb0b8c7c098325c4e9d82aa5d0329d9 Mon Sep 17 00:00:00 2001 From: Rich Logan Date: Mon, 22 Mar 2021 22:58:34 +0000 Subject: [PATCH] [openh264] Add openh264 port (#16714) * Add openh264 port * Fixes for CI * Don't build tests * Add git dependency * Update gas-preprocessor * Update gas subfolder name * No UWP support for meson builds * Manifest format * Update ports/openh264/vcpkg.json Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update versions * [openh264] Tweak precise tool dependencies Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: Robert Schumacher --- ports/openh264/portfile.cmake | 32 +++++++++++++++++++ ports/openh264/vcpkg.json | 10 ++++++ .../cmake/vcpkg_find_acquire_program.cmake | 6 ++-- versions/baseline.json | 4 +++ versions/o-/openh264.json | 9 ++++++ 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 ports/openh264/portfile.cmake create mode 100644 ports/openh264/vcpkg.json create mode 100644 versions/o-/openh264.json diff --git a/ports/openh264/portfile.cmake b/ports/openh264/portfile.cmake new file mode 100644 index 00000000000..275b18b961f --- /dev/null +++ b/ports/openh264/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cisco/openh264 + REF f15f940425eebf24ce66984db2445733cf500b7b + SHA512 361003296e9cef2956aeff76ae4df7a949a585710facd84a92c1b4164c5a4522d6615fcc485ebc2e50be8a13feb942b870efdd28837307467081cb1eba1f17d2 +) + +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}) +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) +endif() + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -Dtests=disabled +) + +vcpkg_install_meson() +vcpkg_copy_pdbs() + +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) diff --git a/ports/openh264/vcpkg.json b/ports/openh264/vcpkg.json new file mode 100644 index 00000000000..aa8f2b53e62 --- /dev/null +++ b/ports/openh264/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "openh264", + "version-date": "2021-03-16", + "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", + "dependencies": [ + "tool-meson" + ] +} diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index dc8fb668ec5..4c022139740 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -337,14 +337,14 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "GASPREPROCESSOR") set(NOEXTRACT true) set(PROGNAME gas-preprocessor) - set(SUBDIR "b5ea3a50") + set(SUBDIR "4daa6115") set(REQUIRED_INTERPRETER PERL) set(SCRIPTNAME "gas-preprocessor.pl") set(PATHS ${DOWNLOADS}/tools/gas-preprocessor/${SUBDIR}) set(_vfa_RENAME "gas-preprocessor.pl") - set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/b5ea3a50ed991e6a3218e89402a8162c73f59cb2/gas-preprocessor.pl") + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/4daa611556a0558dfe537b4f7ad80f7e50a079c1/gas-preprocessor.pl") set(ARCHIVE "gas-preprocessor-${SUBDIR}.pl") - set(HASH 3a42a90dee09f3c8653d043d848057287f7460806a08f9471131d0c546ba541bdfa4efa3019e7ffc57a6c20538f1034f7a53b30ecaad9db5add7c71d8de35db9) + set(HASH 2737ba3c1cf85faeb1fbfe015f7bad170f43a857a50a1b3d81fa93ba325d481f73f271c5a886ff8b7eef206662e19f0e9ef24861dfc608b67b8ea8a2062dc061) elseif(VAR MATCHES "DARK") set(PROGNAME dark) set(SUBDIR "wix311-binaries") diff --git a/versions/baseline.json b/versions/baseline.json index df3801e3ff2..b65bc2a6c1b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4364,6 +4364,10 @@ "baseline": "2020-03-25", "port-version": 0 }, + "openh264": { + "baseline": "2021-03-16", + "port-version": 0 + }, "openigtlink": { "baseline": "3.0", "port-version": 1 diff --git a/versions/o-/openh264.json b/versions/o-/openh264.json new file mode 100644 index 00000000000..0f5a9176e3f --- /dev/null +++ b/versions/o-/openh264.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "e541fb33857fd6401459e1f0fdc617d47fa3094e", + "version-date": "2021-03-16", + "port-version": 0 + } + ] +}