commit:     d61ecb8fb319dcbd085c52a1b64c1456aa6f9a65
Author:     Marco Sirabella <marco <AT> sirabella <DOT> org>
AuthorDate: Fri Apr 16 18:15:18 2021 +0000
Commit:     Marco Sirabella <marco <AT> sirabella <DOT> org>
CommitDate: Fri Apr 16 19:45:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d61ecb8f

sys-apps/nq: Add new package

Currently shell implementations don't pass the tests, too minimal

Should the shell implementations even be included? I don't see why not,
as long as they're around

Came across this from https://news.ycombinator.com/item?id=25920517

Signed-off-by: Marco Sirabella <marco <AT> sirabella.org>

 sys-apps/nq/Manifest      |  1 +
 sys-apps/nq/metadata.xml  | 20 ++++++++++++++++++++
 sys-apps/nq/nq-0.4.ebuild | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/sys-apps/nq/Manifest b/sys-apps/nq/Manifest
new file mode 100644
index 000000000..5f9ea0a1a
--- /dev/null
+++ b/sys-apps/nq/Manifest
@@ -0,0 +1 @@
+DIST nq-0.4.tar.gz 11976 BLAKE2B 
2fa22bd0518e8eea09604db4bfb3c0c11583e8c812bb80697d4697afe30283ff878e367e5e42b0894a1a216ee3ce313f41a8f5d217dcc15a49a8b331d0ba9c3f
 SHA512 
c4587c2074dd6e3d18d56a273b943b2594f6ea73912d774120706dbcb6a64e0b7a99c4da7283cbe0d3d47eb24fa246625e9180a88ee2e0cacc647de8c8606c38

diff --git a/sys-apps/nq/metadata.xml b/sys-apps/nq/metadata.xml
new file mode 100644
index 000000000..2cd03cdfe
--- /dev/null
+++ b/sys-apps/nq/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>ma...@sirabella.org</email>
+               <name>Marco Sirabella</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">leahneukirchen/nq</remote-id>
+               <bugs-to>https://github.com/leahneukirchen/nq/issues</bugs-to>
+               <changelog>https://git.vuxu.org/nq/plain/NEWS.md</changelog>
+       </upstream>
+       <longdescription lang="en">
+               These small utilities allow creating very lightweight job queue 
systems which require no setup, maintenance, supervision, or any long-running 
processes.
+       </longdescription>
+       <use>
+               <flag name="shell">Use shell implementation</flag>
+               <flag name="tq">Install tq, a tmux &amp; screen wrapper</flag>
+       </use>
+</pkgmetadata>

diff --git a/sys-apps/nq/nq-0.4.ebuild b/sys-apps/nq/nq-0.4.ebuild
new file mode 100644
index 000000000..64666b61b
--- /dev/null
+++ b/sys-apps/nq/nq-0.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Unix command line queue utility"
+HOMEPAGE="https://git.vuxu.org/nq/about/";
+SRC_URI="https://git.vuxu.org/${PN}/snapshot/${P}.tar.gz";
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="-shell +tq test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="shell? ( !test )" # shell alternatives currently fail tests
+
+DEPEND=""
+RDEPEND="
+       shell? ( sys-apps/util-linux sys-apps/coreutils )
+       tq? ( || ( app-misc/tmux app-misc/screen ) )
+"
+BDEPEND="test? ( dev-lang/perl )"
+
+DOCS=( README.md NEWS.md )
+
+src_compile() {
+       if use shell; then
+               cp nq.sh nq
+               cp fq.sh fq
+       fi
+       emake CFLAGS="${CFLAGS} -Wno-unused-result"
+}
+
+src_install() {
+       emake DESTDIR="${D}" PREFIX=/usr ALL="nq fq $(usev tq)" install
+       einstalldocs
+}

Reply via email to