aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2021-05-18 08:24:33 +0100
committerGitHub <noreply@github.com>2021-05-18 00:24:33 -0700
commitd77e7675990ac4c5727a40c50b91da59aada8333 (patch)
tree55efaa439d7f980fc411180922c0366368512bcb
parentf8c233a2bd088a08360407bc5601ccd75c8100c5 (diff)
downloadvcpkg-d77e7675990ac4c5727a40c50b91da59aada8333.tar.gz
vcpkg-d77e7675990ac4c5727a40c50b91da59aada8333.zip
[openh264] only build shared or static library (#17592)
* [openh264] respect meson default_library option so only required shared/static library gets built * [openh264] bump port version * [openh264] x-add-version
-rw-r--r--ports/openh264/0001-respect-default-library-option.patch57
-rw-r--r--ports/openh264/portfile.cmake2
-rw-r--r--ports/openh264/vcpkg.json1
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/o-/openh264.json5
5 files changed, 66 insertions, 1 deletions
diff --git a/ports/openh264/0001-respect-default-library-option.patch b/ports/openh264/0001-respect-default-library-option.patch
new file mode 100644
index 000000000..15e3c7154
--- /dev/null
+++ b/ports/openh264/0001-respect-default-library-option.patch
@@ -0,0 +1,57 @@
+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)
+
diff --git a/ports/openh264/portfile.cmake b/ports/openh264/portfile.cmake
index 275b18b96..e9d9808f5 100644
--- a/ports/openh264/portfile.cmake
+++ b/ports/openh264/portfile.cmake
@@ -3,6 +3,8 @@ vcpkg_from_github(
REPO cisco/openh264
REF f15f940425eebf24ce66984db2445733cf500b7b
SHA512 361003296e9cef2956aeff76ae4df7a949a585710facd84a92c1b4164c5a4522d6615fcc485ebc2e50be8a13feb942b870efdd28837307467081cb1eba1f17d2
+ PATCHES
+ 0001-respect-default-library-option.patch # https://github.com/cisco/openh264/pull/3351
)
if((VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64"))
diff --git a/ports/openh264/vcpkg.json b/ports/openh264/vcpkg.json
index aa8f2b53e..7d60b7691 100644
--- a/ports/openh264/vcpkg.json
+++ b/ports/openh264/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "openh264",
"version-date": "2021-03-16",
+ "port-version": 1,
"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",
diff --git a/versions/baseline.json b/versions/baseline.json
index 1e6f14723..7508a2986 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4506,7 +4506,7 @@
},
"openh264": {
"baseline": "2021-03-16",
- "port-version": 0
+ "port-version": 1
},
"openigtlink": {
"baseline": "3.0",
diff --git a/versions/o-/openh264.json b/versions/o-/openh264.json
index 0f5a9176e..229ffc1d7 100644
--- a/versions/o-/openh264.json
+++ b/versions/o-/openh264.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "07352ebe168754b537e6ed23cc64e17e7b22ac9e",
+ "version-date": "2021-03-16",
+ "port-version": 1
+ },
+ {
"git-tree": "e541fb33857fd6401459e1f0fdc617d47fa3094e",
"version-date": "2021-03-16",
"port-version": 0