diff options
Diffstat (limited to 'databases/emacsql/files')
-rw-r--r-- | databases/emacsql/files/patch-Makefile | 12 | ||||
-rw-r--r-- | databases/emacsql/files/patch-emacsql-sqlite.el | 38 | ||||
-rw-r--r-- | databases/emacsql/files/patch-sqlite_Makefile | 22 | ||||
-rw-r--r-- | databases/emacsql/files/patch-sqlite_emacsql.c | 11 |
4 files changed, 83 insertions, 0 deletions
diff --git a/databases/emacsql/files/patch-Makefile b/databases/emacsql/files/patch-Makefile new file mode 100644 index 000000000000..f3ffc1349e85 --- /dev/null +++ b/databases/emacsql/files/patch-Makefile @@ -0,0 +1,12 @@ +--- Makefile.orig 2021-05-17 18:22:23 UTC ++++ Makefile +@@ -7,8 +7,7 @@ + .POSIX: + .SUFFIXES: .el .elc + EMACS = emacs +-LDFLAGS = -L ../pg +-BATCH = $(EMACS) -batch -Q -L . -L tests $(LDFLAGS) ++BATCH = $(EMACS) -batch -Q -L . -L tests $(LOAD_PATH) + + EL = emacsql-compiler.el \ + emacsql.el \ diff --git a/databases/emacsql/files/patch-emacsql-sqlite.el b/databases/emacsql/files/patch-emacsql-sqlite.el new file mode 100644 index 000000000000..9c5d57f9e324 --- /dev/null +++ b/databases/emacsql/files/patch-emacsql-sqlite.el @@ -0,0 +1,38 @@ +--- emacsql-sqlite.el.orig 2018-10-31 17:50:07 UTC ++++ emacsql-sqlite.el +@@ -27,11 +27,7 @@ + (file-name-directory (or load-file-name buffer-file-name)) + "Directory where EmacSQL is installed.") + +-(defvar emacsql-sqlite-executable +- (expand-file-name (if (memq system-type '(windows-nt cygwin ms-dos)) +- "sqlite/emacsql-sqlite.exe" +- "sqlite/emacsql-sqlite") +- emacsql-sqlite-data-root) ++(defvar emacsql-sqlite-executable "%%PREFIX%%/bin/emacsql-sqlite" + "Path to the EmacSQL backend (this is not the sqlite3 shell).") + + (defvar emacsql-sqlite-reserved +@@ -82,6 +78,7 @@ http://www.sqlite.org/lang_keywords.html") + (emacsql-wait connection) + (emacsql connection [:pragma (= busy-timeout $s1)] + (/ (* emacsql-global-timeout 1000) 2)) ++ (emacsql connection [:pragma (= foreign_keys 1)]) + (emacsql-register connection))) + + (cl-defun emacsql-sqlite (file &key debug) +@@ -143,11 +140,11 @@ If called with non-nil ASYNC the return value is meani + (let* ((cc (executable-find "cc")) + (src (expand-file-name "sqlite" emacsql-sqlite-data-root)) + (files (mapcar (lambda (f) (expand-file-name f src)) +- '("sqlite3.c" "emacsql.c"))) ++ '("emacsql.c"))) + (cflags (list (format "-I%s" src) (format "-O%d" (or o-level 2)))) + (ldlibs (if (memq system-type '(windows-nt berkeley-unix)) +- (list "-lm") +- (list "-lm" "-ldl"))) ++ (list "-lm" "-lsqlite3") ++ (list "-lm" "-ldl" "-lsqlite3"))) + (options (emacsql-sqlite-compile-switches)) + (output (list "-o" emacsql-sqlite-executable)) + (arguments (nconc cflags options files ldlibs output))) diff --git a/databases/emacsql/files/patch-sqlite_Makefile b/databases/emacsql/files/patch-sqlite_Makefile new file mode 100644 index 000000000000..463df817ee70 --- /dev/null +++ b/databases/emacsql/files/patch-sqlite_Makefile @@ -0,0 +1,22 @@ +--- sqlite/Makefile.orig 2020-07-14 00:28:59 UTC ++++ sqlite/Makefile +@@ -1,6 +1,6 @@ + .POSIX: +-LDLIBS = -ldl -lm +-CFLAGS = -O2 -Wall -Wextra \ ++LDLIBS = -lsqlite3 ++CFLAGS += \ + -DSQLITE_THREADSAFE=0 \ + -DSQLITE_DEFAULT_FOREIGN_KEYS=1 \ + -DSQLITE_ENABLE_FTS5 \ +@@ -10,8 +10,8 @@ CFLAGS = -O2 -Wall -Wextra \ + -DSQLITE_ENABLE_JSON1 \ + -DSQLITE_SOUNDEX + +-emacsql-sqlite: emacsql.c sqlite3.c +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ emacsql.c sqlite3.c $(LDLIBS) ++emacsql-sqlite: emacsql.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ emacsql.c $(LDLIBS) + + clean: + rm -f emacsql-sqlite diff --git a/databases/emacsql/files/patch-sqlite_emacsql.c b/databases/emacsql/files/patch-sqlite_emacsql.c new file mode 100644 index 000000000000..24590656df22 --- /dev/null +++ b/databases/emacsql/files/patch-sqlite_emacsql.c @@ -0,0 +1,11 @@ +--- sqlite/emacsql.c.orig 2020-07-14 00:28:59 UTC ++++ sqlite/emacsql.c +@@ -1,7 +1,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include "sqlite3.h" ++#include <sqlite3.h> + + #define TRUE 1 + #define FALSE 0 |