public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/clementine/files/, media-sound/clementine/
Date: Sun, 19 Nov 2017 15:09:55 +0000 (UTC)	[thread overview]
Message-ID: <1511104148.f36c3c321d5e383adbfb2ed448ad1e9d1f598179.asturm@gentoo> (raw)

commit:     f36c3c321d5e383adbfb2ed448ad1e9d1f598179
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 12:39:38 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 15:09:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f36c3c32

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

 media-sound/clementine/clementine-9999.ebuild      | 47 ++++++++++++++++------
 .../files/clementine-fts3-tokenizer.patch          | 36 +++++++++++++++++
 .../clementine/files/clementine-qt5-lconvert.patch | 28 +++++++++++++
 3 files changed, 98 insertions(+), 13 deletions(-)

diff --git a/media-sound/clementine/clementine-9999.ebuild b/media-sound/clementine/clementine-9999.ebuild
index 3e249872f86..50ae57df046 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 00000000000..41a5cd76c99
--- /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 00000000000..8565f30cee0
--- /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
+


             reply	other threads:[~2017-11-19 15:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19 15:09 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-05 10:36 [gentoo-commits] repo/gentoo:master commit in: media-sound/clementine/files/, media-sound/clementine/ Sam James
2023-12-23 20:05 Joonas Niilola
2023-10-17  5:24 Yixun Lan
2022-10-16  4:53 Miroslav Šulc
2021-07-02 10:42 Lars Wendler
2019-07-13  8:51 Andreas Sturmlechner
2019-02-17 16:05 Lars Wendler
2018-11-17 23:10 Andreas Sturmlechner
2018-03-17  0:27 Andreas Sturmlechner
2017-12-19  9:32 Andreas Sturmlechner
2016-12-26 23:39 Lars Wendler
2016-04-17 17:52 Lars Wendler
2016-04-17  4:41 Jason Donenfeld
2016-01-13 17:21 Lars Wendler
2015-08-25  8:13 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511104148.f36c3c321d5e383adbfb2ed448ad1e9d1f598179.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox