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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Thu May 14 12:29:51 2009 UTC (10 years, 9 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Fix stripping issue per bug #257297. Again big thanks to Victor Ostroga.
(Portage version: 2.2_rc33/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-r1.ebuild,v 1.7 2009/05/13 21:04:22 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 multilib
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 epatch \
58 "${FILESDIR}"/${PV}-RSA_security.patch \
59 "${FILESDIR}"/${PV}-gcc44.patch
60 # fix stripping
61 ## TODO
62 }
63
64 src_configure() {
65 local wxconf=""
66 local config=""
67
68 # define preferable CFLAGS (recommended by upstream)
69 append-flags -O3 -funroll-loops -fforce-addr -ffast-math
70
71 # look for wxGTK
72 if use X; then
73 WX_GTK_VER="2.8"
74 need-wxwidgets unicode
75 wxconf="${wxconf} --with-wx-config=${WX_CONFIG}"
76 else
77 wxconf="${wxconf} --without-wxdir"
78 fi
79
80 # nonstandard enable
81 use server || config="--disable-server"
82
83 # Bug #248769: don't use strlcat and friends from kerberos or similar
84 local func
85 for func in strlcat strlcpy; do
86 eval "export ac_cv_func_${func}=no"
87 append-cppflags -D${func}=boinc_${func}
88 done
89
90 # configure
91 econf \
92 --disable-dependency-tracking \
93 --with-gnu-ld \
94 --enable-unicode \
95 --enable-client \
96 --with-ssl \
97 ${wxconf} \
98 ${config} \
99 $(use_with X x)
100
101 # Fix LDFLAGS. Link to compiled stuff and not to installed one
102 sed -i \
103 -e "s|LDFLAGS = |LDFLAGS = -L../lib |g" \
104 */Makefile || die "sed failed"
105 }
106
107 src_compile() {
108 # disable parallel build.
109 emake -j1 || die "emake failed"
110 }
111
112 src_install() {
113 emake DESTDIR="${D}" install || die "make install failed"
114
115 dodir /var/lib/${PN}/
116 keepdir /var/lib/${PN}/
117
118 if use X; then
119 newicon "${S}"/sea/${PN}mgr.48x48.png ${PN}.png
120 make_desktop_entry boinc_gui "${PN}" "${PN}" "Education;Science" /var/lib/${PN}
121 fi
122
123 # cleanup cruft
124 rm "${D}"/usr/bin/ca-bundle.crt
125 rm -rf "${D}"/etc/
126
127 # initd script needs to be multilib aware
128 cp "${FILESDIR}"/${PN}.init "${T}"
129 sed -i \
130 -e "s:%LIBDIR%:$(get_libdir):g" \
131 "${T}"/${PN}.init || die "sed for multilib in init script failed"
132 newinitd "${T}"/${PN}.init ${PN}
133 newconfd "${FILESDIR}"/${PN}.conf ${PN}
134 }
135
136 pkg_setup() {
137 enewgroup ${PN}
138 # note this works only for first install so we have to
139 # elog user about the need of being in video group
140 if use cuda; then
141 enewuser ${PN} -1 -1 /var/lib/${PN} "${PN},video"
142 else
143 enewuser ${PN} -1 -1 /var/lib/${PN} "${PN}"
144 fi
145 }
146
147 pkg_postinst() {
148 echo
149 elog "You are using the source compiled version."
150 elog "The manager can be found at /usr/bin/${PN}_gui"
151 elog
152 elog "You need to attach to a project to do anything useful with ${PN}."
153 elog "You can do this by running /etc/init.d/${PN} attach"
154 elog "The howto for configuration is located at:"
155 elog "http://boinc.berkeley.edu/wiki/Anonymous_platform"
156 elog
157 # Add warning about the new password for the client, bug 121896.
158 elog "If you need to use the graphical client the password is in:"
159 elog "/var/lib/${PN}/gui_rpc_auth.cfg"
160 elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
161 elog "/etc/conf.d/${PN}"
162 elog "You should change this to something more memorable (can be even blank)."
163 elog
164 elog "Remember to launch init script before using manager. Or changing the password."
165 if use cuda; then
166 elog "To be able to use CUDA you should add boinc user to video group."
167 elog "To do so run as root:"
168 elog "gpasswd -a boinc video"
169 fi
170 }

  ViewVC Help
Powered by ViewVC 1.1.20