commit: ddcc2f9ded00ffda5042483031757293423d5f03 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> AuthorDate: Fri Jan 12 13:02:41 2018 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Fri Jan 12 13:02:52 2018 +0000 URL: https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=ddcc2f9d
media-sound/amarok: import 2.8.90-r5 from main tree media-sound/amarok/amarok-2.8.90-r5.ebuild | 137 +++++++++++++++++++++ .../amarok/files/amarok-2.8.0-taglib110.patch | 40 ++++++ .../amarok/files/amarok-2.8.90-ffmpeg3.patch | 60 +++++++++ media-sound/amarok/files/amarok-2.8.90-gcc6.patch | 36 ++++++ .../files/amarok-2.8.90-mysql-embedded.patch | 34 +++++ .../amarok/files/amarok-2.8.90-mysqld-rpath.patch | 12 ++ .../amarok/files/amarok-2.8.90-no-webkit.patch | 39 ++++++ .../amarok/files/amarok-2.8.90-scriptconsole.patch | 33 +++++ 8 files changed, 391 insertions(+) diff --git a/media-sound/amarok/amarok-2.8.90-r5.ebuild b/media-sound/amarok/amarok-2.8.90-r5.ebuild new file mode 100644 index 0000000..ee89cf9 --- /dev/null +++ b/media-sound/amarok/amarok-2.8.90-r5.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_REQUIRED="never" +KDE_HANDBOOK="optional" +SQL_REQUIRED="always" +VIRTUALX_REQUIRED="test" +VIRTUALDBUS_TEST="true" +inherit flag-o-matic kde4-base pax-utils + +DESCRIPTION="Advanced audio player based on KDE framework" +HOMEPAGE="https://amarok.kde.org/" +if [[ ${PV} != *9999* ]]; then + SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" + KEYWORDS="amd64 x86" +fi + +LICENSE="GPL-2" +SLOT="4" +IUSE="debug +embedded ipod lastfm mp3tunes mtp ofa test +utils" + +if [[ ${KDE_BUILD_TYPE} == live ]]; then + RESTRICT+=" test" +fi + +# ipod requires gdk enabled and also gtk compiled in libgpod +COMMONDEPEND=" + $(add_kdeapps_dep kdebase-kioslaves) + app-crypt/qca:2[qt4] + >=dev-qt/qtcore-4.8:4 + >=dev-qt/qtdbus-4.8:4 + >=dev-qt/qtscript-4.8:4 + >=kde-frameworks/kdelibs-4.14.37:4[plasma] + >=media-libs/taglib-1.7[asf(+),mp4(+)] + >=media-libs/taglib-extras-1.0.1 + sys-libs/zlib + >=virtual/mysql-5.1[embedded?] + >=x11-libs/qtscriptgenerator-0.1.0 + ipod? ( >=media-libs/libgpod-0.7.0[gtk] ) + lastfm? ( >=media-libs/liblastfm-1.0.3[qt4] ) + mp3tunes? ( + dev-libs/glib:2 + dev-libs/libxml2 + dev-libs/openssl:0 + >=dev-qt/qtcore-4.8.4:4[glib] + net-libs/loudmouth + net-misc/curl + ) + mtp? ( >=media-libs/libmtp-1.0.0 ) + ofa? ( >=media-libs/libofa-0.9.0 ) +" +DEPEND="${COMMONDEPEND} + dev-util/automoc + virtual/pkgconfig + test? ( dev-cpp/gmock ) +" +RDEPEND="${COMMONDEPEND} + !media-sound/amarok-utils + $(add_kdeapps_dep phonon-kde) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.8.0-taglib110.patch" + "${FILESDIR}/${P}-mysql-embedded.patch" + "${FILESDIR}/${P}-mysqld-rpath.patch" + "${FILESDIR}/${P}-scriptconsole.patch" + "${FILESDIR}/${P}-gcc6.patch" + "${FILESDIR}/${P}-ffmpeg3.patch" + "${FILESDIR}/${P}-no-webkit.patch" +) + +src_prepare() { + kde4-base_src_prepare + + # requires qtwebkit + sed -i -e "s/wikipedia,//" data/amarok_homerc || die + + sed -i -e "/macro_log_feature.*QT_QTOPENGL_FOUND/d" \ + CMakeLists.txt \ + || die "failed to remove QT_QTOPENGL detection" + + sed -i -e "/if/ s/QT_QTOPENGL_FOUND/FALSE/" \ + src/context/applets/CMakeLists.txt \ + || die "failed to sed out QT_QTOPENGL_FOUND" +} + +src_configure() { + # Append minimal-toc cflag for ppc64, see bug 280552 and 292707 + use ppc64 && append-flags -mminimal-toc + + local mycmakeargs=( + -DWITH_PLAYER=ON + -DWITH_NepomukCore=OFF + -DWITH_Soprano=OFF + -DWITH_MYSQL_EMBEDDED=$(usex embedded) + -DWITH_IPOD=$(usex ipod) + -DWITH_LibLastFm=$(usex lastfm) + -DWITH_MP3Tunes=$(usex mp3tunes) + -DWITH_Mtp=$(usex mtp) + -DWITH_LibOFA=$(usex ofa) + -DWITH_UTILITIES=$(usex utils) + ) + + use ipod && mycmakeargs+=( DWITH_GDKPixBuf=ON ) + use mp3tunes && mycmakeargs+=( -DWITH_Libgcrypt=OFF ) + + # bug 581554: add libmysqld location for rpath patch + use embedded && mycmakeargs+=( -DMYSQLD_DIR="${EPREFIX}/usr/$(get_libdir)/mysql" ) + + kde4-base_src_configure +} + +src_install() { + kde4-base_src_install + + # bug 481592 + pax-mark m "${ED}"/usr/bin/amarok +} + +pkg_postinst() { + kde4-base_pkg_postinst + + if ! use embedded; then + elog "You've disabled the amarok support for embedded mysql DBs." + elog "You'll have to configure amarok to use an external db server." + elog "Please read https://community.kde.org/Amarok/Community/MySQL for details on how" + elog "to configure the external db and migrate your data from the embedded database." + + if has_version "virtual/mysql[minimal]"; then + elog + elog "You built mysql with the minimal use flag, so it doesn't include the server." + elog "You won't be able to use the local mysql installation to store your amarok collection." + fi + fi +} diff --git a/media-sound/amarok/files/amarok-2.8.0-taglib110.patch b/media-sound/amarok/files/amarok-2.8.0-taglib110.patch new file mode 100644 index 0000000..0934816 --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.0-taglib110.patch @@ -0,0 +1,40 @@ +From: Omar Plummer <[email protected]> +Date: Thu, 06 Aug 2015 22:24:27 +0000 +Subject: Fix TagLib version check. +X-Git-Url: http://quickgit.kde.org/?p=amarok.git&a=commitdiff&h=fec8817c530ce42b6485fdabff6051784b8d9904 +--- +Fix TagLib version check. + +The version check compared version strings lexicographically, so "1.7" +(the min version) compared as greater than "1.10.0". + +BUG: 351013 +REVIEW: 124639 +--- + + +--- a/cmake/modules/FindTaglib.cmake ++++ b/cmake/modules/FindTaglib.cmake +@@ -29,10 +29,10 @@ + + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) + +- if(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") ++ if("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION) + message(STATUS "TagLib version too old: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}") + set(TAGLIB_FOUND FALSE) +- else(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") ++ else("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION) + + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) + +@@ -42,7 +42,7 @@ + set(TAGLIB_FOUND TRUE) + endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}") +- endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") ++ endif("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION) + mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES) + + else(TAGLIBCONFIG_EXECUTABLE) + diff --git a/media-sound/amarok/files/amarok-2.8.90-ffmpeg3.patch b/media-sound/amarok/files/amarok-2.8.90-ffmpeg3.patch new file mode 100644 index 0000000..31feca0 --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.90-ffmpeg3.patch @@ -0,0 +1,60 @@ +https://git.reviewboard.kde.org/r/129626 + +Index: amarok-2.8.90/src/musicbrainz/MusicDNSAudioDecoder.cpp +=================================================================== +--- amarok-2.8.90.orig/src/musicbrainz/MusicDNSAudioDecoder.cpp ++++ amarok-2.8.90/src/musicbrainz/MusicDNSAudioDecoder.cpp +@@ -223,7 +223,7 @@ MusicDNSAudioDecoder::decode( const QStr + { + if( !decodedFrame ) + { +- decodedFrame = avcodec_alloc_frame(); ++ decodedFrame = av_frame_alloc(); + if( !decodedFrame ) + { + warning() << "Unable to allocate enough memory to decode file."; +@@ -231,7 +231,7 @@ MusicDNSAudioDecoder::decode( const QStr + break; + } + else +- avcodec_get_frame_defaults( decodedFrame ); ++ av_frame_unref ( decodedFrame ); + } + + decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt ); +@@ -341,7 +341,7 @@ MusicDNSAudioDecoder::decode( const QStr + { + if( !decodedFrame ) + { +- decodedFrame = avcodec_alloc_frame(); ++ decodedFrame = av_frame_alloc(); + if( !decodedFrame ) + { + warning() << "Unable to allocate enough memory to decode file."; +@@ -349,7 +349,7 @@ MusicDNSAudioDecoder::decode( const QStr + break; + } + else +- avcodec_get_frame_defaults( decodedFrame ); ++ av_frame_unref( decodedFrame ); + } + + decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt ); +@@ -459,7 +459,7 @@ MusicDNSAudioDecoder::decode( const QStr + { + if( !decodedFrame ) + { +- decodedFrame = avcodec_alloc_frame(); ++ decodedFrame = av_frame_alloc(); + if( !decodedFrame ) + { + warning() << "Unable to allocate enough memory to decode file."; +@@ -467,7 +467,7 @@ MusicDNSAudioDecoder::decode( const QStr + break; + } + else +- avcodec_get_frame_defaults( decodedFrame ); ++ av_frame_unref( decodedFrame ); + } + + decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt ); diff --git a/media-sound/amarok/files/amarok-2.8.90-gcc6.patch b/media-sound/amarok/files/amarok-2.8.90-gcc6.patch new file mode 100644 index 0000000..bad936a --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.90-gcc6.patch @@ -0,0 +1,36 @@ +From 9308403e1c8484052f277bf6de32ee07c93a4beb Mon Sep 17 00:00:00 2001 +From: Rex Dieter <[email protected]> +Date: Wed, 1 Jun 2016 13:58:26 -0500 +Subject: [PATCH] gcc6 buildfix + +courtesy of opensuse, thx + +BUG: 363054 +--- + src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp b/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp +index 4bdb9b9..e327354 100644 +--- a/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp ++++ b/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp +@@ -28,6 +28,7 @@ + #include "playlist/PlaylistModelStack.h" + + using namespace Playlists; ++using namespace Playlist; + + XSPFPlaylist::XSPFPlaylist( const KUrl &url, Playlists::PlaylistProvider *provider, OnLoadAction onLoad ) + : PlaylistFile( url, provider ) +@@ -101,7 +102,7 @@ XSPFPlaylist::load() + //FIXME: this needs to be moved to whatever is creating the XSPFPlaylist + if( m_autoAppendAfterLoad ) + The::playlistController()->insertPlaylist( +- ::Playlist::ModelStack::instance()->bottom()->rowCount(), ++ ModelStack::instance()->bottom()->rowCount(), + Playlists::PlaylistPtr( this ) + ); + } +-- +2.8.3 + diff --git a/media-sound/amarok/files/amarok-2.8.90-mysql-embedded.patch b/media-sound/amarok/files/amarok-2.8.90-mysql-embedded.patch new file mode 100644 index 0000000..b03aa18 --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.90-mysql-embedded.patch @@ -0,0 +1,34 @@ +From 048ca3d57228759f05af7b9553200fd362aeaa8b Mon Sep 17 00:00:00 2001 +From: Matt Whitlock <[email protected]> +Date: Tue, 29 Mar 2016 12:22:41 -0400 +Subject: [PATCH] Only link with MYSQL_EMBEDDED_LIBRARIES if + WITH_MYSQL_EMBEDDED + +REVIEW: 127523 +--- + src/core-impl/collections/db/sql/mysqlcollection/CMakeLists.txt | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/core-impl/collections/db/sql/mysqlcollection/CMakeLists.txt b/src/core-impl/collections/db/sql/mysqlcollection/CMakeLists.txt +index 244cde1..4c618fc 100644 +--- a/src/core-impl/collections/db/sql/mysqlcollection/CMakeLists.txt ++++ b/src/core-impl/collections/db/sql/mysqlcollection/CMakeLists.txt +@@ -21,11 +21,14 @@ target_link_libraries(amarok_collection-mysqlcollection + ${KDE4_KDECORE_LIBS} + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} +- ${MYSQL_EMBEDDED_LIBRARIES} + ${CMAKE_DL_LIBS} + ${ZLIB_LIBRARIES} + ) + ++if(WITH_MYSQL_EMBEDDED) ++ target_link_libraries( amarok_collection-mysqlcollection ${MYSQL_EMBEDDED_LIBRARIES} ) ++endif(WITH_MYSQL_EMBEDDED) ++ + if(NOT WIN32 AND NOT APPLE) + target_link_libraries( amarok_collection-mysqlcollection crypt pthread ) + endif(NOT WIN32 AND NOT APPLE) +-- +2.8.1 + diff --git a/media-sound/amarok/files/amarok-2.8.90-mysqld-rpath.patch b/media-sound/amarok/files/amarok-2.8.90-mysqld-rpath.patch new file mode 100644 index 0000000..c84975d --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.90-mysqld-rpath.patch @@ -0,0 +1,12 @@ +--- a/src/core-impl/storage/sql/mysqlestorage/CMakeLists.txt.old 2016-05-04 11:01:25.000000000 -0400 ++++ b/src/core-impl/storage/sql/mysqlestorage/CMakeLists.txt 2016-05-04 11:05:24.216625165 -0400 +@@ -28,6 +28,9 @@ + ${ZLIB_LIBRARIES} + ) + ++SET_TARGET_PROPERTIES(amarok_storage-mysqlestorage PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) ++SET_TARGET_PROPERTIES(amarok_storage-mysqlestorage PROPERTIES INSTALL_RPATH "${MYSQLD_DIR}") ++ + if(NOT WIN32 AND NOT APPLE) + target_link_libraries( amarok_storage-mysqlserverstorage crypt pthread ) + endif(NOT WIN32 AND NOT APPLE) diff --git a/media-sound/amarok/files/amarok-2.8.90-no-webkit.patch b/media-sound/amarok/files/amarok-2.8.90-no-webkit.patch new file mode 100644 index 0000000..91686b1 --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.90-no-webkit.patch @@ -0,0 +1,39 @@ +Borrowed from Arch Linux. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,7 +84,7 @@ include_directories( + ${CMAKE_CURRENT_BINARY_DIR}/shared + ) + +-find_package( Qt4 4.8.3 COMPONENTS QtCore QtGui QtScript QtSvg QtXml QtWebKit REQUIRED ) ++find_package( Qt4 4.8.3 COMPONENTS QtCore QtGui QtScript QtSvg QtXml REQUIRED ) + find_package( KDE4 4.8.4 REQUIRED ) + + include( KDE4Defaults ) +diff --git a/src/context/applets/CMakeLists.txt b/src/context/applets/CMakeLists.txt +index f4d5456d9f..cad9036681 100644 +--- a/src/context/applets/CMakeLists.txt ++++ b/src/context/applets/CMakeLists.txt +@@ -1,18 +1,18 @@ + add_subdirectory( albums ) + add_subdirectory( currenttrack ) +-add_subdirectory( info ) ++# add_subdirectory( info ) + add_subdirectory( labels ) + add_subdirectory( lyrics ) + add_subdirectory( photos ) + add_subdirectory( tabs ) +-add_subdirectory( wikipedia ) ++# add_subdirectory( wikipedia ) + + if( QT_QTOPENGL_FOUND ) + add_subdirectory( analyzer ) + endif() + + if( LIBLASTFM_FOUND ) +- add_subdirectory( upcomingevents ) ++# add_subdirectory( upcomingevents ) + add_subdirectory( similarartists ) + endif() + diff --git a/media-sound/amarok/files/amarok-2.8.90-scriptconsole.patch b/media-sound/amarok/files/amarok-2.8.90-scriptconsole.patch new file mode 100644 index 0000000..455146b --- /dev/null +++ b/media-sound/amarok/files/amarok-2.8.90-scriptconsole.patch @@ -0,0 +1,33 @@ +From 2900fe47adde10999a6c0f907d73b00a1c1bd5b1 Mon Sep 17 00:00:00 2001 +From: Myriam Schweingruber <[email protected]> +Date: Wed, 18 May 2016 21:59:17 +0200 +Subject: [PATCH] Fix a crash in amarok when opening the Script Console + +The script console tries to write to a system folder instead of a user + folder. Note to devs: always make sure to test a system installation, + not just a local build. + +Thanks to Johannes Huber for the quick fix suggestion. + +BUG: 363176 +FIXED-IN: 2.9 +--- + src/scripting/scriptconsole/ScriptConsole.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/scripting/scriptconsole/ScriptConsole.cpp b/src/scripting/scriptconsole/ScriptConsole.cpp +index 6edd9a2..e4e0fab 100644 +--- a/src/scripting/scriptconsole/ScriptConsole.cpp ++++ b/src/scripting/scriptconsole/ScriptConsole.cpp +@@ -161,7 +161,7 @@ ScriptConsole::ScriptConsole( QWidget *parent ) + settings.endGroup(); + + if( m_savePath.isEmpty() ) +- m_savePath = KUrl( KStandardDirs::locate( "data", "amarok/scriptconsole/" ) ).path(); ++ m_savePath = KUrl( KStandardDirs::locateLocal( "data", "amarok/scriptconsole/" ) ).path(); + + slotNewScript(); + connect( m_debugger, SIGNAL(evaluationSuspended()), SLOT(slotEvaluationSuspended()) ); +-- +2.8.2 +
