commit:     42e0a8a1ee13b7b1fae200eed02165c1329f3a27
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Oct  7 00:17:04 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Oct  7 00:17:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=42e0a8a1

sci-misc/boinc-wrapper: fix deps & task suspending

1. Apply a patch to revert upstream switch to SIGTSTP signal for task
   suspending, which never works.

2. Skip OpenGL check, so libboinc_graphics is never built.

Closes: https://bugs.gentoo.org/939899
Closes: https://bugs.gentoo.org/939902
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 .../boinc-wrapper/boinc-wrapper-26018-r2.ebuild    | 54 ++++++++++++++++++++++
 .../files/boinc-wrapper-26018-sigstop.patch        | 28 +++++++++++
 2 files changed, 82 insertions(+)

diff --git a/sci-misc/boinc-wrapper/boinc-wrapper-26018-r2.ebuild 
b/sci-misc/boinc-wrapper/boinc-wrapper-26018-r2.ebuild
new file mode 100644
index 000000000..57e857ec5
--- /dev/null
+++ b/sci-misc/boinc-wrapper/boinc-wrapper-26018-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools edo
+
+DESCRIPTION="Wrapper to use non-BOINC apps with BOINC"
+HOMEPAGE="https://boinc.berkeley.edu/trac/wiki/WrapperApp";
+SRC_URI="https://github.com/BOINC/boinc/archive/refs/tags/wrapper/${PV}.tar.gz 
-> ${P}.tar.gz"
+
+LICENSE="Info-ZIP LGPL-3+ regexp-UofT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+DOCS=( job.xml )
+
+PATCHES=( "${FILESDIR}"/${PN}-26018-sigstop.patch )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       edo bash generate_svn_version.sh
+
+       local myeconfargs=(
+               # build libraries only
+               --enable-pkg-devel
+               --disable-fcgi
+
+               # link with libboinc_api statically
+               --disable-shared
+               --enable-static
+
+               # do not build libboinc_graphics
+               --without-x
+               ax_cv_check_gl_libgl=no
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       emake
+       emake -C samples/wrapper
+}
+
+src_install() {
+       cd samples/wrapper || die
+
+       einstalldocs
+       newbin wrapper boinc-wrapper
+}

diff --git a/sci-misc/boinc-wrapper/files/boinc-wrapper-26018-sigstop.patch 
b/sci-misc/boinc-wrapper/files/boinc-wrapper-26018-sigstop.patch
new file mode 100644
index 000000000..d36f118f6
--- /dev/null
+++ b/sci-misc/boinc-wrapper/files/boinc-wrapper-26018-sigstop.patch
@@ -0,0 +1,28 @@
+Smaller version of a patch merged upstream in
+https://github.com/BOINC/boinc/pull/3045, not released yet.
+
+Author: Benn Snyder <[email protected]>
+Bug: https://bugs.gentoo.org/939902
+
+diff --git a/lib/proc_control.cpp b/lib/proc_control.cpp
+index 71f783d02f..090574ca4b 100644
+--- a/lib/proc_control.cpp
++++ b/lib/proc_control.cpp
+@@ -256,7 +256,7 @@ void suspend_or_resume_descendants(bool resume) {
+     int pid = getpid();
+     get_descendants(pid, descendants);
+     for (unsigned int i=0; i<descendants.size(); i++) {
+-        kill(descendants[i], resume?SIGCONT:SIGTSTP);
++        kill(descendants[i], resume?SIGCONT:SIGSTOP);
+     }
+ #endif
+ }
+@@ -269,7 +269,7 @@ void suspend_or_resume_process(int pid, bool resume) {
+     pids.push_back(pid);
+     suspend_or_resume_threads(pids, 0, resume, false);
+ #else
+-    ::kill(pid, resume?SIGCONT:SIGTSTP);
++    ::kill(pid, resume?SIGCONT:SIGSTOP);
+ #endif
+ }
+ 

Reply via email to