ncmpcpp: rebuilt for taglib 2.0
This commit is contained in:
parent
da200dc770
commit
1c7a7fdcbd
@ -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
|
||||
|
@ -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 \
|
||||
|
47
ncmpcpp/taglib.patch
Normal file
47
ncmpcpp/taglib.patch
Normal file
@ -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 <taglib/taglib.h>
|
||||
+
|
||||
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<TagLib::uint>(s.getDate()));
|
||||
+ #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 {
|
||||
- tag->setTrack(boost::lexical_cast<TagLib::uint>(s.getTrack()));
|
||||
+ #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 +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;
|
Loading…
x
Reference in New Issue
Block a user