summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-11-19 13:39:38 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2017-11-19 16:09:08 +0100
commitf36c3c321d5e383adbfb2ed448ad1e9d1f598179 (patch)
tree98365092c9332fa5c80a24c71fe55996569f64eb /media-sound
parentmedia-sound/clementine: Add 1.3.1_p20171113 snapshot (diff)
downloadgentoo-f36c3c321d5e383adbfb2ed448ad1e9d1f598179.tar.gz
gentoo-f36c3c321d5e383adbfb2ed448ad1e9d1f598179.tar.bz2
gentoo-f36c3c321d5e383adbfb2ed448ad1e9d1f598179.zip
media-sound/clementine: Switch 9999 to qt5
Forward-port fts3-tokenizer fix to qt5 branch. Add patch to properly find linguist-tools for lconvert. Closes: https://bugs.gentoo.org/562610 Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/clementine/clementine-9999.ebuild47
-rw-r--r--media-sound/clementine/files/clementine-fts3-tokenizer.patch36
-rw-r--r--media-sound/clementine/files/clementine-qt5-lconvert.patch28
3 files changed, 98 insertions, 13 deletions
diff --git a/media-sound/clementine/clementine-9999.ebuild b/media-sound/clementine/clementine-9999.ebuild
index 3e249872f868..50ae57df0467 100644
--- a/media-sound/clementine/clementine-9999.ebuild
+++ b/media-sound/clementine/clementine-9999.ebuild
@@ -3,6 +3,7 @@
EAPI=6
+EGIT_BRANCH="qt5"
EGIT_REPO_URI="https://github.com/clementine-player/Clementine.git"
PLOCALES="af ar be bg bn br bs ca cs cy da de el en 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 mk_MK 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"
@@ -19,7 +20,7 @@ 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 wiimote"
+IUSE="box cdda +dbus debug dropbox googledrive ipod lastfm mms moodbar mtp projectm pulseaudio seafile skydrive test +udisks wiimote +X"
REQUIRED_USE="
udisks? ( dbus )
@@ -27,35 +28,42 @@ REQUIRED_USE="
"
COMMON_DEPEND="
+ app-crypt/qca:2[qt5(+)]
dev-db/sqlite:=
dev-libs/crypto++
dev-libs/glib:2
dev-libs/libxml2
dev-libs/protobuf:=
- dev-libs/qjson
- dev-qt/qtcore:4[ssl]
- dev-qt/qtgui:4
- dev-qt/qtopengl:4
- dev-qt/qtsql:4
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtsql:5[sqlite]
+ dev-qt/qtwebkit:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
media-libs/chromaprint:=
media-libs/gstreamer:1.0
media-libs/gst-plugins-base:1.0
- >=media-libs/libmygpo-qt-1.0.9[qt4(+)]
+ >=media-libs/libmygpo-qt-1.0.9[qt5]
media-libs/taglib[mp4(+)]
sys-libs/zlib
virtual/glu
virtual/opengl
- x11-libs/libX11
cdda? ( dev-libs/libcdio )
- dbus? ( dev-qt/qtdbus:4 )
+ dbus? ( dev-qt/qtdbus:5 )
ipod? ( >=media-libs/libgpod-0.8.0 )
- lastfm? ( >=media-libs/liblastfm-1[qt4(+)] )
+ lastfm? ( >=media-libs/liblastfm-1[qt5] )
moodbar? ( sci-libs/fftw:3.0 )
mtp? ( >=media-libs/libmtp-1.0.0 )
projectm? (
media-libs/glew:=
>=media-libs/libprojectm-1.2.0
)
+ X? (
+ dev-qt/qtx11extras:5
+ x11-libs/libX11
+ )
"
# 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 seems to work fine, so no reason to use bundled version; check clementine's patches:
@@ -77,7 +85,7 @@ DEPEND="${COMMON_DEPEND}
dev-cpp/gmock
)
dev-libs/boost:=
- dev-qt/qttest:4
+ dev-qt/linguist-tools:5
sys-devel/gettext
virtual/pkgconfig
box? ( dev-cpp/sparsehash )
@@ -86,15 +94,22 @@ DEPEND="${COMMON_DEPEND}
pulseaudio? ( media-sound/pulseaudio )
seafile? ( dev-cpp/sparsehash )
skydrive? ( dev-cpp/sparsehash )
- test? ( gnome-base/gsettings-desktop-schemas )
+ test? (
+ dev-qt/qttest:5
+ 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 )
+PATCHES=(
+ "${FILESDIR}"/${PN}-fts3-tokenizer.patch
+ "${FILESDIR}"/${PN}-qt5-lconvert.patch
+)
src_prepare() {
l10n_find_plocales_changes "src/translations" "" ".po"
@@ -104,6 +119,11 @@ src_prepare() {
sed -i \
-e '/add_test_file(translations_test.cpp/d' \
tests/CMakeLists.txt || die
+
+ if ! use test; then
+ sed -e "/find_package.*Qt5/s:\ Test::" -i CMakeLists.txt || die
+ cmake_comment_add_subdirectory tests
+ fi
}
src_configure() {
@@ -139,6 +159,7 @@ src_configure() {
-DENABLE_LIBPULSE="$(usex pulseaudio)"
-DENABLE_UDISKS2="$(usex udisks)"
-DENABLE_WIIMOTEDEV="$(usex wiimote)"
+ -DCMAKE_DISABLE_FIND_PACKAGE_X11="$(usex X)"
)
use !debug && append-cppflags -DQT_NO_DEBUG_OUTPUT
diff --git a/media-sound/clementine/files/clementine-fts3-tokenizer.patch b/media-sound/clementine/files/clementine-fts3-tokenizer.patch
new file mode 100644
index 000000000000..41a5cd76c992
--- /dev/null
+++ b/media-sound/clementine/files/clementine-fts3-tokenizer.patch
@@ -0,0 +1,36 @@
+From 77b6d72a3e8d841977a3e30ea435cd9e9289fc96 Mon Sep 17 00:00:00 2001
+From: Alexander Golubev <fatzer2@gmail.com>
+Date: Thu, 16 Mar 2017 14:54:55 +0300
+Subject: [PATCH] core/database: configure fts3 tokenizer support
+
+Original patch by Arfrever
+This fixes https://github.com/clementine-player/Clementine/issues/5297
+---
+ src/core/database.cpp | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/src/core/database.cpp b/src/core/database.cpp
+index 86e8a1052..36113d8c1 100644
+--- a/src/core/database.cpp
++++ b/src/core/database.cpp
+@@ -265,6 +265,20 @@ QSqlDatabase Database::Connect() {
+ StaticInit();
+
+ {
++
++#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
++ // In case sqlite>=3.12 is compiled without -DSQLITE_ENABLE_FTS3_TOKENIZER (generally a good idea
++ // due to security reasons) the fts3 support should be enabled explicitly.
++ // see https://github.com/clementine-player/Clementine/issues/5297
++ 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(db);
+ set_fts_tokenizer.prepare("SELECT fts3_tokenizer(:name, :pointer)");
+ set_fts_tokenizer.bindValue(":name", "unicode");
diff --git a/media-sound/clementine/files/clementine-qt5-lconvert.patch b/media-sound/clementine/files/clementine-qt5-lconvert.patch
new file mode 100644
index 000000000000..8565f30cee05
--- /dev/null
+++ b/media-sound/clementine/files/clementine-qt5-lconvert.patch
@@ -0,0 +1,28 @@
+From 5f75801a08a606073c700bd829ea694950de0729 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 19 Nov 2017 16:00:55 +0100
+Subject: [PATCH] Properly find Qt5LinguistTools
+
+---
+ CMakeLists.txt | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4022c383b..5bdb2a00e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,9 +45,8 @@ if(NOT APPLE)
+ find_package(Qt5 COMPONENTS WebKitWidgets)
+ endif(NOT APPLE)
+
+-# Find Qt's lconvert binary. Try qt's binary dir first, fall back to looking in PATH
+-find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert lconvert-qt5 PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH)
+-find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert lconvert-qt5)
++find_package(Qt5LinguistTools CONFIG REQUIRED)
++set(QT_LCONVERT_EXECUTABLE Qt5::lconvert)
+
+ if(APPLE)
+ if(NOT QT_MAC_USE_COCOA)
+--
+2.15.0
+