mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
graphics/openimageio: Patch to enable ffmpeg-5.1
Signed-off-by: Christoph Willing <chris.willing@linux.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
55bb70fbc1
commit
40d4665c8c
2 changed files with 39 additions and 1 deletions
37
graphics/openimageio/ffmpeg-5.1.diff
Normal file
37
graphics/openimageio/ffmpeg-5.1.diff
Normal file
|
@ -0,0 +1,37 @@
|
|||
From b4b3e26d3b58a4f0feee175290ec7bb4924ebec3 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Cho <cho-m@tuta.io>
|
||||
Date: Thu, 11 Aug 2022 23:29:06 -0700
|
||||
Subject: [PATCH] cmake: fix ffmpeg 5.1 detection (#3516)
|
||||
|
||||
---
|
||||
src/cmake/modules/FindFFmpeg.cmake | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cmake/modules/FindFFmpeg.cmake b/src/cmake/modules/FindFFmpeg.cmake
|
||||
index bb1e9d65fa..0e5ac2979a 100644
|
||||
--- a/src/cmake/modules/FindFFmpeg.cmake
|
||||
+++ b/src/cmake/modules/FindFFmpeg.cmake
|
||||
@@ -59,7 +59,11 @@ else ()
|
||||
endif ()
|
||||
|
||||
if (FFMPEG_INCLUDES)
|
||||
- file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
|
||||
+ set (_libavcodec_version_major_h "${FFMPEG_INCLUDES}/libavcodec/version_major.h")
|
||||
+ if (NOT EXISTS "${_libavcodec_version_major_h}")
|
||||
+ set (_libavcodec_version_major_h "${FFMPEG_INCLUDES}/libavcodec/version.h")
|
||||
+ endif()
|
||||
+ file(STRINGS "${_libavcodec_version_major_h}" TMP
|
||||
REGEX "^#define LIBAVCODEC_VERSION_MAJOR .*$")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MAJOR "${TMP}")
|
||||
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
|
||||
@@ -69,7 +73,9 @@ if (FFMPEG_INCLUDES)
|
||||
REGEX "^#define LIBAVCODEC_VERSION_MICRO .*$")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO "${TMP}")
|
||||
set (LIBAVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
|
||||
- if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.18.100)
|
||||
+ if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100)
|
||||
+ set (FFMPEG_VERSION 5.1)
|
||||
+ elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.18.100)
|
||||
set (FFMPEG_VERSION 5.0)
|
||||
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 58.134.100)
|
||||
set (FFMPEG_VERSION 4.4)
|
|
@ -28,7 +28,7 @@ PRGNAM=openimageio
|
|||
SRCNAM=oiio-Release
|
||||
VERSION=${VERSION:-2.2.21.0}
|
||||
FMT=${FMT:-"fmt-7.1.3"}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -74,6 +74,7 @@ cd $TMP
|
|||
rm -rf $SRCNAM-$VERSION
|
||||
tar xf $CWD/$SRCNAM-$VERSION.tar.gz
|
||||
cd $SRCNAM-$VERSION
|
||||
patch -p1 < $CWD/ffmpeg-5.1.diff
|
||||
|
||||
# Use private fmt
|
||||
mkdir -p ext
|
||||
|
|
Loading…
Reference in a new issue