summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-03-19 22:27:18 +0000
committerV3n3RiX <venerix@rogentos.ro>2016-03-19 22:27:18 +0000
commitfca938a0731ad5c2c28de042aa753b976b506ee5 (patch)
treebd0d133f60f65d57b9bdb845ec8f736e4d33cb49
parent48205fa5a7c1eba35e6f5980db02aba73759de91 (diff)
import bumblebee from deprecated repo
-rw-r--r--x11-misc/bumblebee/Manifest2
-rw-r--r--x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild95
-rw-r--r--x11-misc/bumblebee/bumblebee-3.2.1.ebuild87
-rw-r--r--x11-misc/bumblebee/files/bbswitch-setup20
-rw-r--r--x11-misc/bumblebee/files/bumblebee-3.0.1-remove-wait.patch12
-rw-r--r--x11-misc/bumblebee/files/bumblebee.confd3
-rw-r--r--x11-misc/bumblebee/files/bumblebee.envd3
-rw-r--r--x11-misc/bumblebee/files/bumblebee.initd23
-rw-r--r--x11-misc/bumblebee/files/bumblebee.nouveau-confd3
-rw-r--r--x11-misc/bumblebee/files/bumblebee.nvidia-confd3
-rw-r--r--x11-misc/bumblebee/metadata.xml26
11 files changed, 277 insertions, 0 deletions
diff --git a/x11-misc/bumblebee/Manifest b/x11-misc/bumblebee/Manifest
new file mode 100644
index 00000000..fa693dc7
--- /dev/null
+++ b/x11-misc/bumblebee/Manifest
@@ -0,0 +1,2 @@
+DIST bumblebee-3.0.1.tar.gz 137534 SHA256 447eebbcfbc8877a7a15126b492f07b9186428e75c768b1eeb86ce71076f3e60 SHA512 4b1b37c4b6bef9ea2b91bcfdacf5a2dea18fc4ed245d9881f93454d5e23bb07d4048114ec79c143f82504e20526e7b55e5b8d3a1b83c08340c244ea93fbef150 WHIRLPOOL cf93188d39d2449a2410005649f26c5462a0610bd6c616052cbbb9e27f253cbc2ad394dd737fc963b956298ae6d706c0adf587aebd102a46e82bbe13a7549535
+DIST bumblebee-3.2.1.tar.gz 143110 SHA256 1018703b07e2f607a4641249d69478ce076ae5a1e9dd6cff5694d394fa7ee30e SHA512 6f016f75d199577215ff00c059e196829e9d3efeb0fb6eebe6c3fad6176e330332e1ef25875a22ac9892895683d95899ea44f1ec1f85d31300ad83cb1fe0310a WHIRLPOOL 0d59b205f3c57afbf3fa6c8a55964afed8684e57db045e4c333c8e94f0b5d91637963a0b9f386eb6fe655716b8854e82ae5724dacdc76a34de6eb1f99ffc4908
diff --git a/x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild b/x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild
new file mode 100644
index 00000000..7061f8c8
--- /dev/null
+++ b/x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild,v 1.1 2013/01/21 21:19:16 pacho Exp $
+
+EAPI=5
+inherit eutils multilib systemd udev user
+
+DESCRIPTION="Service providing elegant and stable means of managing Optimus graphics chipsets"
+HOMEPAGE="https://github.com/Bumblebee-Project/Bumblebee"
+SRC_URI="mirror://github/Bumblebee-Project/${PN/bu/Bu}/${P}.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"
+DEPEND=">=sys-devel/autoconf-2.68
+ sys-devel/automake
+ sys-devel/gcc
+ virtual/pkgconfig
+ dev-libs/glib:2
+ x11-libs/libX11
+ dev-libs/libbsd
+ sys-apps/help2man"
+
+REQUIRED_USE="|| ( video_cards_nouveau video_cards_nvidia )"
+
+src_prepare() {
+ DOC_CONTENTS="In order to use Bumblebee, add your user to 'bumblebee' group.
+ You may need to setup your /etc/bumblebee/bumblebee.conf"
+
+ # --wait option for rmmod is deprecated:
+ # https://github.com/Bumblebee-Project/Bumblebee/issues/283
+ epatch "${FILESDIR}/${P}-remove-wait.patch"
+}
+
+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 \
+ --docdir=/usr/share/doc/"${PF}" \
+ ${ECONF_PARAMS}
+}
+
+src_install() {
+ newconfd "${FILESDIR}"/bumblebee.confd bumblebee
+ newinitd "${FILESDIR}"/bumblebee.initd bumblebee
+ newenvd "${FILESDIR}"/bumblebee.envd 99bumblebee
+ systemd_dounit scripts/systemd/bumblebeed.service
+
+ # Kogaion: tweak default settings
+ sed -i "s:TurnCardOffAtExit=.*:TurnCardOffAtExit=true:g" \
+ "${S}/conf/bumblebee.conf" || die
+
+ if use bbswitch; then
+ # This is much better than the udev rule below
+ doinitd "${FILESDIR}/bbswitch-setup"
+ sed -i "s:need xdm:need bbswitch-setup xdm:" \
+ "${ED}/etc/init.d/bumblebee" || die
+ fi
+
+ # Downstream says: this is just plain wrong, how about
+ # the situation in where the user has bumblebee installed
+ # but they are not actually on an Optimus system? This
+ # disables the nvidia driver forever.
+ ##
+ # Install udev rule to handle nvidia card switching,
+ # https://github.com/Bumblebee-Project/Bumblebee/issues/283
+ # udev_dorules "${FILESDIR}"/99-remove-nvidia-dev.rules
+
+ 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
+}
diff --git a/x11-misc/bumblebee/bumblebee-3.2.1.ebuild b/x11-misc/bumblebee/bumblebee-3.2.1.ebuild
new file mode 100644
index 00000000..c6820636
--- /dev/null
+++ b/x11-misc/bumblebee/bumblebee-3.2.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/bumblebee/bumblebee-3.2.1.ebuild,v 1.1 2013/05/26 18:55:23 pacho Exp $
+
+EAPI=5
+inherit eutils multilib readme.gentoo systemd user
+
+DESCRIPTION="Service providing elegant and stable means of managing Optimus graphics chipsets"
+HOMEPAGE="http://bumblebee-project.org https://github.com/Bumblebee-Project/Bumblebee"
+SRC_URI="http://bumblebee-project.org/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="amd64 x86"
+
+IUSE="+bbswitch video_cards_nouveau video_cards_nvidia"
+
+RDEPEND="
+ virtual/opengl
+ x11-misc/virtualgl:=
+ bbswitch? ( sys-power/bbswitch )
+"
+DEPEND="${RDEPEND}
+ dev-libs/glib:2
+ dev-libs/libbsd
+ sys-apps/help2man
+ virtual/pkgconfig
+ x11-libs/libX11
+"
+
+src_configure() {
+ DOC_CONTENTS="In order to use Bumblebee, add your user to 'bumblebee' group.
+ You may need to setup your /etc/bumblebee/bumblebee.conf"
+
+ 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 \
+ --docdir=/usr/share/doc/"${PF}" \
+ ${ECONF_PARAMS}
+}
+
+src_install() {
+ newconfd "${FILESDIR}"/bumblebee.confd bumblebee
+ newinitd "${FILESDIR}"/bumblebee.initd bumblebee
+ newenvd "${FILESDIR}"/bumblebee.envd 99bumblebee
+ systemd_dounit scripts/systemd/bumblebeed.service
+
+ # Kogaion: tweak default settings
+ sed -i "s:TurnCardOffAtExit=.*:TurnCardOffAtExit=true:g" \
+ "${S}/conf/bumblebee.conf" || die
+
+ readme.gentoo_create_doc
+
+ default
+
+ if use bbswitch; then
+ # This is much better than the udev rule below
+ doinitd "${FILESDIR}/bbswitch-setup"
+ sed -i "s:need xdm:need bbswitch-setup xdm:" \
+ "${ED}/etc/init.d/bumblebee" || die
+ fi
+ # Downstream says: this is just plain wrong, how about
+ # the situation in where the user has bumblebee installed
+ # but they are not actually on an Optimus system? This
+ # disables the nvidia driver forever.
+ ##
+ rm "${ED}/lib/udev/rules.d/99-bumblebee-nvidia-dev.rules" || die
+}
+
+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
+}
diff --git a/x11-misc/bumblebee/files/bbswitch-setup b/x11-misc/bumblebee/files/bbswitch-setup
new file mode 100644
index 00000000..7f6c7249
--- /dev/null
+++ b/x11-misc/bumblebee/files/bbswitch-setup
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+start() {
+ # workaround the fact that udev may have loaded nvidia or nouveau
+ # and bbswitch refuses to turn off the card.
+ ebegin "Setting up bbswitch"
+ # make sure that the nvidia and nouveau modules are
+ # removed, then reload bbswitch.
+ for mod in nvidia nouveau; do
+ modprobe -r ${mod} 2> /dev/null # best effort
+ done
+ # reload bbswitch now
+ modprobe -r bbswitch
+ modprobe bbswitch # this inherits the options
+ eend 0
+}
+
diff --git a/x11-misc/bumblebee/files/bumblebee-3.0.1-remove-wait.patch b/x11-misc/bumblebee/files/bumblebee-3.0.1-remove-wait.patch
new file mode 100644
index 00000000..06adda98
--- /dev/null
+++ b/x11-misc/bumblebee/files/bumblebee-3.0.1-remove-wait.patch
@@ -0,0 +1,12 @@
+diff --git a/src/module.c b/src/module.c
+index 06f8872..55fa70e 100644
+--- a/src/module.c
++++ b/src/module.c
+@@ -96,7 +96,6 @@ int module_unload(char *driver) {
+ bb_log(LOG_INFO, "Unloading %s driver\n", driver);
+ char *mod_argv[] = {
+ "rmmod",
+- "--wait",
+ driver,
+ NULL
+ }; \ No newline at end of file
diff --git a/x11-misc/bumblebee/files/bumblebee.confd b/x11-misc/bumblebee/files/bumblebee.confd
new file mode 100644
index 00000000..1c70206d
--- /dev/null
+++ b/x11-misc/bumblebee/files/bumblebee.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.envd b/x11-misc/bumblebee/files/bumblebee.envd
new file mode 100644
index 00000000..e19cc56a
--- /dev/null
+++ b/x11-misc/bumblebee/files/bumblebee.envd
@@ -0,0 +1,3 @@
+# Comment this out if you are using VirtualGL also for other purposes and this
+# slows down things for you.
+VGL_READBACK="pbo"
diff --git a/x11-misc/bumblebee/files/bumblebee.initd b/x11-misc/bumblebee/files/bumblebee.initd
new file mode 100644
index 00000000..0a9fbb79
--- /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.2 2012/06/04 19:46:24 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 00000000..1c70206d
--- /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 00000000..53d2006a
--- /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 00000000..633263d8
--- /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>