diff --git a/ncmpcpp/.signature b/ncmpcpp/.signature index cd51769d5..93b7a4c7e 100644 --- a/ncmpcpp/.signature +++ b/ncmpcpp/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3yMAwTeWaV+4KkyH9tz6/OC8qArntV64sqPRVq6qE5QDYemNrws5EbLo02aWxE5hBJQo+KnmwA5yN/u7u5gEigc= -SHA256 (Pkgfile) = 125d5ae6b8830b7b861b92bd04db28811c1c3575bd794f54f087e9fa458983d1 +RWSagIOpLGJF34ab/EP+iVaGL1QsX32Riy3FDjcSkDV6WgmyVtELIi7L7Q9At3iGqvTpYe2Y3RTCNXmbVdcDFpqzBgawA3/dhwQ= +SHA256 (Pkgfile) = 655d4eb065a4cc177d07a8f3d99300490478be99dce1314b35db3586a545df79 SHA256 (.footprint) = 106b3c28574a9591fa92d0c5c8ee8e0bc78a394a48840175cb2ab8f71b7b0ceb SHA256 (ncmpcpp-0.9.2.tar.gz) = 9321275e26ad4308448e661bb879b96d446b203cf57b3591db17b186387a7847 +SHA256 (taglib.patch) = 90faf21a408fce5fea6fa9f9239fcd50f708ce272afb4694c82078fa4cd2e7f1 diff --git a/ncmpcpp/Pkgfile b/ncmpcpp/Pkgfile index 107a1802b..290d1ed84 100644 --- a/ncmpcpp/Pkgfile +++ b/ncmpcpp/Pkgfile @@ -7,13 +7,17 @@ name=ncmpcpp version=0.9.2 release=2 -source=(https://github.com/arybczak/$name/archive/$version/$name-$version.tar.gz) +source=(https://github.com/arybczak/$name/archive/$version/$name-$version.tar.gz + taglib.patch) build() { cd $name-$version - [[ -e /usr/lib/pkgconfig/fftw3.pc ]] && PKGMK_NCMPCPP+=' --with-fftw --enable-visualizer' - [[ -e /usr/lib/pkgconfig/taglib.pc ]] && PKGMK_NCMPCPP+=' --with-taglib' + prt-get isinst fftw && PKGMK_NCMPCPP+=' --with-fftw --enable-visualizer' + prt-get isinst taglib && PKGMK_NCMPCPP+=' --with-taglib' + + patch -Np1 -i $SRC/taglib.patch + ./autogen.sh ./configure $PKGMK_NCMPCPP \ --prefix=/usr \ diff --git a/ncmpcpp/taglib.patch b/ncmpcpp/taglib.patch new file mode 100644 index 000000000..51f3f2543 --- /dev/null +++ b/ncmpcpp/taglib.patch @@ -0,0 +1,47 @@ +--- ncmpcpp-0.9.2/src/tags.cpp.old 2024-01-28 16:15:20.612778227 +0100 ++++ ncmpcpp-0.9.2/src/tags.cpp 2024-01-28 16:15:30.945741026 +0100 +@@ -40,6 +40,8 @@ + #include "utility/string.h" + #include "utility/wide_string.h" + ++#include ++ + namespace { + + TagLib::StringList tagList(const MPD::MutableSong &s, MPD::Song::GetFunction f) +@@ -122,12 +124,20 @@ + tag->setArtist(ToWString(s.getArtist())); + tag->setAlbum(ToWString(s.getAlbum())); + try { +- tag->setYear(boost::lexical_cast(s.getDate())); ++ #if (TAGLIB_MAJOR_VERSION >= 2) ++ tag->setYear(boost::lexical_cast(s.getDate())); ++ #else ++ tag->setYear(boost::lexical_cast(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 { +- tag->setTrack(boost::lexical_cast(s.getTrack())); ++ #if (TAGLIB_MAJOR_VERSION >= 2) ++ tag->setTrack(boost::lexical_cast(s.getTrack())); ++ #else ++ tag->setTrack(boost::lexical_cast(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 +304,11 @@ + { + writeID3v2Tags(s, mpeg_file->ID3v2Tag(true)); + // write id3v2.4 tags only +- if (!mpeg_file->save(TagLib::MPEG::File::ID3v2, true, 4, false)) ++ #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;