mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-11 13:16:45 +02:00
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
Patch-Source: https://sources.debian.org/data/main/e/emacsql/3.1.1%2Bgit20230417.6401226%2Bds-2/debian/patches/Compile-against-system-sqlite3-and-don-t-assume-foreign-k.patch
|
|
--
|
|
From: Christopher Wellons <wellons@nullprogram.com>
|
|
Date: Fri, 26 Jun 2020 16:55:57 -0700
|
|
Subject: Compile against system sqlite3 and don't assume foreign keys enabled
|
|
|
|
https://github.com/skeeto/emacsql/issues/63#issuecomment-650455369
|
|
---
|
|
emacsql-sqlite.el | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
|
|
index fd222ff..7b39e04 100644
|
|
--- a/emacsql-sqlite.el
|
|
+++ b/emacsql-sqlite.el
|
|
@@ -64,6 +64,7 @@ used.")
|
|
(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)
|
|
@@ -118,12 +119,12 @@ If called with non-nil ERROR, signal an error on failure."
|
|
if path return it))
|
|
(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 (cl-case system-type
|
|
(windows-nt (list))
|
|
(berkeley-unix (list "-lm"))
|
|
- (otherwise (list "-lm" "-ldl"))))
|
|
+ (otherwise (list "-lm" "-ldl" "-lsqlite3"))))
|
|
(options (emacsql-sqlite-compile-switches))
|
|
(output (list "-o" emacsql-sqlite-executable))
|
|
(arguments (nconc cflags options files ldlibs output)))
|