mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-19 07:37:01 +02:00
obs: add luajit buildoption, enable oneVPL on all systems
This commit is contained in:
parent
99cc0211be
commit
d73b0d6547
2 changed files with 69 additions and 12 deletions
59
srcpkgs/obs/patches/non-x86-64.patch
Normal file
59
srcpkgs/obs/patches/non-x86-64.patch
Normal file
|
@ -0,0 +1,59 @@
|
|||
--- a/plugins/obs-qsv11/QSV_Encoder.cpp 2023-11-10 09:29:58.000000000 +0100
|
||||
+++ - 2023-11-14 10:27:36.335536275 +0100
|
||||
@@ -284,6 +284,7 @@
|
||||
|
||||
enum qsv_cpu_platform qsv_get_cpu_platform()
|
||||
{
|
||||
+#if defined(__x86_64__)
|
||||
using std::string;
|
||||
|
||||
int cpuInfo[4];
|
||||
@@ -363,6 +364,9 @@
|
||||
|
||||
//assume newer revisions are at least as capable as Haswell
|
||||
return QSV_CPU_PLATFORM_INTEL;
|
||||
+#else
|
||||
+ return QSV_CPU_PLATFORM_UNKNOWN;
|
||||
+#endif
|
||||
}
|
||||
|
||||
int qsv_hevc_encoder_headers(qsv_t *pContext, uint8_t **pVPS, uint8_t **pSPS,
|
||||
--- a/plugins/obs-qsv11/common_utils_linux.cpp 2023-11-10 09:29:58.000000000 +0100
|
||||
+++ - 2023-11-14 10:28:41.685885028 +0100
|
||||
@@ -1,7 +1,9 @@
|
||||
#include "common_utils.h"
|
||||
|
||||
#include <time.h>
|
||||
+#if defined(__x86_64__)
|
||||
#include <cpuid.h>
|
||||
+#endif
|
||||
#include <util/c99defs.h>
|
||||
#include <util/dstr.h>
|
||||
#include <va/va_drm.h>
|
||||
@@ -191,12 +193,14 @@
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
+#if defined(__x86_64__)
|
||||
extern "C" void util_cpuid(int cpuinfo[4], int level)
|
||||
{
|
||||
__get_cpuid(level, (unsigned int *)&cpuinfo[0],
|
||||
(unsigned int *)&cpuinfo[1], (unsigned int *)&cpuinfo[2],
|
||||
(unsigned int *)&cpuinfo[3]);
|
||||
}
|
||||
+#endif
|
||||
|
||||
struct vaapi_device {
|
||||
int fd;
|
||||
--- a/plugins/obs-qsv11/common_utils.h 2023-11-10 09:29:58.000000000 +0100
|
||||
+++ - 2023-11-14 10:29:16.281404822 +0100
|
||||
@@ -24,7 +24,9 @@
|
||||
extern struct adapter_info adapters[MAX_ADAPTERS];
|
||||
extern size_t adapter_count;
|
||||
|
||||
+#if defined(__x86_64__)
|
||||
void util_cpuid(int cpuinfo[4], int flags);
|
||||
+#endif
|
||||
void check_adapters(struct adapter_info *adapters, size_t *adapter_count);
|
||||
|
||||
#ifdef __cplusplus
|
|
@ -1,18 +1,19 @@
|
|||
# Template file for 'obs'
|
||||
pkgname=obs
|
||||
version=30.0.0
|
||||
revision=1
|
||||
archs="i686* x86_64* ppc64le* aarch64*"
|
||||
revision=2
|
||||
archs="i686* x86_64* ppc64le* aarch64* riscv64*"
|
||||
build_style=cmake
|
||||
configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON
|
||||
-DENABLE_VST=OFF -DENABLE_AJA=OFF -DCALM_DEPRECATION=ON"
|
||||
-DENABLE_VST=OFF -DENABLE_AJA=OFF -DCALM_DEPRECATION=ON
|
||||
-DENABLE_SCRIPTING_LUA=$(vopt_if luajit 'ON' 'OFF')"
|
||||
hostmakedepends="pkg-config swig python3-devel qt6-base"
|
||||
makedepends="LuaJIT-devel fdk-aac-devel ffmpeg-devel glu-devel
|
||||
makedepends="$(vopt_if luajit LuaJIT-devel) fdk-aac-devel ffmpeg-devel glu-devel
|
||||
jack-devel libXcomposite-devel libcurl-devel libva-devel
|
||||
pulseaudio-devel python3-devel speexdsp-devel v4l-utils-devel
|
||||
vlc-devel qt6-svg-devel x264-devel mbedtls-devel jansson-devel
|
||||
wayland-devel pipewire-devel libxkbcommon-devel pciutils-devel
|
||||
librist-devel srt-devel libdatachannel-devel"
|
||||
librist-devel srt-devel libdatachannel-devel oneVPL-devel"
|
||||
depends="xset xdg-desktop-portal"
|
||||
short_desc="Open Broadcaster Software"
|
||||
maintainer="lemmi <lemmi@nerd2nerd.org>"
|
||||
|
@ -22,13 +23,10 @@ changelog="https://github.com/obsproject/obs-studio/releases"
|
|||
distfiles="https://github.com/obsproject/obs-studio/archive/refs/tags/$version.tar.gz"
|
||||
checksum=c23dd463862b1a8f40365d84fd52105d7eafc3614fb3d470b695ba28a6e4da06
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
aarch64*)
|
||||
configure_args+=" -DENABLE_QSV11=off"
|
||||
;;
|
||||
*)
|
||||
makedepends+=" oneVPL"
|
||||
;;
|
||||
build_options="luajit"
|
||||
case $XBPS_TARGET_MACHINE in
|
||||
riscv64*);;
|
||||
*) build_options_default="luajit";;
|
||||
esac
|
||||
|
||||
pre_configure() {
|
||||
|
|
Loading…
Add table
Reference in a new issue