Date: Tuesday, June 21, 2022 @ 22:25:11
  Author: svenstaro
Revision: 1238876

archrelease: copy trunk to community-staging-x86_64

Added:
  libtg_owt/repos/community-staging-x86_64/
  libtg_owt/repos/community-staging-x86_64/PKGBUILD
    (from rev 1238875, libtg_owt/trunk/PKGBUILD)

----------+
 PKGBUILD |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

Copied: libtg_owt/repos/community-staging-x86_64/PKGBUILD (from rev 1238875, 
libtg_owt/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2022-06-21 22:25:11 UTC (rev 1238876)
@@ -0,0 +1,69 @@
+# Maintainer: Jiachen YANG <farseerfc at archlinux dot org>
+# Maintainer: Sven-Hendrik Haase <svenst...@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=10d5f4b
+pkgver=0.git14.${_commit}
+pkgrel=1
+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' 'abseil-cpp' '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";
+        
https://patch-diff.githubusercontent.com/raw/desktop-app/tg_owt/pull/101.patch
+        "pipewire::git+https://github.com/PipeWire/pipewire.git";)
+b2sums=('SKIP'
+        'SKIP'
+        'SKIP'
+        
'3029740444c95cc99eb39fcb255ae1969e4111d6d21caef50481b183713e787c489ef8b3944f06dd27310c1a6dbaa5ae4639f5406e31c09e67b532e1f0da942c'
+        '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 submodule update
+
+  patch -Np1 -i "$srcdir"/101.patch
+}
+
+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
+}

Reply via email to