[packages/cantata] new, version 1.4.1
glen
glen at pld-linux.org
Mon Dec 28 04:55:49 CET 2015
commit 22486cc4af47f834f228ee1a9c01607b4d5758f2
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Jan 31 19:12:44 2015 +0200
new, version 1.4.1
based on fedora package, 5ae494a
cantata.spec | 177 ++++++++++++++++++++++++++++++++++++++++++++
icons_crash.patch | 43 +++++++++++
kde4_includes.patch | 12 +++
libsolid_static.patch | 13 ++++
system-qtiocompressor.patch | 15 ++++
system-qxt.patch | 24 ++++++
6 files changed, 284 insertions(+)
---
diff --git a/cantata.spec b/cantata.spec
new file mode 100644
index 0000000..c889b05
--- /dev/null
+++ b/cantata.spec
@@ -0,0 +1,177 @@
+#
+# Conditional build:
+%bcond_without kde # KDE
+%bcond_without qt4 # Qt4
+%bcond_without qt5 # Qt5
+%bcond_without udisks # UDisks support
+
+Summary: Music Player Daemon (MPD) graphical client
+Name: cantata
+Version: 1.4.1
+Release: 0.1
+License: GPL v2+
+Group: Applications/Multimedia
+# https://code.google.com/p/cantata/wiki/Downloads
+Source0: http://pkgs.fedoraproject.org/repo/pkgs/cantata/%{name}-%{version}.tar.bz2/158cbf064f54f8d33630a17a5d40bebd/cantata-%{version}.tar.bz2
+# Source0-md5: 158cbf064f54f8d33630a17a5d40bebd
+Patch101: system-qtiocompressor.patch
+Patch102: system-qxt.patch
+Patch103: kde4_includes.patch
+Patch104: libsolid_static.patch
+Patch105: icons_crash.patch
+URL: http://code.google.com/p/cantata/
+BuildRequires: cdparanoia-III-devel
+BuildRequires: cmake
+BuildRequires: desktop-file-utils
+BuildRequires: gettext
+%{?with_kde:BuildRequires: kde4-kdelibs-devel >= 4.7}
+BuildRequires: rpmbuild(macros) >= 1.596
+%if %{with qt4} || %{with kde}
+BuildRequires: QtDBus-devel
+BuildRequires: QtGui-devel
+BuildRequires: QtIOCompressor-devel
+BuildRequires: QtNetwork-devel
+BuildRequires: QtSingleApplication-devel
+BuildRequires: QtWebKit-devel
+BuildRequires: QtXml-devel
+BuildRequires: libqxt-devel
+BuildRequires: phonon-devel
+BuildRequires: qjson-devel
+%endif
+%if %{with qt5}
+BuildRequires: Qt5Concurrent-devel
+BuildRequires: Qt5DBus-devel
+BuildRequires: Qt5Gui-devel
+BuildRequires: Qt5Network-devel
+BuildRequires: Qt5Svg-devel
+BuildRequires: Qt5WebKit-devel
+BuildRequires: Qt5Xml-devel
+BuildRequires: phonon-qt5-devel
+%endif
+BuildRequires: libcddb-devel
+BuildRequires: libmtp-devel
+BuildRequires: libmusicbrainz5-devel
+BuildRequires: media-player-info
+BuildRequires: phonon-devel
+BuildRequires: systemd-devel
+BuildRequires: taglib-devel
+BuildRequires: taglib-extras-devel
+Requires: media-player-info
+%if %{with kde}
+# http://bugzilla.redhat.com/1134333
+Requires: oxygen-icon-theme
+%endif
+Requires: gtk-update-icon-cache
+Requires: hicolor-icon-theme
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Cantata is a graphical client for the music player daemon (MPD).
+
+Features:
+- Multiple MPD collections.
+- Highly customisable layout.
+- Songs grouped by album in play queue.
+- Context view to show artist, album, and song information of current
+ track.
+- Simple tag editor.
+- File organizer - use tags to organize files and folders.
+- Ability to calculate ReplyGain tags.
+- Dynamic playlists.
+- Online services; Jamendo, Magnatune, SoundCloud, and Podcasts.
+- Radio stream support - with the ability to search for streams via
+ TuneIn and ShoutCast.
+- USB-Mass-Storage and MTP device support.
+- Audio CD ripping and playback.
+- Playback of non-MPD songs, via simple in-built HTTP server.
+- MPRISv2 DBUS interface.
+- Support for KDE global shortcuts (KDE builds), GNOME media keys, and
+ generic media keys (via Qxt support)
+- Ubuntu/ambiance theme integration.
+
+%prep
+%setup -q
+
+# No qt5 qjson,qtiocompressor... yet
+%if %{without qt5}
+%patch101 -p1
+rm -rfv 3rdparty/{qjson,qtiocompressor}/
+sed -i.system-qtiocompressor-headers -e 's|^#include "qtiocompressor/qtiocompressor.h"|#include <QtIOCompressor>|g' \
+ context/albumview.cpp \
+ context/artistview.cpp \
+ context/songview.cpp \
+ context/wikipediasettings.cpp \
+ models/dirviewmodel.cpp \
+ models/musiclibrarymodel.cpp \
+ models/musiclibraryitempodcast.cpp \
+ models/musiclibraryitemroot.cpp \
+ models/streamsmodel.cpp \
+ online/onlineservice.cpp \
+ scrobbling/scrobbler.cpp \
+ streams/tar.cpp
+%endif
+
+%patch102 -p1
+rm -rfv 3rdparty/{qtsingleapplication,qxt}
+sed -i.system-qxt-headers -e 's|^#include "qxt/qxtglobalshortcut.h"|#include <QxtGlobalShortcut>|g' \
+ gui/qxtmediakeys.cpp
+
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
+
+%build
+install -d build
+cd build
+CXXFLAGS="%{rpmcxxflags} -I/usr/include/QtSolutions" # see bug 1077936
+%cmake \
+ -DENABLE_KDE:BOOL=%{?with_kde:ON}%{!?with_kde:OFF} \
+ -DENABLE_QT5:BOOL=%{?with_qt5:ON}%{!?with_qt5:OFF} \
+ -DENABLE_FFMPEG:BOOL=OFF \
+ -DENABLE_MPG123:BOOL=OFF \
+ -DENABLE_UDISKS2:BOOL=%{?with_udisks:ON} \
+ ..
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install/fast -C build \
+ DESTDIR=$RPM_BUILD_ROOT
+
+#%find_lang %{name} --with-qt --with-kde --all-name
+
+desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/cantata.desktop
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%update_desktop_database
+%update_icon_cache hicolor
+
+%postun
+%update_desktop_database
+%update_icon_cache hicolor
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog LICENSE README TODO
+%attr(755,root,root) %{_bindir}/cantata
+%{_prefix}/lib/cantata/
+%{_desktopdir}/cantata.desktop
+%{_iconsdir}/hicolor/*/*/*.png
+%{_iconsdir}/hicolor/*/*/*.svg
+%dir %{_datadir}/cantata
+%{_datadir}/cantata/config
+%{_datadir}/cantata/icons
+%{_datadir}/cantata/mpd
+%{_datadir}/cantata/scripts
+%{_datadir}/cantata/themes
+%if %{with kde}
+#%dir %{_kde4_appsdir}/solid/
+#%dir %{_kde4_appsdir}/solid/actions/
+#%{_kde4_appsdir}/solid/actions/cantata-play-audiocd.desktop
+%else
+%dir %{_datadir}/cantata/translations/
+%endif
diff --git a/icons_crash.patch b/icons_crash.patch
new file mode 100644
index 0000000..1a43e39
--- /dev/null
+++ b/icons_crash.patch
@@ -0,0 +1,43 @@
+avoid/fix crashes in icons.cpp
+diff -up cantata-1.4.1/support/icon.h.icons_crash cantata-1.4.1/support/icon.h
+--- cantata-1.4.1/support/icon.h.icons_crash 2014-07-22 13:58:44.000000000 -0500
++++ cantata-1.4.1/support/icon.h 2014-08-27 10:39:03.457961536 -0500
+@@ -54,7 +54,7 @@ public:
+ static void init(QToolButton *btn, bool setFlat=true);
+ #ifdef ENABLE_KDE_SUPPORT
+ static Icon getMediaIcon(const QString &name) { return Icon(name); }
+- static QString currentTheme() { return KIconLoader::global()->theme()->name(); }
++ static QString currentTheme() { return (KIconLoader::global()->theme() ? KIconLoader::global()->theme()->name() : QString()); }
+ #else
+ static Icon getMediaIcon(const QString &name);
+ static QString currentTheme() { return QIcon::themeName(); }
+diff -up cantata-1.4.1/widgets/icons.cpp.icons_crash cantata-1.4.1/widgets/icons.cpp
+--- cantata-1.4.1/widgets/icons.cpp.icons_crash 2014-07-22 13:58:44.000000000 -0500
++++ cantata-1.4.1/widgets/icons.cpp 2014-08-27 10:01:28.270480754 -0500
+@@ -370,7 +370,7 @@ Icons::Icons()
+ #endif
+
+ #ifdef ENABLE_STREAMS
+- streamCategoryIcon=Icon(QLatin1String("oxygen")==Icon::currentTheme().toLower() ? "inode-directory" : "folder-music");
++ streamCategoryIcon=Icon(QString::compare(QLatin1String("oxygen"),Icon::currentTheme(), Qt::CaseInsensitive)==0 ? "inode-directory" : "folder-music");
+ #endif
+
+ QString iconFile=QString(CANTATA_SYS_ICONS_DIR+"stream.png");
+@@ -568,7 +568,7 @@ void Icons::initToolbarIcons(const QColo
+ toolbarMenuIcon=createMenuIcon(toolbarText);
+ }
+ #endif
+- if (QLatin1String("gnome")==Icon::currentTheme().toLower()) {
++ if (QString::compare(QLatin1String("gnome"),Icon::currentTheme(), Qt::CaseInsensitive)==0) {
+ QColor col=QApplication::palette().color(QPalette::Active, QPalette::WindowText);
+ infoIcon=loadSidebarIcon("info", col, col);
+ }
+@@ -579,7 +579,7 @@ void Icons::initToolbarIcons(const QColo
+ }
+
+ #if !defined ENABLE_KDE_SUPPORT && !defined Q_OS_WIN && !defined Q_OS_MAC
+- if (QLatin1String("gnome")==Icon::currentTheme().toLower()) {
++ if (QString::compare(QLatin1String("gnome"),Icon::currentTheme(), Qt::CaseInsensitive)==0) {
+ QColor col=QApplication::palette().color(QPalette::Active, QPalette::WindowText);
+ contextIcon=loadSidebarIcon("info", col, col);
+ } else
diff --git a/kde4_includes.patch b/kde4_includes.patch
new file mode 100644
index 0000000..7f412d0
--- /dev/null
+++ b/kde4_includes.patch
@@ -0,0 +1,12 @@
+fix kde support (kde4_includes)
+diff -up cantata-1.3.3/CMakeLists.txt.kde4_includes cantata-1.3.3/CMakeLists.txt
+--- cantata-1.3.3/CMakeLists.txt.kde4_includes 2014-06-07 10:45:10.477192972 -0500
++++ cantata-1.3.3/CMakeLists.txt 2014-06-07 10:47:24.482770660 -0500
+@@ -229,6 +229,7 @@ endif (ENABLE_HTTP_STREAM_PLAYBACK)
+ if (ENABLE_KDE)
+ find_package(KDE4 REQUIRED)
+ add_definitions(-DENABLE_KDE_SUPPORT)
++ include_directories(${KDE4_INCLUDES})
+ set(ENABLE_KDE_SUPPORT TRUE)
+ endif (ENABLE_KDE)
+
diff --git a/libsolid_static.patch b/libsolid_static.patch
new file mode 100644
index 0000000..0a54ecb
--- /dev/null
+++ b/libsolid_static.patch
@@ -0,0 +1,13 @@
+make libsolidlite explicitly static
+diff -up cantata-1.3.4/3rdparty/solid-lite/CMakeLists.txt.libsolid_static cantata-1.3.4/3rdparty/solid-lite/CMakeLists.txt
+--- cantata-1.3.4/3rdparty/solid-lite/CMakeLists.txt.libsolid_static 2014-02-20 13:17:53.000000000 -0600
++++ cantata-1.3.4/3rdparty/solid-lite/CMakeLists.txt 2014-06-09 12:52:02.823317653 -0500
+@@ -289,7 +289,7 @@ if (ENABLE_QT5)
+ else (ENABLE_QT5)
+ QT4_WRAP_CPP(solidlite_LIB_MOC_SRCS ${solidlite_LIB_MOC_HDRS} )
+ endif (ENABLE_QT5)
+-add_library(solidlite ${solidlite_LIB_SRCS} ${solidlite_LIB_MOC_SRCS})
++add_library(solidlite STATIC ${solidlite_LIB_SRCS} ${solidlite_LIB_MOC_SRCS})
+ # set_target_properties(solidlite PROPERTIES AUTOMOC TRUE)
+
+ if ( UDEV_FOUND )
diff --git a/system-qtiocompressor.patch b/system-qtiocompressor.patch
new file mode 100644
index 0000000..e27711b
--- /dev/null
+++ b/system-qtiocompressor.patch
@@ -0,0 +1,15 @@
+could be made upstreamable with a little more work -- rex
+diff -up cantata-1.4.1/CMakeLists.txt.system-qtiocompressor cantata-1.4.1/CMakeLists.txt
+--- cantata-1.4.1/CMakeLists.txt.system-qtiocompressor 2014-08-27 11:15:24.084393939 -0500
++++ cantata-1.4.1/CMakeLists.txt 2014-08-27 11:16:11.182889573 -0500
+@@ -714,8 +714,8 @@ endif (WIN32)
+
+ add_subdirectory(po)
+ add_subdirectory(support)
+-add_subdirectory(3rdparty/qtiocompressor)
+-target_link_libraries(cantata support-core qtiocompressor ${CANTATA_LIBS} ${QTLIBS} ${ZLIB_LIBRARIES})
++#add_subdirectory(3rdparty/qtiocompressor)
++target_link_libraries(cantata support-core QtSolutions_IOCompressor-2.3 ${CANTATA_LIBS} ${QTLIBS} ${ZLIB_LIBRARIES})
+
+ # enable warnings
+ add_definitions(-DQT_NO_DEBUG_OUTPUT)
diff --git a/system-qxt.patch b/system-qxt.patch
new file mode 100644
index 0000000..c2565cc
--- /dev/null
+++ b/system-qxt.patch
@@ -0,0 +1,24 @@
+diff -up cantata-1.4.1/CMakeLists.txt.system-qxt cantata-1.4.1/CMakeLists.txt
+--- cantata-1.4.1/CMakeLists.txt.system-qxt 2014-08-27 11:35:04.684766778 -0500
++++ cantata-1.4.1/CMakeLists.txt 2014-08-27 11:38:39.057480514 -0500
+@@ -671,8 +672,9 @@ else (ENABLE_KDE)
+ endif (ENABLE_QT5)
+
+ if (WIN32 OR (NOT APPLE AND NOT ENABLE_QT5))
+- add_definitions(-DQXT_STATIC)
+- add_subdirectory(3rdparty/qxt)
++ #add_definitions(-DQXT_STATIC)
++ #add_subdirectory(3rdparty/qxt)
++ include_directories(/usr/include/QxtCore /usr/include/QxtGui)
+ set(CANTATA_SRCS ${CANTATA_SRCS} gui/qxtmediakeys.cpp)
+ endif (WIN32 OR (NOT APPLE AND NOT ENABLE_QT5))
+
+@@ -696,7 +698,7 @@ else (ENABLE_KDE)
+ target_link_libraries(cantata qtsingleapplication)
+ endif (WIN32 OR APPLE)
+ if (WIN32 OR (NOT APPLE AND NOT ENABLE_QT5))
+- target_link_libraries(cantata qxt)
++ target_link_libraries(cantata QxtGui)
+ endif (WIN32 OR (NOT APPLE AND NOT ENABLE_QT5))
+ endif (ENABLE_KDE)
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cantata.git/commitdiff/22486cc4af47f834f228ee1a9c01607b4d5758f2
More information about the pld-cvs-commit
mailing list