diff options
author | Christoph Willing <chris.willing@linux.com> | 2022-11-15 17:07:07 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-11-19 10:08:12 +0700 |
commit | 40d4665c8c8e4058a1669cc8b8338397bbaef47c (patch) | |
tree | 73d10aec459b739282e131cac50a444da3483e05 /graphics/openimageio | |
parent | 55bb70fbc13a567a2a71b5d201b2e537916743a6 (diff) |
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>
Diffstat (limited to 'graphics/openimageio')
-rw-r--r-- | graphics/openimageio/ffmpeg-5.1.diff | 37 | ||||
-rw-r--r-- | graphics/openimageio/openimageio.SlackBuild | 3 |
2 files changed, 39 insertions, 1 deletions
diff --git a/graphics/openimageio/ffmpeg-5.1.diff b/graphics/openimageio/ffmpeg-5.1.diff new file mode 100644 index 000000000000..6d3633c83100 --- /dev/null +++ b/graphics/openimageio/ffmpeg-5.1.diff @@ -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) diff --git a/graphics/openimageio/openimageio.SlackBuild b/graphics/openimageio/openimageio.SlackBuild index a556bf69e890..d5a820a96d0d 100644 --- a/graphics/openimageio/openimageio.SlackBuild +++ b/graphics/openimageio/openimageio.SlackBuild @@ -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 |