summaryrefslogtreecommitdiff
path: root/x11-misc
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/bumblebee/Manifest1
-rw-r--r--x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild95
-rw-r--r--x11-misc/bumblebee/bumblebee-3.2.1-r1.ebuild (renamed from x11-misc/bumblebee/bumblebee-3.2.1.ebuild)6
-rw-r--r--x11-misc/bumblebee/files/bumblebee-3.0.1-remove-wait.patch12
-rw-r--r--x11-misc/bumblebee/files/bumblebee-3.2.1-handle-nvidia-modeset.patch14
5 files changed, 20 insertions, 108 deletions
diff --git a/x11-misc/bumblebee/Manifest b/x11-misc/bumblebee/Manifest
index fa693dc7..eefc4b28 100644
--- a/x11-misc/bumblebee/Manifest
+++ b/x11-misc/bumblebee/Manifest
@@ -1,2 +1 @@
-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
deleted file mode 100644
index 7061f8c8..00000000
--- a/x11-misc/bumblebee/bumblebee-3.0.1-r2.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# 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-r1.ebuild
index c6820636..aa6be9e9 100644
--- a/x11-misc/bumblebee/bumblebee-3.2.1.ebuild
+++ b/x11-misc/bumblebee/bumblebee-3.2.1-r1.ebuild
@@ -28,6 +28,12 @@ DEPEND="${RDEPEND}
x11-libs/libX11
"
+src_prepare() {
+ # Dirty fix for issue https://github.com/Bumblebee-Project/Bumblebee/issues/699
+ # cherry picked from https://github.com/arafey/Bumblebee/commit/5636b24fa86a005a5d2e30bd794516db13ccba56
+ epatch "${FILESDIR}/${P}-handle-nvidia-modeset.patch"
+}
+
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"
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
deleted file mode 100644
index 06adda98..00000000
--- a/x11-misc/bumblebee/files/bumblebee-3.0.1-remove-wait.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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-3.2.1-handle-nvidia-modeset.patch b/x11-misc/bumblebee/files/bumblebee-3.2.1-handle-nvidia-modeset.patch
new file mode 100644
index 00000000..742a5d8e
--- /dev/null
+++ b/x11-misc/bumblebee/files/bumblebee-3.2.1-handle-nvidia-modeset.patch
@@ -0,0 +1,14 @@
+diff -Nur a/src/module.c b/src/module.c
+--- a/src/module.c 2013-04-26 16:49:03.022174178 +0100
++++ b/src/module.c 2016-09-19 18:50:43.080311387 +0100
+@@ -96,7 +96,9 @@
+ int retries = 30;
+ bb_log(LOG_INFO, "Unloading %s driver\n", driver);
+ char *mod_argv[] = {
+- "rmmod",
++ "modprobe",
++ "-r",
++ "nvidia_modeset",
+ driver,
+ NULL
+ };