summaryrefslogtreecommitdiffstats
path: root/multimedia/obs-studio/obs-studio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/obs-studio/obs-studio.SlackBuild')
-rw-r--r--multimedia/obs-studio/obs-studio.SlackBuild63
1 files changed, 45 insertions, 18 deletions
diff --git a/multimedia/obs-studio/obs-studio.SlackBuild b/multimedia/obs-studio/obs-studio.SlackBuild
index 6e7f3d75ec..bb3636a606 100644
--- a/multimedia/obs-studio/obs-studio.SlackBuild
+++ b/multimedia/obs-studio/obs-studio.SlackBuild
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Open Broadcaster Software
#
# Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
-# Copyright 2016-2020 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
@@ -23,10 +23,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=obs-studio
-VERSION=${VERSION:-24.0.6}
+VERSION=${VERSION:-29.1.3}
+COMMIT=c58e511813c33e93da7637d50aa431ae0cddda0c
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -44,12 +52,15 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
+ CEF_ROOT=cef_binary_101.0.18+g367b4a0+chromium-101.0.4951.67_linux32_minimal
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
+ CEF_ROOT=cef_binary_101.0.18+g367b4a0+chromium-101.0.4951.67_linux32_minimal
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ CEF_ROOT=cef_binary_4638_linux64
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -60,9 +71,28 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$COMMIT
+tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz
+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" \
+ -DCMAKE_BUILD_TYPE=Release .
+
+ make libcef_dll_wrapper
+ fi
+ cd ..
+
+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 \
@@ -70,15 +100,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Check for mbedtls existence and version suitability (need at least version 2.7.0)
-mbedtls="-DMBEDTLS_LIB=OFF"
-if test -e /usr/include/mbedtls/version.h ; then
- version_number_line=$(grep MBEDTLS_VERSION_NUMBER /usr/include/mbedtls/version.h)
- if [ "$?" = "0" ]; then
- version_number=$(expr substr $(echo $version_number_line | rev | cut -d' ' -f1 | rev) 3 8)
- if expr $version_number \> 02070000 1>/dev/null ; then mbedtls="" ; fi
- fi
-fi
mkdir -p build
cd build
@@ -89,7 +110,13 @@ cd build
-DOBS_MULTIARCH_SUFFIX="$LIBDIRSUFFIX" \
-DOBS_VERSION_OVERRIDE=${VERSION} \
-DUNIX_STRUCTURE=ON \
- $mbedtls \
+ -DENABLE_JACK=ON \
+ -DENABLE_LIBFDK=ON \
+ -DENABLE_NEW_MPEGTS_OUTPUT=OFF \
+ -DENABLE_AJA=OFF \
+ -DENABLE_WEBSOCKET=OFF \
+ -DBUILD_BROWSER=ON \
+ -DCEF_ROOT_DIR="../../$CEF_ROOT" \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -103,4 +130,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE