1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 AUTOTOOLS_AUTORECONF=true
11 inherit autotools-utils flag-o-matic eutils wxwidgets user
13 DESCRIPTION="The Berkeley Open Infrastructure for Network Computing"
14 HOMEPAGE="http://boinc.ssl.berkeley.edu/"
15 SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
19 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
20 IUSE="X cuda static-libs"
24 !app-admin/quickswitch
25 >=app-misc/ca-certificates-20080809
27 net-misc/curl[ssl,-gnutls(-),-nss(-),curl_ssl_openssl(+)]
31 >=dev-util/nvidia-cuda-toolkit-2.1
32 >=x11-drivers/nvidia-drivers-180.22
40 >=x11-libs/libnotify-0.7
41 x11-libs/wxGTK:2.8[X,opengl]
46 app-text/docbook-xml-dtd:4.4
51 "${FILESDIR}"/${P}-fix_subdirs.patch
54 AUTOTOOLS_IN_SOURCE_BUILD=1
57 # prevent bad changes in compile flags, bug 286701
58 sed -i -e "s:BOINC_SET_COMPILE_FLAGS::" configure.ac || die "sed failed"
60 autotools-utils_src_prepare
67 append-flags "$(pkg-config --cflags gtk+-2.0)"
72 need-wxwidgets unicode
73 wxconf+=" --with-wx-config=${WX_CONFIG}"
75 wxconf+=" --without-wxdir"
81 --enable-dynamic-client-linkage
86 $(use_enable X manager)
89 autotools-utils_src_configure
93 autotools-utils_src_install
96 keepdir /var/lib/${PN}/
99 newicon "${S}"/packages/generic/sea/${PN}mgr.48x48.png ${PN}.png || die
100 make_desktop_entry boincmgr "${PN}" "${PN}" "Math;Science" "Path=/var/lib/${PN}"
106 newinitd "${FILESDIR}"/${PN}.init ${PN}
107 newconfd "${FILESDIR}"/${PN}.conf ${PN}
112 # note this works only for first install so we have to
113 # elog user about the need of being in video group
115 enewuser ${PN} -1 -1 /var/lib/${PN} "${PN},video"
117 enewuser ${PN} -1 -1 /var/lib/${PN} "${PN}"
123 elog "You are using the source compiled version of ${PN}."
124 use X && elog "The graphical manager can be found at /usr/bin/${PN}mgr"
126 elog "You need to attach to a project to do anything useful with ${PN}."
127 elog "You can do this by running /etc/init.d/${PN} attach"
128 elog "The howto for configuration is located at:"
129 elog "http://boinc.berkeley.edu/wiki/Anonymous_platform"
131 # Add warning about the new password for the client, bug 121896.
133 elog "If you need to use the graphical manager the password is in:"
134 elog "/var/lib/${PN}/gui_rpc_auth.cfg"
135 elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
136 elog "/etc/conf.d/${PN}"
137 elog "You should change this password to something more memorable (can be even blank)."
138 elog "Remember to launch init script before using manager. Or changing the password."
142 elog "To be able to use CUDA you should add boinc user to video group."
144 elog "gpasswd -a boinc video"