Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emacs/treemacs/, app-emacs/treemacs/files/
Date: Tue, 26 Apr 2022 01:33:05
Message-Id: 1650936701.2c2a902ccb64bcbc53303c5522d79c5d0cfb79d2.xgqt@gentoo
1 commit: 2c2a902ccb64bcbc53303c5522d79c5d0cfb79d2
2 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 00:09:07 2022 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 01:31:41 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c2a902c
7
8 app-emacs/treemacs: new package; add version 2.9.5
9
10 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
11
12 app-emacs/treemacs/Manifest | 1 +
13 app-emacs/treemacs/files/50treemacs-gentoo.el | 1 +
14 .../files/treemacs-icons-icon-directory.patch | 12 +++++
15 app-emacs/treemacs/metadata.xml | 13 +++++
16 app-emacs/treemacs/treemacs-2.9.5.ebuild | 61 ++++++++++++++++++++++
17 5 files changed, 88 insertions(+)
18
19 diff --git a/app-emacs/treemacs/Manifest b/app-emacs/treemacs/Manifest
20 new file mode 100644
21 index 000000000000..6ce00e3b55f9
22 --- /dev/null
23 +++ b/app-emacs/treemacs/Manifest
24 @@ -0,0 +1 @@
25 +DIST treemacs-2.9.5.tar.gz 4134227 BLAKE2B 1fbdb278e9524fdb14cbc7699bc787ab694b00d37a91ec3e91e106079bc02f6b8b39207608873d45c70fd6355a22553bf1a0636a948b79df77adfe0b4a3f799f SHA512 adc026d7ad459418fae531c5a1a7df7f9308e63dec82240c1c5e278eb00fdf8d6dff1ee2112ea73d5a05c4266efe24623bb84f8819a6f07fbb4fde6e644ca9ad
26
27 diff --git a/app-emacs/treemacs/files/50treemacs-gentoo.el b/app-emacs/treemacs/files/50treemacs-gentoo.el
28 new file mode 100644
29 index 000000000000..431f7e90ae73
30 --- /dev/null
31 +++ b/app-emacs/treemacs/files/50treemacs-gentoo.el
32 @@ -0,0 +1 @@
33 +(add-to-list 'load-path "@SITELISP@")
34
35 diff --git a/app-emacs/treemacs/files/treemacs-icons-icon-directory.patch b/app-emacs/treemacs/files/treemacs-icons-icon-directory.patch
36 new file mode 100644
37 index 000000000000..d1ac5022064a
38 --- /dev/null
39 +++ b/app-emacs/treemacs/files/treemacs-icons-icon-directory.patch
40 @@ -0,0 +1,12 @@
41 +index 2cd9baf..e6ea521 100644
42 +--- a/src/elisp/treemacs-icons.el
43 ++++ b/src/elisp/treemacs-icons.el
44 +@@ -273,7 +273,7 @@ Necessary since root icons are not rectangular."
45 + (ht-set! tui-icons it tui-icon))))
46 +
47 + (treemacs-create-theme "Default"
48 +- :icon-directory (treemacs-join-path treemacs-dir "icons/default")
49 ++ :icon-directory "@SITEETC@/icons/default"
50 + :config
51 + (progn
52 + ;; directory and other icons
53
54 diff --git a/app-emacs/treemacs/metadata.xml b/app-emacs/treemacs/metadata.xml
55 new file mode 100644
56 index 000000000000..2b59c18813b9
57 --- /dev/null
58 +++ b/app-emacs/treemacs/metadata.xml
59 @@ -0,0 +1,13 @@
60 +<?xml version="1.0" encoding="UTF-8"?>
61 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
62 +
63 +<pkgmetadata>
64 + <maintainer type="project">
65 + <email>gnu-emacs@g.o</email>
66 + <name>Gentoo GNU Emacs project</name>
67 + </maintainer>
68 + <upstream>
69 + <bugs-to>https://github.com/Alexander-Miller/treemacs/issues/</bugs-to>
70 + <remote-id type="github">Alexander-Miller/treemacs</remote-id>
71 + </upstream>
72 +</pkgmetadata>
73
74 diff --git a/app-emacs/treemacs/treemacs-2.9.5.ebuild b/app-emacs/treemacs/treemacs-2.9.5.ebuild
75 new file mode 100644
76 index 000000000000..ea3b8ab8544a
77 --- /dev/null
78 +++ b/app-emacs/treemacs/treemacs-2.9.5.ebuild
79 @@ -0,0 +1,61 @@
80 +# Copyright 1999-2022 Gentoo Authors
81 +# Distributed under the terms of the GNU General Public License v2
82 +
83 +EAPI=8
84 +
85 +NEED_EMACS=26.1
86 +
87 +inherit elisp
88 +
89 +DESCRIPTION="Tree style project file explorer"
90 +HOMEPAGE="https://github.com/Alexander-Miller/treemacs/"
91 +SRC_URI="https://github.com/Alexander-Miller/${PN}/archive/${PV}.tar.gz
92 + -> ${P}.tar.gz"
93 +
94 +LICENSE="GPL-3+"
95 +KEYWORDS="~amd64"
96 +SLOT="0"
97 +IUSE="test"
98 +RESTRICT="!test? ( test )"
99 +
100 +RDEPEND="
101 + app-emacs/ace-window
102 + app-emacs/cfrs
103 + app-emacs/dash
104 + app-emacs/ht
105 + app-emacs/hydra
106 + app-emacs/pfuture
107 + app-emacs/s
108 +"
109 +BDEPEND="
110 + ${RDEPEND}
111 + test? ( app-emacs/buttercup )
112 +"
113 +
114 +DOCS=( Changelog.org Extensions.org README.org screenshots )
115 +PATCHES=( "${FILESDIR}"/${PN}-icons-icon-directory.patch )
116 +
117 +BYTECOMPFLAGS="-L . -L src/elisp"
118 +SITEFILE="50${PN}-gentoo.el"
119 +
120 +src_prepare() {
121 + elisp_src_prepare
122 +
123 + sed "s|@SITEETC@|${SITEETC}/${PN}|" -i src/elisp/${PN}-icons.el || die
124 +}
125 +
126 +src_compile() {
127 + elisp-compile src/elisp/*.el
128 +}
129 +
130 +src_test() {
131 + buttercup ${BYTECOMPFLAGS} -L test --traceback full || die
132 +}
133 +
134 +src_install() {
135 + elisp-install ${PN} src/elisp/*.el{,c}
136 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
137 +
138 + insinto ${SITEETC}/${PN}
139 + doins -r icons
140 +}