pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/ncmpcpp



Module Name:    pkgsrc
Committed By:   wiz
Date:           Thu Feb  1 07:13:37 UTC 2024

Modified Files:
        pkgsrc/audio/ncmpcpp: distinfo
Added Files:
        pkgsrc/audio/ncmpcpp/patches: patch-src_tags.cpp

Log Message:
ncmpcpp: fix build with taglib 2


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/audio/ncmpcpp/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ncmpcpp/patches/patch-src_tags.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/ncmpcpp/distinfo
diff -u pkgsrc/audio/ncmpcpp/distinfo:1.6 pkgsrc/audio/ncmpcpp/distinfo:1.7
--- pkgsrc/audio/ncmpcpp/distinfo:1.6   Mon Apr 18 13:33:28 2022
+++ pkgsrc/audio/ncmpcpp/distinfo       Thu Feb  1 07:13:37 2024
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2022/04/18 13:33:28 nia Exp $
+$NetBSD: distinfo,v 1.7 2024/02/01 07:13:37 wiz Exp $
 
 BLAKE2s (ncmpcpp-0.9.2.tar.bz2) = 436eed3fd49cd93b4448dedc1f3455ee80c4544c6659ec610181a45e72b1d2d6
 SHA512 (ncmpcpp-0.9.2.tar.bz2) = bbcb3b50233e363412af3c1cf1c0118122733dc376759cd35dee79950f42e098a0402ff670684df91847b990b26022630c9a71192e462bd46e70628e31489742
 Size (ncmpcpp-0.9.2.tar.bz2) = 486266 bytes
 SHA1 (patch-src_status.cpp) = a504f4629a504256c211e24326e1b4695820fd79
+SHA1 (patch-src_tags.cpp) = b40c57a40f105078b1fb8d0bffd81ba84a859a91

Added files:

Index: pkgsrc/audio/ncmpcpp/patches/patch-src_tags.cpp
diff -u /dev/null pkgsrc/audio/ncmpcpp/patches/patch-src_tags.cpp:1.1
--- /dev/null   Thu Feb  1 07:13:37 2024
+++ pkgsrc/audio/ncmpcpp/patches/patch-src_tags.cpp     Thu Feb  1 07:13:37 2024
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_tags.cpp,v 1.1 2024/02/01 07:13:37 wiz Exp $
+
+Support taglib 2.
+https://github.com/ncmpcpp/ncmpcpp/pull/590/commits/d7f487c648e05172aeb2c2d0899d2086160edaf1
+
+--- src/tags.cpp.orig  2021-01-24 15:50:24.000000000 +0000
++++ src/tags.cpp
+@@ -33,6 +33,7 @@
+ #include <textidentificationframe.h>
+ #include <commentsframe.h>
+ #include <xiphcomment.h>
++#include <taglib/taglib.h>
+ 
+ #include <boost/filesystem.hpp>
+ #include "global.h"
+@@ -122,12 +123,20 @@ void writeCommonTags(const MPD::MutableS
+       tag->setArtist(ToWString(s.getArtist()));
+       tag->setAlbum(ToWString(s.getAlbum()));
+       try {
++#if (TAGLIB_MAJOR_VERSION >= 2)
++              tag->setYear(boost::lexical_cast<unsigned int>(s.getDate()));
++#else
+               tag->setYear(boost::lexical_cast<TagLib::uint>(s.getDate()));
++#endif
+       } catch (boost::bad_lexical_cast &) {
+               std::cerr << "writeCommonTags: couldn't write 'year' tag to '" << s.getURI() << "' as it's not a positive integer\n";
+       }
+       try {
++#if (TAGLIB_MAJOR_VERSION >= 2)
++              tag->setTrack(boost::lexical_cast<unsigned int>(s.getTrack()));
++#else
+               tag->setTrack(boost::lexical_cast<TagLib::uint>(s.getTrack()));
++#endif
+       } catch (boost::bad_lexical_cast &) {
+               std::cerr << "writeCommonTags: couldn't write 'track' tag to '" << s.getURI() << "' as it's not a positive integer\n";
+       }
+@@ -294,7 +303,11 @@ bool write(MPD::MutableSong &s)
+       {
+               writeID3v2Tags(s, mpeg_file->ID3v2Tag(true));
+               // write id3v2.4 tags only
++#if (TAGLIB_MAJOR_VERSION >= 2)
++              if (!mpeg_file->save(TagLib::MPEG::File::ID3v2, TagLib::File::StripNone, TagLib::ID3v2::Version::v4, TagLib::File::DuplicateTags::DoNotDuplicate))
++#else
+               if (!mpeg_file->save(TagLib::MPEG::File::ID3v2, true, 4, false))
++#endif
+                       return false;
+               // do not call generic save() as it will duplicate tags
+               saved = true;



Home | Main Index | Thread Index | Old Index