diff options
-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 |