commit:     4aef36ee9a0057913f133c2279e9db59798922cf
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  8 12:58:14 2021 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Jul  8 12:58:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aef36ee

sys-power/bbswitch: Bump to latest snapshot

Also fix building

Closes: https://bugs.gentoo.org/761370
Thanks-to: Johannes Lode
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 sys-power/bbswitch/Manifest                      |  1 +
 sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild | 55 ++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/sys-power/bbswitch/Manifest b/sys-power/bbswitch/Manifest
index 59ef57fa119..d0b1714198d 100644
--- a/sys-power/bbswitch/Manifest
+++ b/sys-power/bbswitch/Manifest
@@ -1 +1,2 @@
 DIST bbswitch-0.8.tar.gz 15800 BLAKE2B 
d9a16d2ca8baebcbc7ad1d8c1daeb9822ed4ea797ff297848e7087d2a0b142b7cd1333d12346fcde85ad06ddb0640e0d6e299d00e0e8e6c7f96d0a409a08d1c6
 SHA512 
11ab163931feb6c0e202d04c4552b848e999fedea9990390c26b28abdb4a69081ccfb5a22d1e390cc274f1c0cfc9adedc719c5fece14738b17aaa93e28865b7c
+DIST bbswitch-0.8_p20200526.tar.gz 15869 BLAKE2B 
cdeaf539a0996f53d3add215fca1127321b7183526a248340177f4320171b92a5ce531eeedfb1da2f0d9f07c6b61e8cfb635a457406e477640f2e7090b29b655
 SHA512 
487bcd845d1f462e77b5b9e3f304cd28d0ddfd391ecc36de530a3d18d9d4932bc895ed29972e27006b6f3eeb50c37b523ef786a26b6ee75c19fa55288a496d4a

diff --git a/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild 
b/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild
new file mode 100644
index 00000000000..1c9b2ba061f
--- /dev/null
+++ b/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/Bumblebee-Project/${PN}.git";
+       EGIT_BRANCH="develop"
+else
+       COMMIT="ddbd243638c7bc2baecf43a78aff46cdc12e9b2e"
+       
SRC_URI="https://github.com/Bumblebee-Project/bbswitch/archive/${COMMIT}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+       S="${WORKDIR}/bbswitch-${COMMIT}"
+fi
+
+DESCRIPTION="Toggle discrete NVIDIA Optimus graphics card"
+HOMEPAGE="https://github.com/Bumblebee-Project/bbswitch";
+
+SLOT="0"
+LICENSE="GPL-3+"
+IUSE=""
+
+DEPEND="
+       virtual/linux-sources
+       sys-kernel/linux-headers
+"
+RDEPEND=""
+
+MODULE_NAMES="bbswitch(acpi)"
+
+pkg_setup() {
+       linux-mod_pkg_setup
+
+       BUILD_TARGETS="default"
+       BUILD_PARAMS="KVERSION=${KV_FULL} CC=$(tc-getCC)"
+}
+
+src_prepare() {
+       # Fix build failure, bug #513542 and bug #761370
+       sed "s%^KDIR :=.*%KDIR := ${KV_OUT_DIR:-$KERNEL_DIR}%g" -i Makefile || 
die
+
+       default
+}
+
+src_install() {
+       einstalldocs
+
+       insinto /etc/modprobe.d
+       newins "${FILESDIR}"/bbswitch.modprobe bbswitch.conf
+
+       linux-mod_src_install
+}

Reply via email to