summaryrefslogtreecommitdiff
path: root/sys-power/bbswitch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-power/bbswitch
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-power/bbswitch')
-rw-r--r--sys-power/bbswitch/Manifest6
-rw-r--r--sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild55
-rw-r--r--sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild8
-rw-r--r--sys-power/bbswitch/bbswitch-9999.ebuild55
-rw-r--r--sys-power/bbswitch/files/bbswitch-kernel-5.18.patch19
5 files changed, 26 insertions, 117 deletions
diff --git a/sys-power/bbswitch/Manifest b/sys-power/bbswitch/Manifest
index 7075fb47a209..98f4e95a9e15 100644
--- a/sys-power/bbswitch/Manifest
+++ b/sys-power/bbswitch/Manifest
@@ -1,7 +1,5 @@
+AUX bbswitch-kernel-5.18.patch 627 BLAKE2B 2b7673a82e5d90192667aba1d741353cdc8d9566636a28045b44e5fc130dc0c413a182a2c9b57e07337433fb447efec7b756b68fa94cc0e11eed02f42cf88706 SHA512 c658e0e8de95c678d1a3ea5659344fff9fce14a93e0f8da3f21f79dc9c820feb3c540e1892ffc10a444c96a768d6d3fecd684315988da5f401f5c6ef6f37be79
AUX bbswitch.modprobe 46 BLAKE2B e76506e79adc57bedd68f038293257e7c70f1f3bc924776741e152b7c95c691f5241066b742583af063a4bdde90134005949ce28715d0b8f0c51f59c582223c8 SHA512 a4fa992d66b401e039c995b64ac5f3b2491c3ccf4412e211d50d1e514253f9341dc77a6d8da808f03988735e44a97bb973f3303ed3c0eeed6f4e21794d3545b6
-DIST bbswitch-0.8_p20200526.tar.gz 15869 BLAKE2B cdeaf539a0996f53d3add215fca1127321b7183526a248340177f4320171b92a5ce531eeedfb1da2f0d9f07c6b61e8cfb635a457406e477640f2e7090b29b655 SHA512 487bcd845d1f462e77b5b9e3f304cd28d0ddfd391ecc36de530a3d18d9d4932bc895ed29972e27006b6f3eeb50c37b523ef786a26b6ee75c19fa55288a496d4a
DIST bbswitch-0.8_p20211129.tar.gz 15889 BLAKE2B f81343529957603734bc29453ae9513eb5e19a87425adb8975c621357c7caa0f353e06367cc186230adb28f75ae48330a58ba904854415bc118c8573f71566a0 SHA512 e7873ae34aed13e8f4d5709fede763552c28528e853ad02ee4a4377c043f1ce2ae5f7fc3e831ea1dc65f5a1c0a5ddded93b451258b539ed72b0e1c196676a677
-EBUILD bbswitch-0.8_p20200526.ebuild 1155 BLAKE2B cf4f4914b11e0d132d7f333bad291e12df6109efbae5a569e20994ea5c8936a4e71754d8e3fffade9d1bd761f4f0a11064e17a9eaf98e2f3ba6127b276f36fbf SHA512 028378100271cf8cbbb61b1cedd1d196e1de3927147c874be16fb6bb69ba8beebb676a93449f354f1f3f4c1e8186c567ebc4d08c30005dc7b3599fdc06c7ec9e
-EBUILD bbswitch-0.8_p20211129.ebuild 1157 BLAKE2B e983acc931af01609cdddfdeb711b0fff8e06cd50053dc8896f59325266cb08df44ddd58d7a7bada2e87129e1d6fa97edfe0e033027d31d73469988c83806ceb SHA512 c1c71a9932d083a262fb9e2404ccac8af366cbc8e50780fe9ceef09707e7dd175287e0a7046075fe263652750875e99b39a4225783ded585859506996248fc44
-EBUILD bbswitch-9999.ebuild 1157 BLAKE2B b6b77f0ecaf7ac94cc370d498929a8597572c9ecabcda1b817d9e4ceb01d5028d2e7d79f3ee0f5020fbe1d7d7a6fedba9e9daa16cbcf48e60b4a062eaa65e800 SHA512 3c7484b57111e6a78236e75a480472f68a68222e02dd763462197424812d301d0d2ada87290f0b226f2f9825fdc3e583809adceac348a8e6c49dd5816fe10e92
+EBUILD bbswitch-0.8_p20211129.ebuild 1206 BLAKE2B d6c99e136626d00018743ad9a9e23e4eab3a24d7a9f088e8f8877fc76837dadc381b8b4a2537ca3bd64c00a6c6e76c6138d59780471480313dd47077153699d1 SHA512 2f20f9c0009c3d5fa1c578f83f9223e7d33cb7cf60295dd19e8ad69f0ddb74854195f5668377f088303dae73e52bbdf87a2b0b8e7152718cb231166752c46a7b
MISC metadata.xml 999 BLAKE2B 9d2751b5928195f96c509147b5f6093a0fb3fd39762fb2c4b4509cde94258f35bada1009dae271b06f376e80a544f976495b8a4610ff9044d7cbd3658d942bde SHA512 d715f175dff0e5d5e34b23c5633469f2cdfbc64796cfb2c88c2fa02c39c6ab23b17d93b727ec900a0edc3bd8dccb09a27e598e8705d30b12e4c0a4ed423c9d42
diff --git a/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild b/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild
deleted file mode 100644
index 62367166d15b..000000000000
--- a/sys-power/bbswitch/bbswitch-0.8_p20200526.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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
-}
diff --git a/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild b/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild
index 409b02bf015a..2aa21af88733 100644
--- a/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild
+++ b/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit linux-mod toolchain-funcs
@@ -12,7 +12,7 @@ if [[ ${PV} == 9999 ]]; then
else
COMMIT="23891174a80ea79c7720bcc7048a5c2bfcde5cd9"
SRC_URI="https://github.com/Bumblebee-Project/bbswitch/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
+ KEYWORDS="amd64 x86"
S="${WORKDIR}/bbswitch-${COMMIT}"
fi
@@ -31,6 +31,8 @@ RDEPEND=""
MODULE_NAMES="bbswitch(acpi)"
+PATCHES=( "${FILESDIR}/${PN}-kernel-5.18.patch" )
+
pkg_setup() {
linux-mod_pkg_setup
diff --git a/sys-power/bbswitch/bbswitch-9999.ebuild b/sys-power/bbswitch/bbswitch-9999.ebuild
deleted file mode 100644
index 1c9b2ba061f9..000000000000
--- a/sys-power/bbswitch/bbswitch-9999.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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
-}
diff --git a/sys-power/bbswitch/files/bbswitch-kernel-5.18.patch b/sys-power/bbswitch/files/bbswitch-kernel-5.18.patch
new file mode 100644
index 000000000000..07cecd4cdf41
--- /dev/null
+++ b/sys-power/bbswitch/files/bbswitch-kernel-5.18.patch
@@ -0,0 +1,19 @@
+diff -u -r bbswitch-0.8/bbswitch.c bbswitch-0.8-5.18/bbswitch.c
+--- bbswitch-0.8/bbswitch.c 2022-05-24 20:26:22.184553495 +0000
++++ bbswitch-0.8-5.18/bbswitch.c 2022-05-24 20:29:00.797008130 +0000
+@@ -264,10 +264,15 @@
+ pci_disable_device(dis_dev);
+ do {
+ struct acpi_device *ad = NULL;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++ ad = acpi_fetch_acpi_dev(dis_handle);
++ if (!ad) {
++#else
+ int r;
+
+ r = acpi_bus_get_device(dis_handle, &ad);
+ if (r || !ad) {
++#endif
+ pr_warn("Cannot get ACPI device for PCI device\n");
+ break;
+ }