summaryrefslogtreecommitdiffstats
path: root/system/tagainijisho/embed-sqlite.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/tagainijisho/embed-sqlite.patch')
-rw-r--r--system/tagainijisho/embed-sqlite.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/system/tagainijisho/embed-sqlite.patch b/system/tagainijisho/embed-sqlite.patch
new file mode 100644
index 0000000000..14ef270a0e
--- /dev/null
+++ b/system/tagainijisho/embed-sqlite.patch
@@ -0,0 +1,50 @@
+diff -u -r tagainijisho-1.0.1/src/sqlite/CMakeLists.txt tagainijisho-1.0.1-patched/src/sqlite/CMakeLists.txt
+--- tagainijisho-1.0.1/src/sqlite/CMakeLists.txt 2013-11-18 23:32:01.000000000 +0000
++++ tagainijisho-1.0.1-patched/src/sqlite/CMakeLists.txt 2016-04-11 15:44:13.408359228 +0100
+@@ -3,19 +3,15 @@
+
+ set(SQLITE_MIN_VERSION "3007004")
+ set(SQLITE_BLACKLIST "3007007;3007008;3008000")
+-set(SQLITE_DOWNLOAD_VERSION "3080100")
++set(SQLITE_DOWNLOAD_VERSION "3110100")
+
+-set(SQLITE_SOURCE http://www.sqlite.org/2013/sqlite-amalgamation-${SQLITE_DOWNLOAD_VERSION}.zip)
++set(SQLITE_SOURCE http://www.sqlite.org/2016/sqlite-amalgamation-${SQLITE_DOWNLOAD_VERSION}.zip)
+
+ option(SHARED_SQLITE_LIBRARY "Build the SQLite library as a shared library (loadable by SQLite's interpreter)" OFF)
+
+ # Embed SQLite even if the system version looks good?
+-option(EMBED_SQLITE "Embed SQLite even if a system version is present and valid" OFF)
+-
+-# Force embedded version on Apple
+-if (APPLE)
+- set (EMBED_SQLITE "ON")
+-endif(APPLE)
++# This should be enabled by default as we require features (e.g. FTS3 tokenizer) that may not be enabled on the system
++option(EMBED_SQLITE "Embed SQLite even if a system version is present and valid" ON)
+
+ # Look for system SQLite
+ find_path(SQLITE_INCLUDE_DIR sqlite3.h)
+@@ -89,7 +85,7 @@
+ endif()
+
+ include_directories(${QT_INCLUDE_DIR})
+-add_definitions(-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_OMIT_DEPRECATED)
++add_definitions(-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_FTS3_TOKENIZER)
+
+ if(SHARED_SQLITE_LIBRARY)
+ add_library(tagaini_sqlite SHARED ${tagainijisho_sqlite_SRCS} ${tagainijisho_sqlite_MOC_SRCS})
+diff -u -r tagainijisho-1.0.1/src/sqlite/sqlite3ext.cc tagainijisho-1.0.1-patched/src/sqlite/sqlite3ext.cc
+--- tagainijisho-1.0.1/src/sqlite/sqlite3ext.cc 2013-11-18 23:32:01.000000000 +0000
++++ tagainijisho-1.0.1-patched/src/sqlite/sqlite3ext.cc 2016-04-11 15:44:10.505347246 +0100
+@@ -118,6 +118,10 @@
+ sqlite3_stmt *pStmt;
+ const char *zSql = "SELECT fts3_tokenizer(?, ?)";
+
++#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
++ sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);
++#endif
++
+ rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
+ if( rc!=SQLITE_OK ){
+ return rc;