diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-04-21 13:26:18 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-04-21 13:26:18 +0000 |
commit | 654a581f18f62df0366c8aadb05905dded7f3662 (patch) | |
tree | 7a343ec739aebe9af8f8c3646e546c68459448f6 /x11-misc/bumblebee | |
parent | Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot t... (diff) | |
download | gentoo-2-654a581f18f62df0366c8aadb05905dded7f3662.tar.gz gentoo-2-654a581f18f62df0366c8aadb05905dded7f3662.tar.bz2 gentoo-2-654a581f18f62df0366c8aadb05905dded7f3662.zip |
Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot to mva and rei4dan for their work.
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc/bumblebee')
-rw-r--r-- | x11-misc/bumblebee/ChangeLog | 12 | ||||
-rw-r--r-- | x11-misc/bumblebee/Manifest | 6 | ||||
-rw-r--r-- | x11-misc/bumblebee/bumblebee-3.0.ebuild | 72 | ||||
-rw-r--r-- | x11-misc/bumblebee/files/bumblebee.initd | 23 | ||||
-rw-r--r-- | x11-misc/bumblebee/files/bumblebee.nouveau-confd | 3 | ||||
-rw-r--r-- | x11-misc/bumblebee/files/bumblebee.nvidia-confd | 3 | ||||
-rw-r--r-- | x11-misc/bumblebee/metadata.xml | 26 |
7 files changed, 145 insertions, 0 deletions
diff --git a/x11-misc/bumblebee/ChangeLog b/x11-misc/bumblebee/ChangeLog new file mode 100644 index 000000000000..9e9bea429437 --- /dev/null +++ b/x11-misc/bumblebee/ChangeLog @@ -0,0 +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 $ + +*bumblebee-3.0 (21 Apr 2012) + + 21 Apr 2012; Pacho Ramos <pacho@gentoo.org> +bumblebee-3.0.ebuild, + +files/bumblebee.initd, +files/bumblebee.nouveau-confd, + +files/bumblebee.nvidia-confd, +metadata.xml: + Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot to + mva and rei4dan for their work. + diff --git a/x11-misc/bumblebee/Manifest b/x11-misc/bumblebee/Manifest new file mode 100644 index 000000000000..9996f6cc3f6c --- /dev/null +++ b/x11-misc/bumblebee/Manifest @@ -0,0 +1,6 @@ +AUX bumblebee.initd 497 RMD160 15662b454dd86fd9b31729853fb8729a66eb5ddb SHA1 603ea131d6e08d8138ea6c09ba11e94facf652c1 SHA256 9bdeecdbe9e73b9947a78fc037095a3e0278e227c71df2ffe294dc05e7841546 +AUX bumblebee.nouveau-confd 60 RMD160 dca2e620d95414c3fcab40698d54dbb8d2897bc1 SHA1 ae5e15d8262b92ab4916435aa1c2552203a839a9 SHA256 9e0287f542cff0fd3452a0c3d6d427a3404706c93ac9a00f4d99fe52ed596d75 +AUX bumblebee.nvidia-confd 254 RMD160 4f9b93dcc275144d408d0f88b43141facdcdf2a9 SHA1 1a00a275c67ea6f2136714bf8899cf82dedb4fff SHA256 a3f70218e277c41903685de7870b5ddc0b1a51747ad24644b698166f1a20ec01 +DIST Bumblebee-3.0.tar.gz 136935 RMD160 510443fb17968ff8d3be1f3fdd5372132ceab75f SHA1 b5afc562e33fa23abd2cb9b83dee6d549d133f23 SHA256 a27ddb77b282ac8b972857fdb0dc5061cf0a0982b7ac3e1cfa698b4f786e49a1 +EBUILD bumblebee-3.0.ebuild 2195 RMD160 47017457822bb5a3aaa622b0e1a5a60a33e5979d SHA1 7ee397e370ee771e844f9032233f3c9b07b9e1d7 SHA256 b5a4c95249defec1b177076397289fdbb6dbfbe897d1c6fb6b73cf13967c7a98 +MISC metadata.xml 850 RMD160 254bf644166dd9e906489cbb33aedd1603e01f89 SHA1 b6ebfb742169d136897d8b9aec640b65de4e05d6 SHA256 ceb120933f3d5123a3ffced5a07d507e86fce4ec189c171bca877a37118d025a diff --git a/x11-misc/bumblebee/bumblebee-3.0.ebuild b/x11-misc/bumblebee/bumblebee-3.0.ebuild new file mode 100644 index 000000000000..2f2298700d3a --- /dev/null +++ b/x11-misc/bumblebee/bumblebee-3.0.ebuild @@ -0,0 +1,72 @@ +# 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.ebuild,v 1.1 2012/04/21 13:26:18 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" + +# FIXME: move from ^^ to || once both VIDEO_CARDS are supported at the same time +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() { + use video_cards_nvidia && newconfd "${FILESDIR}"/bumblebee.nvidia-confd bumblebee + use video_cards_nouveau && newconfd "${FILESDIR}"/bumblebee.nouveau-confd bumblebee + 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." +} diff --git a/x11-misc/bumblebee/files/bumblebee.initd b/x11-misc/bumblebee/files/bumblebee.initd new file mode 100644 index 000000000000..e9c9c29a64e1 --- /dev/null +++ b/x11-misc/bumblebee/files/bumblebee.initd @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/files/bumblebee.initd,v 1.1 2012/04/21 13:26:18 pacho Exp $ + +depend() { + need xdm vgl +} + +PIDFILE="${PIDFILE:-/var/run/bumblebee.pid}" + +start() { + ebegin "Starting BumbleBee Daemon" + start-stop-daemon -S -p "${PIDFILE}" -x /usr/sbin/bumblebeed -- -D ${BUMBLEBEE_EXTRA_OPTS} --pidfile "${PIDFILE}" + eend $? +} + +stop() { + + ebegin "Stopping BumbleBee Daemon" + start-stop-daemon -K -p "${PIDFILE}" -R SIGTERM/10 + eend $? +} diff --git a/x11-misc/bumblebee/files/bumblebee.nouveau-confd b/x11-misc/bumblebee/files/bumblebee.nouveau-confd new file mode 100644 index 000000000000..1c70206da6bf --- /dev/null +++ b/x11-misc/bumblebee/files/bumblebee.nouveau-confd @@ -0,0 +1,3 @@ +# /etc/conf.d/bumblebee + +BUMBLEBEE_EXTRA_OPTS="--use-syslog"
\ No newline at end of file diff --git a/x11-misc/bumblebee/files/bumblebee.nvidia-confd b/x11-misc/bumblebee/files/bumblebee.nvidia-confd new file mode 100644 index 000000000000..53d2006af3eb --- /dev/null +++ b/x11-misc/bumblebee/files/bumblebee.nvidia-confd @@ -0,0 +1,3 @@ +# /etc/conf.d/bumblebee + +BUMBLEBEE_EXTRA_OPTS="--use-syslog -l /usr/lib/opengl/nvidia/lib:/usr/lib/opengl/nvidia/extensions:/usr/lib64/opengl/nvidia/lib:/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/extensions:/usr/lib32/opengl/nvidia/extensions"
\ No newline at end of file diff --git a/x11-misc/bumblebee/metadata.xml b/x11-misc/bumblebee/metadata.xml new file mode 100644 index 000000000000..633263d82c8f --- /dev/null +++ b/x11-misc/bumblebee/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>pacho@gentoo.org</email> + <name>Pacho Ramos</name> +</maintainer> +<maintainer> + <email>mva@mva.name</email> + <name>Vadim A. Misbakh-Soloviev</name> +</maintainer> +<maintainer> + <email>rei4dan@gmail.com</email> + <name>My Th</name> +</maintainer> +<longdescription> + A rewrite of the original Bumblebee service, providing an elegant and stable + means of managing Optimus hybrid graphics chipsets. A primary goal of this + project is to not only enable use of the discrete GPU for rendering, but + also to enable smart power management of the dGPU when it's not in use. +</longdescription> +<use> + <flag name="bbswitch">Add dependency on <pkg>sys-kernel/bbswitch</pkg> for + PM feature</flag> +</use> +</pkgmetadata> |