1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 2023-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
|
USE_RUBY="ruby31 ruby32 ruby33 ruby34"
|
6 |
5 |
|
7 |
|
RUBY_FAKEGEM_EXTRADOC="readme.md"
|
8 |
|
RUBY_FAKEGEM_GEMSPEC="http-accept.gemspec"
|
9 |
|
RUBY_FAKEGEM_RECIPE_TEST="sus"
|
|
6 |
NEED_EMACS="29.1"
|
10 |
7 |
|
11 |
|
inherit ruby-fakegem
|
|
8 |
inherit elisp
|
12 |
9 |
|
13 |
|
DESCRIPTION="Parse Accept and Accept-Language HTTP headers"
|
14 |
|
HOMEPAGE="https://github.com/socketry/http-accept"
|
15 |
|
SRC_URI="https://github.com/socketry/http-accept/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
10 |
DESCRIPTION="Debug Adapter Protocol for Emacs"
|
|
11 |
HOMEPAGE="https://github.com/svaante/dape"
|
16 |
12 |
|
17 |
|
LICENSE="MIT"
|
18 |
|
SLOT="$(ver_cut 1)"
|
19 |
|
KEYWORDS="amd64 ~arm64 ~ppc ~riscv ~x86"
|
|
13 |
if [[ "${PV}" == 9999 ]]; then
|
|
14 |
inherit git-r3
|
|
15 |
|
|
16 |
EGIT_REPO_URI="https://github.com/svaante/${PN}.git"
|
|
17 |
else
|
|
18 |
SRC_URI="https://github.com/svaante/${PN}/archive/refs/tags/${PV}.tar.gz
|
|
19 |
-> ${P}.tar.gz"
|
|
20 |
|
|
21 |
KEYWORDS="~amd64"
|
|
22 |
fi
|
|
23 |
|
|
24 |
LICENSE="GPL-3+"
|
|
25 |
SLOT="0"
|
|
26 |
|
|
27 |
RDEPEND="
|
|
28 |
|| (
|
|
29 |
app-emacs/jsonrpc
|
|
30 |
>=app-editors/emacs-30:*
|
|
31 |
)
|
|
32 |
"
|
|
33 |
DEPEND="
|
|
34 |
${RDEPEND}
|
|
35 |
"
|
|
36 |
|
|
37 |
# Requires debugpy, but we do not package debugpy right now, as well as
|
|
38 |
# js-debug. Most tests use only the former.
|
|
39 |
RESTRICT="test"
|
|
40 |
|
|
41 |
# Remove tests.el to skip compilation and failing tests (see above comment).
|
|
42 |
ELISP_REMOVE="${PN}-tests.el"
|
|
43 |
|
|
44 |
DOCS=( README.org CHANGELOG.org LICENSE )
|
|
45 |
SITEFILE="50${PN}-gentoo.el"
|
|
46 |
|
|
47 |
# elisp-enable-tests ert . -l dape-tests.el
|
|
48 |
|
|
49 |
pkg_setup() {
|
|
50 |
elisp_pkg_setup
|
|
51 |
local has_jsonrpc="$(${EMACS} ${EMACSFLAGS} \
|
|
52 |
--eval "(princ (>= emacs-major-version 30))")"
|
|
53 |
if has_version app-emacs/jsonrpc || [[ ${has_jsonrpc} = t ]]; then
|
|
54 |
:
|
|
55 |
else
|
|
56 |
die "Emacs does not have jsonrpc.el 1.0.25 or later, nor was app-emacs/jsonrpc installed"
|
|
57 |
fi
|
|
58 |
}
|
20 |
59 |
|
21 |
|
all_ruby_prepare() {
|
22 |
|
rm -f config/sus.rb || die
|
|
60 |
src_compile() {
|
|
61 |
elisp_src_compile
|
|
62 |
elisp-make-autoload-file
|
|
63 |
}
|
23 |
64 |
|
24 |
|
sed -e 's:_relative ": "./:' \
|
25 |
|
-e 's/git ls-files -z/find * -print0/' \
|
26 |
|
-i ${RUBY_FAKEGEM_GEMSPEC} || die
|
|
65 |
src_install() {
|
|
66 |
# Need to ignore dape-tests.el.
|
|
67 |
einstalldocs
|
|
68 |
elisp-install "${PN}" dape.el dape.elc dape-autoloads.el
|
|
69 |
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
27 |
70 |
}
|