Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] obs: riscv64, always enable oneVPL. oneVPL: fix cross
@ 2023-11-14  9:31 Johnnynator
  2023-11-14  9:32 ` [PR PATCH] [Updated] " Johnnynator
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johnnynator @ 2023-11-14  9:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

There is a new 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: 8828 bytes --]

From 42c518c02a3094376c2b0331959a1dd3aba9ed53 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sun, 12 Nov 2023 13:36:46 +0100
Subject: [PATCH 1/3] PrismLauncher: fix Minecraft runtime on musl libc

- set sane default soname for gflw and openal
---
 .../PrismLauncher/patches/musl-findPath.patch | 47 +++++++++++++++++++
 srcpkgs/PrismLauncher/template                |  5 +-
 2 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/PrismLauncher/patches/musl-findPath.patch

diff --git a/srcpkgs/PrismLauncher/patches/musl-findPath.patch b/srcpkgs/PrismLauncher/patches/musl-findPath.patch
new file mode 100644
index 0000000000000..8a57bc1f1180f
--- /dev/null
+++ b/srcpkgs/PrismLauncher/patches/musl-findPath.patch
@@ -0,0 +1,47 @@
+diff --git a/launcher/MangoHud.cpp b/launcher/MangoHud.cpp
+index ab79f418..ab685b82 100644
+--- a/launcher/MangoHud.cpp
++++ b/launcher/MangoHud.cpp
+@@ -27,13 +27,14 @@
+ #include "Json.h"
+ #include "MangoHud.h"
+ 
+-#ifdef __GLIBC__
++#ifdef Q_OS_LINUX
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #define UNDEF_GNU_SOURCE
+ #endif
+ #include <dlfcn.h>
+ #include <linux/limits.h>
++#include <link.h>
+ #endif
+ 
+ namespace MangoHud {
+@@ -119,7 +120,7 @@ QString getLibraryString()
+ 
+ QString findLibrary(QString libName)
+ {
+-#ifdef __GLIBC__
++#ifdef Q_OS_LINUX
+     const char* library = libName.toLocal8Bit().constData();
+ 
+     void* handle = dlopen(library, RTLD_NOW);
+@@ -128,14 +129,14 @@ QString findLibrary(QString libName)
+         return {};
+     }
+ 
+-    char path[PATH_MAX];
+-    if (dlinfo(handle, RTLD_DI_ORIGIN, path) == -1) {
++    struct link_map *linkmap;
++    if (dlinfo(handle, RTLD_DI_LINKMAP, &linkmap) == -1) {
+         qCritical() << "dlinfo() failed:" << dlerror();
+         dlclose(handle);
+         return {};
+     }
+ 
+-    auto fullPath = FS::PathCombine(QString(path), libName);
++    auto fullPath = QString(linkmap->l_name);
+ 
+     dlclose(handle);
+     return fullPath;
diff --git a/srcpkgs/PrismLauncher/template b/srcpkgs/PrismLauncher/template
index 50f83b9af96db..a608f2a9fd0ab 100644
--- a/srcpkgs/PrismLauncher/template
+++ b/srcpkgs/PrismLauncher/template
@@ -1,9 +1,10 @@
 # Template file for 'PrismLauncher'
 pkgname=PrismLauncher
 version=8.0
-revision=1
+revision=2
 build_style=cmake
-configure_args="-DLauncher_BUILD_PLATFORM=Void -DLauncher_QT_VERSION_MAJOR='5'"
+configure_args="-DLauncher_BUILD_PLATFORM=Void -DLauncher_QT_VERSION_MAJOR='5'
+ -DLauncher_GLFW_LIBRARY_NAME=libglfw.so.3 -DLauncher_OPENAL_LIBRARY_NAME=libopenal.so.1"
 hostmakedepends="extra-cmake-modules openjdk17 pkg-config qt5-host-tools
  qt5-qmake scdoc"
 makedepends="qt5-devel"

From de1d9b20f3af426a314b4f858a61f27dbac80973 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Tue, 14 Nov 2023 10:02:20 +0100
Subject: [PATCH 2/3] 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 3bb7bbc8fd6403e2a2095d66133dab2c7e258dfe Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Tue, 14 Nov 2023 10:09:21 +0100
Subject: [PATCH 3/3] 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}"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] obs: riscv64, always enable oneVPL. oneVPL: fix cross
  2023-11-14  9:31 [PR PATCH] obs: riscv64, always enable oneVPL. oneVPL: fix cross Johnnynator
@ 2023-11-14  9:32 ` Johnnynator
  2023-11-14 22:01 ` Johnnynator
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-11-14  9:32 UTC (permalink / raw)
  To: ml

[-- 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}"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] obs: riscv64, always enable oneVPL. oneVPL: fix cross
  2023-11-14  9:31 [PR PATCH] obs: riscv64, always enable oneVPL. oneVPL: fix cross Johnnynator
  2023-11-14  9:32 ` [PR PATCH] [Updated] " Johnnynator
@ 2023-11-14 22:01 ` Johnnynator
  2023-11-15 22:20 ` Johnnynator
  2023-11-15 22:54 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-11-14 22:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 459 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
- 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: 6167 bytes --]

From 5fadee8033f208e608d7d32d2141971aede195ac 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                 | 22 +++++------
 2 files changed, 69 insertions(+), 12 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..b343f1131bfcf 100644
--- a/srcpkgs/obs/template
+++ b/srcpkgs/obs/template
@@ -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() {

From a7a9d5aa1a2ac13c0fd043b0e9ed53174b158904 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}"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] obs: riscv64, always enable oneVPL. oneVPL: fix cross
  2023-11-14  9:31 [PR PATCH] obs: riscv64, always enable oneVPL. oneVPL: fix cross Johnnynator
  2023-11-14  9:32 ` [PR PATCH] [Updated] " Johnnynator
  2023-11-14 22:01 ` Johnnynator
@ 2023-11-15 22:20 ` Johnnynator
  2023-11-15 22:54 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-11-15 22:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 459 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
- 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: 6389 bytes --]

From 1ac95fad28ee97a1c4636f3509cdcb1f44f750d0 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                 | 22 +++++------
 2 files changed, 69 insertions(+), 12 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..b343f1131bfcf 100644
--- a/srcpkgs/obs/template
+++ b/srcpkgs/obs/template
@@ -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() {

From 803d2146184941ce6e2da4c5c7c37552b81a4f2f 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               | 19 ++++++++++++++++++-
 3 files changed, 31 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..de6cd7adc9828 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,10 +17,27 @@ 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}"
 	pkg_install() {
+		vmove usr/bin/sample_decode
+		vmove usr/bin/sample_encode
+		vmove usr/bin/sample_multi_transcode
+		vmove usr/bin/sample_vpp
+		vmove usr/bin/vpl-inspect
 		vmove usr/share/vpl/examples
 	}
 }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Merged]: obs: riscv64, always enable oneVPL. oneVPL: fix cross
  2023-11-14  9:31 [PR PATCH] obs: riscv64, always enable oneVPL. oneVPL: fix cross Johnnynator
                   ` (2 preceding siblings ...)
  2023-11-15 22:20 ` Johnnynator
@ 2023-11-15 22:54 ` Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2023-11-15 22:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

There's a merged pull request on the void-packages repository

obs: riscv64, always enable oneVPL. oneVPL: fix cross
https://github.com/void-linux/void-packages/pull/47232

Description:
- obs: add luajit buildoption, enable oneVPL on all systems
- oneVPL: add devel subpackage, fix cross


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-15 22:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14  9:31 [PR PATCH] obs: riscv64, always enable oneVPL. oneVPL: fix cross Johnnynator
2023-11-14  9:32 ` [PR PATCH] [Updated] " Johnnynator
2023-11-14 22:01 ` Johnnynator
2023-11-15 22:20 ` Johnnynator
2023-11-15 22:54 ` [PR PATCH] [Merged]: " Johnnynator

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).