mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
64 lines
2.3 KiB
Bash
64 lines
2.3 KiB
Bash
# 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
|
|
_commit=592b14d13bf9103226e90a83571e24c49f6bfdcd
|
|
pkgver=0.git24.${_commit:0:7}
|
|
pkgrel=2
|
|
pkgdesc='WebRTC library'
|
|
arch=('x86_64')
|
|
url='https://github.com/desktop-app/tg_owt'
|
|
license=('BSD')
|
|
# libdrm is dynamically loaded via dlopen
|
|
depends=('libdrm')
|
|
makedepends=('git' 'ninja' 'unzip' 'cmake' 'protobuf' 'libxrandr' 'libxcomposite' 'openssl' 'glibc'
|
|
'ffmpeg' 'libva' 'opus' 'yasm' 'libjpeg-turbo' 'pipewire' 'libxtst' 'libepoxy')
|
|
options=('staticlibs')
|
|
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"
|
|
"git+https://github.com/cisco/libsrtp")
|
|
b2sums=('c43ea062f8d28696fea5068f51a3548330b906606a256e8096e3e73f346b4bb5942db05b79f3e98daf1bcf195e8f966f52cc2e8e630af25ba06ac671ea5fd233'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP')
|
|
|
|
prepare() {
|
|
cd tg_owt
|
|
git submodule init
|
|
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
|
|
git -c protocol.file.allow=always submodule update
|
|
}
|
|
|
|
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
|
|
}
|