multimedia/obs-studio: Add patch to fix 32bit build

Signed-off-by: Christoph Willing <chris.willing@linux.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2024-05-18 01:33:58 +10:00 committed by Willy Sudiarto Raharjo
parent 3d0d202b47
commit 6239c40536
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 49 additions and 1 deletions

View file

@ -0,0 +1,43 @@
From: =?utf-8?q?=22IOhannes_m_zm=C3=B6lnig_=28Debian/GNU=29=22?=
<umlaeute@debian.org>
Date: Tue, 27 Jun 2023 14:06:19 +0200
Subject: Fix FTBFS on 32bit archs
---
libobs-opengl/gl-egl-common.c | 4 +++-
libobs/obs.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
--- obs-studio.orig/libobs-opengl/gl-egl-common.c
+++ obs-studio/libobs-opengl/gl-egl-common.c
@@ -368,16 +368,18 @@
uint64_t **modifiers,
size_t *n_modifiers)
{
+ EGLuint64KHR n_modifiers_egl = *n_modifiers;
if (!glad_eglQueryDmaBufModifiersEXT) {
blog(LOG_ERROR, "Unable to load eglQueryDmaBufModifiersEXT");
return false;
}
if (!query_dmabuf_modifiers(egl_display, drm_format, modifiers,
- n_modifiers)) {
+ &n_modifiers_egl)) {
*n_modifiers = 0;
*modifiers = NULL;
return false;
}
+ *n_modifiers = n_modifiers_egl;
return true;
}
--- obs-studio.orig/libobs/obs.c
+++ obs-studio/libobs/obs.c
@@ -885,7 +885,7 @@
obs->video.mixes.array[i] = NULL;
}
if (num_views > 0)
- blog(LOG_WARNING, "Number of remaining views: %ld", num_views);
+ blog(LOG_WARNING, "Number of remaining views: %ld", (long int)num_views);
pthread_mutex_unlock(&obs->video.mixes_mutex);
pthread_mutex_destroy(&obs->video.mixes_mutex);

View file

@ -3,7 +3,7 @@
# Slackware build script for Open Broadcaster Software
#
# Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
# Copyright 2016-2023 Christoph Willing, Brisbane Australia
# Copyright 2016-2024 Christoph Willing, Sydney Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -77,6 +77,7 @@ tar xvf $CWD/$CEF_ROOT.tar.bz2
cd $CEF_ROOT
strip -v Release/*.so
if [ "$ARCH" = "i686" -o "$ARCH" = "i586" ]; then
echo "Making 32bit libcef_dll_wrapper ..."
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
@ -88,6 +89,10 @@ cd $CEF_ROOT
cd $PRGNAM-$COMMIT
sed -i -e '/OBS_VERSION_CANONICAL/ s=^=#=' CMakeLists.txt
if [ "$ARCH" = "i686" -o "$ARCH" = "i586" ]; then
echo "Patching 32bit fix"
patch -p1 < $CWD/0011-Fix-FTBFS-on-32bit-archs.patch
fi
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \