2023-03-11 05:40:49 +00:00
|
|
|
# Maintainer: Jiachen YANG <farseerfc at archlinux dot org>
|
|
|
|
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - disable neon on v7 with -DTG_OWT_ARCH_ARMV7_USE_NEON=OFF
|
|
|
|
|
|
|
|
pkgname=libtg_owt
|
|
|
|
# It seems the currently desired version can be gotten from
|
|
|
|
# https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/build/docker/centos_env/Dockerfile
|
2024-07-25 23:55:06 +00:00
|
|
|
_commit=c9cc4390ab951f2cbc103ff783a11f398b27660b
|
|
|
|
pkgver=0.git26.${_commit:0:7}
|
2024-04-07 19:42:25 +00:00
|
|
|
pkgrel=1
|
2023-03-11 05:40:49 +00:00
|
|
|
pkgdesc='WebRTC library'
|
|
|
|
arch=('x86_64')
|
|
|
|
url='https://github.com/desktop-app/tg_owt'
|
|
|
|
license=('BSD')
|
|
|
|
# libdrm is dynamically loaded via dlopen
|
2024-04-07 19:42:25 +00:00
|
|
|
depends=('libdrm' 'libxdamage')
|
2023-05-01 01:24:06 +00:00
|
|
|
makedepends=('git' 'ninja' 'unzip' 'cmake' 'protobuf' 'libxrandr' 'libxcomposite' 'openssl' 'glibc'
|
2023-03-11 05:40:49 +00:00
|
|
|
'ffmpeg' 'libva' 'opus' 'yasm' 'libjpeg-turbo' 'pipewire' 'libxtst' 'libepoxy')
|
|
|
|
options=('staticlibs')
|
2024-03-21 23:35:51 +00:00
|
|
|
source=("git+${url}.git#commit=${_commit}"
|
|
|
|
"git+https://chromium.googlesource.com/libyuv/libyuv/"
|
|
|
|
"git+https://github.com/google/crc32c"
|
|
|
|
"git+https://github.com/abseil/abseil-cpp"
|
2024-07-25 23:55:06 +00:00
|
|
|
"git+https://github.com/cisco/libsrtp"
|
|
|
|
libtg_owt_ffmpeg7.patch::https://patch-diff.githubusercontent.com/raw/desktop-app/tg_owt/pull/128.patch)
|
|
|
|
b2sums=('3a3a67816c4f6637fd5cd1752049ed95911edde3149ce4190fa066b745cd837f969cc8d9669976d01f0a96fcaa7cdd99342a2616154ce895000c617f5156a5ee'
|
2024-03-21 23:35:51 +00:00
|
|
|
'SKIP'
|
2023-03-11 05:40:49 +00:00
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
2024-07-25 23:55:06 +00:00
|
|
|
'SKIP'
|
|
|
|
'2f86d30632e200e9082727eb19ccb33f44f1a57b33b007f5d64e222af1ec95bd85cae5297d3011c692dfe4bf7251d03f7f7d8edd3c7e0dac44cfee2fe50c7e11')
|
2023-03-11 05:40:49 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd tg_owt
|
|
|
|
git submodule init
|
2024-03-21 23:35:51 +00:00
|
|
|
git submodule set-url src/third_party/libyuv "$srcdir"/libyuv
|
|
|
|
git submodule set-url src/third_party/crc32c/src "$srcdir"/crc32c
|
|
|
|
git submodule set-url src/third_party/abseil-cpp "$srcdir"/abseil-cpp
|
|
|
|
git submodule set-url src/third_party/libsrtp "$srcdir"/libsrtp
|
2023-03-11 05:40:49 +00:00
|
|
|
git -c protocol.file.allow=always submodule update
|
2024-07-25 23:55:06 +00:00
|
|
|
|
|
|
|
patch -Np1 -i "$srcdir"/libtg_owt_ffmpeg7.patch
|
2023-03-11 05:40:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd tg_owt
|
|
|
|
|
|
|
|
export CFLAGS+=" -ffat-lto-objects"
|
|
|
|
export CXXFLAGS+=" -ffat-lto-objects -I/usr/include/libdrm"
|
|
|
|
# Upstream stated that only static builds are really supported so that's what we'll do.
|
|
|
|
# https://github.com/desktop-app/tg_owt/issues/75#issuecomment-992061171
|
|
|
|
cmake \
|
|
|
|
-B build \
|
|
|
|
-G Ninja \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
|
|
-DTG_OWT_ARCH_ARMV7_USE_NEON=OFF
|
|
|
|
ninja -C build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd tg_owt
|
|
|
|
DESTDIR="${pkgdir}/" ninja -C build install
|
|
|
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|