commit:     0c95e001d3a5da2c9dc6a5d252a9e6cbf88b5381
Author:     Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Tue Mar 15 10:06:45 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 10:06:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0c95e001

sys-process/task-spooler: new package

Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>

 sys-process/task-spooler/Manifest                  |  1 +
 .../task-spooler/files/var-redefinition.patch      | 20 ++++++++++
 sys-process/task-spooler/metadata.xml              | 12 ++++++
 sys-process/task-spooler/task-spooler-1.3.0.ebuild | 44 ++++++++++++++++++++++
 4 files changed, 77 insertions(+)

diff --git a/sys-process/task-spooler/Manifest 
b/sys-process/task-spooler/Manifest
new file mode 100644
index 000000000..05829910d
--- /dev/null
+++ b/sys-process/task-spooler/Manifest
@@ -0,0 +1 @@
+DIST task-spooler-1.3.0.tar.gz 168745 BLAKE2B 
06befb48df85f96bf68a9547a369a89f774d7508b2463956931d0f885b1c8c297d091497b7063c0436b80e4bc6870385cb5cedc9e92399efd01a99bbf11a02e6
 SHA512 
926e5eee6471caa9f3464ad61b3bb1a29975f4adb1db55cc3fcc261299c663e91d0637333b7251c752b3440483d77119f7cf38a078f0bcc202fb1be4523a061c

diff --git a/sys-process/task-spooler/files/var-redefinition.patch 
b/sys-process/task-spooler/files/var-redefinition.patch
new file mode 100644
index 000000000..4218eccca
--- /dev/null
+++ b/sys-process/task-spooler/files/var-redefinition.patch
@@ -0,0 +1,20 @@
+From 7ad73f001da883a88bcd53e3bf4e7157636ee637 Mon Sep 17 00:00:00 2001
+From: Duc <anhduc12101...@gmail.com>
+Date: Wed, 9 Mar 2022 18:29:41 +0900
+Subject: [PATCH] fixed a redefinition bug, see 
https://github.com/justanhduc/task-spooler/issues/15
+
+---
+ jobs.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/jobs.c b/jobs.c
+index 9f130d6..17612e6 100644
+--- a/jobs.c
++++ b/jobs.c
+@@ -40,7 +40,6 @@ static struct Notify *first_notify = 0;
+ 
+ /* server will access them */
+ int max_jobs;
+-char* logdir;
+ 
+ static struct Job *get_job(int jobid);
\ No newline at end of file

diff --git a/sys-process/task-spooler/metadata.xml 
b/sys-process/task-spooler/metadata.xml
new file mode 100644
index 000000000..e71503b64
--- /dev/null
+++ b/sys-process/task-spooler/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>adel...@zegrapher.com</email>
+               <name>Adel KARA SLIMANE</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">ustanhduc/task-spooler</remote-id>
+               
<bugs-to>https://github.com/ustanhduc/task-spooler/issues</bugs-to>
+       </upstream>
+</pkgmetadata>

diff --git a/sys-process/task-spooler/task-spooler-1.3.0.ebuild 
b/sys-process/task-spooler/task-spooler-1.3.0.ebuild
new file mode 100644
index 000000000..b778e0a41
--- /dev/null
+++ b/sys-process/task-spooler/task-spooler-1.3.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A scheduler for CPU tasks "
+SRC_URI="https://github.com/justanhduc/${PN}/archive/refs/tags/v${PV}-cpu.tar.gz
 -> ${P}.tar.gz"
+
+# A GPU version does exist, if anyone needs it, it can be added through a use 
flag
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+DOCS="Changelog OBJECTIVES PORTABILITY PROTOCOL README.md TRICKS"
+HTML_DOCS=( web/index.html web/ts-0.2.1.png web/ts-0.5.4.ebuild 
web/article_linux_com.html )
+
+S="${WORKDIR}/task-spooler-${PV}-cpu"
+
+src_prepare() {
+       default
+
+       eapply "${FILESDIR}"/var-redefinition.patch
+
+       cmake_src_prepare
+}
+
+src_test() {
+       sh testbench.sh || die "tests failed"
+}
+
+src_install() {
+       cd ${WORKDIR}/${P}-cpu_build
+       mv ts tsp || die "Failed renaming ts executable into tsp"
+       dobin tsp
+
+       # When the use flag doc is enabled.
+       if use doc; then
+               cd ${S}
+               einstalldocs
+       fi
+}

Reply via email to