bumblebee: initial import, version 3.2.1

This commit is contained in:
Matt Housh 2018-08-16 16:05:08 -05:00
parent 9dfda6a129
commit f8d0408d57
9 changed files with 147 additions and 0 deletions

24
bumblebee/.footprint Normal file
View File

@ -0,0 +1,24 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/bash_completion.d/
-rw-r--r-- root/root etc/bash_completion.d/optirun
drwxr-xr-x root/root etc/bumblebee/
-rw-r--r-- root/root etc/bumblebee/bumblebee.conf
drwxr-xr-x root/root etc/bumblebee/xorg.conf.d/
-rw-r--r-- root/root etc/bumblebee/xorg.conf.d/10-dummy.conf (EMPTY)
-rw-r--r-- root/root etc/bumblebee/xorg.conf.nouveau
-rw-r--r-- root/root etc/bumblebee/xorg.conf.nvidia
drwxr-xr-x root/root etc/modprobe.d/
-rw-r--r-- root/root etc/modprobe.d/bumblebee.conf
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/bumblebeed
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/udev/
drwxr-xr-x root/root lib/udev/rules.d/
-rw-r--r-- root/root lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/bumblebee-bugreport
-rwxr-xr-x root/root usr/bin/optirun
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/bumblebeed
drwxr-xr-x root/root usr/share/

4
bumblebee/.md5sum Normal file
View File

@ -0,0 +1,4 @@
07f580e014d5a9e386eb561049cf36ff blacklist.conf
30974e677bb13e8a3825fd6f3e7d3b24 bumblebee-3.2.1.tar.gz
03602d48ae96c47d57394b9d54ee9f5f bumblebeed.rc
46c8cd4ce30db7c22de0417febb7a2ab libglvnd.patch

8
bumblebee/.signature Normal file
View File

@ -0,0 +1,8 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3zN6BiEyz2obmcyYQfa55cufTai4L6y41lUxz45NgGYml+RQ0iJWGL9GX4tmyr7u8z8m05+Rg5w5dKWLQ0GiwAM=
SHA256 (Pkgfile) = 4313f8785552bda10dca7b4c9fbc752177b88517d8941ba86bf57fe209d31e5e
SHA256 (.footprint) = bfdffd4dc5e7478600d928d831587205571dee12b90f220958c7b40b9c3afac9
SHA256 (bumblebee-3.2.1.tar.gz) = 1018703b07e2f607a4641249d69478ce076ae5a1e9dd6cff5694d394fa7ee30e
SHA256 (libglvnd.patch) = b260d64a53617807afe21560db0592d114d7775b182e13fb59349f0157c8dba4
SHA256 (blacklist.conf) = b3dcf27582eb7abe8eb0d991685357386776011cff02cfc8d5f571e2e61b4b8d
SHA256 (bumblebeed.rc) = 344ea5d17ec84dd3bfca95b28e0a607ab9e0b74dbbdd07fce5e89c48a368a6d3

27
bumblebee/Pkgfile Normal file
View File

@ -0,0 +1,27 @@
# Description: An effort to make Nvidia Optimus laptops work in GNU/Linux
# URL: https://bumblebee-project.org/
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: libbsd xorg-libx11 glib bbswitch
name=bumblebee
version=3.2.1
release=1
source=(http://bumblebee-project.org/$name-$version.tar.gz \
libglvnd.patch blacklist.conf bumblebeed.rc)
build() {
cd $name-$version
patch -p1 -i $SRC/libglvnd.patch
./configure \
CONF_DRIVER_MODULE_NVIDIA=nvidia \
CONF_LDPATH_NVIDIA=/usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32 \
CONF_MODPATH_NVIDIA=/usr/lib/nvidia/xorg,/usr/lib/xorg/modules \
--prefix=/usr \
--sysconfdir=/etc
make
make DESTDIR=$PKG install
rm -r $PKG/usr/share/doc
mv $PKG/etc/bash_completion.d/{bumblebee,optirun}
install -D -m 0644 $SRC/blacklist.conf $PKG/etc/modprobe.d/bumblebee.conf
install -D -m 0755 $SRC/bumblebeed.rc $PKG/etc/rc.d/bumblebeed
}

5
bumblebee/blacklist.conf Normal file
View File

@ -0,0 +1,5 @@
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nouveau

5
bumblebee/bumblebee.conf Normal file
View File

@ -0,0 +1,5 @@
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nouveau

38
bumblebee/bumblebeed.rc Normal file
View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# /etc/rc.d/bumblebeed: start/stop bumblebeed daemon
#
GROUP="bumblebee"
SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/bumblebeed
PID=/var/run/bumblebeed.pid
OPTS="-D -g ${GROUP}"
case $1 in
start)
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
;;
stop)
$SSD --stop --retry 10 --pidfile $PID
;;
restart)
$0 stop
$0 start
;;
status)
$SSD --status --pidfile $PID
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
# End of file

26
bumblebee/libglvnd.patch Normal file
View File

@ -0,0 +1,26 @@
From c3ccbb7f6dd00038b1cb328898a29583e3a6c9be Mon Sep 17 00:00:00 2001
From: SolarAquarion <shlomochoina@gmail.com>
Date: Sun, 19 Feb 2017 16:53:09 -0500
Subject: [PATCH] adding workaround for libglvnd
---
src/optirun.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/optirun.c b/src/optirun.c
index 65c83d4..ec72057 100644
--- a/src/optirun.c
+++ b/src/optirun.c
@@ -203,7 +203,11 @@ static int run_primus(int argc, char **argv) {
/* primus starts the X server when needed, fixes long-standing fork issue */
setenv("BUMBLEBEE_SOCKET", bb_config.socket_path, 1);
-
+
+/* primus needs this variable workaround for libglvnd enabled mesa */
+
+ setenv("__GLVND_DISALLOW_PATCHING", "1", 0);
+
/* set LD_LIBRARY_PATH to primus_ld_path plus ld_path plus current LD_LIBRARY_PATH */
setenv("PRIMUS_DISPLAY", bb_config.x_display, 0);
char *ldpath_cur = getenv("LD_LIBRARY_PATH");

10
bumblebee/pre-install Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
if [ -z "`getent group bumblebee`" ]; then
/usr/sbin/groupadd --system bumblebee
fi
if [ -z "`getent passwd bumblebee`" ]; then
/usr/sbin/useradd -r -g bumblebee -d /etc/bumblebee -s /bin/false -c "bumblebee user" bumblebee
/usr/bin/passwd -l bumblebee
fi