Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/bbswitch/
Date: Thu, 08 Jul 2021 13:01:57
Message-Id: 1625749094.4aef36ee9a0057913f133c2279e9db59798922cf.pacho@gentoo
1 commit: 4aef36ee9a0057913f133c2279e9db59798922cf
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 8 12:58:14 2021 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 8 12:58:14 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aef36ee
7
8 sys-power/bbswitch: Bump to latest snapshot
9
10 Also fix building
11
12 Closes: https://bugs.gentoo.org/761370
13 Thanks-to: Johannes Lode
14 Package-Manager: Portage-3.0.20, Repoman-3.0.3
15 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
16
17 sys-power/bbswitch/Manifest | 1 +
18 sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild | 55 ++++++++++++++++++++++++
19 2 files changed, 56 insertions(+)
20
21 diff --git a/sys-power/bbswitch/Manifest b/sys-power/bbswitch/Manifest
22 index 59ef57fa119..d0b1714198d 100644
23 --- a/sys-power/bbswitch/Manifest
24 +++ b/sys-power/bbswitch/Manifest
25 @@ -1 +1,2 @@
26 DIST bbswitch-0.8.tar.gz 15800 BLAKE2B d9a16d2ca8baebcbc7ad1d8c1daeb9822ed4ea797ff297848e7087d2a0b142b7cd1333d12346fcde85ad06ddb0640e0d6e299d00e0e8e6c7f96d0a409a08d1c6 SHA512 11ab163931feb6c0e202d04c4552b848e999fedea9990390c26b28abdb4a69081ccfb5a22d1e390cc274f1c0cfc9adedc719c5fece14738b17aaa93e28865b7c
27 +DIST bbswitch-0.8_p20200526.tar.gz 15869 BLAKE2B cdeaf539a0996f53d3add215fca1127321b7183526a248340177f4320171b92a5ce531eeedfb1da2f0d9f07c6b61e8cfb635a457406e477640f2e7090b29b655 SHA512 487bcd845d1f462e77b5b9e3f304cd28d0ddfd391ecc36de530a3d18d9d4932bc895ed29972e27006b6f3eeb50c37b523ef786a26b6ee75c19fa55288a496d4a
28
29 diff --git a/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild b/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild
30 new file mode 100644
31 index 00000000000..1c9b2ba061f
32 --- /dev/null
33 +++ b/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild
34 @@ -0,0 +1,55 @@
35 +# Copyright 1999-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit linux-mod toolchain-funcs
41 +
42 +if [[ ${PV} == 9999 ]]; then
43 + inherit git-r3
44 + EGIT_REPO_URI="https://github.com/Bumblebee-Project/${PN}.git"
45 + EGIT_BRANCH="develop"
46 +else
47 + COMMIT="ddbd243638c7bc2baecf43a78aff46cdc12e9b2e"
48 + SRC_URI="https://github.com/Bumblebee-Project/bbswitch/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
49 + KEYWORDS="~amd64 ~x86"
50 + S="${WORKDIR}/bbswitch-${COMMIT}"
51 +fi
52 +
53 +DESCRIPTION="Toggle discrete NVIDIA Optimus graphics card"
54 +HOMEPAGE="https://github.com/Bumblebee-Project/bbswitch"
55 +
56 +SLOT="0"
57 +LICENSE="GPL-3+"
58 +IUSE=""
59 +
60 +DEPEND="
61 + virtual/linux-sources
62 + sys-kernel/linux-headers
63 +"
64 +RDEPEND=""
65 +
66 +MODULE_NAMES="bbswitch(acpi)"
67 +
68 +pkg_setup() {
69 + linux-mod_pkg_setup
70 +
71 + BUILD_TARGETS="default"
72 + BUILD_PARAMS="KVERSION=${KV_FULL} CC=$(tc-getCC)"
73 +}
74 +
75 +src_prepare() {
76 + # Fix build failure, bug #513542 and bug #761370
77 + sed "s%^KDIR :=.*%KDIR := ${KV_OUT_DIR:-$KERNEL_DIR}%g" -i Makefile || die
78 +
79 + default
80 +}
81 +
82 +src_install() {
83 + einstalldocs
84 +
85 + insinto /etc/modprobe.d
86 + newins "${FILESDIR}"/bbswitch.modprobe bbswitch.conf
87 +
88 + linux-mod_src_install
89 +}