upg obs-studio vala

This commit is contained in:
joborun linux 2023-02-13 01:44:23 +02:00
parent 0ee8ca1ef4
commit e17e924c63
11 changed files with 500 additions and 13 deletions

130
obs-studio/PKGBUILD Normal file
View File

@ -0,0 +1,130 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=obs-studio
pkgver=29.0.2
#pkgver=29.0.0124+ga0b5c1b3f
#pkgver=${_pkgver//-/_}
pkgrel=02
#epoch=3
pkgdesc="Free and open source software for video recording and live streaming. w/o systemd pipewire pulseaudio"
arch=("x86_64")
url="https://github.com/obsproject/obs-studio"
depends=("ffmpeg" "jansson" "libxinerama" "libxkbcommon-x11" "mbedtls" "rnnoise" "pciutils"
"qt5-svg" "curl" "gtk-update-icon-cache" "libxcomposite")
# "speexdsp" "pciutils" "libajantv2" "librist")
makedepends=('cmake' 'libfdk-aac' 'x264' 'swig' 'python' 'luajit' 'sndio')
#makedepends=("cmake" "git" "libfdk-aac" "libxcomposite" "x264"
# "vlc" "swig" "luajit" "python"
# "cef-minimal-obs-bin" #"wayland"
# "qt5-wayland" "xdg-desktop-portal"
#"pipewire"
#)
optdepends=("libfdk-aac: FDK AAC codec support"
"libva-intel-driver: hardware encoding"
"libva-mesa-driver: hardware encoding"
"vlc: VLC Media Source"
"luajit: Lua scripting"
"python: Python scripting"
'sndio: Sndio input client'
"v4l2loopback-dkms: Virtual webcam"
"jack2: The JACK low-latency audio server")
provides=("obs-studio=$pkgver")
conflicts=("obs-studio-git")
#84adab45cba45fb55526f1b46d0a73006317f65c refs/tags/28.0.3
#^d21891b3ca1a8607de479687cd2e12a4455525d7
#_commit=84adab45cba45fb55526f1b46d0a73006317f65c # tags/28.0.3
_commit=8d9fc74631bb8d0f7ca71d2c158f922b702e7750 # tags/29.0.2
source=("$pkgname::git+https://github.com/obsproject/obs-studio.git#commit=$_commit"
#source=("$pkgname::git+https://github.com/obsproject/obs-studio.git"
# "git+https://github.com/Mixer/ftl-sdk.git"
# "git+https://github.com/obsproject/obs-browser.git"
# "git+https://github.com/obsproject/obs-vst.git"
# "git+https://github.com/obsproject/obs-websocket.git"
# "git+https://github.com/chriskohlhoff/asio.git"
# "git+https://github.com/nlohmann/json.git"
# "git+https://github.com/nayuki/QR-Code-generator.git"
# "git+https://github.com/zaphoyd/websocketpp.git"
fix_python_binary_loading.patch
ignore_unused_submodules.patch)
##pkgver() {
## cd $pkgname
## git describe --long --tags | cut -d- -f1-2 | sed "s/-/\./"
##}
#pkgver() {
# cd $pkgname
# git describe --long | sed "s/$pkgname//" | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;' | sed 's/+//'
#}
prepare() {
# gitconf="protocol.file.allow=always"
cd $pkgname
patch -Np1 < "$srcdir"/fix_python_binary_loading.patch
patch -Np1 < "$srcdir"/ignore_unused_submodules.patch
# git config submodule.plugins/obs-outputs/ftl-sdk.url $srcdir/ftl-sdk
# git config submodule.plugins/obs-browser.url $srcdir/obs-browser
# git config submodule.plugins/obs-vst.url $srcdir/obs-vst
# git config submodule.plugins/obs-websocket.url $srcdir/obs-websocket
# git -c $gitconf submodule update
#
# cd plugins/obs-websocket
# git config submodule.deps/asio.url $srcdir/asio
# git config submodule.deps/json.url $srcdir/json
# git config submodule.deps/qr.url $srcdir/QR-Code-generator
# git config submodule.deps/websocketpp.url $srcdir/websocketpp
# git -c $gitconf submodule update
}
build() {
cmake -B build -S $pkgname \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DENABLE_BROWSER=OFF \
-DENABLE_VST=ON \
-DENABLE_VLC=OFF \
-DENABLE_NEW_MPEGTS_OUTPUT=OFF \
-DENABLE_AJA=OFF \
-DENABLE_JACK=ON \
-DENABLE_ALSA=ON \
-DENABLE_LIBFDK=ON \
-DOBS_VERSION_OVERRIDE="$pkgver-$pkgrel" \
-DENABLE_PIPEWIRE=FALSE \
-DENABLE_PULSEAUDIO=FALSE \
-Wno-dev
cmake --build build
# mkdir -p build; cd build
#
# cmake \
# -DCMAKE_INSTALL_PREFIX=/usr \
# -DCMAKE_INSTALL_LIBDIR=lib \
# -DBUILD_BROWSER=ON \
# -DCEF_ROOT_DIR="/opt/cef-obs" \
# ..
# make
}
package() {
# cd $pkgname/build
#
# make install DESTDIR="$pkgdir"
DESTDIR="$pkgdir" cmake --install build
}
#---- license gpg-key sha256sums ----
license=("GPL2")
sha256sums=(SKIP #SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP
bdfbd062f080bc925588aec1989bb1df34bf779cc2fc08ac27236679cf612abd # fix_python_binary_loading.patch
60b0ee1f78df632e1a8c13cb0a7a5772b2a4b092c4a2a78f23464a7d239557c3) # ignore_unused_submodules.patch

89
obs-studio/PKGBUILD-aur Normal file
View File

@ -0,0 +1,89 @@
# Maintainer: Benjamin Klettbach <b dot klettbach at gmail dot com >
# Contributor: Jonathan Steel <jsteel at archlinux.org>
# Contributor: ArcticVanguard <LideEmily at gmail dot com>
# Contributor: ledti <antergist at gmail dot com>
pkgname=obs-studio-git
pkgver=28.1.0.beta1
pkgrel=2
pkgdesc="Free and open source software for video recording and live streaming."
arch=("i686" "x86_64")
url="https://github.com/obsproject/obs-studio"
license=("GPL2")
depends=("ffmpeg" "jansson" "libxinerama" "libxkbcommon-x11" "mbedtls"
"qt6-svg" "curl" "jack" "gtk-update-icon-cache"
"speexdsp" "pciutils" "libajantv2" "librist")
makedepends=("cmake" "git" "libfdk-aac" "libxcomposite" "x264"
"vlc" "swig" "luajit" "python" "cef-minimal-obs-bin" "wayland"
"qt6-wayland" "pipewire" "xdg-desktop-portal")
optdepends=("libfdk-aac: FDK AAC codec support"
"libxcomposite: XComposite capture support"
"libva-intel-driver: hardware encoding"
"libva-mesa-driver: hardware encoding"
"vlc: VLC Media Source"
"luajit: Lua scripting"
"python: Python scripting"
"v4l2loopback-dkms: Virtual webcam"
"pipewire: Pipewire capture"
"pipewire-media-session: Pipewire capture"
"xdg-desktop-portal: Pipewire capture")
provides=("obs-studio=$pkgver")
conflicts=("obs-studio")
source=("$pkgname::git+https://github.com/obsproject/obs-studio.git#branch=master"
"git+https://github.com/Mixer/ftl-sdk.git"
"git+https://github.com/obsproject/obs-browser.git"
"git+https://github.com/obsproject/obs-vst.git"
"git+https://github.com/obsproject/obs-websocket.git"
"git+https://github.com/chriskohlhoff/asio.git"
"git+https://github.com/nlohmann/json.git"
"git+https://github.com/nayuki/QR-Code-generator.git"
"git+https://github.com/zaphoyd/websocketpp.git"
"fix_python_binary_loading.patch")
md5sums=("SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP"
"051b90f05e26bff99236b8fb1ad377d1")
pkgver() {
cd $pkgname
git describe --long --tags | cut -d- -f1-2 | sed "s/-/\./"
}
prepare() {
cd $pkgname
gitconf="protocol.file.allow=always"
patch -Np1 < "$srcdir"/fix_python_binary_loading.patch
git config submodule.plugins/obs-outputs/ftl-sdk.url $srcdir/ftl-sdk
git config submodule.plugins/obs-browser.url $srcdir/obs-browser
git config submodule.plugins/obs-vst.url $srcdir/obs-vst
git config submodule.plugins/obs-websocket.url $srcdir/obs-websocket
git -c $gitconf submodule update
cd plugins/obs-websocket
git config submodule.deps/asio.url $srcdir/asio
git config submodule.deps/json.url $srcdir/json
git config submodule.deps/qr.url $srcdir/QR-Code-generator
git config submodule.deps/websocketpp.url $srcdir/websocketpp
git -c $gitconf submodule update
}
build() {
cd $pkgname
mkdir -p build; cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_BROWSER=ON \
-DCEF_ROOT_DIR="/opt/cef-obs" \
..
make
}
package() {
cd $pkgname/build
make install DESTDIR="$pkgdir"
}
# vim: ts=2:sw=2:expandtab

175
obs-studio/PKGBUILD-aur.rc Normal file
View File

@ -0,0 +1,175 @@
# Maintainer: tytan652 <tytan652 at tytanium dot xyz>
DISTRIB_ID=`lsb_release --id | cut -f2 -d$'\t'`
pkgname=obs-studio-rc
_pkgver=28.1.0-beta1
pkgver=${_pkgver//-/_}
pkgrel=1
epoch=3
pkgdesc="Beta cycle of the free and open source software for video recording and live streaming. With everything except service integration"
arch=("x86_64" "aarch64")
url="https://github.com/obsproject/obs-studio"
license=("GPL3")
_mbedtlsver=2.28
_pythonver=3.10
depends=(
"jack" "gtk-update-icon-cache" "x264" "rnnoise" "pciutils" "qt6-svg"
# "libxinerama" "provided by "vlc-luajit"
# "libxkbcommon-x11" provided by "qt6-base"
# "jansson" "curl" provided by "ftl-sdk"
# Needed to use Qt on Wayland platform
"qt6-wayland"
# Both needed to load linux-capture, so those two are no longer optional
"libxcomposite" "pipewire"
# Needed to use PipeWire capture
"xdg-desktop-portal"
# Needed by obs-browser
"libxss" "libxrandr" "nss" "at-spi2-core"
# AUR Packages
"ffmpeg-obs>=5" "vlc-luajit" "ftl-sdk"
)
# To manage mbedtls rebuild easily, this will prevent you to rebuild OBS on non-updated system
# For Manjaro user this feature is disabled
# Also OBS will need a patch when mbedtls 3 is on the repo
if [[ $DISTRIB_ID == 'ManjaroLinux' ]]; then
depends+=('mbedtls')
else
depends+=("mbedtls>=$_mbedtlsver")
fi
## About vlc-luajit
# The official VLC package will make OBS crash when a VLC source is used.
# The issue is that VLC and OBS are compiled with different lua version.
# So I also created vlc-luajit, a VLC package compiled with the same lua as OBS.
# But to make people unable to install VLC official package with obs-studio-tytan652.
# I decided to make vlc-luajit a dependency of OBS rather than an optional one.
## About ffmpeg-obs
# Read ffmpeg-obs PKGBUILD for more info
makedepends=(
"cmake" "git" "libfdk-aac" "swig" "luajit" "sndio" "lsb-release"
# Needed by obs-websocket
'asio' 'nlohmann-json' 'websocketpp'
# AUR Packages
"libajantv2"
)
# To manage python rebuild easily, this will prevent you to rebuild OBS on non-updated system
# For Manjaro user this feature is disabled
if [[ $DISTRIB_ID == 'ManjaroLinux' ]]; then
makedepends+=('python')
else
makedepends+=("python>=$_pythonver")
fi
optdepends=(
"libfdk-aac: FDK AAC codec support"
"intel-media-driver: Hardware encoding (>= Broadwell)"
"libva-intel-driver: Hardware encoding (<= Haswell)"
"libva-mesa-driver: Hardware encoding"
"swig: Scripting"
"luajit: Lua scripting"
"sndio: Sndio input client"
"v4l2loopback-dkms: Virtual camera output"
"libajantv2: AJA NTV 2 support"
)
# To manage python rebuild easily, this will prevent you to rebuild OBS on non-updated system
# For Manjaro user this feature is disabled
if [[ $DISTRIB_ID == 'ManjaroLinux' ]]; then
optdepends+=("python: Python scripting")
else
optdepends+=("python>=$_pythonver: Python scripting")
fi
provides=("obs-studio=$pkgver" "obs-vst" "obs-websocket")
conflicts=("obs-studio" "obs-vst" "obs-websocket")
options=('debug')
source=(
"obs-studio::git+https://github.com/obsproject/obs-studio.git#tag=$_pkgver"
"obs-browser::git+https://github.com/obsproject/obs-browser.git"
"obs-websocket::git+https://github.com/obsproject/obs-websocket.git"
"qr::git+https://github.com/nayuki/QR-Code-generator.git"
)
sha256sums=(
"SKIP"
"SKIP"
"SKIP"
"SKIP"
)
if [[ $DISTRIB_ID == 'ManjaroLinux' ]]; then
source+=(
"$pkgname.hook"
"$pkgname.sh"
)
sha256sums+=(
"2313f237e80b5160c5716e30cd7ac0a6a51c09a7ec83485ee33362de6e390009"
"72b6aca44bfdc854b68c101c3304b927fa2411d6c05567f07252b335617d917d"
)
fi
if [[ $CARCH == 'x86_64' ]]; then
optdepends+=("decklink: Blackmagic Design DeckLink support")
fi
if [[ $CARCH == 'x86_64' ]]; then
makedepends+=("cef-minimal-obs=103.0.0_5060_shared_textures_143.2591+g4204d54+chromium_103.0.5060.134_1")
provides+=("obs-browser")
conflicts+=("obs-linuxbrowser" "obs-browser")
_browser=ON
else
_browser=OFF
fi
prepare() {
cd "$srcdir/obs-studio"
git config submodule.plugins/obs-browser.url $srcdir/obs-browser
git config submodule.plugins/obs-websocket.url $srcdir/obs-websocket
git submodule update
cd plugins/obs-websocket
sed -i 's|EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/json/CMakeLists.txt||' CMakeLists.txt
sed -i 's|AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/websocketpp/CMakeLists.txt||' CMakeLists.txt
sed -i 's|AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/asio/asio/include/asio.hpp||' CMakeLists.txt
sed -i "s|AND EXISTS|EXISTS|" CMakeLists.txt
sed -i "s|add_subdirectory(deps/json)|find_package(nlohmann_json 3.10.0 REQUIRED)|" CMakeLists.txt
git config submodule.deps/qr.url $srcdir/qr
git submodule update deps/qr
}
build() {
cd "$srcdir"/obs-studio
mkdir -p build; cd build
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DENABLE_RTMPS=ON \
-DQT_VERSION=6 \
-DENABLE_LIBFDK=ON \
-DENABLE_JACK=ON \
-DENABLE_SNDIO=ON \
-DENABLE_BROWSER=$_browser \
-DCEF_ROOT_DIR=/opt/cef-obs \
-DBETA="$_pkgver" ..
sed -i "s|#define OBS_VERSION |#define OBS_VERSION \"$_pkgver-$pkgrel\" //|" config/obsconfig.h
make
}
package() {
cd obs-studio/build
make install DESTDIR="$pkgdir"
if [[ $DISTRIB_ID == 'ManjaroLinux' ]]; then
install -D -m644 "$srcdir/$pkgname.hook" -t "${pkgdir}"/usr/share/libalpm/hooks/
install -D -m755 "$srcdir/$pkgname.sh" -t "${pkgdir}"/usr/share/libalpm/scripts/
fi
}

1
obs-studio/clean Normal file
View File

@ -0,0 +1 @@
rm -rf {src,pkg,obs-studio-git,ftl-sdk,obs-browser,obs-vst,obs-websocket,asio,json,QR-Code-generator,websocketpp}

18
obs-studio/deps Normal file
View File

@ -0,0 +1,18 @@
git
ffmpeg
libxinerama
libxkbcommon-x11
mbedtls
rnnoise
qt5-svg
gtk-update-icon-cache
libxcomposite
cmake
libfdk-aac
x264
swig
python
luajit
sndio
libgit2
jack2

View File

@ -0,0 +1,24 @@
From c482159ce93deafc7f1fc5755ba15135709ae726 Mon Sep 17 00:00:00 2001
From: Matt Gajownik <matt@obsproject.com>
Date: Tue, 25 Aug 2020 19:28:26 +1000
Subject: [PATCH] libobs/util: Fix loading Python binary modules on *nix
Fixes #2222
---
libobs/util/platform-nix.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libobs/util/platform-nix.c b/libobs/util/platform-nix.c
index 26800d52f7..997b62db1a 100644
--- a/libobs/util/platform-nix.c
+++ b/libobs/util/platform-nix.c
@@ -71,7 +71,8 @@ void *os_dlopen(const char *path)
#ifdef __APPLE__
void *res = dlopen(dylib_name.array, RTLD_LAZY | RTLD_FIRST);
#else
- void *res = dlopen(dylib_name.array, RTLD_LAZY);
+ void *res = dlopen(dylib_name.array,
+ RTLD_LAZY | RTLD_DEEPBIND | RTLD_GLOBAL);
#endif
if (!res)
blog(LOG_ERROR, "os_dlopen(%s->%s): %s\n", path,

View File

@ -0,0 +1,19 @@
--- a/plugins/CMakeLists.txt.orig 2022-09-24 09:05:46.308250388 +0100
+++ b/plugins/CMakeLists.txt 2022-09-24 09:06:04.978206849 +0100
@@ -61,7 +61,6 @@
add_subdirectory(sndio)
add_subdirectory(obs-vst)
- check_obs_browser()
elseif(OS_FREEBSD)
add_subdirectory(linux-capture)
add_subdirectory(linux-pulseaudio)
@@ -84,8 +83,6 @@
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/CMakeLists.txt)
add_subdirectory(obs-websocket)
-else()
- obs_status(FATAL_ERROR "obs-websocket submodule not available.")
endif()
add_subdirectory(image-source)

11
obs-studio/time Normal file
View File

@ -0,0 +1,11 @@
real 5m10.581s
user 18m3.117s
sys 0m53.527s
including my slow download time
real 38m5.359s
user 23m1.277s
sys 1m33.578s

View File

@ -6,7 +6,7 @@
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=vala
pkgver=0.56.3
pkgver=0.56.4
pkgrel=01
pkgdesc='Compiler for the GObject type system'
url='https://wiki.gnome.org/Projects/Vala'
@ -18,7 +18,7 @@ provides=(valadoc libvala-${pkgver%.*}.so libvaladoc-${pkgver%.*}.so)
conflicts=(valadoc)
replaces=(valadoc)
#options=(debug) ## uncomment this to have the debug package produced
_commit=051552f34cfa1f4c08220043683289952f9ffd62 # tags/0.56.3^0
_commit=fbf513c52806e253b3dde68f477e1eca8ac38cd1 # tags/0.56.4^0
source=("git+https://gitlab.gnome.org/GNOME/vala.git#commit=$_commit")
pkgver() {
@ -55,4 +55,3 @@ license=(LGPL)
sha256sums=('SKIP')

View File

@ -4,20 +4,40 @@
# Contributor: Timm Preetz <timm@preetz.us>
pkgname=vala
pkgver=0.56.3
pkgver=0.56.4
pkgrel=1
pkgdesc='Compiler for the GObject type system'
url='https://wiki.gnome.org/Projects/Vala'
arch=(x86_64)
license=(LGPL)
depends=(glib2 gtk-doc graphviz ttf-font pkg-config gcc)
makedepends=(libxslt vala git help2man autoconf-archive)
checkdepends=(dbus libx11 gobject-introspection)
provides=(valadoc libvala-${pkgver%.*}.so libvaladoc-${pkgver%.*}.so)
depends=(
gcc
glib2
graphviz
gtk-doc
pkg-config
ttf-font
)
makedepends=(
autoconf-archive
git
help2man
libxslt
vala
)
checkdepends=(
dbus
gobject-introspection
libx11
)
provides=(
libvala-${pkgver%.*}.so
libvaladoc-${pkgver%.*}.so
valadoc
)
conflicts=(valadoc)
replaces=(valadoc)
options=(debug)
_commit=051552f34cfa1f4c08220043683289952f9ffd62 # tags/0.56.3^0
_commit=fbf513c52806e253b3dde68f477e1eca8ac38cd1 # tags/0.56.4^0
source=("git+https://gitlab.gnome.org/GNOME/vala.git#commit=$_commit")
sha256sums=('SKIP')
@ -48,4 +68,4 @@ package() {
make DESTDIR="$pkgdir" install
}
# vim:set sw=2 et:
# vim:set sw=2 sts=-1 et:

View File

@ -10,6 +10,7 @@ libx11
gobject-introspection
automake
bison
libjpeg-turbo
libgit2
gettext
byacc