1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 inherit autotools eutils linux-info systemd user versionator wxwidgets
11 MY_PV=$(get_version_component_range 1-2)
13 DESCRIPTION="The Berkeley Open Infrastructure for Network Computing"
14 HOMEPAGE="http://boinc.ssl.berkeley.edu/"
15 SRC_URI="https://github.com/BOINC/boinc/archive/client_release/${MY_PV}/${PV}.tar.gz -> ${P}.tar.gz
16 X? ( http://boinc.berkeley.edu/logo/boinc_glossy2_512_F.tif -> ${PN}.tif )"
21 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
22 IUSE="X cuda curl_ssl_libressl +curl_ssl_openssl static-libs"
24 REQUIRED_USE="^^ ( curl_ssl_libressl curl_ssl_openssl ) "
26 # libcurl must not be using an ssl backend boinc does not support.
27 # If the libcurl ssl backend changes, boinc should be recompiled.
30 !app-admin/quickswitch
31 >=app-misc/ca-certificates-20080809
32 net-misc/curl[-curl_ssl_gnutls(-),curl_ssl_libressl(-)=,-curl_ssl_nss(-),curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-),-curl_ssl_polarssl(-)]
36 >=dev-util/nvidia-cuda-toolkit-2.1
37 >=x11-drivers/nvidia-drivers-180.22
45 >=x11-libs/libnotify-0.7
46 x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit]
51 app-text/docbook-xml-dtd:4.4
53 X? ( virtual/imagemagick-tools[png,tiff] )
57 # >=x11-libs/wxGTK-3.0.2.0-r3 has webview removed, bug 587462
58 "${FILESDIR}"/fix_webview.patch
61 S="${WORKDIR}/${PN}-client_release-${MY_PV}-${PV}"
65 if use kernel_linux; then
67 if ! linux_config_exists; then
68 ewarn "Can't check the linux kernel configuration."
69 ewarn "You might be missing vsyscall support."
70 elif kernel_is -ge 4 4 \
71 && linux_chkconfig_present LEGACY_VSYSCALL_NONE; then
72 ewarn "You do not have vsyscall emulation enabled."
73 ewarn "This will prevent some boinc projects from running."
74 ewarn "Please enable vsyscall emulation:"
75 ewarn " CONFIG_LEGACY_VSYSCALL_EMULATE=y"
76 ewarn "in /usr/src/linux/.config, to be found at"
77 ewarn " Processor type and features --->"
78 ewarn " vsyscall table for legacy applications (None) --->"
80 ewarn "Alternatively, you can enable CONFIG_LEGACY_VSYSCALL_NATIVE."
81 ewarn "However, this has security implications and is not recommended."
89 # prevent bad changes in compile flags, bug 286701
90 sed -i -e "s:BOINC_SET_COMPILE_FLAGS::" configure.ac || die "sed failed"
94 use X && need-wxwidgets unicode
98 econf --disable-server \
100 --enable-dynamic-client-linkage \
105 $(use_enable X manager) \
106 $(usex X --with-wx-config="${WX_CONFIG}" --without-wxdir)
112 keepdir /var/lib/${PN}
115 # Create new icons. bug 593362
116 local s SIZES=(16 22 24 32 36 48 64 72 96 128 192 256)
117 for s in "${SIZES[@]}"; do
118 convert "${DISTDIR}"/${PN}.tif -resize ${s}x${s} "${WORKDIR}"/boinc_${s}.png || die
119 newicon -s $s "${WORKDIR}"/boinc_${s}.png boinc.png
121 make_desktop_entry boincmgr "${PN}" "${PN}" "Math;Science" "Path=/var/lib/${PN}"
123 # Rename the desktop file to boincmgr.desktop to (hot)fix bug 599910
124 mv "${ED%/}"/usr/share/applications/boincmgr{-${PN},}.desktop || \
125 die "Failed to rename desktop file"
129 rm -rf "${ED%/}"/etc || die "rm failed"
131 newinitd "${FILESDIR}"/${PN}.init ${PN}
132 newconfd "${FILESDIR}"/${PN}.conf ${PN}
133 systemd_dounit "${FILESDIR}"/${PN}.service
138 # note this works only for first install so we have to
139 # elog user about the need of being in video group
144 enewuser ${PN} -1 -1 /var/lib/${PN} "${groups}"
149 elog "You are using the source compiled version of boinc."
150 use X && elog "The graphical manager can be found at /usr/bin/boincmgr"
152 elog "You need to attach to a project to do anything useful with boinc."
153 elog "You can do this by running /etc/init.d/boinc attach"
154 elog "The howto for configuration is located at:"
155 elog "http://boinc.berkeley.edu/wiki/Anonymous_platform"
157 # Add warning about the new password for the client, bug 121896.
159 elog "If you need to use the graphical manager the password is in:"
160 elog "/var/lib/boinc/gui_rpc_auth.cfg"
161 elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
162 elog "/etc/conf.d/boinc"
163 elog "You should change this password to something more memorable (can be even blank)."
164 elog "Remember to launch init script before using manager. Or changing the password."
168 elog "To be able to use CUDA you should add boinc user to video group."
170 elog "gpasswd -a boinc video"