aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorDavid Spencer <idlemoor@slackbuilds.org>2016-04-11 16:00:10 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-04-12 17:34:23 +0700
commit554d24be0b9d3d39bada5ad03a92b59b52eb06f5 (patch)
tree03d6bd908c6a7347924910fcaea94492f2475b7e /system
parent38b16db6cf2aa20afef9b83f1669a5985f05f554 (diff)
system/tagainijisho: Fixed build with sqlite-3.12.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/tagainijisho/embed-sqlite.patch50
-rw-r--r--system/tagainijisho/tagainijisho.SlackBuild6
2 files changed, 55 insertions, 1 deletions
diff --git a/system/tagainijisho/embed-sqlite.patch b/system/tagainijisho/embed-sqlite.patch
new file mode 100644
index 000000000000..14ef270a0e80
--- /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;
diff --git a/system/tagainijisho/tagainijisho.SlackBuild b/system/tagainijisho/tagainijisho.SlackBuild
index b318531a56cb..39193deba155 100644
--- a/system/tagainijisho/tagainijisho.SlackBuild
+++ b/system/tagainijisho/tagainijisho.SlackBuild
@@ -65,7 +65,11 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Fix build with sqlite-3.11 onwards
+# https://github.com/Gnurou/tagainijisho/issues/163
+patch -p1 < $CWD/embed-sqlite.patch
cd $TMP/$PRGNAM-$VERSION
cmake . \