Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/
Date: Mon, 01 Aug 2022 08:35:10
Message-Id: 1659342877.1736df328f9404f0f0841e25b9f6a158d9ad085c.flow@gentoo
1 commit: 1736df328f9404f0f0841e25b9f6a158d9ad085c
2 Author: Sven Eden <sven.eden <AT> prydeworx <DOT> com>
3 AuthorDate: Wed Jul 27 11:38:07 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 1 08:34:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1736df32
7
8 sci-misc/boinc: Bump to 7.20.2 ; plus OpenCL dependency fixes
9
10 BOINC can now detect and use the correct OpenCL implementations for
11 various situations. Therefore VIDEO_CARDS is questioned to pull in
12 the needed dependencies:
13
14 * video_cards_amdgpu : dev-libs/rocm-opencl-runtime
15 -> AMD GPUs supported by the amdgpu kernel driver. 64-bit only
16 * video_cards_intel : dev-libs/intel-compute-runtime
17 -> integrated Intel GPUs from Broadwell onwards. 64-bit only
18 * video_cards_nvidia : media-gfx/nvidia-cg-toolkit
19 -> USE="cuda" is enforced in this case
20 * video_cards_radeonsi : media-libs/mesa[opencl]
21
22 WARNING: Only nvidia+intel have been tested yet!
23
24 Bug: https://bugs.gentoo.org/861440
25
26 Signed-off-by: Sven Eden <sven.eden <AT> prydeworx.com>
27 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
28
29 sci-misc/boinc/Manifest | 2 +-
30 sci-misc/boinc/boinc-7.20.2-r2.ebuild | 207 ++++++++++++++++++++++++++++++++++
31 sci-misc/boinc/metadata.xml | 1 +
32 3 files changed, 209 insertions(+), 1 deletion(-)
33
34 diff --git a/sci-misc/boinc/Manifest b/sci-misc/boinc/Manifest
35 index 97a54e30850d..8522dc31b874 100644
36 --- a/sci-misc/boinc/Manifest
37 +++ b/sci-misc/boinc/Manifest
38 @@ -1,2 +1,2 @@
39 -DIST boinc-7.18.1.tar.gz 50851883 BLAKE2B 64d321c8c56d7c34a08646dc16de5ddbb9b8e4be57b673fa77515845d967e28b5cf1fda677293e2fc8cf36a18ac0b7e7feebfbd8e434ebed41b8280c7395950d SHA512 200587a0896aec6a7e7247132811141909aa333cb2bb9350c5ba016ffdf056413b1c5346361b311c087634b2d29cdbb204486385d8561a299b68739244c5a532
40 +DIST boinc-7.20.2.tar.gz 46555666 BLAKE2B 4d11217739d341c5b61d86afa02eebdad80809f42caa3f6dea1d86ed53d79004d60fa362fd04d53060060472e108e0ee0aa0428e4799eb70f2e98f07dc1f39cd SHA512 0309d5585ece96a5d9021058870dce9a96c89ece269650961a9b22d5219529e242a55dc1e466f5364535033198ca5c36496ca23125a9cda0c308bfdb4372abbb
41 DIST boinc.tif 288208 BLAKE2B 156a99f08dcabc62a46874830600b9d237e64b650b8edf35db67b82006a67039a3965707194e8f0b25cfd65138b8700c0bfb877507418393b9cd3df32e94d260 SHA512 548e19b87fd70dbeb05687320b86aad39981c161b5b5b7e02fc3ce886d4c464c9bb763d5652d9895dd505ce247c7ff4490caa3d407e28f54ce889ffbab22d046
42
43 diff --git a/sci-misc/boinc/boinc-7.20.2-r2.ebuild b/sci-misc/boinc/boinc-7.20.2-r2.ebuild
44 new file mode 100644
45 index 000000000000..4f714313eeff
46 --- /dev/null
47 +++ b/sci-misc/boinc/boinc-7.20.2-r2.ebuild
48 @@ -0,0 +1,207 @@
49 +# Copyright 1999-2022 Gentoo Authors
50 +# Distributed under the terms of the GNU General Public License v2
51 +
52 +EAPI=8
53 +
54 +MY_PV=$(ver_cut 1-2)
55 +WX_GTK_VER=3.0-gtk3
56 +
57 +inherit autotools desktop flag-o-matic linux-info wxwidgets xdg-utils
58 +
59 +DESCRIPTION="The Berkeley Open Infrastructure for Network Computing"
60 +HOMEPAGE="https://boinc.berkeley.edu/"
61 +
62 +SRC_URI="X? ( https://boinc.berkeley.edu/logo/boinc_glossy2_512_F.tif -> ${PN}.tif )"
63 +if [[ ${PV} == *9999 ]] ; then
64 + EGIT_REPO_URI="https://github.com/BOINC/${PN}.git"
65 + inherit git-r3
66 +else
67 + SRC_URI+=" https://github.com/BOINC/boinc/archive/client_release/${MY_PV}/${PV}.tar.gz -> ${P}.tar.gz"
68 + KEYWORDS="~amd64 ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
69 + S="${WORKDIR}/${PN}-client_release-${MY_PV}-${PV}"
70 +fi
71 +
72 +LICENSE="LGPL-3"
73 +SLOT="0"
74 +
75 +IUSE_VIDEO_CARDS="
76 + video_cards_amdgpu
77 + video_cards_intel
78 + video_cards_nvidia
79 + video_cards_radeonsi
80 +"
81 +
82 +IUSE="${IUSE_VIDEO_CARDS} X cuda curl_ssl_gnutls +curl_ssl_openssl opencl"
83 +
84 +REQUIRED_USE="
85 + ^^ ( curl_ssl_gnutls curl_ssl_openssl )
86 + cuda? ( opencl video_cards_nvidia )
87 + opencl? ( || ( ${IUSE_VIDEO_CARDS} ) )
88 +"
89 +
90 +# libcurl must not be using an ssl backend boinc does not support.
91 +# If the libcurl ssl backend changes, boinc should be recompiled.
92 +DEPEND="
93 + acct-user/boinc
94 + app-misc/ca-certificates
95 + cuda? (
96 + dev-util/nvidia-cuda-toolkit
97 + x11-drivers/nvidia-drivers
98 + )
99 + opencl? (
100 + video_cards_amdgpu? ( amd64? ( dev-libs/rocm-opencl-runtime ) )
101 + video_cards_intel? ( amd64? ( dev-libs/intel-compute-runtime ) )
102 + video_cards_nvidia? ( x11-drivers/nvidia-drivers media-gfx/nvidia-cg-toolkit )
103 + video_cards_radeonsi? ( media-libs/mesa[opencl] )
104 + )
105 + dev-libs/openssl:=
106 + net-misc/curl[curl_ssl_gnutls(-)=,-curl_ssl_nss(-),curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-)]
107 + sys-libs/zlib
108 + X? (
109 + dev-libs/glib:2
110 + media-libs/freeglut
111 + media-libs/libjpeg-turbo:=
112 + x11-libs/gtk+:3
113 + x11-libs/libnotify
114 + x11-libs/libX11
115 + x11-libs/libXScrnSaver
116 + x11-libs/libxcb:=
117 + x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit]
118 + x11-libs/xcb-util
119 + )
120 +"
121 +BDEPEND="app-text/docbook-xml-dtd:4.4
122 + app-text/docbook2X
123 + sys-devel/gettext
124 + X? ( virtual/imagemagick-tools[png,tiff] )
125 +"
126 +RDEPEND="
127 + ${DEPEND}
128 + sys-apps/util-linux
129 + !app-admin/quickswitch
130 +"
131 +
132 +PATCHES=(
133 + # >=x11-libs/wxGTK-3.0.2.0-r3 has webview removed, bug 587462
134 + "${FILESDIR}"/${PN}-7.18-fix_webview.patch
135 +)
136 +
137 +pkg_setup() {
138 + # Bug 578750
139 + if use kernel_linux; then
140 + linux-info_pkg_setup
141 + if ! linux_config_exists; then
142 + ewarn "Can't check the linux kernel configuration."
143 + ewarn "You might be missing vsyscall support."
144 + elif kernel_is -ge 4 4 \
145 + && linux_chkconfig_present LEGACY_VSYSCALL_NONE; then
146 + ewarn "You do not have vsyscall emulation enabled."
147 + ewarn "This will prevent some boinc projects from running."
148 + ewarn "Please enable vsyscall emulation:"
149 + ewarn " CONFIG_LEGACY_VSYSCALL_EMULATE=y"
150 + ewarn "in /usr/src/linux/.config, to be found at"
151 + ewarn " Processor type and features --->"
152 + ewarn " vsyscall table for legacy applications (None) --->"
153 + ewarn " (X) Emulate"
154 + ewarn "Alternatively, you can enable CONFIG_LEGACY_VSYSCALL_NATIVE."
155 + ewarn "However, this has security implications and is not recommended."
156 + fi
157 + fi
158 +}
159 +
160 +src_prepare() {
161 + default
162 +
163 + # prevent bad changes in compile flags, bug 286701
164 + sed -i -e "s:BOINC_SET_COMPILE_FLAGS::" configure.ac || die "sed failed"
165 +
166 + eautoreconf
167 +}
168 +
169 +src_configure() {
170 + use X && setup-wxwidgets
171 +
172 + append-libs -L"${ESYSROOT}"/usr/$(get_libdir) -L"${ESYSROOT}"/$(get_libdir)
173 +
174 + econf --disable-server \
175 + --enable-client \
176 + --enable-dynamic-client-linkage \
177 + --disable-static \
178 + --enable-unicode \
179 + --with-ssl \
180 + $(use_with X x) \
181 + $(use_enable X manager) \
182 + $(usex X --with-wx-config="${WX_CONFIG}" --without-wxdir)
183 +}
184 +
185 +src_install() {
186 + default
187 +
188 + keepdir /var/lib/${PN}
189 +
190 + if use X; then
191 + # Create new icons. bug 593362
192 + local s SIZES=(16 22 24 32 36 48 64 72 96 128 192 256)
193 + for s in "${SIZES[@]}"; do
194 + # The convert command is not checked, because it will issue warnings and exit with
195 + # an error code if imagemagick is used and was merged with USE="-xml", although the
196 + # conversion has worked. See #766093
197 + # Instead, newicon will fail if the conversion did not produce the icon.
198 + convert "${DISTDIR}"/${PN}.tif -resize ${s}x${s} "${WORKDIR}"/boinc_${s}.png
199 + newicon -s $s "${WORKDIR}"/boinc_${s}.png boinc.png
200 + done
201 + make_desktop_entry boincmgr "${PN}" "${PN}" "Math;Science" "Path=/var/lib/${PN}"
202 +
203 + # Rename the desktop file to boincmgr.desktop to (hot)fix bug 599910
204 + mv "${ED}"/usr/share/applications/boincmgr{-${PN},}.desktop || \
205 + die "Failed to rename desktop file"
206 + fi
207 +
208 + # cleanup cruft
209 + rm -r "${ED}"/etc || die "rm failed"
210 + find "${D}" -name '*.la' -delete || die "Removing .la files failed"
211 +
212 + sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.init.in > ${PN}.init || die
213 + newinitd ${PN}.init ${PN}
214 + newconfd "${FILESDIR}"/${PN}.conf ${PN}
215 +}
216 +
217 +pkg_postinst() {
218 + if use X; then
219 + xdg_desktop_database_update
220 + xdg_mimeinfo_database_update
221 + xdg_icon_cache_update
222 + fi
223 +
224 + elog
225 + elog "You are using the source compiled version of boinc."
226 + use X && elog "The graphical manager can be found at /usr/bin/boincmgr"
227 + elog
228 + elog "You need to attach to a project to do anything useful with boinc."
229 + elog "You can do this by running /etc/init.d/boinc attach"
230 + elog "The howto for configuration is located at:"
231 + elog "http://boinc.berkeley.edu/wiki/Anonymous_platform"
232 + elog
233 + # Add warning about the new password for the client, bug 121896.
234 + if use X; then
235 + elog "If you need to use the graphical manager the password is in:"
236 + elog "/var/lib/boinc/gui_rpc_auth.cfg"
237 + elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
238 + elog "/etc/conf.d/boinc"
239 + elog "You should change this password to something more memorable (can be even blank)."
240 + elog "Remember to launch init script before using manager. Or changing the password."
241 + elog
242 + fi
243 + elog "To be able to use CUDA or OpenCL you should add the boinc user to the video group."
244 + elog "Run as root:"
245 + elog "gpasswd -a boinc video"
246 + elog
247 +}
248 +
249 +pkg_postrm() {
250 + if use X; then
251 + xdg_desktop_database_update
252 + xdg_mimeinfo_database_update
253 + xdg_icon_cache_update
254 + fi
255 +}
256
257 diff --git a/sci-misc/boinc/metadata.xml b/sci-misc/boinc/metadata.xml
258 index 6dbc0bf0ab56..297bc5864a8d 100644
259 --- a/sci-misc/boinc/metadata.xml
260 +++ b/sci-misc/boinc/metadata.xml
261 @@ -23,6 +23,7 @@
262 NOTE: works only for subset of nvidia graphic cards so make sure your card
263 is supported before opening a bug about it.
264 </flag>
265 + <flag name="opencl">Use OpenCL to enable computations using your GPU.</flag>
266 </use>
267 <upstream>
268 <remote-id type="github">BOINC/boinc</remote-id>