* [gentoo-commits] repo/gentoo:master commit in: sci-libs/ignition-common/, sci-libs/ignition-common/files/
@ 2022-08-24 11:38 Alexis Ballier
0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier @ 2022-08-24 11:38 UTC (permalink / raw
To: gentoo-commits
commit: d2ae17e834044bc7d9b0d742309fc84a6e66675e
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 24 11:38:21 2022 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Aug 24 11:38:44 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2ae17e8
sci-libs/ignition-common: update patch
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
sci-libs/ignition-common/files/ffmpeg5.patch | 113 +++++----------------
.../ignition-common/ignition-common-3.14.2.ebuild | 2 +-
2 files changed, 25 insertions(+), 90 deletions(-)
diff --git a/sci-libs/ignition-common/files/ffmpeg5.patch b/sci-libs/ignition-common/files/ffmpeg5.patch
index 668b2befeb74..dc0f763072eb 100644
--- a/sci-libs/ignition-common/files/ffmpeg5.patch
+++ b/sci-libs/ignition-common/files/ffmpeg5.patch
@@ -1,93 +1,28 @@
-Index: ign-common-ignition-common3_3.14.0/av/src/AudioDecoder.cc
+Index: gz-common-ignition-common3_3.14.2/graphics/src/Image.cc
===================================================================
---- ign-common-ignition-common3_3.14.0.orig/av/src/AudioDecoder.cc
-+++ ign-common-ignition-common3_3.14.0/av/src/AudioDecoder.cc
-@@ -35,7 +35,7 @@ class ignition::common::AudioDecoderPriv
- public: AVCodecContext *codecCtx;
+--- gz-common-ignition-common3_3.14.2.orig/graphics/src/Image.cc
++++ gz-common-ignition-common3_3.14.2/graphics/src/Image.cc
+@@ -20,6 +20,7 @@
+ #include <FreeImage.h>
- /// \brief libavcodec audio codec.
-- public: AVCodec *codec;
-+ public: const AVCodec *codec;
+ #include <string>
++#include <cstring>
- /// \brief Index of the audio stream.
- public: int audioStream;
-@@ -132,8 +132,12 @@ bool AudioDecoder::Decode(uint8_t **_out
- # pragma GCC diagnostic push
- # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
-- bytesDecoded = avcodec_decode_audio4(this->data->codecCtx, decodedFrame,
-- &gotFrame, &packet1);
-+ bytesDecoded = avcodec_send_packet(this->data->codecCtx, &packet1);
-+ if (bytesDecoded >= 0 || bytesDecoded == AVERROR_EOF) {
-+ bytesDecoded = avcodec_receive_frame(this->data->codecCtx, decodedFrame);
-+ gotFrame = bytesDecoded >= 0;
-+ if (bytesDecoded == AVERROR(EAGAIN) || bytesDecoded == AVERROR_EOF) bytesDecoded = 0;
-+ }
- #ifndef _WIN32
- # pragma GCC diagnostic pop
- #endif
-@@ -224,7 +228,7 @@ bool AudioDecoder::SetFile(const std::st
- # pragma GCC diagnostic push
- # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
-- if (this->data->formatCtx->streams[i]->codec->codec_type == // NOLINT(*)
-+ if (this->data->formatCtx->streams[i]->codecpar->codec_type == // NOLINT(*)
- AVMEDIA_TYPE_AUDIO)
- #ifndef _WIN32
- # pragma GCC diagnostic pop
-@@ -249,8 +253,9 @@ bool AudioDecoder::SetFile(const std::st
- # pragma GCC diagnostic push
- # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
-- this->data->codecCtx = this->data->formatCtx->streams[
-- this->data->audioStream]->codec;
-+ this->data->codecCtx = avcodec_alloc_context3(nullptr);
-+ avcodec_parameters_to_context(this->data->codecCtx, this->data->formatCtx->streams[
-+ this->data->audioStream]->codecpar);
- #ifndef _WIN32
- # pragma GCC diagnostic pop
- #endif
-Index: ign-common-ignition-common3_3.14.0/av/src/Video.cc
+ #include <ignition/common/Console.hh>
+ #include <ignition/common/Util.hh>
+Index: gz-common-ignition-common3_3.14.2/av/src/AudioDecoder.cc
===================================================================
---- ign-common-ignition-common3_3.14.0.orig/av/src/Video.cc
-+++ ign-common-ignition-common3_3.14.0/av/src/Video.cc
-@@ -91,7 +91,7 @@ void Video::Cleanup()
- /////////////////////////////////////////////////
- bool Video::Load(const std::string &_filename)
- {
-- AVCodec *codec = nullptr;
-+ const AVCodec *codec = nullptr;
- this->dataPtr->videoStream = -1;
-
- if (this->dataPtr->formatCtx || this->dataPtr->avFrame ||
-Index: ign-common-ignition-common3_3.14.0/av/src/VideoEncoder.cc
-===================================================================
---- ign-common-ignition-common3_3.14.0.orig/av/src/VideoEncoder.cc
-+++ ign-common-ignition-common3_3.14.0/av/src/VideoEncoder.cc
-@@ -106,7 +106,7 @@ class IGNITION_COMMON_AV_HIDDEN ignition
- /// Find a suitable encoder for the given codec ID.
- /// \param[in] _codecId ID of the codec we seek the encoder for.
- /// \return The matched encoder (or nullptr on failure).
-- public: AVCodec* FindEncoder(AVCodecID _codecId);
-+ public: const AVCodec* FindEncoder(AVCodecID _codecId);
-
- /// \brief Get a pointer to the frame that contains the encoder input. This
- /// mainly serves for uploading the frame to GPU buffer if HW acceleration is
-@@ -123,7 +123,7 @@ class IGNITION_COMMON_AV_HIDDEN ignition
- };
-
- /////////////////////////////////////////////////
--AVCodec* VideoEncoderPrivate::FindEncoder(AVCodecID _codecId)
-+const AVCodec* VideoEncoderPrivate::FindEncoder(AVCodecID _codecId)
- {
- #ifdef IGN_COMMON_BUILD_HW_VIDEO
- if (this->hwEncoder)
-@@ -367,7 +367,7 @@ bool VideoEncoder::Start(
- }
- else
- {
-- AVOutputFormat *outputFormat = av_guess_format(nullptr,
-+ const AVOutputFormat *outputFormat = av_guess_format(nullptr,
- this->dataPtr->filename.c_str(), nullptr);
-
- if (!outputFormat)
+--- gz-common-ignition-common3_3.14.2.orig/av/src/AudioDecoder.cc
++++ gz-common-ignition-common3_3.14.2/av/src/AudioDecoder.cc
+@@ -157,7 +157,11 @@ bool AudioDecoder::Decode(uint8_t **_out
+ // decodedFrame->linesize[0].
+ int size = decodedFrame->nb_samples *
+ av_get_bytes_per_sample(this->data->codecCtx->sample_fmt) *
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,24,100)
+ this->data->codecCtx->ch_layout.nb_channels;
++#else
++ this->data->codecCtx->channels;
++#endif
+ // Resize the audio buffer as necessary
+ if (*_outBufferSize + size > maxBufferSize)
+ {
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 0d31e9ce6c0c..b1328bf00fb2 100644
--- a/sci-libs/ignition-common/ignition-common-3.14.2.ebuild
+++ b/sci-libs/ignition-common/ignition-common-3.14.2.ebuild
@@ -33,7 +33,7 @@ DEPEND="${RDEPEND}
BDEPEND="
dev-util/ignition-cmake:2"
-S="${WORKDIR}/ign-common-${PN}${IGN_MAJOR}_${PV}"
+S="${WORKDIR}/gz-common-ignition-common${IGN_MAJOR}_${PV}"
PATCHES=( "${FILESDIR}/ffmpeg5.patch" )
src_configure() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/ignition-common/, sci-libs/ignition-common/files/
@ 2025-06-06 12:51 Alexis Ballier
0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier @ 2025-06-06 12:51 UTC (permalink / raw
To: gentoo-commits
commit: d44a9a1ac8a5fdb421abcc105ccf2cb7f666d31d
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 3 08:37:25 2025 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Jun 6 12:51:43 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d44a9a1a
sci-libs/ignition-common: add missing include in exported header
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
sci-libs/ignition-common/files/stdint.patch | 12 ++++++
.../ignition-common-3.17.0-r1.ebuild | 48 ++++++++++++++++++++++
2 files changed, 60 insertions(+)
diff --git a/sci-libs/ignition-common/files/stdint.patch b/sci-libs/ignition-common/files/stdint.patch
new file mode 100644
index 000000000000..604819468652
--- /dev/null
+++ b/sci-libs/ignition-common/files/stdint.patch
@@ -0,0 +1,12 @@
+Index: gz-common-ignition-common3_3.17.0/profiler/include/gz/common/Profiler.hh
+===================================================================
+--- gz-common-ignition-common3_3.17.0.orig/profiler/include/gz/common/Profiler.hh
++++ gz-common-ignition-common3_3.17.0/profiler/include/gz/common/Profiler.hh
+@@ -20,6 +20,7 @@
+
+ #include <memory>
+ #include <string>
++#include <cstdint> // uint32
+
+ #include <gz/common/profiler/Export.hh>
+ #include <gz/common/SingletonT.hh>
diff --git a/sci-libs/ignition-common/ignition-common-3.17.0-r1.ebuild b/sci-libs/ignition-common/ignition-common-3.17.0-r1.ebuild
new file mode 100644
index 000000000000..56f4efa6389e
--- /dev/null
+++ b/sci-libs/ignition-common/ignition-common-3.17.0-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_BUILD_TYPE=RelWithDebInfo
+inherit cmake
+
+IGN_MAJOR=3
+
+DESCRIPTION="Set of libraries designed to rapidly develop robot applications"
+HOMEPAGE="https://github.com/ignitionrobotics/ign-common"
+SRC_URI="https://github.com/ignitionrobotics/ign-common/archive/${PN}${IGN_MAJOR}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="${IGN_MAJOR}"
+KEYWORDS="~amd64"
+IUSE="test"
+#RESTRICT="!test? ( test )"
+# tests dont even build
+RESTRICT="test"
+
+RDEPEND="
+ dev-libs/tinyxml2:=
+ sci-libs/ignition-math:6=
+ sys-apps/util-linux
+ media-libs/freeimage:=
+ sci-libs/gts:=
+ media-video/ffmpeg:0=
+"
+DEPEND="${RDEPEND}
+ dev-build/ignition-cmake:2"
+BDEPEND="
+ dev-build/ignition-cmake:2"
+
+S="${WORKDIR}/gz-common-ignition-common${IGN_MAJOR}_${PV}"
+PATCHES=(
+ "${FILESDIR}/ffmpeg5.patch"
+ "${FILESDIR}/ffmpeg6.patch"
+ "${FILESDIR}/stdint.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ "-DBUILD_TESTING=$(usex test)"
+ )
+ cmake_src_configure
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 12:51 [gentoo-commits] repo/gentoo:master commit in: sci-libs/ignition-common/, sci-libs/ignition-common/files/ Alexis Ballier
-- strict thread matches above, loose matches on Subject: below --
2022-08-24 11:38 Alexis Ballier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox