summaryrefslogtreecommitdiff
path: root/media-sound/clementine
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-sound/clementine
reinit the tree, so we can have metadata
Diffstat (limited to 'media-sound/clementine')
-rw-r--r--media-sound/clementine/Manifest12
-rw-r--r--media-sound/clementine/clementine-1.3.1-r5.ebuild174
-rw-r--r--media-sound/clementine/clementine-1.3.1-r6.ebuild180
-rw-r--r--media-sound/clementine/clementine-9999.ebuild177
-rw-r--r--media-sound/clementine/files/clementine-1.3-fix-tokenizer.patch21
-rw-r--r--media-sound/clementine/files/clementine-1.3.1-add-missing-functional-includes.patch51
-rw-r--r--media-sound/clementine/files/clementine-1.3.1-chromaprint14.patch41
-rw-r--r--media-sound/clementine/files/clementine-1.3.1-fix-desktop-file.patch52
-rw-r--r--media-sound/clementine/files/clementine-1.3.1-libechonest_removal.patch701
-rw-r--r--media-sound/clementine/metadata.xml39
10 files changed, 1448 insertions, 0 deletions
diff --git a/media-sound/clementine/Manifest b/media-sound/clementine/Manifest
new file mode 100644
index 000000000000..b8a1832b101d
--- /dev/null
+++ b/media-sound/clementine/Manifest
@@ -0,0 +1,12 @@
+AUX clementine-1.3-fix-tokenizer.patch 674 SHA256 eeb5828314e8531dd0d3ce8c3af38b61840a864345314aee73b5ed3299f04baa SHA512 4f520dcd4937634ebf5bb814ec64267d42473886fc5abd4924ac551bbae8ecc7643ddbacd9e2f9a5b0d8c7b0f67cf5aec420b5eb73162b248cbf6b3eafafbbd8 WHIRLPOOL cd49b399587c1726e2a409df3fecad7b71959326812003edbd3a69eb459947e49590e36e5476ba886d6407c522d840907c2b2091596245209149b4c6b4045a72
+AUX clementine-1.3.1-add-missing-functional-includes.patch 1377 SHA256 7356b5210985a9e030eb57ac2d6190ad5ec66fa25a73497503337be6679780a8 SHA512 bea6fa8d7213404e1d048ec866cbc6d8b60ce7ff76af7f8c2bbc2c89959f478ff3201ddf072691c3e4d5c007e2ea8ad5c07150076920516f82ae1956b1be4075 WHIRLPOOL 2d248bc7d723d77a3296c0535a70e63f7b7f5728b5b6309a11b1d7987cf56ad4ddc8d360aedb92b66cf0bd5a54224ada5c3aee519bab1ad06630a1086fae9bab
+AUX clementine-1.3.1-chromaprint14.patch 1535 SHA256 cf5c1c625885cc4436722ac38dc201cdc491478dc73e171ea2af95bfb59fd0c6 SHA512 21ceda98534e4fe7f860d869cf83387e6c2a5c4c1a0db75c29dc8c9de18a3a117cebcfb98ea816723370009dc08e1804ec2b46c118e657eb293fb45d1fba2601 WHIRLPOOL 3341d3b3c9eda2d4e27b4df085c1cb500e852c1fe985a04088eb7e98e2f042dbc064b5c3bd04ce58404aa9a153b44b8cfcd68e1c4646f08eeab97ccfce15f007
+AUX clementine-1.3.1-fix-desktop-file.patch 1488 SHA256 af6f32da9324a3a6fdbb6ff0bccf2ba770ea82b3d25948e93285600624b04fa9 SHA512 55a787a63da9b1b4970e794d95233b22d704ff591e32cfc6c9b73023289e58a4cce2f2a43ec8186beb2feffe44b3cffa6b50f015a41cab5bba559087a868e826 WHIRLPOOL 52f8af4584b90cf0f52d2246f44fc22c2259a909c82cb6d9d591cbaa002d6005dacc9266d1a41196fdf5d02f8113da0ae3224292c17de150e6acb8b0dcd8bd8d
+AUX clementine-1.3.1-libechonest_removal.patch 23130 SHA256 7623f26a3a9cacf9f4850c51d128b575988059e07c4c35ed030e9d86a77f4f2b SHA512 44f28096567d48446fdd5769d91e32d3987f121e04f8f8fec956892c3a42693863cd5c9ab878e88c0477353fd369a005047c04e5da4661c701ab85103893947a WHIRLPOOL 121077646ea620d4d9633726848f5997aaaafd4a443844fc8c6f5bc196d9b6fe73ee99b332d90c335357612ed74541ea60e0a54b916dcb325ea930436c21ddff
+DIST clementine-1.3.1.tar.gz 8501827 SHA256 f885931a9ab7c88607d07b50c64fcce46fc05f13dd2c0a04188c94eff938f37c SHA512 1942a046be24a583b5e2095dd39dc736c1b14a47dc4aad61d6252c1fccf745c26d7b35da907a220d5dc8c0736f5b589d050ed9582de343aa3cb5abc607001790 WHIRLPOOL 20a57177dc740865f35c407b981e146d9ddec6aff39e662a27dfe0e238f3baa87b331cc6dc50eebf848279c8860fb74454b4997924e2d4d93357a870364af1a7
+EBUILD clementine-1.3.1-r5.ebuild 4964 SHA256 73875d197550f2e10f9c123391ba0a662ea56801911e5596ad9dcdf504101f3a SHA512 da7ea645cd0c4e25233582d1e3c99738913d50bfcd59b17e495a2b27592a8b3af2a69ecb417a225bed00078057397e1ad657b325acb7e0673a460ec97f194b9f WHIRLPOOL 2aa20c99b722073f1b788f2d35ec995211215c0bacfc679ad6937f8a6b59e415170ccd57e652c59aa183d4f43c726477812cba91b99b5af970245d58e20b81b5
+EBUILD clementine-1.3.1-r6.ebuild 5299 SHA256 2568f07932ee246dec4176a5086bce4d23bdeeb48a25d68817e30e0fa1c2bc57 SHA512 334762d043acbc0792677db2f18e56943dbf9f488f8360b36b057d545a383f64f7164e743c97ef42a081f9bc663d611bc611ca66b939d53bb1afd6254b29c12d WHIRLPOOL b56ca3059814a5d6f147388f8bcbe7017b5f88bb9757ae2521cb3a8fce85e332a5193a9e7cc7f0042bb741393dbb9c3c04df72d6dcaf16db3c5552ea95063427
+EBUILD clementine-9999.ebuild 5113 SHA256 24c7209c65251af7ed553fd254a1256ce865e1121e993b11bdb6461f2a1e37e9 SHA512 732b960b264c37e3ffd2ebca697eff8071b39cbe67acee1c404effc1552d12323b43d9d9e24eb7a83b9feb4d940936fe7cb0f1f89787de0cb6cee51229d4e2af WHIRLPOOL b50eae04eeb964c2e2247042f3de8dd1e627286f08bc02fd083e35c098ea64625b4b1b2323ed4c9e5630ca430c9e83f0a9444aef9a68a202238a848aea7ca274
+MISC ChangeLog 9850 SHA256 5be4c79e7322aac6053e857bf192cd1dfc755d14d4eb6fd625ae6057a95ec483 SHA512 60dee44e488580005a61584743363789e1a34ef8526773efa7b91dfa16903e9d72b0c4f237fed17527d73925bf086a5be8878d64ba4057e4adfef90ea47efbcf WHIRLPOOL c80e7694a32e8577081d5acb2569fafe3553efde2154cac6f04c312cc8261771c98ea672f2bb98014966dca83d744d18111117b4dad9e8f70c4bf5e4553da067
+MISC ChangeLog-2015 15896 SHA256 f0ea70385e7167c03bd2864689f9a6ba8a09fb96cd606dc6d6e3d2a5c214705b SHA512 0e7f8cee28a56e833fdb1290cf7ed34bb439451a9500fd6e617743262dcd32bfc64a12cde09fb2ea309235fda464b55315ce8f01bc645c2d41eb4bf4551d482c WHIRLPOOL b953911d7c5695feccb32f8a53aef0a20f2c620f0ab4cbb67b9189d54fef4f38b62568b7664aa9a11a87879a44ff9af10fa9433c2d103ded1c4f878f4d089585
+MISC metadata.xml 1645 SHA256 0a1b5ddba729698f936723963d2abab5a5afe305c0221ab4dfef53559db78c9b SHA512 aebce1b21379c5dd33f8675f26124449a66277fc8d736620f20304d091d4a3ac4cb1dcbe31afc4512d18c2cb246b4ee6c246c763eb197a4bad77ed5e707f8ecd WHIRLPOOL d3004303a10da8c0ac324759044a3c9f6159db6a34742f4160712cf139dee9f63a1b342e9b6d7c2fd0946ca6fdf4580237e9335bba61b3beb0e4b377f95d9ad3
diff --git a/media-sound/clementine/clementine-1.3.1-r5.ebuild b/media-sound/clementine/clementine-1.3.1-r5.ebuild
new file mode 100644
index 000000000000..0edd5356ffe9
--- /dev/null
+++ b/media-sound/clementine/clementine-1.3.1-r5.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/clementine-player/Clementine.git"
+
+LANGS=" af ar be bg bn br bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl he he_IL hi hr hu hy ia id is it ja ka kk ko lt lv mr ms my nb nl oc pa pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr tr_TR uk uz vi zh_CN zh_TW"
+
+inherit cmake-utils flag-o-matic xdg-utils gnome2-utils virtualx
+[[ ${PV} == *9999* ]] && inherit git-r3
+
+DESCRIPTION="A modern music player and library organizer based on Amarok 1.4 and Qt4"
+HOMEPAGE="http://www.clementine-player.org https://github.com/clementine-player/Clementine"
+[[ ${PV} == *9999* ]] || \
+SRC_URI="https://github.com/clementine-player/Clementine/archive/${PV/_}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+[[ ${PV} == *9999* ]] || \
+KEYWORDS="amd64 x86"
+IUSE="amazoncloud box cdda +dbus debug dropbox googledrive ipod lastfm mms moodbar mtp projectm pulseaudio skydrive test +udisks vkontakte wiimote"
+IUSE+="${LANGS// / linguas_}"
+
+REQUIRED_USE="
+ udisks? ( dbus )
+ wiimote? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-db/sqlite:=
+ >=dev-libs/glib-2.24.1-r1
+ dev-libs/libxml2
+ dev-libs/protobuf:=
+ dev-libs/qjson
+ >=dev-qt/qtcore-4.5:4[ssl]
+ >=dev-qt/qtgui-4.5:4
+ >=dev-qt/qtopengl-4.5:4
+ >=dev-qt/qtsql-4.5:4
+ >=media-libs/chromaprint-0.6
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ >=media-libs/libmygpo-qt-1.0.9[qt4(+)]
+ >=media-libs/taglib-1.8[mp4(+)]
+ sys-libs/zlib
+ dev-libs/crypto++
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ cdda? ( dev-libs/libcdio )
+ dbus? ( >=dev-qt/qtdbus-4.5:4 )
+ ipod? ( >=media-libs/libgpod-0.8.0 )
+ lastfm? ( >=media-libs/liblastfm-1[qt4(+)] )
+ mtp? ( >=media-libs/libmtp-1.0.0 )
+ moodbar? ( sci-libs/fftw:3.0 )
+ projectm? ( media-libs/glew:=
+ >=media-libs/libprojectm-1.2.0 )
+"
+# Note: sqlite driver of dev-qt/qtsql is bundled, so no sqlite use is required; check if this can be overcome someway;
+# Libprojectm-1.2 seams to work fine, so no reasons to use bundled version; check the clementine's patches:
+# https://github.com/clementine-player/Clementine/tree/master/3rdparty/libprojectm/patches
+# Still possibly essential but not applied yet patches are:
+# 06-fix-numeric-locale.patch
+# 08-stdlib.h-for-rand.patch
+RDEPEND="${COMMON_DEPEND}
+ dbus? ( udisks? ( sys-fs/udisks:0 ) )
+ mms? ( media-plugins/gst-plugins-libmms:1.0 )
+ mtp? ( gnome-base/gvfs[mtp] )
+ media-plugins/gst-plugins-meta:1.0
+ media-plugins/gst-plugins-soup:1.0
+ media-plugins/gst-plugins-taglib:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.39:=
+ virtual/pkgconfig
+ sys-devel/gettext
+ dev-qt/qttest:4
+ || (
+ >=dev-cpp/gtest-1.8.0
+ dev-cpp/gmock
+ )
+ amazoncloud? ( dev-cpp/sparsehash )
+ box? ( dev-cpp/sparsehash )
+ dropbox? ( dev-cpp/sparsehash )
+ googledrive? ( dev-cpp/sparsehash )
+ pulseaudio? ( media-sound/pulseaudio )
+ skydrive? ( dev-cpp/sparsehash )
+ test? ( gnome-base/gsettings-desktop-schemas )
+"
+DOCS=( Changelog README.md )
+
+MY_P="${P/_}"
+[[ ${PV} == *9999* ]] || \
+S="${WORKDIR}/${MY_P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3-fix-tokenizer.patch
+ "${FILESDIR}"/${P}-fix-desktop-file.patch
+ "${FILESDIR}"/${P}-chromaprint14.patch #603662
+ "${FILESDIR}"/${P}-libechonest_removal.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # some tests fail or hang
+ sed -i \
+ -e '/add_test_file(translations_test.cpp/d' \
+ tests/CMakeLists.txt || die
+}
+
+src_configure() {
+ local langs x
+ for x in ${LANGS}; do
+ use linguas_${x} && langs+=" ${x}"
+ done
+
+ # spotify is not in portage
+ local mycmakeargs=(
+ -DBUILD_WERROR=OFF
+ -DLINGUAS="${langs}"
+ -DENABLE_AMAZON_CLOUD_DRIVE="$(usex amazoncloud)"
+ -DENABLE_AUDIOCD="$(usex cdda)"
+ -DENABLE_DBUS="$(usex dbus)"
+ -DENABLE_DEVICEKIT="$(usex udisks)"
+ -DENABLE_LIBGPOD="$(usex ipod)"
+ -DENABLE_LIBLASTFM="$(usex lastfm)"
+ -DENABLE_LIBMTP="$(usex mtp)"
+ -DENABLE_MOODBAR="$(usex moodbar)"
+ -DENABLE_GIO=ON
+ -DENABLE_WIIMOTEDEV="$(usex wiimote)"
+ -DENABLE_VISUALISATIONS="$(usex projectm)"
+ -DENABLE_BOX="$(usex box)"
+ -DENABLE_DROPBOX="$(usex dropbox)"
+ -DENABLE_GOOGLE_DRIVE="$(usex googledrive)"
+ -DENABLE_LIBPULSE="$(usex pulseaudio)"
+ -DENABLE_SKYDRIVE="$(usex skydrive)"
+ -DENABLE_VK="$(usex vkontakte)"
+ -DENABLE_SPOTIFY_BLOB=OFF
+ -DENABLE_BREAKPAD=OFF #< disable crash reporting
+ -DUSE_BUILTIN_TAGLIB=OFF
+ -DUSE_SYSTEM_GMOCK=ON
+ -DUSE_SYSTEM_PROJECTM=ON
+ -DBUNDLE_PROJECTM_PRESETS=OFF
+ # force to find crypto++ see bug #548544
+ -DCRYPTOPP_LIBRARIES="crypto++"
+ -DCRYPTOPP_FOUND=ON
+ # avoid automagically enabling of ccache (bug #611010)
+ -DCCACHE_EXECUTABLE=OFF
+ )
+
+ use !debug && append-cppflags -DQT_NO_DEBUG_OUTPUT
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ virtx emake test
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-sound/clementine/clementine-1.3.1-r6.ebuild b/media-sound/clementine/clementine-1.3.1-r6.ebuild
new file mode 100644
index 000000000000..5aac7220fd64
--- /dev/null
+++ b/media-sound/clementine/clementine-1.3.1-r6.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/clementine-player/Clementine.git"
+
+LANGS=" af ar be bg bn br bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl he he_IL hi hr hu hy ia id is it ja ka kk ko lt lv mr ms my nb nl oc pa pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr tr_TR uk uz vi zh_CN zh_TW"
+
+inherit cmake-utils flag-o-matic xdg-utils gnome2-utils virtualx
+[[ ${PV} == *9999* ]] && inherit git-r3
+
+DESCRIPTION="A modern music player and library organizer based on Amarok 1.4 and Qt4"
+HOMEPAGE="http://www.clementine-player.org https://github.com/clementine-player/Clementine"
+[[ ${PV} == *9999* ]] || \
+SRC_URI="https://github.com/clementine-player/Clementine/archive/${PV/_}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+[[ ${PV} == *9999* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="amazoncloud box cdda +dbus debug dropbox googledrive ipod lastfm mms moodbar mtp projectm pulseaudio skydrive test +udisks wiimote"
+IUSE+="${LANGS// / linguas_}"
+
+REQUIRED_USE="
+ udisks? ( dbus )
+ wiimote? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-db/sqlite:=
+ >=dev-libs/glib-2.24.1-r1
+ dev-libs/libxml2
+ dev-libs/protobuf:=
+ dev-libs/qjson
+ >=dev-qt/qtcore-4.5:4[ssl]
+ >=dev-qt/qtgui-4.5:4
+ >=dev-qt/qtopengl-4.5:4
+ >=dev-qt/qtsql-4.5:4
+ >=media-libs/chromaprint-0.6
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ >=media-libs/libmygpo-qt-1.0.9[qt4(+)]
+ >=media-libs/taglib-1.8[mp4(+)]
+ sys-libs/zlib
+ dev-libs/crypto++
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ cdda? ( dev-libs/libcdio )
+ dbus? ( >=dev-qt/qtdbus-4.5:4 )
+ ipod? ( >=media-libs/libgpod-0.8.0 )
+ lastfm? ( >=media-libs/liblastfm-1[qt4(+)] )
+ mtp? ( >=media-libs/libmtp-1.0.0 )
+ moodbar? ( sci-libs/fftw:3.0 )
+ projectm? ( media-libs/glew:=
+ >=media-libs/libprojectm-1.2.0 )
+"
+# Note: sqlite driver of dev-qt/qtsql is bundled, so no sqlite use is required; check if this can be overcome someway;
+# Libprojectm-1.2 seams to work fine, so no reasons to use bundled version; check the clementine's patches:
+# https://github.com/clementine-player/Clementine/tree/master/3rdparty/libprojectm/patches
+# Still possibly essential but not applied yet patches are:
+# 06-fix-numeric-locale.patch
+# 08-stdlib.h-for-rand.patch
+RDEPEND="${COMMON_DEPEND}
+ dbus? ( udisks? ( sys-fs/udisks:0 ) )
+ mms? ( media-plugins/gst-plugins-libmms:1.0 )
+ mtp? ( gnome-base/gvfs[mtp] )
+ media-plugins/gst-plugins-meta:1.0
+ media-plugins/gst-plugins-soup:1.0
+ media-plugins/gst-plugins-taglib:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.39:=
+ virtual/pkgconfig
+ sys-devel/gettext
+ dev-qt/qttest:4
+ || (
+ >=dev-cpp/gtest-1.8.0
+ dev-cpp/gmock
+ )
+ amazoncloud? ( dev-cpp/sparsehash )
+ box? ( dev-cpp/sparsehash )
+ dropbox? ( dev-cpp/sparsehash )
+ googledrive? ( dev-cpp/sparsehash )
+ pulseaudio? ( media-sound/pulseaudio )
+ skydrive? ( dev-cpp/sparsehash )
+ test? ( gnome-base/gsettings-desktop-schemas )
+"
+DOCS=( Changelog README.md )
+
+MY_P="${P/_}"
+[[ ${PV} == *9999* ]] || \
+S="${WORKDIR}/${MY_P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3-fix-tokenizer.patch
+ "${FILESDIR}"/${P}-fix-desktop-file.patch
+ "${FILESDIR}"/${P}-chromaprint14.patch #603662
+ "${FILESDIR}"/${P}-libechonest_removal.patch
+ "${FILESDIR}"/${P}-add-missing-functional-includes.patch #618214
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # some tests fail or hang
+ sed -i \
+ -e '/add_test_file(translations_test.cpp/d' \
+ tests/CMakeLists.txt || die
+}
+
+src_configure() {
+ local langs x
+ for x in ${LANGS}; do
+ use linguas_${x} && langs+=" ${x}"
+ done
+
+ # spotify is not in portage
+ local mycmakeargs=(
+ -DBUILD_WERROR=OFF
+ -DLINGUAS="${langs}"
+ -DENABLE_AMAZON_CLOUD_DRIVE="$(usex amazoncloud)"
+ -DENABLE_AUDIOCD="$(usex cdda)"
+ -DENABLE_DBUS="$(usex dbus)"
+ -DENABLE_DEVICEKIT="$(usex udisks)"
+ -DENABLE_LIBGPOD="$(usex ipod)"
+ -DENABLE_LIBLASTFM="$(usex lastfm)"
+ -DENABLE_LIBMTP="$(usex mtp)"
+ -DENABLE_MOODBAR="$(usex moodbar)"
+ -DENABLE_GIO=ON
+ -DENABLE_WIIMOTEDEV="$(usex wiimote)"
+ -DENABLE_VISUALISATIONS="$(usex projectm)"
+ -DENABLE_BOX="$(usex box)"
+ -DENABLE_DROPBOX="$(usex dropbox)"
+ -DENABLE_GOOGLE_DRIVE="$(usex googledrive)"
+ -DENABLE_LIBPULSE="$(usex pulseaudio)"
+ -DENABLE_SKYDRIVE="$(usex skydrive)"
+ -DENABLE_SPOTIFY_BLOB=OFF
+ -DENABLE_BREAKPAD=OFF #< disable crash reporting
+ -DUSE_BUILTIN_TAGLIB=OFF
+ -DUSE_SYSTEM_GMOCK=ON
+ -DUSE_SYSTEM_PROJECTM=ON
+ -DBUNDLE_PROJECTM_PRESETS=OFF
+ # force to find crypto++ see bug #548544
+ -DCRYPTOPP_LIBRARIES="crypto++"
+ -DCRYPTOPP_FOUND=ON
+ # avoid automagically enabling of ccache (bug #611010)
+ -DCCACHE_EXECUTABLE=OFF
+ # see https://github.com/clementine-player/Clementine/issues/5591
+ -DENABLE_VK=OFF
+ )
+
+ use !debug && append-cppflags -DQT_NO_DEBUG_OUTPUT
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ virtx emake test
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+
+ elog "Note that list of supported formats is controlled by media-plugins/gst-plugins-meta "
+ elog "USE flags. You may be intrested in setting aac, flac, mp3, ogg or wavpack USE flags "
+ elog "depending on your preferences"
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-sound/clementine/clementine-9999.ebuild b/media-sound/clementine/clementine-9999.ebuild
new file mode 100644
index 000000000000..48a9e1e41b5e
--- /dev/null
+++ b/media-sound/clementine/clementine-9999.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/clementine-player/Clementine.git"
+
+LANGS=" af ar be bg bn br bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl he he_IL hi hr hu hy ia id is it ja ka kk ko lt lv mr ms my nb nl oc pa pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr tr_TR uk uz vi zh_CN zh_TW"
+
+inherit cmake-utils flag-o-matic xdg-utils gnome2-utils virtualx
+[[ ${PV} == *9999* ]] && inherit git-r3
+
+DESCRIPTION="A modern music player and library organizer based on Amarok 1.4 and Qt4"
+HOMEPAGE="http://www.clementine-player.org https://github.com/clementine-player/Clementine"
+[[ ${PV} == *9999* ]] || \
+SRC_URI="https://github.com/clementine-player/Clementine/archive/${PV/_}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+[[ ${PV} == *9999* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="box cdda +dbus debug dropbox googledrive ipod lastfm mms moodbar mtp projectm pulseaudio seafile skydrive test +udisks udisks_legacy wiimote"
+IUSE+="${LANGS// / linguas_}"
+
+REQUIRED_USE="
+ udisks? ( dbus )
+ udisks_legacy? ( dbus )
+ wiimote? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-db/sqlite:=
+ >=dev-libs/glib-2.24.1-r1
+ dev-libs/libxml2
+ dev-libs/protobuf:=
+ dev-libs/qjson
+ >=dev-qt/qtcore-4.5:4[ssl]
+ >=dev-qt/qtgui-4.5:4
+ >=dev-qt/qtopengl-4.5:4
+ >=dev-qt/qtsql-4.5:4
+ >=media-libs/chromaprint-0.6
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ >=media-libs/libmygpo-qt-1.0.9[qt4(+)]
+ >=media-libs/taglib-1.8[mp4(+)]
+ sys-libs/zlib
+ dev-libs/crypto++
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ cdda? ( dev-libs/libcdio )
+ dbus? ( >=dev-qt/qtdbus-4.5:4 )
+ ipod? ( >=media-libs/libgpod-0.8.0 )
+ lastfm? ( >=media-libs/liblastfm-1[qt4(+)] )
+ mtp? ( >=media-libs/libmtp-1.0.0 )
+ moodbar? ( sci-libs/fftw:3.0 )
+ projectm? ( media-libs/glew:=
+ >=media-libs/libprojectm-1.2.0 )
+"
+# Note: sqlite driver of dev-qt/qtsql is bundled, so no sqlite use is required; check if this can be overcome someway;
+# Libprojectm-1.2 seams to work fine, so no reasons to use bundled version; check the clementine's patches:
+# https://github.com/clementine-player/Clementine/tree/master/3rdparty/libprojectm/patches
+# Still possibly essential but not applied yet patches are:
+# 06-fix-numeric-locale.patch
+# 08-stdlib.h-for-rand.patch
+RDEPEND="${COMMON_DEPEND}
+ dbus? ( udisks? ( sys-fs/udisks:2 )
+ udisks_legacy? ( sys-fs/udisks:0 ) )
+ mms? ( media-plugins/gst-plugins-libmms:1.0 )
+ mtp? ( gnome-base/gvfs[mtp] )
+ media-plugins/gst-plugins-meta:1.0
+ media-plugins/gst-plugins-soup:1.0
+ media-plugins/gst-plugins-taglib:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.39:=
+ virtual/pkgconfig
+ sys-devel/gettext
+ dev-qt/qttest:4
+ || (
+ >=dev-cpp/gtest-1.8.0
+ dev-cpp/gmock
+ )
+ box? ( dev-cpp/sparsehash )
+ dropbox? ( dev-cpp/sparsehash )
+ googledrive? ( dev-cpp/sparsehash )
+ seafile? ( dev-cpp/sparsehash )
+ pulseaudio? ( media-sound/pulseaudio )
+ skydrive? ( dev-cpp/sparsehash )
+ test? ( gnome-base/gsettings-desktop-schemas )
+"
+DOCS=( Changelog README.md )
+
+MY_P="${P/_}"
+[[ ${PV} == *9999* ]] || \
+S="${WORKDIR}/${MY_P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3-fix-tokenizer.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # some tests fail or hang
+ sed -i \
+ -e '/add_test_file(translations_test.cpp/d' \
+ tests/CMakeLists.txt || die
+}
+
+src_configure() {
+ local langs x
+ for x in ${LANGS}; do
+ use linguas_${x} && langs+=" ${x}"
+ done
+
+ # spotify is not in portage
+ local mycmakeargs=(
+ -DBUILD_WERROR=OFF
+ -DLINGUAS="${langs}"
+ -DENABLE_AUDIOCD="$(usex cdda)"
+ -DENABLE_DBUS="$(usex dbus)"
+ -DENABLE_UDISKS2="$(usex udisks)"
+ -DENABLE_DEVICEKIT="$(usex udisks_legacy)"
+ -DENABLE_LIBGPOD="$(usex ipod)"
+ -DENABLE_LIBLASTFM="$(usex lastfm)"
+ -DENABLE_LIBMTP="$(usex mtp)"
+ -DENABLE_MOODBAR="$(usex moodbar)"
+ -DENABLE_GIO=ON
+ -DENABLE_WIIMOTEDEV="$(usex wiimote)"
+ -DENABLE_VISUALISATIONS="$(usex projectm)"
+ -DENABLE_BOX="$(usex box)"
+ -DENABLE_DROPBOX="$(usex dropbox)"
+ -DENABLE_GOOGLE_DRIVE="$(usex googledrive)"
+ -DENABLE_LIBPULSE="$(usex pulseaudio)"
+ -DENABLE_SEAFILE="$(usex seafile)"
+ -DENABLE_SKYDRIVE="$(usex skydrive)"
+ -DENABLE_SPOTIFY_BLOB=OFF
+ -DENABLE_BREAKPAD=OFF #< disable crash reporting
+ -DUSE_BUILTIN_TAGLIB=OFF
+ -DUSE_SYSTEM_GMOCK=ON
+ -DUSE_SYSTEM_PROJECTM=ON
+ -DBUNDLE_PROJECTM_PRESETS=OFF
+ # force to find crypto++ see bug #548544
+ -DCRYPTOPP_LIBRARIES="crypto++"
+ -DCRYPTOPP_FOUND=ON
+ # avoid automagically enabling of ccache (bug #611010)
+ -DCCACHE_EXECUTABLE=OFF
+ )
+
+ use !debug && append-cppflags -DQT_NO_DEBUG_OUTPUT
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ virtx emake test
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+
+ elog "Note that list of supported formats is controlled by media-plugins/gst-plugins-meta "
+ elog "USE flags. You may be intrested in setting aac, flac, mp3, ogg or wavpack USE flags "
+ elog "depending on your preferences"
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-sound/clementine/files/clementine-1.3-fix-tokenizer.patch b/media-sound/clementine/files/clementine-1.3-fix-tokenizer.patch
new file mode 100644
index 000000000000..437518695a32
--- /dev/null
+++ b/media-sound/clementine/files/clementine-1.3-fix-tokenizer.patch
@@ -0,0 +1,21 @@
+https://github.com/clementine-player/Clementine/issues/5297
+
+--- a/src/core/database.cpp
++++ b/src/core/database.cpp
+@@ -265,6 +265,16 @@
+ StaticInit();
+
+ {
++#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
++ QVariant v = db.driver()->handle();
++ if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) {
++ sqlite3* handle = *static_cast<sqlite3**>(v.data());
++ if (handle) {
++ sqlite3_db_config(handle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);
++ }
++ }
++#endif
++
+ QSqlQuery set_fts_tokenizer("SELECT fts3_tokenizer(:name, :pointer)", db);
+ set_fts_tokenizer.bindValue(":name", "unicode");
+ set_fts_tokenizer.bindValue(
diff --git a/media-sound/clementine/files/clementine-1.3.1-add-missing-functional-includes.patch b/media-sound/clementine/files/clementine-1.3.1-add-missing-functional-includes.patch
new file mode 100644
index 000000000000..e480212b883b
--- /dev/null
+++ b/media-sound/clementine/files/clementine-1.3.1-add-missing-functional-includes.patch
@@ -0,0 +1,51 @@
+From 8a6cc8b5069265e1e92e22def985e22c5955e503 Mon Sep 17 00:00:00 2001
+From: Morris Hafner <mmha@users.noreply.github.com>
+Date: Mon, 13 Feb 2017 17:46:46 +0100
+Subject: [PATCH] Add missing <functional> includes (#5630)
+
+---
+ src/core/mergedproxymodel.cpp | 1 +
+ src/devices/giolister.cpp | 1 +
+ src/library/groupbydialog.cpp | 2 ++
+ 3 files changed, 4 insertions(+)
+
+diff --git a/src/core/mergedproxymodel.cpp b/src/core/mergedproxymodel.cpp
+index 56217f6..8c210d3 100644
+--- a/src/core/mergedproxymodel.cpp
++++ b/src/core/mergedproxymodel.cpp
+@@ -23,6 +23,7 @@
+
+ #include <QStringList>
+
++#include <functional>
+ #include <limits>
+
+ // boost::multi_index still relies on these being in the global namespace.
+diff --git a/src/devices/giolister.cpp b/src/devices/giolister.cpp
+index aa3bddb..5f63ef2 100644
+--- a/src/devices/giolister.cpp
++++ b/src/devices/giolister.cpp
+@@ -17,6 +17,7 @@
+
+ #include "config.h"
+
++#include <functional>
+ #include <memory>
+
+ #include <QFile>
+diff --git a/src/library/groupbydialog.cpp b/src/library/groupbydialog.cpp
+index 5efdc9f..e5f711b 100644
+--- a/src/library/groupbydialog.cpp
++++ b/src/library/groupbydialog.cpp
+@@ -20,6 +20,8 @@
+
+ #include <QPushButton>
+
++#include <functional>
++
+ // boost::multi_index still relies on these being in the global namespace.
+ using std::placeholders::_1;
+ using std::placeholders::_2;
+--
+2.10.2
+
diff --git a/media-sound/clementine/files/clementine-1.3.1-chromaprint14.patch b/media-sound/clementine/files/clementine-1.3.1-chromaprint14.patch
new file mode 100644
index 000000000000..bfdc49265aa3
--- /dev/null
+++ b/media-sound/clementine/files/clementine-1.3.1-chromaprint14.patch
@@ -0,0 +1,41 @@
+From ded312685735fc266d4154d355286eeb86db3bcd Mon Sep 17 00:00:00 2001
+From: Chocobozzz <florian.bigard@gmail.com>
+Date: Thu, 8 Dec 2016 23:12:17 +0100
+Subject: [PATCH] Add compatibility with chromaprint >= 1.4
+
+---
+ src/musicbrainz/chromaprinter.cpp | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/musicbrainz/chromaprinter.cpp b/src/musicbrainz/chromaprinter.cpp
+index 9579b62..c7ad99e 100644
+--- a/src/musicbrainz/chromaprinter.cpp
++++ b/src/musicbrainz/chromaprinter.cpp
+@@ -143,16 +143,24 @@ QString Chromaprinter::CreateFingerprint() {
+ ChromaprintContext* chromaprint =
+ chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT);
+ chromaprint_start(chromaprint, kDecodeRate, kDecodeChannels);
+- chromaprint_feed(chromaprint, reinterpret_cast<void*>(data.data()),
++ chromaprint_feed(chromaprint, reinterpret_cast<int16_t *>(data.data()),
+ data.size() / 2);
+ chromaprint_finish(chromaprint);
+
+- void* fprint = nullptr;
+ int size = 0;
++
++#if CHROMAPRINT_VERSION_MAJOR >= 1 && CHROMAPRINT_VERSION_MINOR >= 4
++ u_int32_t *fprint = nullptr;
++ char *encoded = nullptr;
++#else
++ void *fprint = nullptr;
++ void *encoded = nullptr;
++#endif
++
+ int ret = chromaprint_get_raw_fingerprint(chromaprint, &fprint, &size);
++
+ QByteArray fingerprint;
+ if (ret == 1) {
+- void* encoded = nullptr;
+ int encoded_size = 0;
+ chromaprint_encode_fingerprint(fprint, size, CHROMAPRINT_ALGORITHM_DEFAULT,
+ &encoded, &encoded_size, 1);
diff --git a/media-sound/clementine/files/clementine-1.3.1-fix-desktop-file.patch b/media-sound/clementine/files/clementine-1.3.1-fix-desktop-file.patch
new file mode 100644
index 000000000000..bb561318c59d
--- /dev/null
+++ b/media-sound/clementine/files/clementine-1.3.1-fix-desktop-file.patch
@@ -0,0 +1,52 @@
+This patch fixes gentoo QA notices against the desktop file (see gentoo bug 460412#3)
+Based upon patch extracted from upstream git; original patch info:
+commit 04f73d125365d97fa6f72677ec5d220292690e56
+Author: Golubev Alexander <fatzer2@gmail.com>
+Date: Mon Jul 18 13:45:03 2016 +0400
+
+ Remove OnlyShowIn=Unity from clementine.desktop's action sections (#5444)
+
+diff --git a/dist/clementine.desktop b/dist/clementine.desktop
+index 2fb9559..9ee881e 100644
+--- a/dist/clementine.desktop
++++ b/dist/clementine.desktop
+@@ -38,7 +38,6 @@ Actions=Play;Pause;Stop;Previous;Next;
+ [Desktop Action Play]
+ Name=Play
+ Exec=clementine --play
+-OnlyShowIn=Unity;
+ Name[af]=Speel
+ Name[be]=Прайграць
+ Name[bg]=Възпроизвеждане
+@@ -89,7 +88,6 @@ Name[zh_TW]=播放
+ [Desktop Action Pause]
+ Name=Pause
+ Exec=clementine --pause
+-OnlyShowIn=Unity;
+ Name[be]=Прыпыніць
+ Name[bg]=Пауза
+ Name[br]=Ehan
+@@ -135,7 +133,6 @@ Name[zh_TW]=暫停
+ [Desktop Action Stop]
+ Name=Stop
+ Exec=clementine --stop
+-OnlyShowIn=Unity;
+ Name[be]=Спыніць
+ Name[bg]=Спиране
+ Name[br]=Paouez
+@@ -184,7 +181,6 @@ Name[zh_TW]=停止
+ [Desktop Action Previous]
+ Name=Previous
+ Exec=clementine --previous
+-OnlyShowIn=Unity;
+ Name[af]=Vorige
+ Name[be]=Папярэдні
+ Name[bg]=Предишна
+@@ -232,7 +228,6 @@ Name[zh_TW]=往前
+ [Desktop Action Next]
+ Name=Next
+ Exec=clementine --next
+-OnlyShowIn=Unity;
+ Name[af]=Volgende
+ Name[be]=Далей
+ Name[bg]=Следваща
diff --git a/media-sound/clementine/files/clementine-1.3.1-libechonest_removal.patch b/media-sound/clementine/files/clementine-1.3.1-libechonest_removal.patch
new file mode 100644
index 000000000000..63eb096d84d0
--- /dev/null
+++ b/media-sound/clementine/files/clementine-1.3.1-libechonest_removal.patch
@@ -0,0 +1,701 @@
+Remove depend upon media-libs/libechonest and its support from clementine due to echonest service
+was shutdown and this functionality is useless now and results in nothing but a slight security
+and privacy risk.
+See Gentoo bug #573712.
+Based upon patch extracted from upstream git; original patch info:
+commit a8a0f2e4fdd3d4b2fd23b8628a3abc27c290d01d
+Author: John Maguire <john.maguire@gmail.com>
+Date: Mon Jun 27 14:45:40 2016 +0100
+
+ Remove echonest and update songkick concert fetcher.
+--- Clementine-1.3.1/CMakeLists.txt
++++ Clementine-1.3.1/CMakeLists.txt
+@@ -365,9 +365,6 @@
+ endif (NOT APPLE)
+ endif (USE_SYSTEM_QXT)
+
+-find_path(ECHONEST_INCLUDE_DIRS echonest/echonest_export.h)
+-find_library(ECHONEST_LIBRARIES echonest)
+-
+ # Use system gmock if it's available
+ # We need to look for both gmock and gtest
+ find_path(GMOCK_INCLUDE_DIRS gmock/gmock.h)
+--- Clementine-1.3.1/src/CMakeLists.txt
++++ Clementine-1.3.1/src/CMakeLists.txt
+@@ -35,7 +35,6 @@
+ include_directories(${QTSINGLEAPPLICATION_INCLUDE_DIRS})
+ include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS})
+ include_directories(${QXT_INCLUDE_DIRS})
+-include_directories(${ECHONEST_INCLUDE_DIRS})
+ include_directories(${SHA2_INCLUDE_DIRS})
+ include_directories(${CHROMAPRINT_INCLUDE_DIRS})
+ include_directories(${MYGPOQT_INCLUDE_DIRS})
+@@ -297,8 +296,6 @@
+ songinfo/artistinfoview.cpp
+ songinfo/collapsibleinfoheader.cpp
+ songinfo/collapsibleinfopane.cpp
+- songinfo/echonestbiographies.cpp
+- songinfo/echonestimages.cpp
+ songinfo/songinfobase.cpp
+ songinfo/songinfofetcher.cpp
+ songinfo/songinfoprovider.cpp
+@@ -586,8 +583,6 @@
+ songinfo/artistinfoview.h
+ songinfo/collapsibleinfoheader.h
+ songinfo/collapsibleinfopane.h
+- songinfo/echonestbiographies.h
+- songinfo/echonestimages.h
+ songinfo/songinfobase.h
+ songinfo/songinfofetcher.h
+ songinfo/songinfoprovider.h
+@@ -822,16 +817,12 @@
+ internet/lastfm/lastfmcompat.cpp
+ internet/lastfm/lastfmservice.cpp
+ internet/lastfm/lastfmsettingspage.cpp
+- songinfo/echonestsimilarartists.cpp
+- songinfo/echonesttags.cpp
+ songinfo/lastfmtrackinfoprovider.cpp
+ songinfo/tagwidget.cpp
+ HEADERS
+ covers/lastfmcoverprovider.h
+ internet/lastfm/lastfmservice.h
+ internet/lastfm/lastfmsettingspage.h
+- songinfo/echonestsimilarartists.h
+- songinfo/echonesttags.h
+ songinfo/lastfmtrackinfoprovider.h
+ songinfo/tagwidget.h
+ UI
+@@ -1241,7 +1232,6 @@
+ ${TAGLIB_LIBRARIES}
+ ${MYGPOQT_LIBRARIES}
+ ${CHROMAPRINT_LIBRARIES}
+- ${ECHONEST_LIBRARIES}
+ ${GOBJECT_LIBRARIES}
+ ${GLIB_LIBRARIES}
+ ${GIO_LIBRARIES}
+--- Clementine-1.3.1/src/main.cpp
++++ Clementine-1.3.1/src/main.cpp
+@@ -76,8 +76,6 @@
+ #include <glib.h>
+ #include <gst/gst.h>
+
+-#include <echonest/Config.h>
+-
+ #ifdef Q_OS_DARWIN
+ #include <sys/resource.h>
+ #include <sys/sysctl.h>
+@@ -401,8 +399,8 @@
+ // Add root CA cert for SoundCloud, whose certificate is missing on OS X.
+ QSslSocket::addDefaultCaCertificates(
+ QSslCertificate::fromPath(":/soundcloud-ca.pem", QSsl::Pem));
+- QSslSocket::addDefaultCaCertificates(
+- QSslCertificate::fromPath(":/Equifax_Secure_Certificate_Authority.pem", QSsl::Pem));
++ QSslSocket::addDefaultCaCertificates(QSslCertificate::fromPath(
++ ":/Equifax_Secure_Certificate_Authority.pem", QSsl::Pem));
+
+ // Has the user forced a different language?
+ QString override_language = options.language();
+@@ -440,10 +438,6 @@
+ Application app;
+ app.set_language_name(language);
+
+- Echonest::Config::instance()->setAPIKey("DFLFLJBUF4EGTXHIG");
+- Echonest::Config::instance()->setNetworkAccessManager(
+- new NetworkAccessManager);
+-
+ // Network proxy
+ QNetworkProxyFactory::setApplicationProxyFactory(
+ NetworkProxyFactory::Instance());
+--- Clementine-1.3.1/src/songinfo/artistinfoview.cpp
++++ Clementine-1.3.1/src/songinfo/artistinfoview.cpp
+@@ -16,25 +16,12 @@
+ */
+
+ #include "artistinfoview.h"
+-#include "echonestbiographies.h"
+-#include "echonestimages.h"
+ #include "songinfofetcher.h"
+ #include "songkickconcerts.h"
+ #include "widgets/prettyimageview.h"
+
+-#ifdef HAVE_LIBLASTFM
+-#include "echonestsimilarartists.h"
+-#include "echonesttags.h"
+-#endif
+-
+ ArtistInfoView::ArtistInfoView(QWidget* parent) : SongInfoBase(parent) {
+- fetcher_->AddProvider(new EchoNestBiographies);
+- fetcher_->AddProvider(new EchoNestImages);
+ fetcher_->AddProvider(new SongkickConcerts);
+-#ifdef HAVE_LIBLASTFM
+- fetcher_->AddProvider(new EchoNestSimilarArtists);
+- fetcher_->AddProvider(new EchoNestTags);
+-#endif
+ }
+
+ ArtistInfoView::~ArtistInfoView() {}
+--- Clementine-1.3.1/src/songinfo/echonestbiographies.cpp
++++ Clementine-1.3.1/src/songinfo/echonestbiographies.cpp
+@@ -1,123 +0,0 @@
+-/* This file is part of Clementine.
+- Copyright 2010, David Sansome <me@davidsansome.com>
+-
+- Clementine is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- Clementine is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with Clementine. If not, see <http://www.gnu.org/licenses/>.
+-*/
+-
+-#include "echonestbiographies.h"
+-
+-#include <memory>
+-
+-#include <echonest/Artist.h>
+-
+-#include "songinfotextview.h"
+-#include "core/logging.h"
+-#include "ui/iconloader.h"
+-
+-struct EchoNestBiographies::Request {
+- Request(int id) : id_(id), artist_(new Echonest::Artist) {}
+-
+- int id_;
+- std::unique_ptr<Echonest::Artist> artist_;
+-};
+-
+-EchoNestBiographies::EchoNestBiographies() {
+- site_relevance_["wikipedia"] = 100;
+- site_relevance_["lastfm"] = 60;
+- site_relevance_["amazon"] = 30;
+-
+- site_icons_["amazon"] = IconLoader::Load("amazon", IconLoader::Provider);
+- site_icons_["aol"] = IconLoader::Load("aol", IconLoader::Provider);
+- site_icons_["cdbaby"] = IconLoader::Load("cdbaby", IconLoader::Provider);
+- site_icons_["lastfm"] = IconLoader::Load("as", IconLoader::Lastfm);
+- site_icons_["mog"] = IconLoader::Load("mog", IconLoader::Provider);
+- site_icons_["mtvmusic"] = IconLoader::Load("mtvmusic", IconLoader::Provider);
+- site_icons_["myspace"] = IconLoader::Load("myspace", IconLoader::Provider);
+- site_icons_["wikipedia"] = IconLoader::Load("wikipedia", IconLoader::Provider);
+-}
+-
+-void EchoNestBiographies::FetchInfo(int id, const Song& metadata) {
+- std::shared_ptr<Request> request(new Request(id));
+- request->artist_->setName(metadata.artist());
+-
+- QNetworkReply* reply = request->artist_->fetchBiographies();
+- connect(reply, SIGNAL(finished()), SLOT(RequestFinished()));
+- requests_[reply] = request;
+-}
+-
+-void EchoNestBiographies::RequestFinished() {
+- QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
+- if (!reply || !requests_.contains(reply)) return;
+- reply->deleteLater();
+-
+- RequestPtr request = requests_.take(reply);
+-
+- try {
+- request->artist_->parseProfile(reply);
+- }
+- catch (Echonest::ParseError e) {
+- qLog(Warning) << "Error parsing echonest reply:" << e.errorType()
+- << e.what();
+- }
+-
+- QSet<QString> already_seen;
+-
+- for (const Echonest::Biography& bio : request->artist_->biographies()) {
+- QString canonical_site = bio.site().toLower();
+- canonical_site.replace(QRegExp("[^a-z]"), "");
+-
+- if (already_seen.contains(canonical_site)) continue;
+- already_seen.insert(canonical_site);
+-
+- CollapsibleInfoPane::Data data;
+- data.id_ = "echonest/bio/" + bio.site();
+- data.title_ = tr("Biography from %1").arg(bio.site());
+- data.type_ = CollapsibleInfoPane::Data::Type_Biography;
+-
+- if (site_relevance_.contains(canonical_site))
+- data.relevance_ = site_relevance_[canonical_site];
+- if (site_icons_.contains(canonical_site))
+- data.icon_ = site_icons_[canonical_site];
+-
+- SongInfoTextView* editor = new SongInfoTextView;
+- QString text;
+- // Add a link to the bio webpage at the top if we have one
+- if (!bio.url().isEmpty()) {
+- QString bio_url = bio.url().toEncoded();
+- if (bio.site() == "facebook") {
+- bio_url.replace("graph.facebook.com", "www.facebook.com");
+- }
+- text += "<p><a href=\"" + bio_url + "\">" +
+- tr("Open in your browser") + "</a></p>";
+- }
+-
+- text += bio.text();
+- if (bio.site() == "last.fm") {
+- // Echonest lost formatting and it seems there is currently no plans on
+- // Echonest side for changing this.
+- // But with last.fm, we can guess newlines: " " corresponds to a newline
+- // (this seems to be because on last.fm' website, extra blank is inserted
+- // before <br /> tag, and this blank is kept).
+- // This is tricky, but this make the display nicer for last.fm
+- // biographies.
+- text.replace(" ", "<p>");
+- }
+- editor->SetHtml(text);
+- data.contents_ = editor;
+-
+- emit InfoReady(request->id_, data);
+- }
+-
+- emit Finished(request->id_);
+-}
+--- Clementine-1.3.1/src/songinfo/echonestbiographies.h
++++ Clementine-1.3.1/src/songinfo/echonestbiographies.h
+@@ -1,48 +0,0 @@
+-/* This file is part of Clementine.
+- Copyright 2010, David Sansome <me@davidsansome.com>
+-
+- Clementine is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- Clementine is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with Clementine. If not, see <http://www.gnu.org/licenses/>.
+-*/
+-
+-#ifndef ECHONESTBIOGRAPHIES_H
+-#define ECHONESTBIOGRAPHIES_H
+-
+-#include <memory>
+-
+-#include "songinfoprovider.h"
+-
+-class QNetworkReply;
+-
+-class EchoNestBiographies : public SongInfoProvider {
+- Q_OBJECT
+-
+- public:
+- EchoNestBiographies();
+-
+- void FetchInfo(int id, const Song& metadata);
+-
+- private slots:
+- void RequestFinished();
+-
+- private:
+- QMap<QString, int> site_relevance_;
+- QMap<QString, QIcon> site_icons_;
+-
+- struct Request;
+- typedef std::shared_ptr<Request> RequestPtr;
+-
+- QMap<QNetworkReply*, RequestPtr> requests_;
+-};
+-
+-#endif // ECHONESTBIOGRAPHIES_H
+--- Clementine-1.3.1/src/songinfo/echonestsimilarartists.cpp
++++ Clementine-1.3.1/src/songinfo/echonestsimilarartists.cpp
+@@ -1,76 +0,0 @@
+-/* This file is part of Clementine.
+- Copyright 2010, David Sansome <me@davidsansome.com>
+-
+- Clementine is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- Clementine is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with Clementine. If not, see <http://www.gnu.org/licenses/>.
+-*/
+-
+-#include "echonestsimilarartists.h"
+-#include "tagwidget.h"
+-#include "core/logging.h"
+-#include "ui/iconloader.h"
+-
+-#include <echonest/Artist.h>
+-
+-Q_DECLARE_METATYPE(QVector<QString>);
+-
+-void EchoNestSimilarArtists::FetchInfo(int id, const Song& metadata) {
+- using Echonest::Artist;
+-
+- Artist::SearchParams params;
+- params << Artist::SearchParamEntry(Artist::Name, metadata.artist());
+- params << Artist::SearchParamEntry(Artist::MinHotttnesss, 0.5);
+-
+- QNetworkReply* reply = Echonest::Artist::fetchSimilar(params);
+- connect(reply, SIGNAL(finished()), SLOT(RequestFinished()));
+- requests_[reply] = id;
+-}
+-
+-void EchoNestSimilarArtists::RequestFinished() {
+- QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
+- if (!reply || !requests_.contains(reply)) return;
+- reply->deleteLater();
+-
+- int id = requests_.take(reply);
+-
+- Echonest::Artists artists;
+- try {
+- artists = Echonest::Artist::parseSimilar(reply);
+- }
+- catch (Echonest::ParseError e) {
+- qLog(Warning) << "Error parsing echonest reply:" << e.errorType()
+- << e.what();
+- }
+-
+- if (!artists.isEmpty()) {
+- CollapsibleInfoPane::Data data;
+- data.id_ = "echonest/similarartists";
+- data.title_ = tr("Similar artists");
+- data.type_ = CollapsibleInfoPane::Data::Type_Similar;
+- data.icon_ = IconLoader::Load("echonest", IconLoader::Provider);
+-
+- TagWidget* widget = new TagWidget(TagWidget::Type_Artists);
+- data.contents_ = widget;
+-
+- widget->SetIcon(IconLoader::Load("x-clementine-artist", IconLoader::Base));
+-
+- for (const Echonest::Artist& artist : artists) {
+- widget->AddTag(artist.name());
+- if (widget->count() >= 10) break;
+- }
+-
+- emit InfoReady(id, data);
+- }
+-
+- emit Finished(id);
+-}
+--- Clementine-1.3.1/src/songinfo/echonestsimilarartists.h
++++ Clementine-1.3.1/src/songinfo/echonestsimilarartists.h
+@@ -1,38 +0,0 @@
+-/* This file is part of Clementine.
+- Copyright 2010, David Sansome <me@davidsansome.com>
+-
+- Clementine is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- Clementine is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with Clementine. If not, see <http://www.gnu.org/licenses/>.
+-*/
+-
+-#ifndef ECHONESTSIMILARARTISTS_H
+-#define ECHONESTSIMILARARTISTS_H
+-
+-#include "songinfoprovider.h"
+-
+-class QNetworkReply;
+-
+-class EchoNestSimilarArtists : public SongInfoProvider {
+- Q_OBJECT
+-
+- public:
+- void FetchInfo(int id, const Song& metadata);
+-
+- private slots:
+- void RequestFinished();
+-
+- private:
+- QMap<QNetworkReply*, int> requests_;
+-};
+-
+-#endif // ECHONESTSIMILARARTISTS_H
+--- Clementine-1.3.1/src/songinfo/echonesttags.cpp
++++ Clementine-1.3.1/src/songinfo/echonesttags.cpp
+@@ -1,80 +0,0 @@
+-/* This file is part of Clementine.
+- Copyright 2010, David Sansome <me@davidsansome.com>
+-
+- Clementine is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- Clementine is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with Clementine. If not, see <http://www.gnu.org/licenses/>.
+-*/
+-
+-#include "echonesttags.h"
+-
+-#include <memory>
+-
+-#include <echonest/Artist.h>
+-
+-#include "tagwidget.h"
+-#include "core/logging.h"
+-#include "ui/iconloader.h"
+-
+-struct EchoNestTags::Request {
+- Request(int id) : id_(id), artist_(new Echonest::Artist) {}
+-
+- int id_;
+- std::unique_ptr<Echonest::Artist> artist_;
+-};
+-
+-void EchoNestTags::FetchInfo(int id, const Song& metadata) {
+- std::shared_ptr<Request> request(new Request(id));
+- request->artist_->setName(metadata.artist());
+-
+- QNetworkReply* reply = request->artist_->fetchTerms();
+- connect(reply, SIGNAL(finished()), SLOT(RequestFinished()));
+- requests_[reply] = request;
+-}
+-
+-void EchoNestTags::RequestFinished() {
+- QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
+- if (!reply || !requests_.contains(reply)) return;
+- reply->deleteLater();
+-
+- RequestPtr request = requests_.take(reply);
+-
+- try {
+- request->artist_->parseProfile(reply);
+- }
+- catch (Echonest::ParseError e) {
+- qLog(Warning) << "Error parsing echonest reply:" << e.errorType()
+- << e.what();
+- }
+-
+- if (!request->artist_->terms().isEmpty()) {
+- CollapsibleInfoPane::Data data;
+- data.id_ = "echonest/artisttags";
+- data.title_ = tr("Artist tags");
+- data.type_ = CollapsibleInfoPane::Data::Type_Tags;
+- data.icon_ = IconLoader::Load("icon_tag", IconLoader::Lastfm);
+-
+- TagWidget* widget = new TagWidget(TagWidget::Type_Tags);
+- data.contents_ = widget;
+-
+- widget->SetIcon(data.icon_);
+-
+- for (const Echonest::Term& term : request->artist_->terms()) {
+- widget->AddTag(term.name());
+- if (widget->count() >= 10) break;
+- }
+-
+- emit InfoReady(request->id_, data);
+- }
+-
+- emit Finished(request->id_);
+-}
+--- Clementine-1.3.1/src/songinfo/echonesttags.h
++++ Clementine-1.3.1/src/songinfo/echonesttags.h
+@@ -1,43 +0,0 @@
+-/* This file is part of Clementine.
+- Copyright 2010, David Sansome <me@davidsansome.com>
+-
+- Clementine is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- Clementine is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with Clementine. If not, see <http://www.gnu.org/licenses/>.
+-*/
+-
+-#ifndef ECHONESTTAGS_H
+-#define ECHONESTTAGS_H
+-
+-#include <memory>
+-
+-#include "songinfoprovider.h"
+-
+-class QNetworkReply;
+-
+-class EchoNestTags : public SongInfoProvider {
+- Q_OBJECT
+-
+- public:
+- void FetchInfo(int id, const Song& metadata);
+-
+- private slots:
+- void RequestFinished();
+-
+- private:
+- struct Request;
+- typedef std::shared_ptr<Request> RequestPtr;
+-
+- QMap<QNetworkReply*, RequestPtr> requests_;
+-};
+-
+-#endif // ECHONESTTAGS_H
+--- Clementine-1.3.1/src/songinfo/songkickconcerts.cpp
++++ Clementine-1.3.1/src/songinfo/songkickconcerts.cpp
+@@ -21,9 +21,6 @@
+ #include <QVBoxLayout>
+ #include <QXmlStreamWriter>
+
+-#include <echonest/Artist.h>
+-#include <echonest/TypeInformation.h>
+-
+ #include <qjson/parser.h>
+
+ #include "core/closure.h"
+@@ -31,77 +28,64 @@
+ #include "songkickconcertwidget.h"
+ #include "ui/iconloader.h"
+
+-const char* SongkickConcerts::kSongkickArtistBucket = "songkick";
+-const char* SongkickConcerts::kSongkickArtistCalendarUrl =
+- "https://api.songkick.com/api/3.0/artists/%1/calendar.json?"
+- "per_page=5&"
+- "apikey=8rgKfy1WU6IlJFfN";
++namespace {
++const char* kSongkickArtistCalendarUrl =
++ "https://api.songkick.com/api/3.0/artists/%1/calendar.json";
++const char* kSongkickArtistSearchUrl =
++ "https://api.songkick.com/api/3.0/search/artists.json";
++const char* kSongkickApiKey = "8rgKfy1WU6IlJFfN";
++} // namespace
+
+ SongkickConcerts::SongkickConcerts() {
+ Geolocator* geolocator = new Geolocator;
+ geolocator->Geolocate();
+ connect(geolocator, SIGNAL(Finished(Geolocator::LatLng)),
+ SLOT(GeolocateFinished(Geolocator::LatLng)));
+- NewClosure(geolocator, SIGNAL(Finished(Geolocator::LatLng)), geolocator,
+- SLOT(deleteLater()));
++ connect(geolocator, SIGNAL(Finished(Geolocator::LatLng)), geolocator,
++ SLOT(deleteLater()));
+ }
+
+ void SongkickConcerts::FetchInfo(int id, const Song& metadata) {
+- Echonest::Artist::SearchParams params;
+- params.push_back(
+- qMakePair(Echonest::Artist::Name, QVariant(metadata.artist())));
+- qLog(Debug) << "Params:" << params;
+- QNetworkReply* reply = Echonest::Artist::search(
+- params,
+- Echonest::ArtistInformation(Echonest::ArtistInformation::NoInformation,
+- QStringList() << kSongkickArtistBucket));
+- qLog(Debug) << reply->request().url();
++ if (metadata.artist().isEmpty()) {
++ emit Finished(id);
++ return;
++ }
++
++ QUrl url(kSongkickArtistSearchUrl);
++ url.addQueryItem("apikey", kSongkickApiKey);
++ url.addQueryItem("query", metadata.artist());
++
++ QNetworkRequest request(url);
++ QNetworkReply* reply = network_.get(request);
+ NewClosure(reply, SIGNAL(finished()), this,
+ SLOT(ArtistSearchFinished(QNetworkReply*, int)), reply, id);
+ }
+
+ void SongkickConcerts::ArtistSearchFinished(QNetworkReply* reply, int id) {
+ reply->deleteLater();
+- try {
+- Echonest::Artists artists = Echonest::Artist::parseSearch(reply);
+- if (artists.isEmpty()) {
+- qLog(Debug) << "Failed to find artist in echonest";
+- emit Finished(id);
+- return;
+- }
+-
+- const Echonest::Artist& artist = artists[0];
+- const Echonest::ForeignIds& foreign_ids = artist.foreignIds();
+- QString songkick_id;
+- for (const Echonest::ForeignId& id : foreign_ids) {
+- if (id.catalog == "songkick") {
+- songkick_id = id.foreign_id;
+- break;
+- }
+- }
+-
+- if (songkick_id.isEmpty()) {
+- qLog(Debug) << "Failed to fetch songkick foreign id for artist";
+- emit Finished(id);
+- return;
+- }
+-
+- QStringList split = songkick_id.split(':');
+- if (split.count() != 3) {
+- qLog(Error) << "Weird songkick id";
+- emit Finished(id);
+- return;
+- }
+-
+- FetchSongkickCalendar(split[2], id);
+- } catch (Echonest::ParseError& e) {
+- qLog(Error) << "Error parsing echonest reply:" << e.errorType() << e.what();
++
++ QJson::Parser parser;
++ QVariantMap json = parser.parse(reply).toMap();
++
++ QVariantMap results_page = json["resultsPage"].toMap();
++ QVariantMap results = results_page["results"].toMap();
++ QVariantList artists = results["artist"].toList();
++
++ if (artists.isEmpty()) {
+ emit Finished(id);
++ return;
+ }
++
++ QVariantMap artist = artists.first().toMap();
++ QString artist_id = artist["id"].toString();
++
++ FetchSongkickCalendar(artist_id, id);
+ }
+
+ void SongkickConcerts::FetchSongkickCalendar(const QString& artist_id, int id) {
+ QUrl url(QString(kSongkickArtistCalendarUrl).arg(artist_id));
++ url.addQueryItem("per_page", "5");
++ url.addQueryItem("apikey", kSongkickApiKey);
+ qLog(Debug) << url;
+ QNetworkReply* reply = network_.get(QNetworkRequest(url));
+ NewClosure(reply, SIGNAL(finished()), this,
+--- Clementine-1.3.1/src/songinfo/songkickconcerts.h
++++ Clementine-1.3.1/src/songinfo/songkickconcerts.h
+@@ -44,9 +44,6 @@
+
+ NetworkAccessManager network_;
+ Geolocator::LatLng latlng_;
+-
+- static const char* kSongkickArtistBucket;
+- static const char* kSongkickArtistCalendarUrl;
+ };
+
+ #endif
diff --git a/media-sound/clementine/metadata.xml b/media-sound/clementine/metadata.xml
new file mode 100644
index 000000000000..145208285ecf
--- /dev/null
+++ b/media-sound/clementine/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Fat-Zer</name>
+ <description>Proxied maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ <description>Proxy maintainer for Fat-Zer. Please CC on bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sound@gentoo.org</email>
+ <name>Gentoo Sound project</name>
+ </maintainer>
+ <use>
+ <flag name="amazoncloud">Enable Amazon cloud drive support</flag>
+ <flag name="box">Enable filesharing via Box.com</flag>
+ <flag name="dropbox">Enable Dropbox support</flag>
+ <flag name="googledrive">Enable Google Drive support</flag>
+ <flag name="lastfm">Use liblastfm for fetching song info, scrobbling and radio streams</flag>
+ <flag name="moodbar">Enable moodbar support</flag>
+ <flag name="projectm">Build with ProjectM visualization</flag>
+ <flag name="seafile">Enable support for seafile: a file sync service</flag>
+ <flag name="skydrive">Enable Skydrive support</flag>
+ <flag name="udisks_legacy">Enable storage management support via legacy <pkg>sys-fs/udisks</pkg>:0</flag>
+ <flag name="vkontakte">Enable vk.com support</flag>
+ <flag name="wiimote">Enable support for Wii remote</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">clementine-player/Clementine</remote-id>
+ </upstream>
+</pkgmetadata>