[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sqlite3 5218e49511 41/62: Merge pull request #2 from tarsi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sqlite3 5218e49511 41/62: Merge pull request #2 from tarsiiformes/melpa |
Date: |
Tue, 14 Mar 2023 11:01:47 -0400 (EDT) |
branch: elpa/sqlite3
commit 5218e4951129200f7e3653ead92e015f2b3d22d0
Merge: 9a2dbb9dc2 800a4fc494
Author: Peking Duck <pekingduck@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #2 from tarsiiformes/melpa
Add a wrapper library so that this package can be distributed on Melpa
---
Makefile | 10 +++++-----
sqlite3.el | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index b9d329ee3a..6dd70593f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
-CC = gcc
-INC=-I.
-LIB=-lsqlite3
+CC ?= gcc
+INC ?= -I.
+LIB ?= -lsqlite3
ifeq ($(HOMEBREW), 1)
INC=-I/usr/local/opt/sqlite3/include
LIB=-L/usr/local/opt/sqlite3/lib -lsqlite3
endif
-CFLAGS=-g3 -Wall -std=c99 $(INC)
+CFLAGS ?= -g3 -Wall -std=c99 $(INC)
-EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_14
+EMACS ?= /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_14
# Melpa package
PKG=sqlite3-api
diff --git a/sqlite3.el b/sqlite3.el
new file mode 100644
index 0000000000..ee494c1dcb
--- /dev/null
+++ b/sqlite3.el
@@ -0,0 +1,57 @@
+;;; sqlite3.el --- Direct access to the core SQLite3 API -*- lexical-binding:
t -*-
+
+;; Copyright (C) 2018-2020 Y. N. Lo
+
+;; Author: Y. N. Lo <gordonynlo@yahoo.com>
+;; Homepage: https://github.com/pekingduck/emacs-sqlite3-api
+;; Keywords: comm, data, sql
+
+;; Package-Requires: ((emacs "25.1"))
+
+;; This file is not part of GNU Emacs.
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; For a full copy of the GNU General Public License
+;; see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; `sqlite3-api' is a dynamic module for GNU Emacs 25+ that provides
+;; direct access to the core SQLite3 C API from Emacs Lisp.
+
+;;; Code:
+
+(require 'cl-lib)
+
+(defvar sqlite3-api-build-command '("make" "all"))
+
+(cl-eval-when (load eval)
+ (unless (require 'sqlite3-api nil t)
+ (if (yes-or-no-p "sqlite3-api module must be build. Do so now? ")
+ (let ((default-directory (file-name-directory (or load-file-name
+ buffer-file-name))))
+ (with-temp-buffer
+ (unless (zerop (apply #'call-process
+ (car sqlite3-api-build-command) nil t t
+ (cdr sqlite3-api-build-command)))
+ (error "Failed to compile module using: %s: %s"
+ (mapconcat #'identity sqlite3-api-build-command " ")
+ (buffer-substring-no-properties
+ (point-min)
+ (point-max))))))
+ (user-error "Abort"))))
+
+(provide 'sqlite3)
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
+;;; sqlite3.el ends here
- [nongnu] elpa/sqlite3 d03bda0360 47/62: replaced == with eq in type predicates, (continued)
- [nongnu] elpa/sqlite3 d03bda0360 47/62: replaced == with eq in type predicates, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 75d89d64e6 49/62: Typo?, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 1caff0e721 52/62: Merge branch 'master' of github.com:pekingduck/emacs-sqlite3-api, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 68eda59d5f 55/62: Bumped version to 0.16, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 91859c8766 56/62: Code cleanup, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 2f6095201b 57/62: Removed #if 0, added tests/Makefile, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 bcb3b0163b 58/62: Fix build with Cygwin and MSYS2, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 108521be02 59/62: Merge pull request #5 from yasuhirokimura/fix_build_with_cygwin_and_msys2, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 ad6dc366b7 60/62: Added contributors, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 50b814063b 62/62: Merge pull request #6 from emacsmirror/noninteractive, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 5218e49511 41/62: Merge pull request #2 from tarsiiformes/melpa,
ELPA Syncer <=
- [nongnu] elpa/sqlite3 94108288e4 08/62: fixed README, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 a4832b01c3 14/62: improved commentary, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 89512b336a 23/62: removed package-install.el & install.el, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0d4ca93830 33/62: Removed gcc warnings, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 800a4fc494 40/62: Add sqlite3.el to make installable from Melpa, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 fd4188756e 45/62: Fixed inlined src blocks, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 40e3c9b6a8 61/62: Compile without prompting in non-interactive session, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0cb2e25155 22/62: doc updated, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 84bd83a7fa 42/62: Removed unused codes from consts.c, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 95abc25cc6 48/62: package name: sqlite3-api to sqlite3, ELPA Syncer, 2023/03/14