Gentoo Archives: gentoo-commits

From: Michael Yang <michaelzcyang@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-misc/clifm/
Date: Fri, 29 Jul 2022 19:19:29
Message-Id: 1659122248.051516132e9e2d78d4aa2694d77de1fdd430ee4b.michaelzcyang@gentoo
1 commit: 051516132e9e2d78d4aa2694d77de1fdd430ee4b
2 Author: FluffyJay1 <michaelzcyang <AT> gmail <DOT> com>
3 AuthorDate: Fri Jul 29 19:17:28 2022 +0000
4 Commit: Michael Yang <michaelzcyang <AT> gmail <DOT> com>
5 CommitDate: Fri Jul 29 19:17:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=05151613
7
8 app-misc/clifm: new package, add 1.6, 9999
9
10 Signed-off-by: FluffyJay1 <michaelzcyang <AT> gmail.com>
11
12 app-misc/clifm/Manifest | 1 +
13 app-misc/clifm/clifm-1.6.ebuild | 87 ++++++++++++++++++++++++++++++++++++++++
14 app-misc/clifm/clifm-9999.ebuild | 87 ++++++++++++++++++++++++++++++++++++++++
15 app-misc/clifm/metadata.xml | 48 ++++++++++++++++++++++
16 4 files changed, 223 insertions(+)
17
18 diff --git a/app-misc/clifm/Manifest b/app-misc/clifm/Manifest
19 new file mode 100644
20 index 000000000..a7bb68a4e
21 --- /dev/null
22 +++ b/app-misc/clifm/Manifest
23 @@ -0,0 +1 @@
24 +DIST clifm-1.6.tar.gz 1268633 BLAKE2B de36f0d3bc1c6584471d313f346a9db77f659b4fde41775e45c78066db12aff8bf33a58b3c5d0f9cd43800cf823f0508c2abb5c88ff50a28147aec5c7e7178df SHA512 a8f6b73070779d0d49b41109bee1b418cb6eb4fb1ac8e684cf859e1137336df2655ddfb5107b50674a5380364f572fe47cc72f58c25c4ff6439593b411a5f69e
25
26 diff --git a/app-misc/clifm/clifm-1.6.ebuild b/app-misc/clifm/clifm-1.6.ebuild
27 new file mode 100644
28 index 000000000..fbffa78e3
29 --- /dev/null
30 +++ b/app-misc/clifm/clifm-1.6.ebuild
31 @@ -0,0 +1,87 @@
32 +# Copyright 2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +DESCRIPTION="The command line file manager"
38 +HOMEPAGE="https://github.com/leo-arch/clifm"
39 +
40 +inherit flag-o-matic optfeature xdg
41 +
42 +if [[ ${PV} == "9999" ]]; then
43 + EGIT_REPO_URI="https://github.com/leo-arch/clifm.git"
44 + inherit git-r3
45 +else
46 + SRC_URI="mirror://sourceforge/${PN}/v${PV}.tar.gz -> ${P}.tar.gz"
47 + # also on github but seems like a worse alternative?
48 + # SRC_URI="https://github.com/leo-arch/clifm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
49 + KEYWORDS="~amd64"
50 +fi
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +IUSE="+archives +bleach emoji-icons +highlight icons-in-terminal +lira
55 + nerdfonts +suggestions +tags +trash"
56 +
57 +DEPEND="
58 + sys-libs/libcap
59 + sys-libs/readline
60 + sys-apps/acl
61 + sys-apps/file
62 +"
63 +RDEPEND="${DEPEND}"
64 +BDEPEND=""
65 +
66 +src_compile() {
67 + use archives || append-cflags "-D_NO_ARCHIVING"
68 + use bleach || append-cflags "-D_NO_BLEACH"
69 +
70 + # emoji-icons > nerdfonts > icons-in-terminal
71 + if ! use emoji-icons; then # support for emoji-icons is default
72 + if use nerdfonts; then
73 + append-cflags "-D_NERD"
74 + elif use icons-in-terminal; then
75 + append-cflags "-D_ICONS_IN_TERMINAL"
76 + else
77 + append-cflags "-D_NO_ICONS"
78 + fi
79 + fi
80 +
81 + use highlight || append-cflags "-D_NO_HIGHLIGHT"
82 + use lira || append-cflags "-D_NO_LIRA"
83 + use suggestions || append-cflags "-D_NO_SUGGESTIONS"
84 + use tags || append-cflags "-D_NO_TAGS"
85 + use trash || append-cflags "-D_NO_TRASH"
86 + # there is no reason to use -D_NO_MAGIC since we already depend on sys-apps/file
87 +
88 + # basically free faster qsort implementation
89 + append-cflags "-D_TOURBIN_QSORT"
90 +
91 + # makefile defaults to /usr/local
92 + emake PREFIX="/usr" || die "make failed"
93 +}
94 +
95 +src_install() {
96 + docompress -x /usr/share/man # makefile compresses man page
97 + # makefile defaults to /usr/local, and manpages to /usr/man
98 + emake DESTDIR="${D}" PREFIX="/usr" MANDIR="/usr/share/man" install || die "install failed"
99 + einstalldocs
100 +}
101 +
102 +pkg_postinst() {
103 + optfeature_header "Install additional optional functionality:"
104 + optfeature "fzf tab completion and more" app-shells/fzf
105 + optfeature "mounting/unmounting support" sys-fs/udisks sys-apps/udevil
106 + optfeature_header "Install optional archiving support:"
107 + optfeature "zstd operations" app-arch/zstd
108 + optfeature "archive extraction/unpacking" app-arch/atool
109 + optfeature "mounting archives" sys-fs/archivemount
110 + optfeature "extracting .iso files" app-arch/p7zip
111 + optfeature "creating .iso files" app-cdr/cdrtools
112 + if use emoji-icons; then
113 + use nerdfonts && ewarn "Warning: Use flag 'nerdfonts' overridden by 'emoji-icons'"
114 + use icons-in-terminal && ewarn "Warning: Use flag 'icons-in-terminal' overridden by 'emoji-icons'"
115 + elif use nerdfonts; then
116 + use icons-in-terminal && ewarn "Warning: Use flag 'icons-in-terminal' overridden by 'nerdfonts'"
117 + fi
118 +}
119
120 diff --git a/app-misc/clifm/clifm-9999.ebuild b/app-misc/clifm/clifm-9999.ebuild
121 new file mode 100644
122 index 000000000..fbffa78e3
123 --- /dev/null
124 +++ b/app-misc/clifm/clifm-9999.ebuild
125 @@ -0,0 +1,87 @@
126 +# Copyright 2022 Gentoo Authors
127 +# Distributed under the terms of the GNU General Public License v2
128 +
129 +EAPI=8
130 +
131 +DESCRIPTION="The command line file manager"
132 +HOMEPAGE="https://github.com/leo-arch/clifm"
133 +
134 +inherit flag-o-matic optfeature xdg
135 +
136 +if [[ ${PV} == "9999" ]]; then
137 + EGIT_REPO_URI="https://github.com/leo-arch/clifm.git"
138 + inherit git-r3
139 +else
140 + SRC_URI="mirror://sourceforge/${PN}/v${PV}.tar.gz -> ${P}.tar.gz"
141 + # also on github but seems like a worse alternative?
142 + # SRC_URI="https://github.com/leo-arch/clifm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
143 + KEYWORDS="~amd64"
144 +fi
145 +
146 +LICENSE="GPL-2"
147 +SLOT="0"
148 +IUSE="+archives +bleach emoji-icons +highlight icons-in-terminal +lira
149 + nerdfonts +suggestions +tags +trash"
150 +
151 +DEPEND="
152 + sys-libs/libcap
153 + sys-libs/readline
154 + sys-apps/acl
155 + sys-apps/file
156 +"
157 +RDEPEND="${DEPEND}"
158 +BDEPEND=""
159 +
160 +src_compile() {
161 + use archives || append-cflags "-D_NO_ARCHIVING"
162 + use bleach || append-cflags "-D_NO_BLEACH"
163 +
164 + # emoji-icons > nerdfonts > icons-in-terminal
165 + if ! use emoji-icons; then # support for emoji-icons is default
166 + if use nerdfonts; then
167 + append-cflags "-D_NERD"
168 + elif use icons-in-terminal; then
169 + append-cflags "-D_ICONS_IN_TERMINAL"
170 + else
171 + append-cflags "-D_NO_ICONS"
172 + fi
173 + fi
174 +
175 + use highlight || append-cflags "-D_NO_HIGHLIGHT"
176 + use lira || append-cflags "-D_NO_LIRA"
177 + use suggestions || append-cflags "-D_NO_SUGGESTIONS"
178 + use tags || append-cflags "-D_NO_TAGS"
179 + use trash || append-cflags "-D_NO_TRASH"
180 + # there is no reason to use -D_NO_MAGIC since we already depend on sys-apps/file
181 +
182 + # basically free faster qsort implementation
183 + append-cflags "-D_TOURBIN_QSORT"
184 +
185 + # makefile defaults to /usr/local
186 + emake PREFIX="/usr" || die "make failed"
187 +}
188 +
189 +src_install() {
190 + docompress -x /usr/share/man # makefile compresses man page
191 + # makefile defaults to /usr/local, and manpages to /usr/man
192 + emake DESTDIR="${D}" PREFIX="/usr" MANDIR="/usr/share/man" install || die "install failed"
193 + einstalldocs
194 +}
195 +
196 +pkg_postinst() {
197 + optfeature_header "Install additional optional functionality:"
198 + optfeature "fzf tab completion and more" app-shells/fzf
199 + optfeature "mounting/unmounting support" sys-fs/udisks sys-apps/udevil
200 + optfeature_header "Install optional archiving support:"
201 + optfeature "zstd operations" app-arch/zstd
202 + optfeature "archive extraction/unpacking" app-arch/atool
203 + optfeature "mounting archives" sys-fs/archivemount
204 + optfeature "extracting .iso files" app-arch/p7zip
205 + optfeature "creating .iso files" app-cdr/cdrtools
206 + if use emoji-icons; then
207 + use nerdfonts && ewarn "Warning: Use flag 'nerdfonts' overridden by 'emoji-icons'"
208 + use icons-in-terminal && ewarn "Warning: Use flag 'icons-in-terminal' overridden by 'emoji-icons'"
209 + elif use nerdfonts; then
210 + use icons-in-terminal && ewarn "Warning: Use flag 'icons-in-terminal' overridden by 'nerdfonts'"
211 + fi
212 +}
213
214 diff --git a/app-misc/clifm/metadata.xml b/app-misc/clifm/metadata.xml
215 new file mode 100644
216 index 000000000..3f64b675d
217 --- /dev/null
218 +++ b/app-misc/clifm/metadata.xml
219 @@ -0,0 +1,48 @@
220 +<?xml version="1.0" encoding="UTF-8"?>
221 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
222 +<pkgmetadata>
223 + <longdescription>
224 + The command line file manager.
225 + More information about the use flags can be found here:
226 + https://github.com/leo-arch/clifm/blob/master/src/README.md#compiling-features-inout
227 + </longdescription>
228 + <maintainer type="person">
229 + <email>michaelzcyang@×××××.com</email>
230 + <name>FluffyJay1</name>
231 + </maintainer>
232 + <use>
233 + <flag name="archives">
234 + Archive manipulation support
235 + </flag>
236 + <flag name="bleach">
237 + Support for Bleach, the built-in file names cleaner
238 + </flag>
239 + <flag name="emoji-icons">
240 + Enable icons and set them to use the noto-emoji font (see <pkg>media-fonts/noto-emoji</pkg>)
241 + </flag>
242 + <flag name="highlight">
243 + Syntax highlighting support
244 + </flag>
245 + <flag name="icons-in-terminal">
246 + Enable icons and set them to use icons-in-terminal (see https://github.com/sebastiencs/icons-in-terminal)
247 + </flag>
248 + <flag name="lira">
249 + Add Lira as the default built-in resource opener
250 + </flag>
251 + <flag name="nerdfonts">
252 + Enable icons and set them to use NerdFonts
253 + </flag>
254 + <flag name="suggestions">
255 + Autosuggestion support
256 + </flag>
257 + <flag name="tags">
258 + Built-in file tagging system support
259 + </flag>
260 + <flag name="trash">
261 + FreeDesktop compliant trash system support
262 + </flag>
263 + </use>
264 + <upstream>
265 + <remote-id type="github">leo-arch/clifm</remote-id>
266 + </upstream>
267 +</pkgmetadata>