From afde14d8b644691a8308e6de1ea5b74a21a40e344ac0cdb9cfcd17c0e3635e08 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Wed, 29 Jun 2016 19:48:47 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/qmmp?expand=0&rev=82 --- qmmp-taglib-1.9.patch | 149 ++++++++++++++++++++++++++++++++++++++++++ qmmp.changes | 5 ++ qmmp.spec | 5 +- 3 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 qmmp-taglib-1.9.patch diff --git a/qmmp-taglib-1.9.patch b/qmmp-taglib-1.9.patch new file mode 100644 index 0000000..482edf6 --- /dev/null +++ b/qmmp-taglib-1.9.patch @@ -0,0 +1,149 @@ +--- a/src/plugins/CMakeLists.txt ++++ b/src/plugins/CMakeLists.txt +@@ -1,7 +1,7 @@ + SET(USE_ENCA TRUE CACHE BOOL "enable/disable libenca support") + include(FindPkgConfig) + pkg_search_module(ENCA enca>=1.9) +-pkg_search_module(TAGLIB taglib>=1.10) ++pkg_search_module(TAGLIB taglib>=1.9) + add_subdirectory(Input) + add_subdirectory(Output) + add_subdirectory(Visual) +--- a/src/plugins/General/converter/converter.cpp ++++ b/src/plugins/General/converter/converter.cpp +@@ -33,6 +33,11 @@ + #include + #include "converter.h" + ++#if ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) ++#undef QStringToTString ++#define QStringToTString(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) ++#endif ++ + Converter::Converter(QObject *parent) : QObject(parent), QRunnable() + { + m_user_stop = false; +--- a/src/plugins/General/rgscan/rgscandialog.cpp ++++ b/src/plugins/General/rgscan/rgscandialog.cpp +@@ -42,6 +42,11 @@ + + #define FILE_SKIPPED (Qt::UserRole + 1) + ++#if ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) ++#undef QStringToTString ++#define QStringToTString(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) ++#endif ++ + struct ReplayGainInfoItem + { + QMap info; +@@ -75,8 +80,12 @@ RGScanDialog::RGScanDialog(QList url()); + QString name = formatter.format(track); +@@ -368,6 +377,7 @@ void RGScanDialog::writeVorbisComment(Ta + } + } + ++#if !((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) + void RGScanDialog::writeMP4Tag(TagLib::MP4::Tag *tag, ReplayGainInfoItem *item) + { + if(m_ui.trackCheckBox->isChecked()) +@@ -385,6 +395,7 @@ void RGScanDialog::writeMP4Tag(TagLib::M + gainToStringList(item->info[Qmmp::REPLAYGAIN_ALBUM_PEAK])); + } + } ++#endif + + void RGScanDialog::on_writeButton_clicked() + { +@@ -428,11 +439,13 @@ void RGScanDialog::on_writeButton_clicke + writeAPETag(file.APETag(true), item); + file.save(); + } ++#if !((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) + else if(ext == "m4a") //MPEG-4 Part 14 + { + TagLib::MP4::File file(qPrintable(item->url)); + writeMP4Tag(file.tag(), item); + file.save(); + } ++#endif + } + } +--- a/src/plugins/General/rgscan/rgscandialog.h ++++ b/src/plugins/General/rgscan/rgscandialog.h +@@ -48,10 +48,12 @@ namespace TagLib + { + class XiphComment; + } ++#if !((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) + namespace MP4 + { + class Tag; + } ++#endif + } + + /** +@@ -81,7 +83,9 @@ private: + void writeAPETag(TagLib::APE::Tag *tag, ReplayGainInfoItem *item); + void writeID3v2Tag(TagLib::ID3v2::Tag *tag, ReplayGainInfoItem *item); + void writeVorbisComment(TagLib::Ogg::XiphComment *tag, ReplayGainInfoItem *item); ++#if !((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) + void writeMP4Tag(TagLib::MP4::Tag *tag, ReplayGainInfoItem *item); ++#endif + Ui::RGScanDialog m_ui; + QList m_scanners; + QList m_replayGainItemList; +--- a/src/plugins/Input/flac/flacmetadatamodel.cpp ++++ b/src/plugins/Input/flac/flacmetadatamodel.cpp +@@ -26,6 +26,11 @@ + #include + #include "flacmetadatamodel.h" + ++#if ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) ++#undef QStringToTString ++#define QStringToTString(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) ++#endif ++ + FLACMetaDataModel::FLACMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) + { + m_file = 0; +--- a/src/plugins/Input/opus/opusmetadatamodel.cpp ++++ b/src/plugins/Input/opus/opusmetadatamodel.cpp +@@ -26,6 +26,11 @@ + #include + #include "opusmetadatamodel.h" + ++#if ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) ++#undef QStringToTString ++#define QStringToTString(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) ++#endif ++ + OpusMetaDataModel::OpusMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) + { + m_path = path; +--- a/src/plugins/Input/vorbis/vorbismetadatamodel.cpp ++++ b/src/plugins/Input/vorbis/vorbismetadatamodel.cpp +@@ -26,6 +26,11 @@ + #include + #include "vorbismetadatamodel.h" + ++#if ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION <= 9)) ++#undef QStringToTString ++#define QStringToTString(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) ++#endif ++ + VorbisMetaDataModel::VorbisMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) + { + m_path = path; diff --git a/qmmp.changes b/qmmp.changes index 832ff9c..4ce6698 100644 --- a/qmmp.changes +++ b/qmmp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 29 19:29:12 UTC 2016 - sor.alexei@meowr.ru + +- Add qmmp-taglib-1.9.patch: extend TagLib support to 1.9. + ------------------------------------------------------------------- Tue Jun 21 22:12:43 UTC 2016 - sor.alexei@meowr.ru diff --git a/qmmp.spec b/qmmp.spec index 06df0bd..60cbb51 100644 --- a/qmmp.spec +++ b/qmmp.spec @@ -31,6 +31,8 @@ Source1: baselibs.conf Patch0: %{name}-fix_cdda_version.patch # PATCH-FEATURE-OPENSUSE qmmp-default_pulse.patch reddwarf@opensuse.org -- Use PulseAudio instead of ALSA by default. Patch1: %{name}-default-pulse.patch +# PATCH-FIX-OPENSUSE qmmp-taglib-1.9.patch -- Extend TagLib support to 1.9. +Patch2: %{name}-taglib-1.9.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ @@ -69,7 +71,7 @@ BuildRequires: pkgconfig(opus) >= 1.0.2 BuildRequires: pkgconfig(opusfile) >= 0.2 BuildRequires: pkgconfig(sndfile) BuildRequires: pkgconfig(soxr) -BuildRequires: pkgconfig(taglib) +BuildRequires: pkgconfig(taglib) >= 1.9 BuildRequires: pkgconfig(vorbisfile) BuildRequires: pkgconfig(wavpack) Requires: %{name}(%{sover})(Input) @@ -137,6 +139,7 @@ Development files for libqmmp. %setup -q %patch0 %patch1 -p1 +%patch2 -p1 %build %cmake \