1 # Maintainer: Jiachen YANG <farseerfc at archlinux dot org>
2 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
5 # It seems the currently desired version can be gotten from
6 # https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/build/docker/centos_env/Dockerfile
7 _commit=9d120195334db4f232c925529aa7601656dc59d7
8 pkgver=0.git21.${_commit:0:7}
10 pkgdesc='WebRTC library'
12 url='https://github.com/desktop-app/tg_owt'
14 # libdrm is dynamically loaded via dlopen
16 makedepends=('git' 'ninja' 'unzip' 'cmake' 'protobuf' 'libxrandr' 'libxcomposite' 'openssl' 'glibc'
17 'ffmpeg' 'libva' 'opus' 'yasm' 'libjpeg-turbo' 'pipewire' 'libxtst' 'libepoxy')
18 options=('staticlibs')
19 source=("tg_owt::git+${url}.git#commit=${_commit}"
20 "libvpx::git+https://chromium.googlesource.com/webm/libvpx.git"
21 "libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git"
22 "pipewire::git+https://github.com/PipeWire/pipewire.git")
31 git config submodule.src/third_party/libvpx/source/libvpx.url "$srcdir"/libvpx
32 git config submodule.src/third_party/libyuv.url "$srcdir"/libyuv
33 git config submodule.src/third_party/pipewire.url "$srcdir"/pipewire
34 git -c protocol.file.allow=always submodule update
40 export CFLAGS+=" -ffat-lto-objects"
41 export CXXFLAGS+=" -ffat-lto-objects -I/usr/include/libdrm"
42 # Upstream stated that only static builds are really supported so that's what we'll do.
43 # https://github.com/desktop-app/tg_owt/issues/75#issuecomment-992061171
47 -DCMAKE_BUILD_TYPE=Release \
48 -DCMAKE_INSTALL_PREFIX=/usr \
49 -DBUILD_SHARED_LIBS=OFF
55 DESTDIR="${pkgdir}/" ninja -C build install
56 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE