Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/nickvision-tagger/, media-sound/nickvision-tagger/files/
Date: Tue, 28 Feb 2023 18:03:26
Message-Id: 1677607398.e6d5f5f83b69d689c501c45761b839bfda02caca.xgqt@gentoo
1 commit: e6d5f5f83b69d689c501c45761b839bfda02caca
2 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 18:02:59 2023 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 18:03:18 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6d5f5f8
7
8 media-sound/nickvision-tagger: fix narrowing
9
10 Bug: https://github.com/nlogozzo/NickvisionTagger/pull/80
11 Closes: https://bugs.gentoo.org/898372
12 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
13
14 ...nickvision-tagger-2022.11.2-fix-narrowing.patch | 27 ++++++++++++++++++++++
15 .../nickvision-tagger-2022.11.2.ebuild | 5 +++-
16 2 files changed, 31 insertions(+), 1 deletion(-)
17
18 diff --git a/media-sound/nickvision-tagger/files/nickvision-tagger-2022.11.2-fix-narrowing.patch b/media-sound/nickvision-tagger/files/nickvision-tagger-2022.11.2-fix-narrowing.patch
19 new file mode 100644
20 index 000000000000..96803ca9d692
21 --- /dev/null
22 +++ b/media-sound/nickvision-tagger/files/nickvision-tagger-2022.11.2-fix-narrowing.patch
23 @@ -0,0 +1,27 @@
24 +From a4c1dcc823d5294e32859a5b7f44d8dd31f7a43a Mon Sep 17 00:00:00 2001
25 +From: =?UTF-8?q?Maciej=20Bar=C4=87?= <xgqt@g.o>
26 +Date: Tue, 28 Feb 2023 18:57:14 +0100
27 +Subject: [PATCH] mediahelpers.cpp: use an explicit cast
28 +MIME-Version: 1.0
29 +Content-Type: text/plain; charset=UTF-8
30 +Content-Transfer-Encoding: 8bit
31 +
32 +Bug: https://bugs.gentoo.org/898372
33 +Signed-off-by: Maciej Barć <xgqt@g.o>
34 +---
35 + src/helpers/mediahelpers.cpp | 2 +-
36 + 1 file changed, 1 insertion(+), 1 deletion(-)
37 +
38 +diff --git a/src/helpers/mediahelpers.cpp b/src/helpers/mediahelpers.cpp
39 +index 47c563d..dbebf92 100644
40 +--- a/src/helpers/mediahelpers.cpp
41 ++++ b/src/helpers/mediahelpers.cpp
42 +@@ -35,7 +35,7 @@ std::string MediaHelpers::durationToString(int durationInSeconds)
43 + std::string MediaHelpers::fileSizeToString(std::uintmax_t fileSize)
44 + {
45 + std::vector<std::string> sizes{ _("B"), _("KB"), _("MB"), _("GB"), _("TB") };
46 +- double size{ fileSize };
47 ++ double size{ static_cast<double>(fileSize) };
48 + int index{ 0 };
49 + std::stringstream builder;
50 + while (size >= 1024 && index < 4)
51
52 diff --git a/media-sound/nickvision-tagger/nickvision-tagger-2022.11.2.ebuild b/media-sound/nickvision-tagger/nickvision-tagger-2022.11.2.ebuild
53 index 851dbba8b770..c743b5be40e7 100644
54 --- a/media-sound/nickvision-tagger/nickvision-tagger-2022.11.2.ebuild
55 +++ b/media-sound/nickvision-tagger/nickvision-tagger-2022.11.2.ebuild
56 @@ -30,6 +30,9 @@ RDEPEND="
57 media-libs/chromaprint[tools]
58 "
59
60 -PATCHES=( "${FILESDIR}"/${P}-meson-install.patch )
61 +PATCHES=(
62 + "${FILESDIR}"/${P}-fix-narrowing.patch
63 + "${FILESDIR}"/${P}-meson-install.patch
64 +)
65
66 DOCS=( README.md )