/[gentoo-x86]/sci-misc/boinc/boinc-6.6.40-r2.ebuild
Gentoo

Contents of /sci-misc/boinc/boinc-6.6.40-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Wed Dec 9 19:03:44 2009 UTC (10 years, 3 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
rm
(Portage version: 2.2_rc56/cvs/Linux i686)

1 scarabeus 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 scarabeus 1.4 # $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/boinc-6.6.40-r2.ebuild,v 1.3 2009/10/20 10:18:09 scarabeus Exp $
4 scarabeus 1.1
5     EAPI="2"
6    
7     inherit flag-o-matic depend.apache eutils wxwidgets autotools
8    
9     DESCRIPTION="The Berkeley Open Infrastructure for Network Computing"
10     HOMEPAGE="http://boinc.ssl.berkeley.edu/"
11     SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.bz2"
12    
13     LICENSE="LGPL-2.1"
14     SLOT="0"
15     KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16     IUSE="X +client cuda server"
17    
18     RDEPEND="
19     !sci-misc/boinc-bin
20     !app-admin/quickswitch
21     >=app-misc/ca-certificates-20080809
22     dev-libs/openssl
23     net-misc/curl
24     sys-apps/util-linux
25     sys-libs/zlib
26     cuda? (
27     >=dev-util/nvidia-cuda-toolkit-2.1
28     >=x11-drivers/nvidia-drivers-180.22
29     )
30     server? (
31     >=virtual/mysql-5.0
32     dev-python/mysql-python
33     )
34     "
35     DEPEND="${RDEPEND}
36     sys-devel/gettext
37     server? ( virtual/imap-c-client )
38     X? (
39     media-libs/freeglut
40     media-libs/jpeg
41     x11-libs/wxGTK:2.8[X,opengl]
42     )
43     "
44    
45 scarabeus 1.3 # Upstream sucks in autotools
46     MAKEOPTS="-j1"
47    
48 scarabeus 1.1 src_prepare() {
49     # use system ssl certificates
50     mkdir "${S}"/curl
51     cp /etc/ssl/certs/ca-certificates.crt "${S}"/curl/ca-bundle.crt
52    
53     # prevent bad changes in compile flags, bug 286701
54     sed -i -e "s:BOINC_SET_COMPILE_FLAGS::" configure.ac || die "sed failed"
55    
56     epatch \
57     "${FILESDIR}"/6.4.5-glibc210.patch \
58     "${FILESDIR}"/${PV}-*
59    
60     eautoreconf
61     }
62    
63     src_configure() {
64     local wxconf=""
65     local conf=""
66    
67     # define preferable CFLAGS (recommended by upstream)
68     append-flags -O3 -funroll-loops -fforce-addr -ffast-math
69    
70     # look for wxGTK
71     if use X; then
72     WX_GTK_VER="2.8"
73     need-wxwidgets unicode
74     wxconf+=" --with-wx-config=${WX_CONFIG}"
75     else
76     wxconf+=" --without-wxdir"
77     fi
78    
79     # Bug #248769: don't use strlcat and friends from kerberos or similar
80     #local func
81     #for func in strlcat strlcpy; do
82     # eval "export ac_cv_func_${func}=no"
83     # append-cppflags -D${func}=boinc_${func}
84     #done
85     use server || conf+=" --disable-server"
86     use X || conf+=" --disable-manager"
87     use client || conf+=" --disable-client"
88    
89     # configure
90     econf \
91     --disable-dependency-tracking \
92     --enable-unicode \
93     --with-ssl \
94     $(use_with X x) \
95     ${wxconf} \
96     ${conf}
97     }
98    
99     src_install() {
100     emake DESTDIR="${D}" install || die "make install failed"
101    
102     dodir /var/lib/${PN}/
103     keepdir /var/lib/${PN}/
104    
105     if use X; then
106     newicon "${S}"/packages/generic/sea/${PN}mgr.48x48.png ${PN}.png || die
107     make_desktop_entry boincmgr "${PN}" "${PN}" "Math;Science" /var/lib/${PN}
108     fi
109    
110     # cleanup cruft
111     rm -rf "${D}"/etc/
112    
113     newinitd "${FILESDIR}"/${PN}.init ${PN}
114     newconfd "${FILESDIR}"/${PN}.conf ${PN}
115     }
116    
117     pkg_setup() {
118     enewgroup ${PN}
119     # note this works only for first install so we have to
120     # elog user about the need of being in video group
121     if use cuda; then
122     enewuser ${PN} -1 -1 /var/lib/${PN} "${PN},video"
123     else
124     enewuser ${PN} -1 -1 /var/lib/${PN} "${PN}"
125     fi
126     }
127    
128     pkg_postinst() {
129     echo
130     elog "You are using the source compiled version of ${PN}."
131     use X && elog "The graphical manager can be found at /usr/bin/${PN}mgr"
132     elog
133     elog "You need to attach to a project to do anything useful with ${PN}."
134     elog "You can do this by running /etc/init.d/${PN} attach"
135     elog "The howto for configuration is located at:"
136     elog "http://boinc.berkeley.edu/wiki/Anonymous_platform"
137     elog
138     # Add warning about the new password for the client, bug 121896.
139     if use X; then
140     elog "If you need to use the graphical manager the password is in:"
141     elog "/var/lib/${PN}/gui_rpc_auth.cfg"
142     elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
143     elog "/etc/conf.d/${PN}"
144     elog "You should change this password to something more memorable (can be even blank)."
145     elog "Remember to launch init script before using manager. Or changing the password."
146     elog
147     fi
148     if use cuda; then
149     elog "To be able to use CUDA you should add boinc user to video group."
150     elog "To do so run as root:"
151     elog "gpasswd -a boinc video"
152     fi
153     }

  ViewVC Help
Powered by ViewVC 1.1.20