summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2023-03-29 18:38:42 +0200
committerAlexis Ballier <aballier@gentoo.org>2023-03-29 18:38:46 +0200
commitf5229d7d812b1b9e66eb5556eae4803edd1a4943 (patch)
tree3a16bc6ecffe452ab36f3b3a77d102eeb0753831 /sci-electronics
parentprofiles/package.mask: mask dev-ruby/rspec:2 for removal (diff)
downloadgentoo-f5229d7d812b1b9e66eb5556eae4803edd1a4943.tar.gz
gentoo-f5229d7d812b1b9e66eb5556eae4803edd1a4943.tar.bz2
gentoo-f5229d7d812b1b9e66eb5556eae4803edd1a4943.zip
sci-electronics/gazebo: fix build with ffmpeg6
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/gazebo/files/ffmpeg6.patch40
-rw-r--r--sci-electronics/gazebo/gazebo-11.12.0.ebuild1
2 files changed, 41 insertions, 0 deletions
diff --git a/sci-electronics/gazebo/files/ffmpeg6.patch b/sci-electronics/gazebo/files/ffmpeg6.patch
new file mode 100644
index 000000000000..932d1e31c9d1
--- /dev/null
+++ b/sci-electronics/gazebo/files/ffmpeg6.patch
@@ -0,0 +1,40 @@
+Index: gazebo-11.12.0/gazebo/common/AudioDecoder.cc
+===================================================================
+--- gazebo-11.12.0.orig/gazebo/common/AudioDecoder.cc
++++ gazebo-11.12.0/gazebo/common/AudioDecoder.cc
+@@ -364,6 +364,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->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+ this->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED;
+@@ -371,6 +372,7 @@ bool AudioDecoder::SetFile(const std::st
+ if (this->codec->capabilities & CODEC_CAP_TRUNCATED)
+ this->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
+ #endif
++#endif
+
+ // Open codec
+ if (avcodec_open2(this->codecCtx, this->codec, nullptr) < 0)
+Index: gazebo-11.12.0/gazebo/common/Video.cc
+===================================================================
+--- gazebo-11.12.0.orig/gazebo/common/Video.cc
++++ gazebo-11.12.0/gazebo/common/Video.cc
+@@ -214,6 +214,7 @@ bool Video::Load(const std::string &_fil
+ return false;
+ }
+
++#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)
+@@ -223,6 +224,7 @@ bool Video::Load(const std::string &_fil
+ if (codec->capabilities & CODEC_CAP_TRUNCATED)
+ this->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
+ #endif
++#endif
+
+ // Open codec
+ if (avcodec_open2(this->codecCtx, codec, nullptr) < 0)
diff --git a/sci-electronics/gazebo/gazebo-11.12.0.ebuild b/sci-electronics/gazebo/gazebo-11.12.0.ebuild
index 79c54a12daca..3eaa4232a79e 100644
--- a/sci-electronics/gazebo/gazebo-11.12.0.ebuild
+++ b/sci-electronics/gazebo/gazebo-11.12.0.ebuild
@@ -65,6 +65,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
PATCHES=(
"${FILESDIR}/qwt2.patch"
"${FILESDIR}/cmake.patch"
+ "${FILESDIR}/ffmpeg6.patch"
)
src_configure() {