diff options
author | Esteve Varela Colominas <esteve.varela@gmail.com> | 2021-09-20 19:02:44 +0200 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-09-24 10:33:19 -0700 |
commit | 06c9558162b42b733bae875c755dfb747f2b77db (patch) | |
tree | 250b8093d45a52551265d687d8c820da7211756f /media-libs/tg_owt | |
parent | media-libs/libtgvoip: Make dev-libs/openssl depend on SLOT (diff) | |
download | gentoo-06c9558162b42b733bae875c755dfb747f2b77db.tar.gz gentoo-06c9558162b42b733bae875c755dfb747f2b77db.tar.bz2 gentoo-06c9558162b42b733bae875c755dfb747f2b77db.zip |
media-libs/tg_owt: Bump to 0_pre20210914
Also removed some more useless headers...
Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'media-libs/tg_owt')
-rw-r--r-- | media-libs/tg_owt/Manifest | 1 | ||||
-rw-r--r-- | media-libs/tg_owt/tg_owt-0_pre20210626-r1.ebuild | 4 | ||||
-rw-r--r-- | media-libs/tg_owt/tg_owt-0_pre20210914.ebuild | 116 |
3 files changed, 119 insertions, 2 deletions
diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest index e5610fd04b73..6342eb38fb94 100644 --- a/media-libs/tg_owt/Manifest +++ b/media-libs/tg_owt/Manifest @@ -1,2 +1,3 @@ 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 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 +} |