This repository has been archived by the owner on May 20, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
archrelease: copy trunk to community-staging-x86_64
git-svn-id: file:///srv/repos/svn-community/svn@1340953 9fca08f4-af9d-4005-b8df-a31f2cc04f65
- Loading branch information
foutrelis
committed
Nov 2, 2022
1 parent
4bb305f
commit 8c64602
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Maintainer: Jiachen YANG <farseerfc at archlinux dot org> | ||
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org> | ||
|
||
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=442d5bb593c0ae314960308d78f2016ad1f80c3e | ||
pkgver=0.git16.${_commit} | ||
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' | ||
'ffmpeg4.4' 'libva' 'opus' 'yasm' 'libjpeg-turbo' 'pipewire' 'libxtst' 'libepoxy') | ||
options=('staticlibs') | ||
source=("tg_owt::git+${url}.git#commit=${_commit}" | ||
"libvpx::git+https://chromium.googlesource.com/webm/libvpx.git" | ||
"libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git" | ||
"pipewire::git+https://github.com/PipeWire/pipewire.git") | ||
b2sums=('SKIP' | ||
'SKIP' | ||
'SKIP' | ||
'SKIP') | ||
|
||
prepare() { | ||
cd tg_owt | ||
git submodule init | ||
git config submodule.src/third_party/libvpx/source/libvpx.url "$srcdir"/libvpx | ||
git config submodule.src/third_party/libyuv.url "$srcdir"/libyuv | ||
git config submodule.src/third_party/pipewire.url "$srcdir"/pipewire | ||
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" | ||
export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig' | ||
# 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 | ||
sed -i "s|/usr/lib/libav|/usr/lib/ffmpeg4.4/libav|g" build/build.ninja | ||
sed -i "s|/usr/lib/libsw|/usr/lib/ffmpeg4.4/libsw|g" build/build.ninja | ||
sed -i "s|-lavcodec|/usr/lib/ffmpeg4.4/libavcodec.so|g" build/build.ninja | ||
sed -i "s|-lavformat|/usr/lib/ffmpeg4.4/libavformat.so|g" build/build.ninja | ||
sed -i "s|-lavutil|/usr/lib/ffmpeg4.4/libavutil.so|g" build/build.ninja | ||
sed -i "s|-lswscale|/usr/lib/ffmpeg4.4/libswscale.so|g" build/build.ninja | ||
sed -i "s|-lswresample|/usr/lib/ffmpeg4.4/libswresample.so|g" build/build.ninja | ||
ninja -C build | ||
} | ||
|
||
package() { | ||
cd tg_owt | ||
DESTDIR="${pkgdir}/" ninja -C build install | ||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE | ||
} |