commit:     051516132e9e2d78d4aa2694d77de1fdd430ee4b
Author:     FluffyJay1 <michaelzcyang <AT> gmail <DOT> com>
AuthorDate: Fri Jul 29 19:17:28 2022 +0000
Commit:     Michael Yang <michaelzcyang <AT> gmail <DOT> com>
CommitDate: Fri Jul 29 19:17:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=05151613

app-misc/clifm: new package, add 1.6, 9999

Signed-off-by: FluffyJay1 <michaelzcyang <AT> gmail.com>

 app-misc/clifm/Manifest          |  1 +
 app-misc/clifm/clifm-1.6.ebuild  | 87 ++++++++++++++++++++++++++++++++++++++++
 app-misc/clifm/clifm-9999.ebuild | 87 ++++++++++++++++++++++++++++++++++++++++
 app-misc/clifm/metadata.xml      | 48 ++++++++++++++++++++++
 4 files changed, 223 insertions(+)

diff --git a/app-misc/clifm/Manifest b/app-misc/clifm/Manifest
new file mode 100644
index 000000000..a7bb68a4e
--- /dev/null
+++ b/app-misc/clifm/Manifest
@@ -0,0 +1 @@
+DIST clifm-1.6.tar.gz 1268633 BLAKE2B 
de36f0d3bc1c6584471d313f346a9db77f659b4fde41775e45c78066db12aff8bf33a58b3c5d0f9cd43800cf823f0508c2abb5c88ff50a28147aec5c7e7178df
 SHA512 
a8f6b73070779d0d49b41109bee1b418cb6eb4fb1ac8e684cf859e1137336df2655ddfb5107b50674a5380364f572fe47cc72f58c25c4ff6439593b411a5f69e

diff --git a/app-misc/clifm/clifm-1.6.ebuild b/app-misc/clifm/clifm-1.6.ebuild
new file mode 100644
index 000000000..fbffa78e3
--- /dev/null
+++ b/app-misc/clifm/clifm-1.6.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="The command line file manager"
+HOMEPAGE="https://github.com/leo-arch/clifm";
+
+inherit flag-o-matic optfeature xdg
+
+if [[ ${PV} == "9999" ]]; then
+       EGIT_REPO_URI="https://github.com/leo-arch/clifm.git";
+       inherit git-r3
+else
+       SRC_URI="mirror://sourceforge/${PN}/v${PV}.tar.gz -> ${P}.tar.gz"
+       # also on github but seems like a worse alternative?
+       # SRC_URI="https://github.com/leo-arch/clifm/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+archives +bleach emoji-icons +highlight icons-in-terminal +lira
+               nerdfonts +suggestions +tags +trash"
+
+DEPEND="
+       sys-libs/libcap
+       sys-libs/readline
+       sys-apps/acl
+       sys-apps/file
+"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+src_compile() {
+       use archives || append-cflags "-D_NO_ARCHIVING"
+       use bleach || append-cflags "-D_NO_BLEACH"
+
+       # emoji-icons > nerdfonts > icons-in-terminal
+       if ! use emoji-icons; then # support for emoji-icons is default
+               if use nerdfonts; then
+                       append-cflags "-D_NERD"
+               elif use icons-in-terminal; then
+                       append-cflags "-D_ICONS_IN_TERMINAL"
+               else
+                       append-cflags "-D_NO_ICONS"
+               fi
+       fi
+
+       use highlight || append-cflags "-D_NO_HIGHLIGHT"
+       use lira || append-cflags "-D_NO_LIRA"
+       use suggestions || append-cflags "-D_NO_SUGGESTIONS"
+       use tags || append-cflags "-D_NO_TAGS"
+       use trash || append-cflags "-D_NO_TRASH"
+       # there is no reason to use -D_NO_MAGIC since we already depend on 
sys-apps/file
+
+       # basically free faster qsort implementation
+       append-cflags "-D_TOURBIN_QSORT"
+
+       # makefile defaults to /usr/local
+       emake PREFIX="/usr" || die "make failed"
+}
+
+src_install() {
+       docompress -x /usr/share/man # makefile compresses man page
+       # makefile defaults to /usr/local, and manpages to /usr/man
+       emake DESTDIR="${D}" PREFIX="/usr" MANDIR="/usr/share/man" install || 
die "install failed"
+       einstalldocs
+}
+
+pkg_postinst() {
+       optfeature_header "Install additional optional functionality:"
+       optfeature "fzf tab completion and more" app-shells/fzf
+       optfeature "mounting/unmounting support" sys-fs/udisks sys-apps/udevil
+       optfeature_header "Install optional archiving support:"
+       optfeature "zstd operations" app-arch/zstd
+       optfeature "archive extraction/unpacking" app-arch/atool
+       optfeature "mounting archives" sys-fs/archivemount
+       optfeature "extracting .iso files" app-arch/p7zip
+       optfeature "creating .iso files" app-cdr/cdrtools
+       if use emoji-icons; then
+               use nerdfonts && ewarn "Warning: Use flag 'nerdfonts' 
overridden by 'emoji-icons'"
+               use icons-in-terminal && ewarn "Warning: Use flag 
'icons-in-terminal' overridden by 'emoji-icons'"
+       elif use nerdfonts; then
+               use icons-in-terminal && ewarn "Warning: Use flag 
'icons-in-terminal' overridden by 'nerdfonts'"
+       fi
+}

diff --git a/app-misc/clifm/clifm-9999.ebuild b/app-misc/clifm/clifm-9999.ebuild
new file mode 100644
index 000000000..fbffa78e3
--- /dev/null
+++ b/app-misc/clifm/clifm-9999.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="The command line file manager"
+HOMEPAGE="https://github.com/leo-arch/clifm";
+
+inherit flag-o-matic optfeature xdg
+
+if [[ ${PV} == "9999" ]]; then
+       EGIT_REPO_URI="https://github.com/leo-arch/clifm.git";
+       inherit git-r3
+else
+       SRC_URI="mirror://sourceforge/${PN}/v${PV}.tar.gz -> ${P}.tar.gz"
+       # also on github but seems like a worse alternative?
+       # SRC_URI="https://github.com/leo-arch/clifm/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+archives +bleach emoji-icons +highlight icons-in-terminal +lira
+               nerdfonts +suggestions +tags +trash"
+
+DEPEND="
+       sys-libs/libcap
+       sys-libs/readline
+       sys-apps/acl
+       sys-apps/file
+"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+src_compile() {
+       use archives || append-cflags "-D_NO_ARCHIVING"
+       use bleach || append-cflags "-D_NO_BLEACH"
+
+       # emoji-icons > nerdfonts > icons-in-terminal
+       if ! use emoji-icons; then # support for emoji-icons is default
+               if use nerdfonts; then
+                       append-cflags "-D_NERD"
+               elif use icons-in-terminal; then
+                       append-cflags "-D_ICONS_IN_TERMINAL"
+               else
+                       append-cflags "-D_NO_ICONS"
+               fi
+       fi
+
+       use highlight || append-cflags "-D_NO_HIGHLIGHT"
+       use lira || append-cflags "-D_NO_LIRA"
+       use suggestions || append-cflags "-D_NO_SUGGESTIONS"
+       use tags || append-cflags "-D_NO_TAGS"
+       use trash || append-cflags "-D_NO_TRASH"
+       # there is no reason to use -D_NO_MAGIC since we already depend on 
sys-apps/file
+
+       # basically free faster qsort implementation
+       append-cflags "-D_TOURBIN_QSORT"
+
+       # makefile defaults to /usr/local
+       emake PREFIX="/usr" || die "make failed"
+}
+
+src_install() {
+       docompress -x /usr/share/man # makefile compresses man page
+       # makefile defaults to /usr/local, and manpages to /usr/man
+       emake DESTDIR="${D}" PREFIX="/usr" MANDIR="/usr/share/man" install || 
die "install failed"
+       einstalldocs
+}
+
+pkg_postinst() {
+       optfeature_header "Install additional optional functionality:"
+       optfeature "fzf tab completion and more" app-shells/fzf
+       optfeature "mounting/unmounting support" sys-fs/udisks sys-apps/udevil
+       optfeature_header "Install optional archiving support:"
+       optfeature "zstd operations" app-arch/zstd
+       optfeature "archive extraction/unpacking" app-arch/atool
+       optfeature "mounting archives" sys-fs/archivemount
+       optfeature "extracting .iso files" app-arch/p7zip
+       optfeature "creating .iso files" app-cdr/cdrtools
+       if use emoji-icons; then
+               use nerdfonts && ewarn "Warning: Use flag 'nerdfonts' 
overridden by 'emoji-icons'"
+               use icons-in-terminal && ewarn "Warning: Use flag 
'icons-in-terminal' overridden by 'emoji-icons'"
+       elif use nerdfonts; then
+               use icons-in-terminal && ewarn "Warning: Use flag 
'icons-in-terminal' overridden by 'nerdfonts'"
+       fi
+}

diff --git a/app-misc/clifm/metadata.xml b/app-misc/clifm/metadata.xml
new file mode 100644
index 000000000..3f64b675d
--- /dev/null
+++ b/app-misc/clifm/metadata.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <longdescription>
+               The command line file manager.
+               More information about the use flags can be found here:
+               
https://github.com/leo-arch/clifm/blob/master/src/README.md#compiling-features-inout
+       </longdescription>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>FluffyJay1</name>
+       </maintainer>
+       <use>
+               <flag name="archives">
+                       Archive manipulation support
+               </flag>
+               <flag name="bleach">
+                       Support for Bleach, the built-in file names cleaner
+               </flag>
+               <flag name="emoji-icons">
+                       Enable icons and set them to use the noto-emoji font 
(see <pkg>media-fonts/noto-emoji</pkg>)
+               </flag>
+               <flag name="highlight">
+                       Syntax highlighting support
+               </flag>
+               <flag name="icons-in-terminal">
+                       Enable icons and set them to use icons-in-terminal (see 
https://github.com/sebastiencs/icons-in-terminal)
+               </flag>
+               <flag name="lira">
+                       Add Lira as the default built-in resource opener
+               </flag>
+               <flag name="nerdfonts">
+                       Enable icons and set them to use NerdFonts
+               </flag>
+               <flag name="suggestions">
+                       Autosuggestion support
+               </flag>
+               <flag name="tags">
+                       Built-in file tagging system support
+               </flag>
+               <flag name="trash">
+                       FreeDesktop compliant trash system support
+               </flag>
+       </use>
+       <upstream>
+               <remote-id type="github">leo-arch/clifm</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to