/[gentoo-x86]/x11-misc/bumblebee/bumblebee-3.0.1.ebuild
Gentoo

Contents of /x11-misc/bumblebee/bumblebee-3.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Sep 14 20:24:21 2012 UTC (23 months, 2 weeks ago) by pacho
Branch: MAIN
Version bump, bug #433381 by mrueg.

(Portage version: 2.1.11.14/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/bumblebee-3.0-r2.ebuild,v 1.3 2012/06/20 12:49:22 scarabeus Exp $
4
5 EAPI=4
6 inherit multilib systemd user
7
8 DESCRIPTION="Service providing elegant and stable means of managing Optimus graphics chipsets"
9 HOMEPAGE="https://github.com/Bumblebee-Project/Bumblebee"
10 SRC_URI="mirror://github/Bumblebee-Project/${PN/bu/Bu}/${P}.tar.gz"
11
12 SLOT="0"
13 LICENSE="GPL-3"
14 KEYWORDS="~amd64 ~x86"
15
16 IUSE="+bbswitch video_cards_nouveau video_cards_nvidia"
17
18 RDEPEND="x11-misc/virtualgl
19 bbswitch? ( sys-power/bbswitch )
20 virtual/opengl
21 x11-base/xorg-drivers[video_cards_nvidia?,video_cards_nouveau?]"
22 DEPEND=">=sys-devel/autoconf-2.68
23 sys-devel/automake
24 sys-devel/gcc
25 virtual/pkgconfig
26 dev-libs/glib:2
27 x11-libs/libX11
28 dev-libs/libbsd
29 sys-apps/help2man"
30
31 REQUIRED_USE="|| ( video_cards_nouveau video_cards_nvidia )"
32
33 src_configure() {
34 if use video_cards_nvidia ; then
35 # Get paths to GL libs for all ABIs
36 local nvlib=""
37 for i in $(get_all_libdirs) ; do
38 nvlib="${nvlib}:/usr/${i}/opengl/nvidia/lib"
39 done
40
41 local nvpref="/usr/$(get_libdir)/opengl/nvidia"
42 local xorgpref="/usr/$(get_libdir)/xorg/modules"
43 ECONF_PARAMS="CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia \
44 CONF_LDPATH_NVIDIA=${nvlib#:} \
45 CONF_MODPATH_NVIDIA=${nvpref}/lib,${nvpref}/extensions,${xorgpref}/drivers,${xorgpref}"
46 fi
47
48 econf ${ECONF_PARAMS}
49 }
50
51 src_install() {
52 newconfd "${FILESDIR}"/bumblebee.confd bumblebee
53 newinitd "${FILESDIR}"/bumblebee.initd bumblebee
54 newenvd "${FILESDIR}"/bumblebee.envd 99bumblebee
55 systemd_dounit scripts/systemd/bumblebeed.service
56 default
57 }
58
59 pkg_preinst() {
60 use video_cards_nvidia || rm "${ED}"/etc/bumblebee/xorg.conf.nvidia
61 use video_cards_nouveau || rm "${ED}"/etc/bumblebee/xorg.conf.nouveau
62
63 enewgroup bumblebee
64 }
65
66 pkg_postinst() {
67 ewarn "In order to use Bumblebee, add your user to 'bumblebee' group."
68 ewarn "You may need to setup your /etc/bumblebee/bumblebee.conf"
69 }

  ViewVC Help
Powered by ViewVC 1.1.20