summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2012-04-21 14:52:27 +0000
committerPacho Ramos <pacho@gentoo.org>2012-04-21 14:52:27 +0000
commit6c47552eabc16d4e797b9b0b1cf340135d28ed2c (patch)
treef28f08ae77d5d40a1b4e32bedf133966889f78b7 /x11-misc/bumblebee
parentversion bump (diff)
downloadgentoo-2-6c47552eabc16d4e797b9b0b1cf340135d28ed2c.tar.gz
gentoo-2-6c47552eabc16d4e797b9b0b1cf340135d28ed2c.tar.bz2
gentoo-2-6c47552eabc16d4e797b9b0b1cf340135d28ed2c.zip
Use same conf.d file for nouveau and nvidia, allowing both supports to co-exist.
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc/bumblebee')
-rw-r--r--x11-misc/bumblebee/ChangeLog8
-rw-r--r--x11-misc/bumblebee/bumblebee-3.0-r1.ebuild70
2 files changed, 77 insertions, 1 deletions
diff --git a/x11-misc/bumblebee/ChangeLog b/x11-misc/bumblebee/ChangeLog
index 9e9bea429437..48d82787905e 100644
--- a/x11-misc/bumblebee/ChangeLog
+++ b/x11-misc/bumblebee/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-misc/bumblebee
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/ChangeLog,v 1.1 2012/04/21 13:26:18 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/ChangeLog,v 1.2 2012/04/21 14:52:27 pacho Exp $
+
+*bumblebee-3.0-r1 (21 Apr 2012)
+
+ 21 Apr 2012; Pacho Ramos <pacho@gentoo.org> +bumblebee-3.0-r1.ebuild:
+ Use same conf.d file for nouveau and nvidia, allowing both supports to co-
+ exist.
*bumblebee-3.0 (21 Apr 2012)
diff --git a/x11-misc/bumblebee/bumblebee-3.0-r1.ebuild b/x11-misc/bumblebee/bumblebee-3.0-r1.ebuild
new file mode 100644
index 000000000000..0c7d6cce3069
--- /dev/null
+++ b/x11-misc/bumblebee/bumblebee-3.0-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/bumblebee-3.0-r1.ebuild,v 1.1 2012/04/21 14:52:27 pacho Exp $
+
+EAPI="4"
+
+inherit multilib eutils
+
+DESCRIPTION="Service providing elegant and stable means of managing Optimus graphics chipsets"
+HOMEPAGE="https://github.com/Bumblebee-Project/Bumblebee"
+SRC_URI="https://github.com/downloads/Bumblebee-Project/${PN/bu/Bu}/${P/bu/Bu}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+bbswitch video_cards_nouveau video_cards_nvidia"
+
+RDEPEND="x11-misc/virtualgl
+ bbswitch? ( sys-power/bbswitch )
+ virtual/opengl
+ x11-base/xorg-drivers[video_cards_nvidia?,video_cards_nouveau?]"
+DEPEND=">=sys-devel/autoconf-2.68
+ sys-devel/automake
+ sys-devel/gcc
+ dev-util/pkgconfig
+ dev-libs/glib:2
+ x11-libs/libX11
+ dev-libs/libbsd
+ sys-apps/help2man"
+
+REQUIRED_USE="|| ( video_cards_nouveau video_cards_nvidia )"
+
+src_configure() {
+ if use video_cards_nvidia ; then
+ # Get paths to GL libs for all ABIs
+ local nvlib=""
+ for i in $(get_all_libdirs) ; do
+ nvlib="${nvlib}:/usr/${i}/opengl/nvidia/lib"
+ done
+
+ local nvpref="/usr/$(get_libdir)/opengl/nvidia"
+ local xorgpref="/usr/$(get_libdir)/xorg/modules"
+ ECONF_PARAMS="CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia \
+ CONF_LDPATH_NVIDIA=${nvlib#:} \
+ CONF_MODPATH_NVIDIA=${nvpref}/lib,${nvpref}/extensions,${xorgpref}/drivers,${xorgpref}"
+ fi
+
+ econf ${ECONF_PARAMS}
+}
+
+src_install() {
+ newconfd "${FILESDIR}"/bumblebee.nouveau-confd bumblebee # The same conf.d file can be used for nvidia also
+ newinitd "${FILESDIR}"/bumblebee.initd bumblebee
+ default
+}
+
+pkg_preinst() {
+ ! use video_cards_nvidia && rm "${ED}"/etc/bumblebee/xorg.conf.nvidia
+ ! use video_cards_nouveau && rm "${ED}"/etc/bumblebee/xorg.conf.nouveau
+
+ enewgroup bumblebee
+}
+
+pkg_postinst() {
+ ewarn "This is *NOT* all! Bumblebee still *NOT* ready to use."
+ ewarn "You may need to setup your /etc/bumblebee/bumblebee.conf!"
+ ewarn "For example, default config suggests you have bbswitch installed."
+ ewarn "Also you should add your user to 'bumblebee' group."
+}