From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 159A3158074 for ; Fri, 27 Jun 2025 02:13:49 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id F3214340DEB for ; Fri, 27 Jun 2025 02:13:48 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 02CF4110278; Fri, 27 Jun 2025 02:13:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id ED660110278 for ; Fri, 27 Jun 2025 02:13:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A22BE340DEB for ; Fri, 27 Jun 2025 02:13:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4397929FC for ; Fri, 27 Jun 2025 02:13:46 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1750990377.f4bf839e69f8b88ad3cbd9f63b0a92c71f4ce6a4.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/tg_owt/files/tg_owt-gcc16-build-fix.patch media-libs/tg_owt/tg_owt-0_pre20250515-r1.ebuild X-VCS-Directories: media-libs/tg_owt/ media-libs/tg_owt/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f4bf839e69f8b88ad3cbd9f63b0a92c71f4ce6a4 X-VCS-Branch: master Date: Fri, 27 Jun 2025 02:13:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4d70b42c-f1b3-4793-be13-6a31acc33655 X-Archives-Hash: a0947a2b40e522d6cedf618ace818273 commit: f4bf839e69f8b88ad3cbd9f63b0a92c71f4ce6a4 Author: Brahmajit Das listout xyz> AuthorDate: Thu Jun 26 22:42:34 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jun 27 02:12:57 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4bf839e media-libs/tg_owt: Fix error: uint32_t has not been declared Closes: https://bugs.gentoo.org/958600 Signed-off-by: Brahmajit Das listout.xyz> Part-of: https://github.com/gentoo/gentoo/pull/42771 Closes: https://github.com/gentoo/gentoo/pull/42771 Signed-off-by: Sam James gentoo.org> .../tg_owt/files/tg_owt-gcc16-build-fix.patch | 26 +++++ media-libs/tg_owt/tg_owt-0_pre20250515-r1.ebuild | 125 +++++++++++++++++++++ 2 files changed, 151 insertions(+) diff --git a/media-libs/tg_owt/files/tg_owt-gcc16-build-fix.patch b/media-libs/tg_owt/files/tg_owt-gcc16-build-fix.patch new file mode 100644 index 000000000000..f13c875bc761 --- /dev/null +++ b/media-libs/tg_owt/files/tg_owt-gcc16-build-fix.patch @@ -0,0 +1,26 @@ +https://github.com/desktop-app/tg_owt/pull/161 +From: Brahmajit Das +Date: Fri, 27 Jun 2025 04:01:15 +0530 +Subject: [PATCH 1/1] Fix building with GCC 16 + +Building with GCC 16 results in the follwing build error: + +/var/tmp/portage/media-libs/tg_owt-0_pre20250515/work/tg_owt-232ec410502e773024e8d83cfae83a52203306c0/src/video/stats_counter.h:116:28: error: uint32_t has not been declared + 116 | void Set(int64_t sample, uint32_t stream_id); + | ^~~~~~~~ + +Downstream-bug: https://bugs.gentoo.org/958600 +Signed-off-by: Brahmajit Das +--- a/src/video/stats_counter.h ++++ b/src/video/stats_counter.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + namespace webrtc { + +-- +2.50.0 + diff --git a/media-libs/tg_owt/tg_owt-0_pre20250515-r1.ebuild b/media-libs/tg_owt/tg_owt-0_pre20250515-r1.ebuild new file mode 100644 index 000000000000..504bb258091a --- /dev/null +++ b/media-libs/tg_owt/tg_owt-0_pre20250515-r1.ebuild @@ -0,0 +1,125 @@ +# Copyright 2020-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic + +DESCRIPTION="WebRTC build for Telegram" +HOMEPAGE="https://github.com/desktop-app/tg_owt" + +TG_OWT_COMMIT="232ec410502e773024e8d83cfae83a52203306c0" +LIBYUV_COMMIT="04821d1e7d60845525e8db55c7bcd41ef5be9406" +LIBSRTP_COMMIT="a566a9cfcd619e8327784aa7cff4a1276dc1e895" +SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz + https://gitlab.com/chromiumsrc/libyuv/-/archive/${LIBYUV_COMMIT}/libyuv-${LIBYUV_COMMIT}.tar.bz2" +S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}" +# Upstream libyuv: https://chromium.googlesource.com/libyuv/libyuv + +LICENSE="BSD" +SLOT="0/${PV##*pre}" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv" +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. +# Furthermore, the -DNDEBUG preprocessor flag should be defined by any +# dependent package, failure to do so will change the ABI in the header files. + +# Bundled libs: +# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it) +# - pffft (no stable versioning, patched) +RDEPEND=" + >=dev-cpp/abseil-cpp-20240722.0:= + 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/libsrtp:2= + dev-libs/crc32c + screencast? ( + dev-libs/glib:2 + >=media-video/pipewire-1.0.7:= + ) + 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 + ) +" +DEPEND="${RDEPEND} + screencast? ( + media-libs/libglvnd[X] + media-libs/mesa + x11-libs/libdrm + ) +" +BDEPEND=" + virtual/pkgconfig + X? ( x11-base/xorg-proto ) +" + +PATCHES=( + "${FILESDIR}/${PN}-gcc16-build-fix.patch" +) + +src_unpack() { + default + + mv -T "libyuv-${LIBYUV_COMMIT}" "${S}/src/third_party/libyuv" || die +} + +src_prepare() { + # The sources for these aren't available, avoid needing them + sed -e '/include(cmake\/libcrc32c.cmake)/d' \ + -e '/include(cmake\/libabsl.cmake)/d' -i CMakeLists.txt || die + + # "lol" said the scorpion, "lmao" + sed -i '/if (BUILD_SHARED_LIBS)/{n;n;s/WARNING/DEBUG/}' CMakeLists.txt || die + + cmake_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=( + -DTG_OWT_USE_X11=$(usex X) + -DTG_OWT_USE_PIPEWIRE=$(usex screencast) + ) + cmake_src_configure +} + +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 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 +}