summaryrefslogtreecommitdiff
path: root/media-libs/tg_owt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
commit93a93e9a3b53c1a73142a305ea1f8136846942ee (patch)
treeb9791a06ab3284e27b568412c59316c66240c682 /media-libs/tg_owt
parent2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff)
gentoo resync : 22.12.2021
Diffstat (limited to 'media-libs/tg_owt')
-rw-r--r--media-libs/tg_owt/Manifest6
-rw-r--r--media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch115
-rw-r--r--media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch17
-rw-r--r--media-libs/tg_owt/tg_owt-0_pre20211207.ebuild (renamed from media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild)30
4 files changed, 157 insertions, 11 deletions
diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index 45ebd6baa78e..94d282d02abe 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,9 +1,11 @@
AUX tg_owt-0_pre20210626-allow-disabling-X11.patch 3969 BLAKE2B fb0cb1f04762ec0ccb6e5f1057a413d380356cccbe394679bb6168a15961e906cf6a6fa025b87ee78d98902314656e0973932c5c952fc6edf8650dc4dd40a6bb SHA512 ca74fb15ad43e6933ccc5d014c9219045fd0be4a0bc5a18e8c8c244455fa1dd72268cd14fa203df66acd411b8d1315339c7f29930da898d80c40e74c6e326fc4
AUX tg_owt-0_pre20210626-allow-disabling-pipewire.patch 1030 BLAKE2B e81b7fa348a1cfb148f0f64524a18ea48fb5cd01104137edb33e85a86c190418c0b8230564026527bea414c27b1a535415ad31279b705ea777241874ae3c1802 SHA512 8b16e49dad06aa71becb535600d411160e1cbef2c2cdc2258aebc282b4b64d87a0011b4c1ade4209116176965be3c2ee8ab2bf0ad5a33c451f184b32d0a7e77a
AUX tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch 3322 BLAKE2B 61f04506af251a52f77a5b1289471e6519bc00aab1f0e2b0b703deec094109537506297dac55d6ece747beab889a2509a71ae862683c87e6f0c006573b3dffab SHA512 7c5a4851cfe982b069c1ce752414a7771805ab1edf00a88d16e46b11cda8a85692cc2534e04a562aba1519638e2c128b66b11f24ac93f7b8e3b2b9be6d031d55
+AUX tg_owt-0_pre20211207-allow-disabling-X11.patch 4240 BLAKE2B 923aea93bcc64c946a5a3729e6e3e419ef78d99ed85195fdc7b364b5eb931350d09c4ae3bfadef4e72fdccfd7c322ac8b6a98fe8a789aa88ed490a57db355ab0 SHA512 d2e05f07a86381aea1bc2cdc7e4dffc6ff2b866769dd7fe20808fdea5e00514830f709bea30123097c5942cddee887aa98cfd4d6ce45dd772a06391e2df0761c
+AUX tg_owt-0_pre20211207-fix-dcsctp-references.patch 1337 BLAKE2B cf74aefd4a350ebdcef76bbded02fd86fdf499809aef338969d75c5f91ae68b00daac4f2778b5ce2ee89461b81f4702e5181e3ea4aaf7145aea23096b2ba341e SHA512 b21b0fe8f75c1ec03755197b3db82a0fe51d9ba3e2cf6b976392515ba04032f8a676e92ab992aed6525eabb81318282710460bbfa8aa594e7b152129d0314e85
DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
-DIST tg_owt-0_pre20210626.tar.gz 16264716 BLAKE2B de500e02789516527c814d0aba87cf1d0e772747f06acff7ac9295508c6e6bce1915cd3a703df618ff17ba8e04dc194538a6ef859fa85b301bb63eceab2c339a SHA512 a5d10011c427d8685bcf0743c356ff8c58c3cad6c59ac2409298b30b15cb04233889a5ed0a18107ac5b3477eee96741fdc85176d4330c866e8e3329753be7d73
DIST tg_owt-0_pre20210914.tar.gz 16266351 BLAKE2B 048d6a77046b10af63f4e5c1530b6aeb9d423702a6e34e6e0082a10b06262e19c30aa766cc9ea38549605d8d2cc08bfcd5a4e715ab53c46031c23938f94af27e SHA512 bd46393d9a85fa38fcd560af4f68a4868b25528b134731070e8578217cb0b9bb8b5cf7b3990f619d321ba373e5630a52e467e14d93f71b24de3a5b3e591b8866
-EBUILD tg_owt-0_pre20210626-r1.ebuild 3365 BLAKE2B c1232b870dba6f5516256c9b667062099bdfbf4959486e52d5cb6ad7907ce7e723002eb8354dc06f4324d1349d24650a443b4e4629ab46511828367b7843424b SHA512 baccbacc571087336040fc5f24f0456be0dc395c115e748650ce43bb29ffd2859d6ea4686ff900c13fb63d12e20bcde001824524f5b0d7c5a1b8a252ae3e7fba
+DIST tg_owt-0_pre20211207.tar.gz 16780636 BLAKE2B bfa35a43b2085b897eb16986ecfb79ece5f8076d88572869580716014a564023dbc156b1d0885685bf04c57e34f26870dde497e8aae9889e5b2eed6d9a012d8e SHA512 7f8b1ae63371106cd59db6e2a290fd24554d31de4188d243ed6645468dad91c9653b7685add61291830e5309284a87512a73b63c3be76f01ea33701c72f48c90
EBUILD tg_owt-0_pre20210914.ebuild 3550 BLAKE2B bd23e195adc8d17d68a022319a859004edf8c5309a1eacb010414dc4844a5ea78db106db8f6ecbc3c32ab187cd243d7b3d87af49793bae841324470aaa7bac38 SHA512 dabe6b1c68316e7926c7b7b773bbfadbf32feac4d0bf597f2d1e0e6a7fa84e65eb309fde1bdc21e16855d25b71ddf4c1972a79422f748a0a11c3031108bd5052
+EBUILD tg_owt-0_pre20211207.ebuild 3797 BLAKE2B aa483cfead9748dc8f77ffc75918eb64d6b407b18c8f8f19c14e36caf5ef95d2f2ac6ea62fe37d01db373675f296e950e597fb08fd8cdb838b6dbaaff09f8cb6 SHA512 551dea40df7991e485fba993ada4a36cc27b7e8974b25cf759210e94946774781ecbb33382692f9bb650dd589ed9d35ccf003cf9cc10727fe524b723619637e0
MISC metadata.xml 546 BLAKE2B 10baf770f70a00730c78dee6661096db60de2fd04ddd1f36c54d0ad2423ad78127eb70c56e15dba9dbd15ded61d3a9ee0587987e2bf1d6420204dc1a67a6d6c7 SHA512 cbd8187c0c2e0c7824f82d15a6f2162871339350953ff9f09b42f74077c5d53c9456059437360a823739bd06622ac37b86bd5c5ef17ae284dfe71fccb5862760
diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
new file mode 100644
index 000000000000..0abb3cfb4a37
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
@@ -0,0 +1,115 @@
+Add -DTG_OWT_USE_X11
+
+Allows disabling X11 desktop capturing independently of pipewire support, for
+the few people that run wayland without any X11 support whatsoever.
+
+This setup is untested, but supported by the GNI build system, see:
+* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
+
+Toggling the WEBRTC_USE_X11 define also affects some files under
+src/modules/audio_device, but that falls under "X11 support", regardless...
+
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
+@@ -21,11 +21,13 @@
+
+ option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." ${TG_OWT_PACKAGED_BUILD})
+ option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
++option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
+ option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." ON)
+
+ if (NOT UNIX OR APPLE)
++ set(TG_OWT_USE_X11 OFF)
+ set(TG_OWT_USE_PIPEWIRE OFF)
+ endif()
+
+@@ -84,6 +86,10 @@
+ add_library(tg_owt)
+ init_target(tg_owt)
+
++if (TG_OWT_USE_X11)
++ link_x11(tg_owt)
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+ link_glib(tg_owt)
+ if (TG_OWT_DLOPEN_PIPEWIRE)
+@@ -161,10 +167,6 @@
+ include(cmake/libwebrtcbuild.cmake)
+ target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
+
+-if (UNIX AND NOT APPLE)
+- link_x11(tg_owt)
+-endif()
+-
+ function(add_sublibrary postfix)
+ add_library(tg_owt_${postfix} OBJECT)
+ init_feature_target(tg_owt_${postfix} ${postfix})
+@@ -2204,6 +2206,37 @@
+ )
+ endif()
+
++if (NOT TG_OWT_USE_X11)
++ remove_target_sources(tg_owt ${webrtc_loc}
++ modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
++ modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
++ modules/desktop_capture/linux/screen_capturer_x11.cc
++ modules/desktop_capture/linux/screen_capturer_x11.h
++ modules/desktop_capture/linux/shared_x_display.cc
++ modules/desktop_capture/linux/shared_x_display.h
++ modules/desktop_capture/linux/window_capturer_x11.cc
++ modules/desktop_capture/linux/window_capturer_x11.h
++ modules/desktop_capture/linux/window_finder_x11.cc
++ modules/desktop_capture/linux/window_finder_x11.h
++ modules/desktop_capture/linux/window_list_utils.cc
++ modules/desktop_capture/linux/window_list_utils.h
++ modules/desktop_capture/linux/x_atom_cache.cc
++ modules/desktop_capture/linux/x_atom_cache.h
++ modules/desktop_capture/linux/x_error_trap.cc
++ modules/desktop_capture/linux/x_error_trap.h
++ modules/desktop_capture/linux/x_server_pixel_buffer.cc
++ modules/desktop_capture/linux/x_server_pixel_buffer.h
++ modules/desktop_capture/linux/x_window_property.cc
++ modules/desktop_capture/linux/x_window_property.h
++
++ modules/desktop_capture/screen_drawer.cc
++ modules/desktop_capture/screen_drawer.h
++ modules/desktop_capture/screen_drawer_linux.cc
++ modules/desktop_capture/screen_drawer_lock_posix.cc
++ modules/desktop_capture/screen_drawer_lock_posix.h
++ )
++endif()
++
+ if (NOT TG_OWT_USE_PIPEWIRE)
+ remove_target_sources(tg_owt ${webrtc_loc}
+ modules/desktop_capture/linux/base_capturer_pipewire.cc
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/cmake/libwebrtcbuild.cmake
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/cmake/libwebrtcbuild.cmake
+@@ -28,6 +28,13 @@
+ BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
+ )
+
++if (TG_OWT_USE_X11)
++ target_compile_definitions(libwebrtcbuild
++ INTERFACE
++ WEBRTC_USE_X11
++ )
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+ target_compile_definitions(libwebrtcbuild
+ INTERFACE
+@@ -64,11 +71,6 @@
+ INTERFACE
+ WEBRTC_MAC
+ )
+- else()
+- target_compile_definitions(libwebrtcbuild
+- INTERFACE
+- WEBRTC_USE_X11
+- )
+ endif()
+
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
new file mode 100644
index 000000000000..7b3380dd55de
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
@@ -0,0 +1,17 @@
+Fix undefined references to dcsctp when linking this library
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout(dcsctp::TaskQueueTimeoutFactory&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::DcSctpSocketFactory::Create(std::basic_string_view<char, std::char_traits<char> >, dcsctp::DcSctpSocketCallbacks&, std::unique_ptr<dcsctp::PacketObserver, std::default_delete<dcsctp::PacketObserver> >, dcsctp::DcSctpOptions const&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `vtable for dcsctp::TextPcapPacketObserver'
+
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
+@@ -808,8 +808,6 @@
+ media/engine/webrtc_media_engine_defaults.cc
+ media/engine/webrtc_video_engine.cc
+ media/engine/webrtc_voice_engine.cc
+- media/sctp/dcsctp_transport.cc
+- media/sctp/dcsctp_transport.h
+ media/sctp/sctp_transport_factory.cc
+ media/sctp/sctp_transport_factory.h
+ media/sctp/usrsctp_transport.cc
diff --git a/media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild b/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild
index 5a261d38d4b2..a0f20c6643ce 100644
--- a/media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild
+++ b/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild
@@ -1,14 +1,14 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit cmake
+inherit cmake flag-o-matic
DESCRIPTION="WebRTC build for Telegram"
HOMEPAGE="https://github.com/desktop-app/tg_owt"
-TG_OWT_COMMIT="91d836dc84a16584c6ac52b36c04c0de504d9c34"
+TG_OWT_COMMIT="d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589"
LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
@@ -17,7 +17,7 @@ S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
LICENSE="BSD"
SLOT="0/${PV##*pre}"
-KEYWORDS="amd64 ~ppc64"
+KEYWORDS="~amd64 ~ppc64"
IUSE="screencast +X"
# This package's USE flags may change the ABI and require a rebuild of
@@ -60,8 +60,9 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-pipewire.patch"
- "${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-X11.patch"
+ "${FILESDIR}/tg_owt-0_pre20211207-allow-disabling-X11.patch"
"${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch"
+ "${FILESDIR}/tg_owt-0_pre20211207-fix-dcsctp-references.patch"
)
src_unpack() {
@@ -85,6 +86,7 @@ src_prepare() {
src_configure() {
# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
# see https://bugs.gentoo.org/754012
+ # EAPI 8 still wipes this flag.
append-cppflags '-DNDEBUG'
local mycmakeargs=(
@@ -104,10 +106,20 @@ src_install() {
cmake_src_install
# Save about 15MB of useless headers
+ rm -r "${ED}/usr/include/tg_owt/rtc_base/third_party" || die
+ rm -r "${ED}/usr/include/tg_owt/common_audio/third_party" || die
+ rm -r "${ED}/usr/include/tg_owt/modules/third_party" || die
rm -r "${ED}/usr/include/tg_owt/third_party" || die
- # Install third_party/libyuv anyway...
- dodir /usr/include/tg_owt/third_party/libyuv/include
- cd "${S}/src/third_party/libyuv/include" || die
- find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/third_party/libyuv/include/{}" \; || die
+ # Install a few headers anyway, as required by net-im/telegram-desktop...
+ local headers=(
+ third_party/libyuv/include
+ rtc_base/third_party/sigslot
+ rtc_base/third_party/base64
+ )
+ for dir in "${headers[@]}"; do
+ pushd "${S}/src/${dir}" > /dev/null || die
+ find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/${dir}/{}" \; || die
+ popd > /dev/null || die
+ done
}