[amarok] work on epel7 support, BR: kdelibs4-webkit-devel
Rex Dieter
rdieter at fedoraproject.org
Thu Jun 19 19:27:18 UTC 2014
commit 8efb369f9408fe2ff3ce31eeab08e7b9b5642d40
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Thu Jun 19 14:27:14 2014 -0500
work on epel7 support, BR: kdelibs4-webkit-devel
amarok-2.8.0-no_kdewebkit.patch | 117 +++++++++++++++++++++++++++++++++++++++
amarok.spec | 55 ++++++++++++++-----
2 files changed, 158 insertions(+), 14 deletions(-)
---
diff --git a/amarok-2.8.0-no_kdewebkit.patch b/amarok-2.8.0-no_kdewebkit.patch
new file mode 100644
index 0000000..9f3b871
--- /dev/null
+++ b/amarok-2.8.0-no_kdewebkit.patch
@@ -0,0 +1,117 @@
+diff -up amarok-2.8.0/src/context/applets/CMakeLists.txt.webkit amarok-2.8.0/src/context/applets/CMakeLists.txt
+diff -up amarok-2.8.0/src/context/applets/info/CMakeLists.txt.webkit amarok-2.8.0/src/context/applets/info/CMakeLists.txt
+--- amarok-2.8.0/src/context/applets/info/CMakeLists.txt.webkit 2013-08-14 15:22:52.000000000 -0500
++++ amarok-2.8.0/src/context/applets/info/CMakeLists.txt 2014-06-18 13:35:31.496217418 -0500
+@@ -16,7 +16,6 @@ target_link_libraries(amarok_context_app
+ amarokcore
+ amaroklib
+ ${KDE4_PLASMA_LIBS}
+- ${KDE4_KDEWEBKIT_LIBS}
+ ${QT_QTWEBKIT_LIBRARY}
+ )
+
+diff -up amarok-2.8.0/src/context/applets/info/InfoApplet.cpp.webkit amarok-2.8.0/src/context/applets/info/InfoApplet.cpp
+--- amarok-2.8.0/src/context/applets/info/InfoApplet.cpp.webkit 2013-08-14 15:22:52.000000000 -0500
++++ amarok-2.8.0/src/context/applets/info/InfoApplet.cpp 2014-06-18 14:10:15.337284616 -0500
+@@ -26,7 +26,7 @@
+ #include "PaletteHandler.h"
+ #include "playlist/PlaylistController.h"
+
+-#include <KGraphicsWebView>
++#include <QGraphicsWebView>
+ #include <KStandardDirs>
+
+ #include <QPainter>
+@@ -63,7 +63,7 @@ void InfoApplet::init()
+
+ dataEngine( "amarok-info" )->connectSource( "info", this );
+
+- m_webView = new KGraphicsWebView( this );
++ m_webView = new QGraphicsWebView( this );
+
+ QPalette p = m_webView->palette();
+ p.setColor( QPalette::Dark, QColor( 255, 255, 255, 0) );
+diff -up amarok-2.8.0/src/context/applets/info/InfoApplet.h.webkit amarok-2.8.0/src/context/applets/info/InfoApplet.h
+--- amarok-2.8.0/src/context/applets/info/InfoApplet.h.webkit 2013-08-14 15:22:52.000000000 -0500
++++ amarok-2.8.0/src/context/applets/info/InfoApplet.h 2014-06-18 13:35:31.496217418 -0500
+@@ -27,7 +27,7 @@
+
+ #include <QGraphicsProxyWidget>
+
+-class KGraphicsWebView;
++class QGraphicsWebView;
+
+ class InfoApplet : public Context::Applet
+ {
+@@ -47,7 +47,7 @@ private slots:
+ void linkClicked( const QUrl & url );
+
+ private:
+- KGraphicsWebView *m_webView;
++ QGraphicsWebView *m_webView;
+ bool m_initialized;
+
+ static QString s_defaultHtml;
+diff -up amarok-2.8.0/src/context/applets/wikipedia/CMakeLists.txt.webkit amarok-2.8.0/src/context/applets/wikipedia/CMakeLists.txt
+--- amarok-2.8.0/src/context/applets/wikipedia/CMakeLists.txt.webkit 2014-06-18 14:07:24.355163151 -0500
++++ amarok-2.8.0/src/context/applets/wikipedia/CMakeLists.txt 2014-06-18 14:07:34.347695400 -0500
+@@ -18,7 +18,6 @@ target_link_libraries(amarok_context_app
+ amaroklib
+ ${KDE4_PLASMA_LIBS}
+ ${KDE4_KIO_LIBS}
+- ${KDE4_KDEWEBKIT_LIBS}
+ ${QT_QTWEBKIT_LIBRARY}
+ )
+
+diff -up amarok-2.8.0/src/context/applets/wikipedia/WikipediaApplet_p.h.webkit amarok-2.8.0/src/context/applets/wikipedia/WikipediaApplet_p.h
+--- amarok-2.8.0/src/context/applets/wikipedia/WikipediaApplet_p.h.webkit 2013-08-14 15:22:52.000000000 -0500
++++ amarok-2.8.0/src/context/applets/wikipedia/WikipediaApplet_p.h 2014-06-18 13:56:15.446760436 -0500
+@@ -23,7 +23,7 @@
+ #include "ui_wikipediaGeneralSettings.h"
+ #include "ui_wikipediaLanguageSettings.h"
+
+-#include <KGraphicsWebView>
++#include <QGraphicsWebView>
+ #include <KLineEdit>
+ #include <KUrl>
+
+@@ -180,13 +180,13 @@ protected:
+ }
+ };
+
+-class WikipediaWebView : public KGraphicsWebView
++class WikipediaWebView : public QGraphicsWebView
+ {
+ Q_OBJECT
+
+ public:
+ WikipediaWebView( QGraphicsItem *parent = 0 )
+- : KGraphicsWebView( parent )
++ : QGraphicsWebView( parent )
+ {
+ m_lineEdit = new WikipediaSearchLineEdit( this );
+ m_lineEdit->setContentsMargins( 0, 0, 0, 0 );
+@@ -242,7 +242,7 @@ protected:
+ }
+ return false;
+ }
+- return KGraphicsWebView::eventFilter( obj, event );
++ return QGraphicsWebView::eventFilter( obj, event );
+ }
+
+ void keyPressEvent( QKeyEvent *event )
+@@ -258,12 +258,12 @@ protected:
+ event->accept();
+ }
+ else
+- KGraphicsWebView::keyPressEvent( event );
++ QGraphicsWebView::keyPressEvent( event );
+ }
+
+ void resizeEvent( QGraphicsSceneResizeEvent *event )
+ {
+- KGraphicsWebView::resizeEvent( event );
++ QGraphicsWebView::resizeEvent( event );
+ if( m_topBorder )
+ {
+ m_topBorder->resize( event->newSize().width(), m_topBorder->size().height() );
diff --git a/amarok.spec b/amarok.spec
index 8698267..5a2db2f 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -1,8 +1,12 @@
+%if 0%{?fedora}
+%define kdewebkit 1
+%endif
+
Name: amarok
Summary: Media player
Version: 2.8.0
-Release: 5%{?dist}
+Release: 6%{?dist}
# KDE e.V. may determine that future GPL versions are accepted
License: GPLv2 or GPLv3
@@ -19,6 +23,9 @@ Source0: http://download.kde.org/%{stable}/amarok/%{version}/src/amarok-%{versio
# for the help contents if the amarok-doc subpackage is not installed.
Patch0: amarok-2.8.0-onlinedoc.patch
+# try to allow build without kdewebkit (like rhel), use QWeb* instead of KWeb*
+Patch1: amarok-2.8.0-no_kdewebkit.patch
+
## upstreamable patches
## upstream patches
@@ -29,18 +36,18 @@ BuildRequires: desktop-file-utils
#BuildRequires: ffmpeg-devel libofa-devel
BuildRequires: gettext
BuildRequires: kdelibs4-devel >= 4.9
-BuildRequires: liblastfm-devel >= 1.0.3
+%if 0%{?kdewebkit}
+BuildRequires: kdelibs4-webkit-devel
+%endif
%if 0%{?fedora} > 18 || 0%{?rhel} > 6
BuildRequires: mariadb-embedded-devel
%else
# extra libaio linkage comes from use of mysql_config --libs
BuildRequires: mysql-embedded-devel libaio-devel
%endif
-BuildRequires: pkgconfig(libgpod-1.0) >= 0.7.0
-BuildRequires: pkgconfig(libmtp) >= 0.3.0
-BuildRequires: pkgconfig(libmygpo-qt) >= 1.0.7
+BuildRequires: pkgconfig(gdk-pixbuf-2.0)
+BuildRequires: pkgconfig(glib-2.0) pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(libxml-2.0)
-BuildRequires: pkgconfig(loudmouth-1.0)
BuildRequires: pkgconfig(phonon) >= 4.5.0
BuildRequires: pkgconfig(qca2)
BuildRequires: pkgconfig(QJson)
@@ -48,19 +55,27 @@ BuildRequires: pkgconfig(QtWebKit)
BuildRequires: pkgconfig(taglib) >= 1.6
BuildRequires: pkgconfig(taglib-extras) >= 1.0.1
+%if 0%{?fedora}
+BuildRequires: liblastfm-devel >= 1.0.3
+BuildRequires: pkgconfig(libmygpo-qt) >= 1.0.7
+BuildRequires: pkgconfig(loudmouth-1.0)
+BuildRequires: pkgconfig(libmtp) >= 0.3.0
+Requires: kio_mtp
+BuildRequires: pkgconfig(libgpod-1.0) >= 0.7.0
+Requires: ifuse
# not strictly required at buildtime, but if it's not available here,
# then you're hosed at runtime anyway
-BuildRequires: clamz qtscriptbindings
+BuildRequires: clamz
+Requires: clamz
+Requires: kio-upnp-ms
+Requires: moodbar
+%endif
+BuildRequires: qtscriptbindings
Requires: qtscriptbindings%{?_isa}
Requires: %{name}-utils = %{version}-%{release}
Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}
Requires: audiocd-kio
-Requires: clamz
-Requires: ifuse
-Requires: kio_mtp
-Requires: kio-upnp-ms
Requires: media-player-info
-Requires: moodbar
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -108,6 +123,9 @@ Requires: %{name} = %{version}-%{release}
%setup -q
%patch0 -p1 -b .onlinedoc
+%if ! 0%{?kdewebkit}
+%patch1 -p1 -b .no_kdewebkit
+%endif
%build
@@ -158,7 +176,9 @@ fi
%{_kde4_bindir}/amarok
%{_kde4_bindir}/amarokpkg
%{_kde4_bindir}/amarok_afttagger
+%if 0%{?fedora}
%{_kde4_bindir}/amarokmp3tunesharmonydaemon
+%endif
%{_kde4_bindir}/amzdownloader
%{_kde4_appsdir}/amarok/
%{_kde4_appsdir}/kconf_update/amarok*
@@ -176,8 +196,6 @@ fi
%{_kde4_datadir}/kde4/services/amarok-data-engine-*.desktop
%{_kde4_datadir}/kde4/services/amarok_collection-audiocdcollection.desktop
%{_kde4_datadir}/kde4/services/amarok_collection-daapcollection.desktop
-%{_kde4_datadir}/kde4/services/amarok_collection-ipodcollection.desktop
-%{_kde4_datadir}/kde4/services/amarok_collection-mtpcollection.desktop
%{_kde4_datadir}/kde4/services/amarok_collection-mysqlecollection.desktop
%{_kde4_datadir}/kde4/services/amarok_collection-mysqlservercollection.desktop
%{_kde4_datadir}/kde4/services/amarok_collection-playdarcollection.desktop
@@ -190,8 +208,12 @@ fi
%{_kde4_iconsdir}/hicolor/*/*/*
%{_kde4_libdir}/kde4/amarok_collection-audiocdcollection.so
%{_kde4_libdir}/kde4/amarok_collection-daapcollection.so
+%if 0%{?fedora}
+%{_kde4_datadir}/kde4/services/amarok_collection-ipodcollection.desktop
+%{_kde4_datadir}/kde4/services/amarok_collection-mtpcollection.desktop
%{_kde4_libdir}/kde4/amarok_collection-ipodcollection.so
%{_kde4_libdir}/kde4/amarok_collection-mtpcollection.so
+%endif
%{_kde4_libdir}/kde4/amarok_collection-mysqlecollection.so
%{_kde4_libdir}/kde4/amarok_collection-mysqlservercollection.so
%{_kde4_libdir}/kde4/amarok_collection-playdarcollection.so
@@ -217,7 +239,9 @@ fi
%{_kde4_libdir}/libamarok-sqlcollection.so.1*
%{_kde4_libdir}/libamarok-transcoding.so.1*
# private libs
+%if 0%{?fedora}
%{_kde4_libdir}/libamarok_service_lastfm_shared.so
+%endif
%{_kde4_libdir}/libampache_account_login.so
%files utils -f amarokcollectionscanner_qt.lang
@@ -231,6 +255,9 @@ fi
%changelog
+* Thu Jun 19 2014 Rex Dieter <rdieter at fedoraproject.org> 2.8.0-6
+- work on epel7 support, BR: kdelibs4-webkit-devel
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list