Commit86c3112bRecorded31 Mar 2026Repositorysigil-sqlite
Enable FTS5 in sigil-sqlite
Message
Add SQLITEENABLEFTS5 define to the SQLite amalgamation and build flags. FTS5 provides full-text search capabilities needed by folio's search index. Also consolidate SQLITETHREADSAFE and SQLITEOMITLOADEXTENSION into the amalgamation header so they apply regardless of how sqlite3.c is compiled.
Changed
package.sgl | 4 ++++
vendor/sqlite3.c | 10 ++++++++++
2 files changed, 14 insertions(+)Diff
package.sglmodified
@@ -21,6 +21,9 @@
21
c-sources: '("native/sqlite.c" 22
"vendor/sqlite3.c") 23
c-include-dirs: '("vendor")+24
c-flags: '("-DSQLITE_THREADSAFE=0"+25
"-DSQLITE_OMIT_LOAD_EXTENSION"+26
"-DSQLITE_ENABLE_FTS5") 27
native-init: "sigil__init_sigil_sqlite_module")) 28
29
tasks: (list@@ -34,6 +37,7 @@
37
flags: '("-std=c99" 38
"-DSQLITE_THREADSAFE=0" 39
"-DSQLITE_OMIT_LOAD_EXTENSION"+40
"-DSQLITE_ENABLE_FTS5" 41
"-Wno-unused-parameter" 42
"-Wno-sign-compare")) 43
vendor/sqlite3.cmodified
@@ -25,6 +25,16 @@
25
#ifndef SQLITE_PRIVATE 26
# define SQLITE_PRIVATE static 27
#endif+28
/* Sigil configuration */+29
#ifndef SQLITE_THREADSAFE+30
# define SQLITE_THREADSAFE 0+31
#endif+32
#ifndef SQLITE_OMIT_LOAD_EXTENSION+33
# define SQLITE_OMIT_LOAD_EXTENSION 1+34
#endif+35
#ifndef SQLITE_ENABLE_FTS5+36
# define SQLITE_ENABLE_FTS5 1+37
#endif 38
/************** Begin file sqliteInt.h ***************************************/ 39
/* 40
** 2001 September 15