--- clementine-1.3.1-r6.ebuild 2017-03-04 22:08:46.000000000 +0200 +++ clementine-1.3.1-r6.ebuild 2017-03-14 20:27:04.005555152 +0200 @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -19,28 +19,48 @@ 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="amazoncloud box cdda +dbus debug dropbox googledrive ipod lastfm mms moodbar mtp projectm pulseaudio skydrive +qt4 qt5 test +udisks wiimote" IUSE+="${LANGS// / linguas_}" REQUIRED_USE=" + ^^ ( qt4 qt5 ) udisks? ( dbus ) wiimote? ( dbus ) " COMMON_DEPEND=" - dev-db/sqlite:= + qt4? ( >=dev-qt/qtcore-4.5:4 + >=dev-qt/qtgui-4.5:4 + >=dev-qt/qtopengl-4.5:4 + >=dev-qt/qtsql-4.5:4[sqlite] + app-crypt/qca:2[qt4(+)] + >=media-libs/libmygpo-qt-1.0.7[qt4] + media-libs/libechonest[qt4] + lastfm? ( >=media-libs/liblastfm-1[qt4] ) + dbus? ( >=dev-qt/qtdbus-4.5:4 ) ) + qt5? ( >=dev-qt/qtcore-5.1:5 + >=dev-qt/qtgui-5.1:5 + >=dev-qt/qtnetwork-5.1:5 + >=dev-qt/qtopengl-5.1:5 + >=dev-qt/qttranslations-5.1:5 + >=dev-qt/qtsql-5.1:5[sqlite] + >=dev-qt/qtwidgets-5.1:5 + >=dev-qt/qtx11extras-5.1:5 + >=dev-qt/qtxml-5.1:5 + >=dev-qt/linguist-tools-5.1:5 + app-crypt/qca:2[qt5(+)] + >=media-libs/libmygpo-qt-1.0.8[qt5] + >=media-libs/libechonest-2.3.0[qt5] + lastfm? ( >=media-libs/liblastfm-1[qt5] ) + dbus? ( >=dev-qt/qtdbus-5.1:5 ) ) + >=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++ @@ -48,9 +68,7 @@ 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:= @@ -74,7 +92,8 @@ >=dev-libs/boost-1.39:= virtual/pkgconfig sys-devel/gettext - dev-qt/qttest:4 + qt4? ( test? ( dev-qt/qttest:4 ) ) + qt5? ( test? ( dev-qt/qttest:5 ) ) dev-cpp/gmock amazoncloud? ( dev-cpp/sparsehash ) box? ( dev-cpp/sparsehash ) @@ -91,12 +110,20 @@ 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}-fix-tokenizer.patch ) +# https://github.com/clementine-player/Clementine/issues/3935 +RESTRICT="test" + +src_unpack() { + if use qt5; then + EGIT_BRANCH="qt5" + fi + + git-r3_src_unpack +} + src_prepare() { cmake-utils_src_prepare @@ -104,6 +131,16 @@ sed -i \ -e '/add_test_file(translations_test.cpp/d' \ tests/CMakeLists.txt || die + # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used. + # Setting QT_SELECT environment variable will enforce correct binaries. + if use qt4; then + export QT_SELECT=qt4 + elif use qt5; then + export QT_SELECT=qt5 + ewarn "Please note that Qt5 support is still experimental." + ewarn "If you find anything to not work with Qt5, please report a bug." + ewarn "«Work (slowly) in progress.»© https://github.com/clementine-player/Clementine/issues/3463#issuecomment-90714420" + fi } src_configure() {