summaryrefslogtreecommitdiff
path: root/media-sound/cantata
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-09 15:28:45 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-09 15:28:45 +0000
commit97aa2a49ead87cd722c01f74adb402af5034c5ea (patch)
tree58d9e8b72568bc1bb407f68f84fff854e5ae4c62 /media-sound/cantata
parentded9dd467d7116cb5d1bde28e5e13e6ec43561b8 (diff)
media-sound/cantata : fix build with taglib2edge
Diffstat (limited to 'media-sound/cantata')
-rw-r--r--media-sound/cantata/cantata-2.5.0-r15.ebuild5
-rw-r--r--media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch42
2 files changed, 46 insertions, 1 deletions
diff --git a/media-sound/cantata/cantata-2.5.0-r15.ebuild b/media-sound/cantata/cantata-2.5.0-r15.ebuild
index 67729439..91815339 100644
--- a/media-sound/cantata/cantata-2.5.0-r15.ebuild
+++ b/media-sound/cantata/cantata-2.5.0-r15.ebuild
@@ -65,7 +65,10 @@ DEPEND="${COMMON_DEPEND}
"
BDEPEND="dev-qt/linguist-tools:5"
-PATCHES=( "${FILESDIR}/${PN}-2.2.0-headers.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-2.2.0-headers.patch"
+ "${FILESDIR}/${PN}-2.5.0-fix-build-taglib2.patch"
+)
src_prepare() {
remove_locale() {
diff --git a/media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch b/media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch
new file mode 100644
index 00000000..c0cc7490
--- /dev/null
+++ b/media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch
@@ -0,0 +1,42 @@
+patch from fork as official is archived
+https://github.com/nullobsi/cantata/commit/45bac9eb3e99ed75b6539f92418556dac1c0193d.patch
+diff --git a/tags/tags.cpp b/tags/tags.cpp
+index ce86a1e8..5817dc1b 100644
+--- a/tags/tags.cpp
++++ b/tags/tags.cpp
+@@ -619,7 +619,7 @@ static void readAPETags(TagLib::APE::Tag *tag, Song *song, ReplayGain *rg, QImag
+ if (map.contains("COVER ART (FRONT)")) {
+ const TagLib::ByteVector nullStringTerminator(1, 0);
+
+- TagLib::ByteVector item = map["COVER ART (FRONT)"].value();
++ TagLib::ByteVector item = map["COVER ART (FRONT)"].binaryData();
+ int pos = item.find(nullStringTerminator); // Skip the filename
+
+ if (++pos > 0) {
+@@ -1301,7 +1301,7 @@ static void readTags(const TagLib::FileRef fileref, Song *song, ReplayGain *rg,
+ }
+ } else if (TagLib::RIFF::WAV::File *file = dynamic_cast< TagLib::RIFF::WAV::File * >(fileref.file())) {
+ if (file->tag()) {
+- readID3v2Tags(file->tag(), song, rg, img, lyrics, rating);
++ readID3v2Tags(file->ID3v2Tag(), song, rg, img, lyrics, rating);
+ }
+ #ifdef TAGLIB_ASF_FOUND
+ } else if (TagLib::ASF::File *file = dynamic_cast< TagLib::ASF::File * >(fileref.file())) {
+@@ -1419,7 +1419,7 @@ static bool writeTags(const TagLib::FileRef fileref, const Song &from, const Son
+ }
+ } else if (TagLib::RIFF::WAV::File *file = dynamic_cast< TagLib::RIFF::WAV::File * >(fileref.file())) {
+ if (file->tag()) {
+- changed=writeID3v2Tags(file->tag(), from, to, rg, img, rating) || changed;
++ changed=writeID3v2Tags(file->ID3v2Tag(), from, to, rg, img, rating) || changed;
+ }
+ #ifdef TAGLIB_ASF_FOUND
+ } else if (TagLib::ASF::File *file = dynamic_cast< TagLib::ASF::File * >(fileref.file())) {
+@@ -1455,7 +1455,7 @@ Song read(const QString &fileName)
+
+ readTags(fileref, &song, nullptr, nullptr, nullptr, nullptr);
+ song.file=fileName;
+- song.time=fileref.audioProperties() ? fileref.audioProperties()->length() : 0;
++ song.time=fileref.audioProperties() ? fileref.audioProperties()->lengthInSeconds() : 0;
+ return song;
+ }
+