From d0f525122d28e9293d66dd406d14d944b9b19899 Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Fri, 27 May 2016 15:49:47 +1000 Subject: [PATCH] Add patch to support sqlite 3.12+ --- clementine-1.3.1-sqlite-3.12.patch | 19 +++++++++++++++++++ clementine.spec | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 clementine-1.3.1-sqlite-3.12.patch diff --git a/clementine-1.3.1-sqlite-3.12.patch b/clementine-1.3.1-sqlite-3.12.patch new file mode 100644 index 0000000..5c6a152 --- /dev/null +++ b/clementine-1.3.1-sqlite-3.12.patch @@ -0,0 +1,19 @@ +--- 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(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/clementine.spec b/clementine.spec index 6d2c1b2..9cb0baf 100644 --- a/clementine.spec +++ b/clementine.spec @@ -16,7 +16,7 @@ Summary: A cross-platform music player based on Amarok 1.4 Name: clementine Version: 1.3.1 -Release: 1%{?extrarelsuffix} +Release: 2%{?extrarelsuffix} License: GPLv3+ Group: Sound Url: http://www.clementine-player.org/ @@ -39,6 +39,7 @@ Patch7: clementine-1.3-play-folder.patch # It's especially imported to fix after free access to DI.fm services was disabled # https://github.com/clementine-player/Clementine/commit/3ab20defce71a009bf180255642c18fa671650f9 Patch8: clementine-1.3.1-rockradio-premium.patch +Patch9: clementine-1.3.1-sqlite-3.12.patch BuildRequires: cmake BuildRequires: qt4-linguist @@ -129,6 +130,7 @@ Features: %patch6 -p1 -b .l10n~ %patch7 -p1 -b .desktop~ %patch8 -p1 -b .rockradio~ +%patch9 -p1 -b .sqlite312~ %build %cmake_qt4 \