From nobody Sat May 13 06:38:12 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJGD51hFMz4B0nf; Sat, 13 May 2023 06:38:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QJGD50qSyz3Jmd; Sat, 13 May 2023 06:38:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683959893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8KLGWZ2lKkes95xo0lp6YnAWPTnbBik99n9UKeeYL5k=; b=k9xPbHCi9ati6M3zXDoucCILHJ8xLKL4ad/PI4bZLg+L214dG/vrrPSV4lkd0aK3SNyOLd WoWu40OFevHTLq5krLvK6wDIy93cxYMawzFPLSEVeYbuMlKW9sILx/zYvnyiqdJGr68VgU MeXc/hRvtF5rwcLE1ZllbNwJlMZMXLrX0smXzISnyuITS6k+kcBPv21h0OABNpV7JR3Ds4 Zrk0/icrrWHamM6Z/BV9gK94oqgP4GSemEustbl9ajfru7DSDeWsFG/aAUAv38FGDR5KwP MDgZdOWMS55TIit74a0jbg0N1KHDWSh47b9fm5hey8w0Lm6x6OXuR1jZ1hsHsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683959893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8KLGWZ2lKkes95xo0lp6YnAWPTnbBik99n9UKeeYL5k=; b=pWiw3rIyqfIZLfVhYjOztq90Q+yDt2IKMi34S9eN0ExkjneU5mbX9Qb3LPQq7yBBPslnG0 KHKgUfln2fYxWxW5zUEmCgLtQ0Sdx82q5okm5z2W1kzvR2pae+VxSpz3gyk68UXFIB4gn4 ABpsfiQGjVYgBky7oLdEc9KpYWdVYUOFi8b+12VUYfm8XPVN2ZSh+Da2cHaYcSXwDDdofg N2fwQVj8FX9lcOcz71ODukVT82eUsPYQ6YRsT55K4JogPCQMRx5z4LWi1pwg3D7CR7GEMV 0JZOuH1JRDKb+JnDDRIbq1JhbScxKAJAY1mPkjUSWuMps+bO3z2I3j1fKKW07Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683959893; a=rsa-sha256; cv=none; b=bDbQY5sxRbKz6qHJF54V29KSaxIp97to66tyydY6G2TY9GRPRLV1DzGe9SspAykd5aOmr8 VPYrleljqmjEhE6VlOr0ksVPHCCXG9EncBdvwaMKC/9tDKCcNG9k+G2/Na1rJzALctRUTh Zwxxhmk0E+Y3dtkZiIumuUObPk5+/C3/FUvAoD3JJIq5UWZ4rIL+I47iybfmy6sDrMqm9E rWhcAlWGD3QQ8ocRFXMnPsVS643r+jjvnxdrpTZP/dSucIfzF9lvFZWB/vnxaTt30ke8vn sQX25WQIpmj9qST45kKSMWQIN4CASsypdNB22bvrDJIiw7tNnrkCdLNc9H9+VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QJGD46xCKz16XS; Sat, 13 May 2023 06:38:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34D6cChW029781; Sat, 13 May 2023 06:38:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34D6cCg3029780; Sat, 13 May 2023 06:38:12 GMT (envelope-from git) Date: Sat, 13 May 2023 06:38:12 GMT Message-Id: <202305130638.34D6cCg3029780@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: 214f1e0b7578 - main - databases/emacsql-devel: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 214f1e0b757862e4e9081c6f1c06e48ad368a225 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=214f1e0b757862e4e9081c6f1c06e48ad368a225 commit 214f1e0b757862e4e9081c6f1c06e48ad368a225 Author: Yasuhiro Kimura AuthorDate: 2023-05-12 09:44:36 +0000 Commit: Yasuhiro Kimura CommitDate: 2023-05-13 06:34:29 +0000 databases/emacsql-devel: Add new port EmacSQL is a high-level Emacs Lisp front-end for SQLite (primarily), PostgreSQL, MySQL, and potentially other SQL databases. This is development version of EmacSQL. https://github.com/magit/emacsql --- databases/Makefile | 1 + databases/emacsql-devel/Makefile | 51 ++++++++++++++++++++++ databases/emacsql-devel/distinfo | 3 ++ .../emacsql-devel/files/patch-emacsql-sqlite.el | 44 +++++++++++++++++++ .../emacsql-devel/files/patch-sqlite_Makefile | 24 ++++++++++ .../emacsql-devel/files/patch-sqlite_emacsql.c | 11 +++++ databases/emacsql-devel/pkg-descr | 12 +++++ databases/emacsql-devel/pkg-plist | 20 +++++++++ databases/emacsql/Makefile | 2 +- 9 files changed, 167 insertions(+), 1 deletion(-) diff --git a/databases/Makefile b/databases/Makefile index ce41ad199edf..df2e4c765cd0 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -59,6 +59,7 @@ SUBDIR += ejdb SUBDIR += emacs-sqlite3-api SUBDIR += emacsql + SUBDIR += emacsql-devel SUBDIR += erlfdb SUBDIR += evolution-data-server SUBDIR += fastdb diff --git a/databases/emacsql-devel/Makefile b/databases/emacsql-devel/Makefile new file mode 100644 index 000000000000..e27cf43eef3a --- /dev/null +++ b/databases/emacsql-devel/Makefile @@ -0,0 +1,51 @@ +PORTNAME= emacsql +DISTVERSION= 3.1.1-42 +DISTVERSIONSUFFIX= -g6401226 +CATEGORIES= databases elisp +PKGNAMESUFFIX= -devel${EMACS_PKGNAMESUFFIX} + +MAINTAINER= yasu@FreeBSD.org +COMMENT= High-level Emacs Lisp RDBMS front-end (Development Version) +WWW= https://github.com/magit/emacsql + +LICENSE= UNLICENSE +LICENSE_FILE= ${WRKSRC}/UNLICENSE + +BUILD_DEPENDS= emacs-sqlite3-api${EMACS_PKGNAMESUFFIX}>=0.16:databases/emacs-sqlite3-api@${EMACS_FLAVOR} \ + pg.el${EMACS_PKGNAMESUFFIX}>=0.16:databases/pg.el@${EMACS_FLAVOR} +LIB_DEPENDS= libsqlite3.so:databases/sqlite3 +RUN_DEPENDS= emacs-sqlite3-api${EMACS_PKGNAMESUFFIX}>=0.16:databases/emacs-sqlite3-api@${EMACS_FLAVOR} \ + pg.el${EMACS_PKGNAMESUFFIX}>=0.16:databases/pg.el@${EMACS_FLAVOR} + +USES= emacs gmake localbase:ldflags + +USE_GITHUB= yes +GH_ACCOUNT= magit + +MAKE_ENV+= LOAD_PATH="-L ${PREFIX}/${EMACS_SITE_LISPDIR} -L ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}" +MAKE_JOBS_UNSAFE= yes +TEST_TARGET= test + +CONFLICTS_INSTALL= emacsql emacsql-emacs_* + +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-patch: + ${RM} ${WRKSRC}/sqlite/sqlite3.[ch] + ${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/emacsql-sqlite.el + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/bin \ + ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/${PORTNAME} + ${INSTALL_PROGRAM} ${WRKSRC}/sqlite/emacsql-sqlite \ + ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/*.el ${WRKSRC}/*.elc \ + ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/${PORTNAME} + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include diff --git a/databases/emacsql-devel/distinfo b/databases/emacsql-devel/distinfo new file mode 100644 index 000000000000..cf8ac913ecf5 --- /dev/null +++ b/databases/emacsql-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1683885114 +SHA256 (magit-emacsql-3.1.1-42-g6401226_GH0.tar.gz) = a60dfc7620d0448c8dd5b8b5644a83cea22012240b2463f0a0bcb6c88eede87a +SIZE (magit-emacsql-3.1.1-42-g6401226_GH0.tar.gz) = 2398782 diff --git a/databases/emacsql-devel/files/patch-emacsql-sqlite.el b/databases/emacsql-devel/files/patch-emacsql-sqlite.el new file mode 100644 index 000000000000..8ddae08ac1fe --- /dev/null +++ b/databases/emacsql-devel/files/patch-emacsql-sqlite.el @@ -0,0 +1,44 @@ +--- emacsql-sqlite.el.orig 2022-02-18 15:43:25 UTC ++++ emacsql-sqlite.el +@@ -33,16 +33,7 @@ + "sqlite/emacsql-sqlite") + "Relative path to emacsql executable.") + +-(defvar emacsql-sqlite-executable +- (expand-file-name emacsql-sqlite-executable-path +- (if (or (file-writable-p emacsql-sqlite-data-root) +- (file-exists-p (expand-file-name +- emacsql-sqlite-executable-path +- emacsql-sqlite-data-root))) +- emacsql-sqlite-data-root +- (expand-file-name +- (concat "emacsql/" emacsql-version) +- user-emacs-directory))) ++(defvar emacsql-sqlite-executable "%%PREFIX%%/bin/emacsql-sqlite" + "Path to the EmacSQL backend (this is not the sqlite3 shell).") + + (defvar emacsql-sqlite-reserved +@@ -100,6 +91,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) +@@ -163,12 +155,12 @@ If called with non-nil ASYNC the return value is meani + 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")))) ++ (berkeley-unix (list "-lm" "-lsqlite3")) ++ (otherwise (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-devel/files/patch-sqlite_Makefile b/databases/emacsql-devel/files/patch-sqlite_Makefile new file mode 100644 index 000000000000..7408786dead2 --- /dev/null +++ b/databases/emacsql-devel/files/patch-sqlite_Makefile @@ -0,0 +1,24 @@ +--- sqlite/Makefile.orig 2022-10-11 15:22:51 UTC ++++ sqlite/Makefile +@@ -1,8 +1,8 @@ + -include ../.config.mk + + .POSIX: +-LDLIBS = -ldl -lm +-CFLAGS = -O2 -Wall -Wextra -Wno-implicit-fallthrough \ ++LDLIBS = -lsqlite3 ++CFLAGS += \ + -DSQLITE_THREADSAFE=0 \ + -DSQLITE_DEFAULT_FOREIGN_KEYS=1 \ + -DSQLITE_ENABLE_FTS5 \ +@@ -12,8 +12,8 @@ CFLAGS = -O2 -Wall -Wextra -Wno-implicit-fallthrough \ + -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-devel/files/patch-sqlite_emacsql.c b/databases/emacsql-devel/files/patch-sqlite_emacsql.c new file mode 100644 index 000000000000..24590656df22 --- /dev/null +++ b/databases/emacsql-devel/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 + #include + #include +-#include "sqlite3.h" ++#include + + #define TRUE 1 + #define FALSE 0 diff --git a/databases/emacsql-devel/pkg-descr b/databases/emacsql-devel/pkg-descr new file mode 100644 index 000000000000..172b572e6c59 --- /dev/null +++ b/databases/emacsql-devel/pkg-descr @@ -0,0 +1,12 @@ +EmacSQL is a high-level Emacs Lisp front-end for SQLite (primarily), +PostgreSQL, MySQL, and potentially other SQL databases. + +It works by maintaining a inferior process running (a "connection") +for interacting with the back-end database. Connections are +automatically cleaned up if they are garbage collected. All requests +are synchronous. + +Any readable lisp value can be stored as a value in EmacSQL, including +numbers, strings, symbols, lists, vectors, and closures. EmacSQL has +no concept of "TEXT" values; it's all just lisp objects. The lisp +object nil corresponds 1:1 with NULL in the database. diff --git a/databases/emacsql-devel/pkg-plist b/databases/emacsql-devel/pkg-plist new file mode 100644 index 000000000000..034968dd773c --- /dev/null +++ b/databases/emacsql-devel/pkg-plist @@ -0,0 +1,20 @@ +bin/emacsql-sqlite +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-autoloads.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-compiler.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-compiler.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-mysql.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-mysql.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-pg.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-pg.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-psql.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-psql.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite-builtin.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite-builtin.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite-common.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite-common.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite-module.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite-module.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql-sqlite.elc +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql.el +%%EMACS_VERSION_SITE_LISPDIR%%/emacsql/emacsql.elc diff --git a/databases/emacsql/Makefile b/databases/emacsql/Makefile index 8cc8a9a4f741..1ea8caba745d 100644 --- a/databases/emacsql/Makefile +++ b/databases/emacsql/Makefile @@ -27,7 +27,7 @@ MAKE_ENV+= LOAD_PATH="-L ${PREFIX}/${EMACS_SITE_LISPDIR} -L ${PREFIX}/${EMACS_VE MAKE_JOBS_UNSAFE= yes TEST_TARGET= test -CONFLICTS_INSTALL= emacsql emacsql-emacs_* +CONFLICTS_INSTALL= emacsql emacsql-devel* emacsql-emacs_* PORTDOCS= README.md