summaryrefslogtreecommitdiff
path: root/app-emacs/emacsql/emacsql-4.3.6.ebuild
blob: 6ded0db262732bc5db7a1ebb86641d72c2d43de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 2025-2026 BaldEagleOS 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"

SRC_URI="https://github.com/magit/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

KEYWORDS="~amd64"
LICENSE="Unlicense"
SLOT="0"
IUSE="postgres mariadb"

RDEPEND="
	${DEPEND}
	postgres? (
		dev-db/postgresql
	)
	mariadb? (
		dev-db/mariadb
	)
"
BDEPEND="
	virtual/pkgconfig
"

SITEFILE="50${PN}-gentoo.el"

src_prepare() {
	default

	# Not packaged.
	rm emacsql-pg.el || die

	local -A backends=(
		[postgres]=psql
		[mariadb]=mysql
	)

	for useflag in "${!backends[@]}"; do
		if ! use "${useflag}"; then
			rm emacsql-"${backends[${useflag}]}".el || die
		fi
	done
}