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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Nov 10 21:14:27 2009 UTC (10 years, 3 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Version bump. Drop old. Per bug #292640.
(Portage version: 2.2_rc48/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20