pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/strawberry



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Feb 20 11:02:42 UTC 2021

Modified Files:
        pkgsrc/audio/strawberry: distinfo
Added Files:
        pkgsrc/audio/strawberry/patches:
            patch-ext_libstrawberry-tagreader_tagreader.cpp
            patch-ext_libstrawberry-tagreader_tagreader.h
            patch-ext_libstrawberry-tagreader_tagreadermessages.proto
            patch-ext_strawberry-tagreader_tagreaderworker.cpp
            patch-ext_strawberry-tagreader_tagreaderworker.h
            patch-src_core_song.cpp patch-src_core_song.h
            patch-src_core_tagreaderclient.cpp patch-src_core_tagreaderclient.h
            patch-tests_src_tagreader__test.cpp

Log Message:
strawberry: fix build with protobuf 3.15.0


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/audio/strawberry/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.cpp \
    pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.h \
    pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreadermessages.proto \
    pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.cpp \
    pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.h \
    pkgsrc/audio/strawberry/patches/patch-src_core_song.cpp \
    pkgsrc/audio/strawberry/patches/patch-src_core_song.h \
    pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.cpp \
    pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.h \
    pkgsrc/audio/strawberry/patches/patch-tests_src_tagreader__test.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/strawberry/distinfo
diff -u pkgsrc/audio/strawberry/distinfo:1.10 pkgsrc/audio/strawberry/distinfo:1.11
--- pkgsrc/audio/strawberry/distinfo:1.10       Mon Jan  4 12:12:27 2021
+++ pkgsrc/audio/strawberry/distinfo    Sat Feb 20 11:02:41 2021
@@ -1,6 +1,16 @@
-$NetBSD: distinfo,v 1.10 2021/01/04 12:12:27 wiz Exp $
+$NetBSD: distinfo,v 1.11 2021/02/20 11:02:41 wiz Exp $
 
 SHA1 (strawberry-0.8.5.tar.xz) = 8e0178075632b1c6245369ae6e0e5cc641d2a179
 RMD160 (strawberry-0.8.5.tar.xz) = ffe16fb5adc9f2235f49f66cf3c70fdb0de2dc1b
 SHA512 (strawberry-0.8.5.tar.xz) = 33ab6751e5bd17ff98beed29c179c47bebca92229b94b863a172169704b2fd69d6605cf31db456dee552666b58bcbad867b3cca7bcff2cc6582c4c2c0a2f49c8
 Size (strawberry-0.8.5.tar.xz) = 10801412 bytes
+SHA1 (patch-ext_libstrawberry-tagreader_tagreader.cpp) = 74dc9bd269cd6036e3de8dab77f91a7b713154a8
+SHA1 (patch-ext_libstrawberry-tagreader_tagreader.h) = 999746c50460e9bba07f4cd98c4d257aba52d355
+SHA1 (patch-ext_libstrawberry-tagreader_tagreadermessages.proto) = 68f5414be7218d080f9ea116baefbd15299ba88c
+SHA1 (patch-ext_strawberry-tagreader_tagreaderworker.cpp) = 68f4a3d10d0092bd5daec4a566f9c6aab7085538
+SHA1 (patch-ext_strawberry-tagreader_tagreaderworker.h) = 2542f59b5005cb229bf39a76a0aeed8cd8d22c8b
+SHA1 (patch-src_core_song.cpp) = 45be66132895bd7e4336402aab09e2a312c6e967
+SHA1 (patch-src_core_song.h) = 6e12068faf62d906c91932df4ae37f1a12bed840
+SHA1 (patch-src_core_tagreaderclient.cpp) = 6fa0e2ee043760663613dcb00c56a2c1f42eee18
+SHA1 (patch-src_core_tagreaderclient.h) = 84f4f56698e90a8d962b722c094a2e0bfc6adc78
+SHA1 (patch-tests_src_tagreader__test.cpp) = b959b3db90613be370d2368bb8e55a346201d2b8

Added files:

Index: pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.cpp
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.cpp:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.cpp     Sat Feb 20 11:02:41 2021
@@ -0,0 +1,106 @@
+$NetBSD: patch-ext_libstrawberry-tagreader_tagreader.cpp,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- ext/libstrawberry-tagreader/tagreader.cpp.orig     2020-11-29 07:35:15.638962593 +0000
++++ ext/libstrawberry-tagreader/tagreader.cpp
+@@ -146,34 +146,34 @@ bool TagReader::IsMediaFile(const QStrin
+ 
+ }
+ 
+-pb::tagreader::SongMetadata_FileType TagReader::GuessFileType(TagLib::FileRef *fileref) const {
++spb::tagreader::SongMetadata_FileType TagReader::GuessFileType(TagLib::FileRef *fileref) const {
+ 
+-  if (dynamic_cast<TagLib::RIFF::WAV::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_WAV;
+-  if (dynamic_cast<TagLib::FLAC::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_FLAC;
+-  if (dynamic_cast<TagLib::WavPack::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_WAVPACK;
+-  if (dynamic_cast<TagLib::Ogg::FLAC::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_OGGFLAC;
+-  if (dynamic_cast<TagLib::Ogg::Vorbis::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_OGGVORBIS;
+-  if (dynamic_cast<TagLib::Ogg::Opus::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_OGGOPUS;
+-  if (dynamic_cast<TagLib::Ogg::Speex::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_OGGSPEEX;
+-  if (dynamic_cast<TagLib::MPEG::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_MPEG;
+-  if (dynamic_cast<TagLib::MP4::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_MP4;
+-  if (dynamic_cast<TagLib::ASF::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_ASF;
+-  if (dynamic_cast<TagLib::RIFF::AIFF::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_AIFF;
+-  if (dynamic_cast<TagLib::MPC::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_MPC;
+-  if (dynamic_cast<TagLib::TrueAudio::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_TRUEAUDIO;
+-  if (dynamic_cast<TagLib::APE::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_APE;
++  if (dynamic_cast<TagLib::RIFF::WAV::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_WAV;
++  if (dynamic_cast<TagLib::FLAC::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_FLAC;
++  if (dynamic_cast<TagLib::WavPack::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_WAVPACK;
++  if (dynamic_cast<TagLib::Ogg::FLAC::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_OGGFLAC;
++  if (dynamic_cast<TagLib::Ogg::Vorbis::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_OGGVORBIS;
++  if (dynamic_cast<TagLib::Ogg::Opus::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_OGGOPUS;
++  if (dynamic_cast<TagLib::Ogg::Speex::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_OGGSPEEX;
++  if (dynamic_cast<TagLib::MPEG::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_MPEG;
++  if (dynamic_cast<TagLib::MP4::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_MP4;
++  if (dynamic_cast<TagLib::ASF::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_ASF;
++  if (dynamic_cast<TagLib::RIFF::AIFF::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_AIFF;
++  if (dynamic_cast<TagLib::MPC::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_MPC;
++  if (dynamic_cast<TagLib::TrueAudio::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_TRUEAUDIO;
++  if (dynamic_cast<TagLib::APE::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_APE;
+ #ifdef HAVE_TAGLIB_DSFFILE
+-  if (dynamic_cast<TagLib::DSF::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_DSF;
++  if (dynamic_cast<TagLib::DSF::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_DSF;
+ #endif
+ #ifdef HAVE_TAGLIB_DSDIFFFILE
+-  if (dynamic_cast<TagLib::DSDIFF::File*>(fileref->file())) return pb::tagreader::SongMetadata_FileType_DSDIFF;
++  if (dynamic_cast<TagLib::DSDIFF::File*>(fileref->file())) return spb::tagreader::SongMetadata_FileType_DSDIFF;
+ #endif
+ 
+-  return pb::tagreader::SongMetadata_FileType_UNKNOWN;
++  return spb::tagreader::SongMetadata_FileType_UNKNOWN;
+ 
+ }
+ 
+-void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *song) const {
++void TagReader::ReadFile(const QString &filename, spb::tagreader::SongMetadata *song) const {
+ 
+   const QByteArray url(QUrl::fromLocalFile(filename).toEncoded());
+   const QFileInfo info(filename);
+@@ -435,7 +435,7 @@ void TagReader::Decode(const QString &ta
+ 
+ }
+ 
+-void TagReader::ParseOggTag(const TagLib::Ogg::FieldListMap &map, QString *disc, QString *compilation, pb::tagreader::SongMetadata *song) const {
++void TagReader::ParseOggTag(const TagLib::Ogg::FieldListMap &map, QString *disc, QString *compilation, spb::tagreader::SongMetadata *song) const {
+ 
+   if (!map["COMPOSER"].isEmpty()) Decode(map["COMPOSER"].front(), song->mutable_composer());
+   if (!map["PERFORMER"].isEmpty()) Decode(map["PERFORMER"].front(), song->mutable_performer());
+@@ -459,7 +459,7 @@ void TagReader::ParseOggTag(const TagLib
+ 
+ }
+ 
+-void TagReader::ParseAPETag(const TagLib::APE::ItemListMap &map, QString *disc, QString *compilation, pb::tagreader::SongMetadata *song) const {
++void TagReader::ParseAPETag(const TagLib::APE::ItemListMap &map, QString *disc, QString *compilation, spb::tagreader::SongMetadata *song) const {
+ 
+   TagLib::APE::ItemListMap::ConstIterator it = map.find("ALBUM ARTIST");
+   if (it != map.end()) {
+@@ -503,7 +503,7 @@ void TagReader::ParseAPETag(const TagLib
+ 
+ }
+ 
+-void TagReader::SetVorbisComments(TagLib::Ogg::XiphComment *vorbis_comments, const pb::tagreader::SongMetadata &song) const {
++void TagReader::SetVorbisComments(TagLib::Ogg::XiphComment *vorbis_comments, const spb::tagreader::SongMetadata &song) const {
+ 
+   vorbis_comments->addField("COMPOSER", StdStringToTaglibString(song.composer()), true);
+   vorbis_comments->addField("PERFORMER", StdStringToTaglibString(song.performer()), true);
+@@ -521,7 +521,7 @@ void TagReader::SetVorbisComments(TagLib
+ 
+ }
+ 
+-bool TagReader::SaveFile(const QString &filename, const pb::tagreader::SongMetadata &song) const {
++bool TagReader::SaveFile(const QString &filename, const spb::tagreader::SongMetadata &song) const {
+ 
+   if (filename.isEmpty()) return false;
+ 
+@@ -602,7 +602,7 @@ bool TagReader::SaveFile(const QString &
+   return result;
+ }
+ 
+-void TagReader::SaveAPETag(TagLib::APE::Tag *tag, const pb::tagreader::SongMetadata &song) const {
++void TagReader::SaveAPETag(TagLib::APE::Tag *tag, const spb::tagreader::SongMetadata &song) const {
+ 
+   tag->setItem("album artist", TagLib::APE::Item("album artist", TagLib::StringList(song.albumartist().c_str())));
+   tag->addValue("disc", QStringToTaglibString(song.disc() <= 0 ? QString() : QString::number(song.disc())), true);
Index: pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.h
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.h:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreader.h       Sat Feb 20 11:02:41 2021
@@ -0,0 +1,37 @@
+$NetBSD: patch-ext_libstrawberry-tagreader_tagreader.h,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- ext/libstrawberry-tagreader/tagreader.h.orig       2020-11-09 22:12:40.431554880 +0000
++++ ext/libstrawberry-tagreader/tagreader.h
+@@ -51,10 +51,10 @@ class TagReader {
+   ~TagReader();
+ 
+   bool IsMediaFile(const QString &filename) const;
+-  pb::tagreader::SongMetadata_FileType GuessFileType(TagLib::FileRef *fileref) const;
++  spb::tagreader::SongMetadata_FileType GuessFileType(TagLib::FileRef *fileref) const;
+ 
+-  void ReadFile(const QString &filename, pb::tagreader::SongMetadata *song) const;
+-  bool SaveFile(const QString &filename, const pb::tagreader::SongMetadata &song) const;
++  void ReadFile(const QString &filename, spb::tagreader::SongMetadata *song) const;
++  bool SaveFile(const QString &filename, const spb::tagreader::SongMetadata &song) const;
+ 
+   QByteArray LoadEmbeddedArt(const QString &filename) const;
+   QByteArray LoadEmbeddedAPEArt(const TagLib::APE::ItemListMap &map) const;
+@@ -62,11 +62,11 @@ class TagReader {
+   static void Decode(const TagLib::String &tag, std::string *output);
+   static void Decode(const QString &tag, std::string *output);
+ 
+-  void ParseOggTag(const TagLib::Ogg::FieldListMap &map, QString *disc, QString *compilation, pb::tagreader::SongMetadata *song) const;
+-  void ParseAPETag(const TagLib::APE::ItemListMap &map, QString *disc, QString *compilation, pb::tagreader::SongMetadata *song) const;
++  void ParseOggTag(const TagLib::Ogg::FieldListMap &map, QString *disc, QString *compilation, spb::tagreader::SongMetadata *song) const;
++  void ParseAPETag(const TagLib::APE::ItemListMap &map, QString *disc, QString *compilation, spb::tagreader::SongMetadata *song) const;
+ 
+-  void SetVorbisComments(TagLib::Ogg::XiphComment *vorbis_comments, const pb::tagreader::SongMetadata &song) const;
+-  void SaveAPETag(TagLib::APE::Tag *tag, const pb::tagreader::SongMetadata &song) const;
++  void SetVorbisComments(TagLib::Ogg::XiphComment *vorbis_comments, const spb::tagreader::SongMetadata &song) const;
++  void SaveAPETag(TagLib::APE::Tag *tag, const spb::tagreader::SongMetadata &song) const;
+ 
+   void SetTextFrame(const char *id, const QString &value, TagLib::ID3v2::Tag *tag) const;
+   void SetTextFrame(const char *id, const std::string &value, TagLib::ID3v2::Tag *tag) const;
Index: pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreadermessages.proto
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreadermessages.proto:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-ext_libstrawberry-tagreader_tagreadermessages.proto   Sat Feb 20 11:02:41 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-ext_libstrawberry-tagreader_tagreadermessages.proto,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- ext/libstrawberry-tagreader/tagreadermessages.proto.orig   2020-11-29 07:34:39.463138999 +0000
++++ ext/libstrawberry-tagreader/tagreadermessages.proto
+@@ -1,6 +1,6 @@
+ syntax = "proto2";
+ 
+-package pb.tagreader;
++package spb.tagreader;
+ 
+ message SongMetadata {
+ 
Index: pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.cpp
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.cpp:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.cpp  Sat Feb 20 11:02:41 2021
@@ -0,0 +1,31 @@
+$NetBSD: patch-ext_strawberry-tagreader_tagreaderworker.cpp,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- ext/strawberry-tagreader/tagreaderworker.cpp.orig  2020-11-29 07:34:39.463138999 +0000
++++ ext/strawberry-tagreader/tagreaderworker.cpp
+@@ -27,11 +27,11 @@
+ #include "tagreaderworker.h"
+ 
+ TagReaderWorker::TagReaderWorker(QIODevice *socket, QObject *parent)
+-  : AbstractMessageHandler<pb::tagreader::Message>(socket, parent) {}
++  : AbstractMessageHandler<spb::tagreader::Message>(socket, parent) {}
+ 
+-void TagReaderWorker::MessageArrived(const pb::tagreader::Message &message) {
++void TagReaderWorker::MessageArrived(const spb::tagreader::Message &message) {
+ 
+-  pb::tagreader::Message reply;
++  spb::tagreader::Message reply;
+ 
+   if (message.has_read_file_request()) {
+     tag_reader_.ReadFile(QStringFromStdString(message.read_file_request().filename()), reply.mutable_read_file_response()->mutable_metadata());
+@@ -54,7 +54,7 @@ void TagReaderWorker::MessageArrived(con
+ 
+ 
+ void TagReaderWorker::DeviceClosed() {
+-  AbstractMessageHandler<pb::tagreader::Message>::DeviceClosed();
++  AbstractMessageHandler<spb::tagreader::Message>::DeviceClosed();
+ 
+   qApp->exit();
+ }
Index: pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.h
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.h:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-ext_strawberry-tagreader_tagreaderworker.h    Sat Feb 20 11:02:41 2021
@@ -0,0 +1,22 @@
+$NetBSD: patch-ext_strawberry-tagreader_tagreaderworker.h,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- ext/strawberry-tagreader/tagreaderworker.h.orig    2020-11-29 07:34:39.463138999 +0000
++++ ext/strawberry-tagreader/tagreaderworker.h
+@@ -28,12 +28,12 @@
+ 
+ class QIODevice;
+ 
+-class TagReaderWorker : public AbstractMessageHandler<pb::tagreader::Message> {
++class TagReaderWorker : public AbstractMessageHandler<spb::tagreader::Message> {
+  public:
+   explicit TagReaderWorker(QIODevice *socket, QObject *parent = nullptr);
+ 
+  protected:
+-  void MessageArrived(const pb::tagreader::Message &message) override;
++  void MessageArrived(const spb::tagreader::Message &message) override;
+   void DeviceClosed() override;
+ 
+  private:
Index: pkgsrc/audio/strawberry/patches/patch-src_core_song.cpp
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-src_core_song.cpp:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-src_core_song.cpp     Sat Feb 20 11:02:41 2021
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_core_song.cpp,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- src/core/song.cpp.orig     2020-12-12 17:21:46.352815979 +0000
++++ src/core/song.cpp
+@@ -744,7 +744,7 @@ void Song::set_genre_id3(int id) {
+   set_genre(TStringToQString(TagLib::ID3v1::genre(id)));
+ }
+ 
+-void Song::InitFromProtobuf(const pb::tagreader::SongMetadata &pb) {
++void Song::InitFromProtobuf(const spb::tagreader::SongMetadata &pb) {
+ 
+   if (d->source_ == Source_Unknown) d->source_ = Source_LocalFile;
+ 
+@@ -791,7 +791,7 @@ void Song::InitFromProtobuf(const pb::ta
+ 
+ }
+ 
+-void Song::ToProtobuf(pb::tagreader::SongMetadata *pb) const {
++void Song::ToProtobuf(spb::tagreader::SongMetadata *pb) const {
+ 
+   const QByteArray url(d->url_.toEncoded());
+   const QByteArray art_automatic(d->art_automatic_.toEncoded());
+@@ -826,7 +826,7 @@ void Song::ToProtobuf(pb::tagreader::Son
+   pb->set_filesize(d->filesize_);
+   pb->set_suspicious_tags(d->suspicious_tags_);
+   pb->set_art_automatic(art_automatic.constData(), art_automatic.size());
+-  pb->set_filetype(static_cast<pb::tagreader::SongMetadata_FileType>(d->filetype_));
++  pb->set_filetype(static_cast<spb::tagreader::SongMetadata_FileType>(d->filetype_));
+ 
+ }
+ 
Index: pkgsrc/audio/strawberry/patches/patch-src_core_song.h
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-src_core_song.h:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-src_core_song.h       Sat Feb 20 11:02:41 2021
@@ -0,0 +1,39 @@
+$NetBSD: patch-src_core_song.h,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- src/core/song.h.orig       2020-12-12 17:21:46.352815979 +0000
++++ src/core/song.h
+@@ -44,11 +44,11 @@ namespace Engine {
+ struct SimpleMetaBundle;
+ }  // namespace Engine
+ 
+-namespace pb {
++namespace spb {
+ namespace tagreader {
+ class SongMetadata;
+ }  // namespace tagreader
+-}  // namespace pb
++}  // namespace spb
+ 
+ #ifdef HAVE_LIBGPOD
+ struct _Itdb_Track;
+@@ -155,7 +155,7 @@ class Song {
+   // Constructors
+   void Init(const QString &title, const QString &artist, const QString &album, qint64 length_nanosec);
+   void Init(const QString &title, const QString &artist, const QString &album, qint64 beginning, qint64 end);
+-  void InitFromProtobuf(const pb::tagreader::SongMetadata &pb);
++  void InitFromProtobuf(const spb::tagreader::SongMetadata &pb);
+   void InitFromQuery(const SqlRow &query, bool reliable_metadata, int col = 0);
+   void InitFromFilePartial(const QString &filename);  // Just store the filename: incomplete but fast
+   void InitArtManual();  // Check if there is already a art in the cache and store the filename in art_manual
+@@ -180,7 +180,7 @@ class Song {
+   void BindToQuery(QSqlQuery *query) const;
+   void BindToFtsQuery(QSqlQuery *query) const;
+   void ToXesam(QVariantMap *map) const;
+-  void ToProtobuf(pb::tagreader::SongMetadata *pb) const;
++  void ToProtobuf(spb::tagreader::SongMetadata *pb) const;
+ 
+   // Simple accessors
+   bool is_valid() const;
Index: pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.cpp
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.cpp:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.cpp  Sat Feb 20 11:02:41 2021
@@ -0,0 +1,51 @@
+$NetBSD: patch-src_core_tagreaderclient.cpp,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- src/core/tagreaderclient.cpp.orig  2020-11-21 08:32:20.599784703 +0000
++++ src/core/tagreaderclient.cpp
+@@ -71,8 +71,8 @@ void TagReaderClient::WorkerFailedToStar
+ 
+ TagReaderReply *TagReaderClient::ReadFile(const QString &filename) {
+ 
+-  pb::tagreader::Message message;
+-  pb::tagreader::ReadFileRequest *req = message.mutable_read_file_request();
++  spb::tagreader::Message message;
++  spb::tagreader::ReadFileRequest *req = message.mutable_read_file_request();
+ 
+   req->set_filename(DataCommaSizeFromQString(filename));
+ 
+@@ -82,8 +82,8 @@ TagReaderReply *TagReaderClient::ReadFil
+ 
+ TagReaderReply *TagReaderClient::SaveFile(const QString &filename, const Song &metadata) {
+ 
+-  pb::tagreader::Message message;
+-  pb::tagreader::SaveFileRequest *req = message.mutable_save_file_request();
++  spb::tagreader::Message message;
++  spb::tagreader::SaveFileRequest *req = message.mutable_save_file_request();
+ 
+   req->set_filename(DataCommaSizeFromQString(filename));
+   metadata.ToProtobuf(req->mutable_metadata());
+@@ -96,8 +96,8 @@ TagReaderReply *TagReaderClient::SaveFil
+ 
+ TagReaderReply *TagReaderClient::IsMediaFile(const QString &filename) {
+ 
+-  pb::tagreader::Message message;
+-  pb::tagreader::IsMediaFileRequest *req = message.mutable_is_media_file_request();
++  spb::tagreader::Message message;
++  spb::tagreader::IsMediaFileRequest *req = message.mutable_is_media_file_request();
+ 
+   req->set_filename(DataCommaSizeFromQString(filename));
+ 
+@@ -107,8 +107,8 @@ TagReaderReply *TagReaderClient::IsMedia
+ 
+ TagReaderReply *TagReaderClient::LoadEmbeddedArt(const QString &filename) {
+ 
+-  pb::tagreader::Message message;
+-  pb::tagreader::LoadEmbeddedArtRequest *req = message.mutable_load_embedded_art_request();
++  spb::tagreader::Message message;
++  spb::tagreader::LoadEmbeddedArtRequest *req = message.mutable_load_embedded_art_request();
+ 
+   req->set_filename(DataCommaSizeFromQString(filename));
+ 
Index: pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.h
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.h:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-src_core_tagreaderclient.h    Sat Feb 20 11:02:41 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_core_tagreaderclient.h,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- src/core/tagreaderclient.h.orig    2020-11-19 06:56:43.587995530 +0000
++++ src/core/tagreaderclient.h
+@@ -44,7 +44,7 @@ class TagReaderClient : public QObject {
+  public:
+   explicit TagReaderClient(QObject *parent = nullptr);
+ 
+-  typedef AbstractMessageHandler<pb::tagreader::Message> HandlerType;
++  typedef AbstractMessageHandler<spb::tagreader::Message> HandlerType;
+   typedef HandlerType::ReplyType ReplyType;
+ 
+   static const char *kWorkerExecutableName;
+@@ -78,7 +78,7 @@ class TagReaderClient : public QObject {
+   static TagReaderClient *sInstance;
+ 
+   WorkerPool<HandlerType> *worker_pool_;
+-  QList<pb::tagreader::Message> message_queue_;
++  QList<spb::tagreader::Message> message_queue_;
+   QThread *original_thread_;
+ };
+ 
Index: pkgsrc/audio/strawberry/patches/patch-tests_src_tagreader__test.cpp
diff -u /dev/null pkgsrc/audio/strawberry/patches/patch-tests_src_tagreader__test.cpp:1.1
--- /dev/null   Sat Feb 20 11:02:42 2021
+++ pkgsrc/audio/strawberry/patches/patch-tests_src_tagreader__test.cpp Sat Feb 20 11:02:41 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-tests_src_tagreader__test.cpp,v 1.1 2021/02/20 11:02:41 wiz Exp $
+
+Fix build with protobuf 3.15.0.
+Based on https://github.com/strawberrymusicplayer/strawberry/issues/654
+
+--- tests/src/tagreader_test.cpp.orig  2020-11-29 07:34:39.479138921 +0000
++++ tests/src/tagreader_test.cpp
+@@ -44,7 +44,7 @@ class TagReaderTest : public ::testing::
+   static Song ReadSongFromFile(const QString& filename) {
+     TagReader tag_reader;
+     Song song;
+-    ::pb::tagreader::SongMetadata pb_song;
++    ::spb::tagreader::SongMetadata pb_song;
+ 
+     // We need to init protobuf object from a Song object, to have default values initialized correctly.
+     song.ToProtobuf(&pb_song);
+@@ -55,7 +55,7 @@ class TagReaderTest : public ::testing::
+ 
+   static void WriteSongToFile(const Song& song, const QString& filename) {
+     TagReader tag_reader;
+-    ::pb::tagreader::SongMetadata pb_song;
++    ::spb::tagreader::SongMetadata pb_song;
+     song.ToProtobuf(&pb_song);
+     tag_reader.SaveFile(filename, pb_song);
+   }



Home | Main Index | Thread Index | Old Index