summaryrefslogtreecommitdiff
path: root/media-libs/tg_owt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
commitc719fdcee603a5a706a45d10cb598762d56a727d (patch)
tree620cbf137661399a3fb1eff92914204f9a970713 /media-libs/tg_owt
parentcc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff)
gentoo resync : 25.09.2021
Diffstat (limited to 'media-libs/tg_owt')
-rw-r--r--media-libs/tg_owt/Manifest4
-rw-r--r--media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild4
-rw-r--r--media-libs/tg_owt/tg_owt-0_pre20210914.ebuild116
3 files changed, 121 insertions, 3 deletions
diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index c63ce642a3e3..f5550fe6739b 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -3,5 +3,7 @@ AUX tg_owt-0_pre20210626-allow-disabling-pipewire.patch 1030 BLAKE2B e81b7fa348a
AUX tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch 3322 BLAKE2B 61f04506af251a52f77a5b1289471e6519bc00aab1f0e2b0b703deec094109537506297dac55d6ece747beab889a2509a71ae862683c87e6f0c006573b3dffab SHA512 7c5a4851cfe982b069c1ce752414a7771805ab1edf00a88d16e46b11cda8a85692cc2534e04a562aba1519638e2c128b66b11f24ac93f7b8e3b2b9be6d031d55
DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
DIST tg_owt-0_pre20210626.tar.gz 16264716 BLAKE2B de500e02789516527c814d0aba87cf1d0e772747f06acff7ac9295508c6e6bce1915cd3a703df618ff17ba8e04dc194538a6ef859fa85b301bb63eceab2c339a SHA512 a5d10011c427d8685bcf0743c356ff8c58c3cad6c59ac2409298b30b15cb04233889a5ed0a18107ac5b3477eee96741fdc85176d4330c866e8e3329753be7d73
-EBUILD tg_owt-0_pre20210626-r1.ebuild 3351 BLAKE2B 34e2e5065a860f7753234058968d630ec3860bf192eb30f047db2552d94f0f978cd69f48f5cab92be8ad70fdfd59ffa54aaa68d6c974c85dc517d9f2fb065eff SHA512 9ead14f282706b2363057f7e43117395171e733e06f1b189b1f9f0ddeaf2e8aea8c69c2f4eeece93b732cb71202afd1d6efaeb63694e7465e7173cf2a2e67e8d
+DIST tg_owt-0_pre20210914.tar.gz 16266351 BLAKE2B 048d6a77046b10af63f4e5c1530b6aeb9d423702a6e34e6e0082a10b06262e19c30aa766cc9ea38549605d8d2cc08bfcd5a4e715ab53c46031c23938f94af27e SHA512 bd46393d9a85fa38fcd560af4f68a4868b25528b134731070e8578217cb0b9bb8b5cf7b3990f619d321ba373e5630a52e467e14d93f71b24de3a5b3e591b8866
+EBUILD tg_owt-0_pre20210626-r1.ebuild 3365 BLAKE2B c1232b870dba6f5516256c9b667062099bdfbf4959486e52d5cb6ad7907ce7e723002eb8354dc06f4324d1349d24650a443b4e4629ab46511828367b7843424b SHA512 baccbacc571087336040fc5f24f0456be0dc395c115e748650ce43bb29ffd2859d6ea4686ff900c13fb63d12e20bcde001824524f5b0d7c5a1b8a252ae3e7fba
+EBUILD tg_owt-0_pre20210914.ebuild 3551 BLAKE2B 462afa298c4dcc8c93d95fb10053698cb8829a31e0c8e154547e39778e3a7f4000f369aaa802f3fe1f2c21ea99bdfba0c3ee80f7a33f1338ae25a2e264c0a709 SHA512 4c06fdb457ef8f39bcbba1502bb386b684ddfce82e3f34ac7402eedba0222802ce13e24393aa65ecaa16d7853e1a9ad5c32f48c191375bd81c4dee6af4bb7bc4
MISC metadata.xml 546 BLAKE2B 10baf770f70a00730c78dee6661096db60de2fd04ddd1f36c54d0ad2423ad78127eb70c56e15dba9dbd15ded61d3a9ee0587987e2bf1d6420204dc1a67a6d6c7 SHA512 cbd8187c0c2e0c7824f82d15a6f2162871339350953ff9f09b42f74077c5d53c9456059437360a823739bd06622ac37b86bd5c5ef17ae284dfe71fccb5862760
diff --git a/media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild b/media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild
index 8f7f9f6f3d3d..5a261d38d4b2 100644
--- a/media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild
+++ b/media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild
@@ -108,6 +108,6 @@ src_install() {
# Install third_party/libyuv anyway...
dodir /usr/include/tg_owt/third_party/libyuv/include
- cd "${S}/src/third_party/libyuv/include"
- find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/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
}
diff --git a/media-libs/tg_owt/tg_owt-0_pre20210914.ebuild b/media-libs/tg_owt/tg_owt-0_pre20210914.ebuild
new file mode 100644
index 000000000000..44dc8909be7b
--- /dev/null
+++ b/media-libs/tg_owt/tg_owt-0_pre20210914.ebuild
@@ -0,0 +1,116 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="WebRTC build for Telegram"
+HOMEPAGE="https://github.com/desktop-app/tg_owt"
+
+TG_OWT_COMMIT="575fb17d2853c43329e45f6693370f5e41668055"
+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"
+S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
+# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
+
+LICENSE="BSD"
+SLOT="0/${PV##*pre}"
+KEYWORDS="~amd64 ~ppc64"
+IUSE="screencast +X"
+
+# This package's USE flags may change the ABI and require a rebuild of
+# dependent pacakges. As such, one should make sure to depend on
+# media-libs/tg_owt[x=,y=,z=] for any package that uses this.
+
+# Bundled libs:
+# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
+# - libsrtp (project uses private APIs)
+# - pffft (no stable versioning, patched)
+# media-libs/libjpeg-turbo is required for libyuv
+DEPEND="
+ dev-cpp/abseil-cpp:=[cxx17(+)]
+ dev-libs/libevent:=
+ dev-libs/openssl:=
+ dev-libs/protobuf:=
+ media-libs/libjpeg-turbo:=
+ >=media-libs/libvpx-1.10.0:=
+ media-libs/openh264:=
+ media-libs/opus
+ media-video/ffmpeg:=
+ net-libs/usrsctp
+ screencast? (
+ dev-libs/glib:2
+ media-video/pipewire:=
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrender
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ )
+"
+RDEPEND="${DEPEND}"
+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_pre20210626-allow-disabling-pulseaudio.patch"
+)
+
+src_unpack() {
+ unpack "${P}.tar.gz"
+ cd "${S}/src/third_party/libyuv" || die
+ unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
+}
+
+src_prepare() {
+ # libvpx source files aren't included in the repository
+ sed -i '/include(cmake\/libvpx.cmake)/d' CMakeLists.txt || die
+
+ # libopenh264 has GENERATED files with yasm that aren't excluded by
+ # EXCLUDE_FROM_ALL, and I have no clue how to avoid this.
+ # These source files aren't used with system-openh264, anyway.
+ sed -i '/include(cmake\/libopenh264.cmake)/d' CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
+ # see https://bugs.gentoo.org/754012
+ append-cppflags '-DNDEBUG'
+
+ local mycmakeargs=(
+ -DTG_OWT_USE_X11=$(usex X)
+ -DTG_OWT_USE_PIPEWIRE=$(usex screencast)
+
+ # Not required by net-im/telegram-desktop right now, I'd rather avoid
+ # the (ABI compatibility) headache.
+ -DTG_OWT_BUILD_AUDIO_BACKENDS=OFF
+ #-DTG_OWT_BUILD_AUDIO_BACKENDS=$(usex alsa)
+ #-DTG_OWT_BUILD_PULSE_BACKEND=$(usex pulseaudio)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ # Save about 15MB of useless headers
+ rm -r "${ED}/usr/include/tg_owt/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
+}