commit:     9420455644c34b92ac9ec7502ed490f4810a11bc
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 22:33:07 2024 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 22:52:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94204556

app-emacs/emacsql: add 4.1.0

Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 app-emacs/emacsql/Manifest             |  1 +
 app-emacs/emacsql/emacsql-4.1.0.ebuild | 72 ++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/app-emacs/emacsql/Manifest b/app-emacs/emacsql/Manifest
index 5d33a97b9834..c032efaa65c1 100644
--- a/app-emacs/emacsql/Manifest
+++ b/app-emacs/emacsql/Manifest
@@ -1 +1,2 @@
 DIST emacsql-4.0.3.tar.gz 2398435 BLAKE2B 
3c66b922b63a1265660e59cf0319583f98bb6d51347fb6abd76e12d1ff0d9bb92501fb1e35bb4cbe83f8338d6b03e25d3a0536e78998f252ad210d80971e701a
 SHA512 
a8ea07ddae35f993bfd9b19f4d0964ae3128d362e1e377e917a715d5c1dfb0c2dda0fd7ad17664f0e7e70342deeb780f99c5cd66be9b80aff46dd11a91c20984
+DIST emacsql-4.1.0.tar.gz 32308 BLAKE2B 
b5022c9312057949fe243ae696860da26060ccd2df0103fa6298c9613135e0b4bd246eb57c276d33ee39d348230a5648e70f077feb0b97e07c06af5778d5905d
 SHA512 
a43c5dd1bdca451b91a4a0dbf771b138cb55ee69a950e37507d109b3dbe5522a01ba57e2ac6ec8678dbb21c002fb72bf69068f014883bac660d1a824a4eecafc

diff --git a/app-emacs/emacsql/emacsql-4.1.0.ebuild 
b/app-emacs/emacsql/emacsql-4.1.0.ebuild
new file mode 100644
index 000000000000..dd61788c8ae3
--- /dev/null
+++ b/app-emacs/emacsql/emacsql-4.1.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NEED_EMACS=26.1
+
+inherit elisp
+
+DESCRIPTION="A high-level Emacs Lisp RDBMS front-end"
+HOMEPAGE="https://github.com/magit/emacsql";
+
+if [[ "${PV}" == *9999* ]]; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/magit/${PN}.git";
+else
+       SRC_URI="
+               https://github.com/magit/${PN}/archive/refs/tags/v${PV}.tar.gz
+                       -> ${P}.tar.gz
+       "
+
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="Unlicense"
+SLOT="0"
+# TODO(arsen): postgres-pg using app-emacs/pg (unpackaged as of yet)
+IUSE="postgres mysql"
+
+RDEPEND="
+       ${DEPEND}
+       postgres? (
+               dev-db/postgresql
+       )
+       mysql? (
+               virtual/mysql
+       )
+"
+BDEPEND="
+       virtual/pkgconfig
+"
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+       default
+
+       # Not packaged.
+       rm emacsql-pg.el || die
+
+       local -A backends=(
+               [postgres]=psql
+               [mysql]=mysql
+       )
+
+       for useflag in "${!backends[@]}"; do
+               if ! use "${useflag}"; then
+                       rm emacsql-"${backends[${useflag}]}".el || die
+               fi
+       done
+}
+
+pkg_postinst() {
+       [[ ${REPLACING_VERSIONS} ]] || return;
+       elog "${P} removes the SQLite connector in favor of sqlite-builtin"
+       elog "or sqlite-module.  If you use org-roam and you were using"
+       elog "    (org-roam-database-connector 'sqlite)"
+       elog "... consider using app-editors/emacs[sqlite] and "
+       elog "    (org-roam-database-connector 'sqlite-builtin)"
+       elog "... instead"
+}

Reply via email to