From: Johnnynator <Johnnynator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] obs: riscv64, always enable oneVPL. oneVPL: fix cross
Date: Tue, 14 Nov 2023 10:32:52 +0100 [thread overview]
Message-ID: <20231114093252.p9Cz-Z81d_H9I6aMHu_tBf9iF1E1Qw6VLHn2060yu9c@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47232@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 509 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages obs-riscv64
https://github.com/void-linux/void-packages/pull/47232
obs: riscv64, always enable oneVPL. oneVPL: fix cross
- PrismLauncher: fix Minecraft runtime on musl libc
- obs: add luajit buildoption, enable oneVPL on all systems
- oneVPL: add devel subpackage, fix cross
A patch file from https://github.com/void-linux/void-packages/pull/47232.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-obs-riscv64-47232.patch --]
[-- Type: text/x-diff, Size: 6127 bytes --]
From ffc075a14a8145d00f6cc290348d7afed6d2930f Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Tue, 14 Nov 2023 10:02:20 +0100
Subject: [PATCH 1/2] obs: add luajit buildoption, enable oneVPL on all systems
---
srcpkgs/obs/patches/non-x86-64.patch | 59 ++++++++++++++++++++++++++++
srcpkgs/obs/template | 20 +++++-----
2 files changed, 68 insertions(+), 11 deletions(-)
create mode 100644 srcpkgs/obs/patches/non-x86-64.patch
diff --git a/srcpkgs/obs/patches/non-x86-64.patch b/srcpkgs/obs/patches/non-x86-64.patch
new file mode 100644
index 0000000000000..280d8f18fb124
--- /dev/null
+++ b/srcpkgs/obs/patches/non-x86-64.patch
@@ -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
diff --git a/srcpkgs/obs/template b/srcpkgs/obs/template
index 90d903a7b982c..efaf2250f3b86 100644
--- a/srcpkgs/obs/template
+++ b/srcpkgs/obs/template
@@ -2,17 +2,18 @@
pkgname=obs
version=30.0.0
revision=1
-archs="i686* x86_64* ppc64le* aarch64*"
+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() {
From e3c05e789966e66abd9f0e8f8af58f79022f9a69 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Tue, 14 Nov 2023 10:09:21 +0100
Subject: [PATCH 2/2] oneVPL: add devel subpackage, fix cross
---
srcpkgs/oneVPL-devel | 1 +
srcpkgs/oneVPL/patches/cross-pc.patch | 12 ++++++++++++
srcpkgs/oneVPL/template | 14 +++++++++++++-
3 files changed, 26 insertions(+), 1 deletion(-)
create mode 120000 srcpkgs/oneVPL-devel
create mode 100644 srcpkgs/oneVPL/patches/cross-pc.patch
diff --git a/srcpkgs/oneVPL-devel b/srcpkgs/oneVPL-devel
new file mode 120000
index 0000000000000..03776a5d59e14
--- /dev/null
+++ b/srcpkgs/oneVPL-devel
@@ -0,0 +1 @@
+oneVPL
\ No newline at end of file
diff --git a/srcpkgs/oneVPL/patches/cross-pc.patch b/srcpkgs/oneVPL/patches/cross-pc.patch
new file mode 100644
index 0000000000000..0b24a2124c9b2
--- /dev/null
+++ b/srcpkgs/oneVPL/patches/cross-pc.patch
@@ -0,0 +1,12 @@
+--- a/dispatcher/pkgconfig/vpl.pc.in 2023-07-21 23:28:38.000000000 +0200
++++ - 2023-11-14 10:16:46.665168740 +0100
+@@ -1,6 +1,6 @@
+-prefix=@pc_rel_prefix@
+-libdir=@pc_rel_libdir@
+-includedir=@pc_rel_incdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${prefix}/lib
++includedir=${prefix}/include
+
+ # oneAPI Video Processing Library (oneVPL)
+ Name: oneVPL
diff --git a/srcpkgs/oneVPL/template b/srcpkgs/oneVPL/template
index 9ceeea7ccc737..03be8b4c83fdb 100644
--- a/srcpkgs/oneVPL/template
+++ b/srcpkgs/oneVPL/template
@@ -1,7 +1,7 @@
# Template file for 'oneVPL'
pkgname=oneVPL
version=2023.3.1
-revision=1
+revision=2
build_style=cmake
hostmakedepends="libva-devel libX11-devel"
hostmakedepends="pkg-config"
@@ -17,6 +17,18 @@ post_install() {
vlicense LICENSE
}
+oneVPL-devel_package() {
+ short_desc+=" - development files"
+ depends="${sourcepkg}>=${version}_${revision}"
+ pkg_install() {
+ vmove etc/vpl/vars.sh
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
+
oneVPL-examples_package() {
short_desc+=" - examples"
depends="${sourcepkg}>=${version}_${revision}"
next prev parent reply other threads:[~2023-11-14 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 9:31 [PR PATCH] " Johnnynator
2023-11-14 9:32 ` Johnnynator [this message]
2023-11-14 22:01 ` [PR PATCH] [Updated] " Johnnynator
2023-11-15 22:20 ` Johnnynator
2023-11-15 22:54 ` [PR PATCH] [Merged]: " Johnnynator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231114093252.p9Cz-Z81d_H9I6aMHu_tBf9iF1E1Qw6VLHn2060yu9c@z \
--to=johnnynator@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).