summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2023-03-29 18:16:27 +0200
committerAlexis Ballier <aballier@gentoo.org>2023-03-29 18:16:46 +0200
commit2671860189b907e6933bcf090ee8a6c79ba46500 (patch)
tree9408ae19ce941539ea88ed4acbe5e8a40adb5f78 /sci-libs
parentmedia-video/gpac: bump to 2.2.0 (diff)
downloadgentoo-2671860189b907e6933bcf090ee8a6c79ba46500.tar.gz
gentoo-2671860189b907e6933bcf090ee8a6c79ba46500.tar.bz2
gentoo-2671860189b907e6933bcf090ee8a6c79ba46500.zip
sci-libs/ignition-common: fix build with ffmpeg6
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/ignition-common/files/ffmpeg6.patch40
-rw-r--r--sci-libs/ignition-common/ignition-common-3.14.2.ebuild7
2 files changed, 45 insertions, 2 deletions
diff --git a/sci-libs/ignition-common/files/ffmpeg6.patch b/sci-libs/ignition-common/files/ffmpeg6.patch
new file mode 100644
index 000000000000..b4d61f181291
--- /dev/null
+++ b/sci-libs/ignition-common/files/ffmpeg6.patch
@@ -0,0 +1,40 @@
+Index: gz-common-ignition-common3_3.14.2/av/src/AudioDecoder.cc
+===================================================================
+--- gz-common-ignition-common3_3.14.2.orig/av/src/AudioDecoder.cc
++++ gz-common-ignition-common3_3.14.2/av/src/AudioDecoder.cc
+@@ -348,6 +348,7 @@ bool AudioDecoder::SetFile(const std::st
+ return false;
+ }
+
++#if LIBAVCODEC_VERSION_MAJOR < 60
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100)
+ if (this->data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+ this->data->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED;
+@@ -355,6 +356,7 @@ bool AudioDecoder::SetFile(const std::st
+ if (this->data->codec->capabilities & CODEC_CAP_TRUNCATED)
+ this->data->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
+ #endif
++#endif
+
+ // Open codec
+ if (avcodec_open2(this->data->codecCtx, this->data->codec, nullptr) < 0)
+Index: gz-common-ignition-common3_3.14.2/av/src/Video.cc
+===================================================================
+--- gz-common-ignition-common3_3.14.2.orig/av/src/Video.cc
++++ gz-common-ignition-common3_3.14.2/av/src/Video.cc
+@@ -179,6 +179,7 @@ bool Video::Load(const std::string &_fil
+ this->dataPtr->videoStream]->codec;
+ #endif
+
++#if LIBAVCODEC_VERSION_MAJOR < 60
+ // Inform the codec that we can handle truncated bitstreams -- i.e.,
+ // bitstreams where frame boundaries can fall in the middle of packets
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100)
+@@ -188,6 +189,7 @@ bool Video::Load(const std::string &_fil
+ if (codec->capabilities & CODEC_CAP_TRUNCATED)
+ this->dataPtr->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
+ #endif
++#endif
+
+ // Open codec
+ if (avcodec_open2(this->dataPtr->codecCtx, codec, nullptr) < 0)
diff --git a/sci-libs/ignition-common/ignition-common-3.14.2.ebuild b/sci-libs/ignition-common/ignition-common-3.14.2.ebuild
index b1328bf00fb2..122afd62eb9c 100644
--- a/sci-libs/ignition-common/ignition-common-3.14.2.ebuild
+++ b/sci-libs/ignition-common/ignition-common-3.14.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -34,7 +34,10 @@ BDEPEND="
dev-util/ignition-cmake:2"
S="${WORKDIR}/gz-common-ignition-common${IGN_MAJOR}_${PV}"
-PATCHES=( "${FILESDIR}/ffmpeg5.patch" )
+PATCHES=(
+ "${FILESDIR}/ffmpeg5.patch"
+ "${FILESDIR}/ffmpeg6.patch"
+)
src_configure() {
local mycmakeargs=(