git: d7e2af190e56 - main - multimedia/musique: Prepare for Taglib 2.x
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jun 2024 01:23:07 UTC
The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=d7e2af190e56f36661230d12c86cbf4adfd76e51 commit d7e2af190e56f36661230d12c86cbf4adfd76e51 Author: Jason E. Hale <jhale@FreeBSD.org> AuthorDate: 2024-06-06 21:54:39 +0000 Commit: Jason E. Hale <jhale@FreeBSD.org> CommitDate: 2024-06-06 23:05:02 +0000 multimedia/musique: Prepare for Taglib 2.x PR: 276677 Obtained from: upstream --- multimedia/musique/files/patch-src_coverutils.cpp | 16 ++++++++++++++ multimedia/musique/files/patch-src_mainwindow.cpp | 17 +++++++++++++++ multimedia/musique/files/patch-src_tags_mp4utils.h | 25 ++++++++++++++++++++++ .../musique/files/patch-src_tags_tagutils.cpp | 13 +++++++++++ 4 files changed, 71 insertions(+) diff --git a/multimedia/musique/files/patch-src_coverutils.cpp b/multimedia/musique/files/patch-src_coverutils.cpp new file mode 100644 index 000000000000..1f74650156b8 --- /dev/null +++ b/multimedia/musique/files/patch-src_coverutils.cpp @@ -0,0 +1,16 @@ +Fix build with Taglib 2.x + +Obtained from: +https://github.com/flaviotordini/musique/commit/7277d40defe9cde40f947a81d624195ddf683f44 + +--- src/coverutils.cpp.orig 2023-06-24 18:44:28 UTC ++++ src/coverutils.cpp +@@ -159,7 +159,7 @@ bool CoverUtils::coverFromMP4(const QString &filename, + TagLib::MP4::Tag *tag = static_cast<TagLib::MP4::Tag *>(f.tag()); + if (!tag) return false; + +- TagLib::MP4::ItemListMap itemsListMap = tag->itemListMap(); ++ TagLib::MP4::ItemMap itemsListMap = tag->itemMap(); + TagLib::MP4::Item coverItem = itemsListMap["covr"]; + TagLib::MP4::CoverArtList coverArtList = coverItem.toCoverArtList(); + TagLib::MP4::CoverArt coverArt = coverArtList.front(); diff --git a/multimedia/musique/files/patch-src_mainwindow.cpp b/multimedia/musique/files/patch-src_mainwindow.cpp new file mode 100644 index 000000000000..c1410a1a6c5a --- /dev/null +++ b/multimedia/musique/files/patch-src_mainwindow.cpp @@ -0,0 +1,17 @@ +Fix build with Taglib 2.x + +Obtained from: +https://github.com/flaviotordini/musique/commit/7277d40defe9cde40f947a81d624195ddf683f44 + +--- src/mainwindow.cpp.orig 2023-06-24 18:44:28 UTC ++++ src/mainwindow.cpp +@@ -575,6 +575,9 @@ void MainWindow::createToolBar() { + volumeSlider = new SeekSlider(this); + volumeSlider->setValue(volumeSlider->maximum()); + ++#include <iostream> ++ ++ + #if defined(APP_MAC_SEARCHFIELD) && !defined(APP_MAC_QMACTOOLBAR) + SearchWrapper *searchWrapper = new SearchWrapper(this); + toolbarSearch = searchWrapper->getSearchLineEdit(); diff --git a/multimedia/musique/files/patch-src_tags_mp4utils.h b/multimedia/musique/files/patch-src_tags_mp4utils.h new file mode 100644 index 000000000000..ed5966e9a3f9 --- /dev/null +++ b/multimedia/musique/files/patch-src_tags_mp4utils.h @@ -0,0 +1,25 @@ +Fix build with Taglib 2.x + +Obtained from: +https://github.com/flaviotordini/musique/commit/7277d40defe9cde40f947a81d624195ddf683f44 + +--- src/tags/mp4utils.h.orig 2023-06-24 18:44:28 UTC ++++ src/tags/mp4utils.h +@@ -9,7 +9,7 @@ void load(TagLib::MP4::Tag *tag, Tags *tags) { + namespace Mp4Utils { + + void load(TagLib::MP4::Tag *tag, Tags *tags) { +- const TagLib::MP4::ItemListMap &map = tag->itemListMap(); ++ const TagLib::MP4::ItemMap &map = tag->itemMap(); + + if (map.contains("trkn")) { + TagLib::MP4::Item::IntPair intPair = map["trkn"].toIntPair(); +@@ -31,7 +31,7 @@ void load(TagLib::MP4::Tag *tag, Tags *tags) { + tags->setComposerSort(v); + } + +- TagLib::MP4::ItemListMap::ConstIterator it = map.find("aART"); ++ TagLib::MP4::ItemMap::ConstIterator it = map.find("aART"); + if (it != map.end()) { + TagLib::StringList sl = it->second.toStringList(); + if (!sl.isEmpty()) diff --git a/multimedia/musique/files/patch-src_tags_tagutils.cpp b/multimedia/musique/files/patch-src_tags_tagutils.cpp new file mode 100644 index 000000000000..634728b76fbc --- /dev/null +++ b/multimedia/musique/files/patch-src_tags_tagutils.cpp @@ -0,0 +1,13 @@ +TagLib::AudioProperties::length() is deprecated in Taglib 2.x. + +--- src/tags/tagutils.cpp.orig 2023-06-24 18:44:28 UTC ++++ src/tags/tagutils.cpp +@@ -49,7 +49,7 @@ Tags *TagUtils::load(const QString &filename) { + tags->setComment(TagUtils::qString(tag->comment())); + TagLib::AudioProperties *audioProperties = fileref.audioProperties(); + if (audioProperties) +- tags->setDuration(audioProperties->length()); ++ tags->setDuration(audioProperties->lengthInSeconds()); + } + + /*