Diff boinc-7.24.1-r2 with a boinc-9999

/usr/portage/sci-misc/boinc/boinc-9999.ebuild 2025-07-29 16:22:17.344467791 +0300
6 6
MY_PV=$(ver_cut 1-2)
7 7
WX_GTK_VER=3.2-gtk3
8 8

  
9
inherit autotools desktop flag-o-matic linux-info optfeature wxwidgets xdg-utils
9
inherit autotools bash-completion-r1 linux-info optfeature wxwidgets xdg-utils
10 10

  
11 11
DESCRIPTION="The Berkeley Open Infrastructure for Network Computing"
12 12
HOMEPAGE="https://boinc.berkeley.edu/"
13 13

  
14
SRC_URI="X? ( https://boinc.berkeley.edu/logo/boinc_glossy2_512_F.tif -> ${PN}.tif )"
15 14
if [[ ${PV} == *9999 ]] ; then
16 15
	EGIT_REPO_URI="https://github.com/BOINC/${PN}.git"
17 16
	inherit git-r3
18 17
else
19
	SRC_URI+=" https://github.com/BOINC/boinc/archive/client_release/${MY_PV}/${PV}.tar.gz -> ${P}.tar.gz"
20
	KEYWORDS="amd64 arm64 ~ppc ppc64 sparc ~x86"
18
	SRC_URI="https://github.com/BOINC/boinc/archive/client_release/${MY_PV}/${PV}.tar.gz -> ${P}.tar.gz"
21 19
	S="${WORKDIR}/${PN}-client_release-${MY_PV}-${PV}"
20

  
21
	# We don't mark "stable" and "alpha" release channels in any special way but
22
	# use stable/testing keywords instead.
23
	#
24
	# "Alpha" versions are only named as such, they are actually more like beta
25
	# versions or release candidates.
26
	# https://github.com/BOINC/boinc/wiki/AlphaInstructions
27
	#
28
	# The current versions for each of release channels can be found at:
29
	# https://boinc.berkeley.edu/linux_install.php
30
	KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~sparc ~x86"
22 31
fi
23 32

  
24 33
LICENSE="LGPL-3+"
25 34
SLOT="0"
26 35

  
27
IUSE="X cuda curl_ssl_gnutls +curl_ssl_openssl opencl"
28

  
29
REQUIRED_USE="
30
	^^ ( curl_ssl_gnutls curl_ssl_openssl )
31
"
36
# - "X" builds idle tracking via XScrnSaver and the libboinc_graphics2 library
37
# - "gui" builds the manager app and the screensaver
38
IUSE="X gui"
32 39

  
33
# libcurl must not be using an ssl backend boinc does not support.
34
# If the libcurl ssl backend changes, boinc should be recompiled.
35 40
DEPEND="
36
	acct-user/boinc
41
	>=acct-user/boinc-1
37 42
	app-misc/ca-certificates
38 43
	dev-libs/openssl:=
39
	net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-)]
40
	sys-libs/zlib
41
	cuda? (
42
		x11-drivers/nvidia-drivers
43
	)
44
	opencl? (
45
		virtual/opencl
46
	)
44
	net-misc/curl[ssl]
45
	sys-libs/zlib:=
47 46
	X? (
48
		dev-libs/glib:2
49 47
		media-libs/freeglut
50 48
		media-libs/libjpeg-turbo:=
51
		x11-libs/gtk+:3
52
		x11-libs/libnotify
53 49
		x11-libs/libX11
54 50
		x11-libs/libXScrnSaver
51
	)
52
	gui? (
53
		dev-libs/glib:2
54
		x11-libs/gtk+:3
55
		x11-libs/libnotify
55 56
		x11-libs/libxcb:=
56
		x11-libs/wxGTK:${WX_GTK_VER}=[X,opengl,webkit]
57
		x11-libs/wxGTK:${WX_GTK_VER}=[opengl,webkit]
57 58
		x11-libs/xcb-util
58 59
	)
59 60
"
60
BDEPEND="app-text/docbook-xml-dtd:4.4
61
RDEPEND="${DEPEND}"
62
BDEPEND="
63
	app-text/docbook-xml-dtd:4.4
61 64
	app-text/docbook2X
62
	sys-devel/gettext
63
	X? ( virtual/imagemagick-tools[png,tiff] )
64
"
65
RDEPEND="
66
	${DEPEND}
67
	sys-apps/util-linux
68
	!app-admin/quickswitch
65
	virtual/pkgconfig
69 66
"
70 67

  
71 68
pkg_setup() {
......
101 98
}
102 99

  
103 100
src_configure() {
104
	use X && setup-wxwidgets
105

  
106
	append-libs -L"${ESYSROOT}"/usr/$(get_libdir) -L"${ESYSROOT}"/$(get_libdir)
101
	use gui && setup-wxwidgets
107 102

  
108 103
	local myeconfargs=(
109 104
		--disable-server
110 105
		--enable-client
111 106
		--enable-dynamic-client-linkage
112
		--disable-static
113 107
		--enable-unicode
114 108
		--with-ssl
109
		$(usex X "" ax_cv_check_glut_libglut="no")
115 110
		$(use_with X x)
116
		$(use_enable X manager)
117
		$(usex X --with-wx-config="${WX_CONFIG}" --without-wxdir)
111
		$(use_enable gui manager)
112
		$(usex gui --with-wx-config="${WX_CONFIG}" --without-wxdir)
118 113
	)
119 114
	econf "${myeconfargs[@]}"
120 115
}
......
122 117
src_install() {
123 118
	default
124 119

  
125
	keepdir /var/lib/${PN}
126

  
127
	if use X; then
128
		# Create new icons. bug 593362
129
		local s SIZES=(16 22 24 32 36 48 64 72 96 128 192 256)
130
		for s in "${SIZES[@]}"; do
131
			# The convert command is not checked, because it will issue warnings and exit with
132
			# an error code if imagemagick is used and was merged with USE="-xml", although the
133
			# conversion has worked. See #766093
134
			# Instead, newicon will fail if the conversion did not produce the icon.
135
			convert "${DISTDIR}"/${PN}.tif -resize ${s}x${s} "${WORKDIR}"/boinc_${s}.png
136
			newicon -s $s "${WORKDIR}"/boinc_${s}.png boinc.png
137
		done
138
		make_desktop_entry boincmgr "${PN}" "${PN}" "Math;Science" "Path=/var/lib/${PN}"
139

  
140
		# Rename the desktop file to boincmgr.desktop to (hot)fix bug 599910
141
		mv "${ED}"/usr/share/applications/boincmgr{-${PN},}.desktop || \
142
			die "Failed to rename desktop file"
143
	fi
144

  
145 120
	# cleanup cruft
146 121
	rm -r "${ED}"/etc || die "rm failed"
147
	find "${D}" -name '*.la' -delete || die "Removing .la files failed"
122
	find "${D}/usr/$(get_libdir)" -name '*.la' -delete || die "Removing .la files failed"
123
	find "${D}/usr/$(get_libdir)" -name '*.a' -delete || die "Removing static libs failed"
124

  
125
	newbashcomp client/scripts/boinc.bash boinc
126
	bashcomp_alias boinc boinccmd
148 127

  
149
	newinitd "${FILESDIR}"/${PN}.init ${PN}
150
	newconfd "${FILESDIR}"/${PN}.conf ${PN}
128
	keepdir /var/lib/boinc
129
	fowners boinc:boinc /var/lib/boinc
130
	fperms 750 /var/lib/boinc
131

  
132
	dosym -r /etc/ssl/certs/ca-certificates.crt /var/lib/boinc/ca-bundle.crt
133

  
134
	exeinto /etc/X11/xinit/xinitrc.d
135
	newexe packages/generic/36x11-common_xhost-boinc 95-boinc
136

  
137
	newinitd "${FILESDIR}"/boinc.initd-r1 boinc
138
	newconfd "${FILESDIR}"/boinc.confd-r1 boinc
151 139
}
152 140

  
153 141
pkg_postinst() {
154
	if use X; then
142
	if use gui; then
155 143
		xdg_desktop_database_update
156 144
		xdg_mimeinfo_database_update
157 145
		xdg_icon_cache_update
158 146
	fi
159 147

  
160 148
	elog
161
	elog "You are using the source compiled version of boinc."
162
	use X && elog "The graphical manager can be found at /usr/bin/boincmgr"
163
	elog
164 149
	elog "You need to attach to a project to do anything useful with boinc."
165
	elog "You can do this by running /etc/init.d/boinc attach"
166
	elog "The howto for configuration is located at:"
167
	elog "http://boinc.berkeley.edu/wiki/Anonymous_platform"
150
	elog "You can do this by running:"
151
	elog "# rc-service boinc attach"
152
	elog "The user manual is located at:"
153
	elog "https://github.com/BOINC/boinc/wiki/User-manual"
168 154
	elog
169 155
	# Add warning about the new password for the client, bug 121896.
170
	if use X; then
171
		elog "If you need to use the graphical manager the password is in:"
156
	if use gui; then
157
		elog "If you need to use the graphical manager, the password is in:"
172 158
		elog "/var/lib/boinc/gui_rpc_auth.cfg"
173
		elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
159
		elog "Where /var/lib/boinc is default RUNTIMEDIR that can be changed in:"
174 160
		elog "/etc/conf.d/boinc"
175 161
		elog "You should change this password to something more memorable (can be even blank)."
176 162
		elog "Remember to launch init script before using manager. Or changing the password."
177 163
		elog
178 164
	fi
179
	elog "To be able to use CUDA or OpenCL you should add the boinc user to the video group."
180
	elog "Run as root:"
181
	elog "gpasswd -a boinc video"
182
	elog
165

  
166
	# OpenCL and CUDA libraries are loaded with dlopen(),
167
	# no headers used at build time and no linking occurs.
168
	optfeature "CUDA applications support" x11-drivers/nvidia-drivers
169
	optfeature "Docker applications support" \
170
		"app-containers/podman app-containers/podman-compose" \
171
		"app-containers/docker app-containers/docker-compose:2"
172
	optfeature "OpenCL applications support" virtual/opencl
173
	optfeature "VirtualBox applications support" app-emulation/virtualbox
183 174

  
184 175
	optfeature_header "If you want to run ATLAS native tasks by LHC@home, you need to install:"
185 176
	optfeature "CERN VM filesystem support" net-fs/cvmfs
186 177
}
187 178

  
188 179
pkg_postrm() {
189
	if use X; then
180
	if use gui; then
190 181
		xdg_desktop_database_update
191 182
		xdg_mimeinfo_database_update
192 183
		xdg_icon_cache_update
Thank you!