diff options
author | Pacho Ramos <pacho@gentoo.org> | 2021-07-08 14:58:14 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2021-07-08 14:58:14 +0200 |
commit | 4aef36ee9a0057913f133c2279e9db59798922cf (patch) | |
tree | a782fa14f7d7eb21fe3130e9f86517d43cd324bf /sys-power | |
parent | sys-boot/woeusb: Move to maintainer-needed (diff) | |
download | gentoo-4aef36ee9a0057913f133c2279e9db59798922cf.tar.gz gentoo-4aef36ee9a0057913f133c2279e9db59798922cf.tar.bz2 gentoo-4aef36ee9a0057913f133c2279e9db59798922cf.zip |
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@gentoo.org>
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/bbswitch/Manifest | 1 | ||||
-rw-r--r-- | sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/sys-power/bbswitch/Manifest b/sys-power/bbswitch/Manifest index 59ef57fa1197..d0b1714198d4 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 000000000000..1c9b2ba061f9 --- /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 +} |