summaryrefslogtreecommitdiff
path: root/games-util/sc-controller
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-24 23:59:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-24 23:59:54 +0000
commit401101f9c8077911929d3f2b60a37098460a5d89 (patch)
treec2bef4719f6787550f0916aeaa8f4f403a9296af /games-util/sc-controller
parent4cbcc855382a06088e2f016f62cafdbcb7e40665 (diff)
gentoo resync : 25.03.2022
Diffstat (limited to 'games-util/sc-controller')
-rw-r--r--games-util/sc-controller/Manifest5
-rw-r--r--games-util/sc-controller/files/sc-controller-bluetooth-evdev.patch38
-rw-r--r--games-util/sc-controller/sc-controller-0.4.8.6_p20211211.ebuild (renamed from games-util/sc-controller/sc-controller-0.4.8.6-r2.ebuild)14
3 files changed, 54 insertions, 3 deletions
diff --git a/games-util/sc-controller/Manifest b/games-util/sc-controller/Manifest
index b1ed69d4033b..21aa6d9d4d79 100644
--- a/games-util/sc-controller/Manifest
+++ b/games-util/sc-controller/Manifest
@@ -1,3 +1,4 @@
-DIST sc-controller-0.4.8.6.tar.gz 2524756 BLAKE2B b31454fde0705bd49cdf3d56aec43d230617877a1dd1f72bef84d772c28f153b2e6812fd50b096e32a2ea3be549cfd1ee5fb3f9cf138c1dbc73c004ec11984b7 SHA512 d6f8098bff0fce064e194815a6c9bbf6ee974e22af056df9a12ebc24de4f1a22decfcf5191565c81aed39e3aa73b742bdc26040945e2b87543b67202834b46ea
-EBUILD sc-controller-0.4.8.6-r2.ebuild 1041 BLAKE2B bc35fe71336adba0c19134aa97fdcce9741c6fbf96ef9228cef46dd7fe67ea6b99f520f0cb40227897fedaf591c912047f428e13274883c48a8b476ff0d64500 SHA512 834a384623bae922e5363eba96f79bf102ef93c209466cfe64cf1b62fe413c1f223d16ea21edf41192b75ac08aab47ee5d51a5e1c6ca33fa6b61b070a6717cac
+AUX sc-controller-bluetooth-evdev.patch 1558 BLAKE2B ee5f23ce380aad0a240f341f7bf182568ecec3e826625e912999ece3eba655263022386e41599e3904ecf31bd047db6a121fe29b149c16a881e9e80d2426152f SHA512 66bcecb9d17f771c2117cb6d81b2aec3ef3c2df5b0bc533a98c1d9bb3a48298e48d4631e3489319dfdcb702824935c65ea71f9d7a62bd07dacc89f9d61e075a3
+DIST sc-controller-0.4.8.6_p20211211.tar.gz 2527489 BLAKE2B e04e2a9d617b6cfb3b0709f37bbbbb7384ac0c516f1f30a23547f1132c562cafeb8972f23e9cc93967187c881fd78fe6e6d102451aa5afc4bf8fce619e86820b SHA512 9d1030ed2766b9a0984852eafc343e265768489f3d01833e6633019276c0559cb4265d72013c0bc2ecb57ac35c95791ee8e2285f8c45917695ea92826bca6dc3
+EBUILD sc-controller-0.4.8.6_p20211211.ebuild 1263 BLAKE2B f7f7c094ba88d932c232dba0e6de9fbc476dedd11f1226606560455e187cacf40eeecfff46a43935f7e78d7424207f6155122e6ce949566c30fc983d0a8dfad1 SHA512 ca33f8b3c52d72c051b6ca96343bf9595693a6f75fbba0468629ecb30f523989310f964523ac88806b7caede0be8bc65fd0e8342273cfba59eb3e9b1189d20a6
MISC metadata.xml 341 BLAKE2B 8bfad400d398e07b5c8ba2c0a54c3fb3768d6748df641c4d2ad75a8032fd7f351f023acf791b9b61da0e70500cfdb1b669eaaa140f6351a851b6b2e23d3c5147 SHA512 4f17d6bd17da51eec7d7b90a3c72b9ef29bb6780dc4b67245ca4ce17a62128eb800ae1e519d2b136763c3c26cf89473fb23a7e878c1e4b19b116ed9546547f58
diff --git a/games-util/sc-controller/files/sc-controller-bluetooth-evdev.patch b/games-util/sc-controller/files/sc-controller-bluetooth-evdev.patch
new file mode 100644
index 000000000000..6f5b6ae1856d
--- /dev/null
+++ b/games-util/sc-controller/files/sc-controller-bluetooth-evdev.patch
@@ -0,0 +1,38 @@
+From 0b816d9fb06a325477961c50118db670e1cc15d2 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 12 Mar 2022 09:52:54 +0000
+Subject: [PATCH] Allow Bluetooth evdev and HID controllers to appear in the
+ list
+
+We currently check whether `dev.phys` is blank to work out whether the
+device is virtual or not. Unfortunately, this is also blank for
+Bluetooth-connected devices.
+
+I thought checking whether `dev.info.bustype` is `BUS_VIRTUAL` might
+help but our emulated gamepad has `BUS_USB`. Given that we deliberately
+make the emulated device look as real as possible, I can't find any
+other way to tell it apart from real USB devices. We should therefore
+only check whether `dev.phys` is blank when the bustype is `BUS_USB`.
+This will allow Bluetooth devices with `BUS_BLUETOOTH` to work.
+---
+ scc/gui/creg/dialog.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/scc/gui/creg/dialog.py b/scc/gui/creg/dialog.py
+index 76658e08..77a94dea 100644
+--- a/scc/gui/creg/dialog.py
++++ b/scc/gui/creg/dialog.py
+@@ -742,7 +742,9 @@ class ControllerRegistration(Editor):
+ for fname in evdev.list_devices():
+ dev = evdev.InputDevice(fname)
+ is_gamepad = ControllerRegistration.does_he_looks_like_a_gamepad(dev)
+- if not dev.phys:
++ # bustype 3 is BUS_USB, which is the type used for emulated
++ # gamepads. phys is blank for BUS_BLUETOOTH devices.
++ if dev.info.bustype == 3 and not dev.phys:
+ # Skipping over virtual devices so list doesn't show
+ # gamepads emulated by SCC
+ continue
+--
+2.34.1
+
diff --git a/games-util/sc-controller/sc-controller-0.4.8.6-r2.ebuild b/games-util/sc-controller/sc-controller-0.4.8.6_p20211211.ebuild
index 04d45d6855e4..6f4d359c969c 100644
--- a/games-util/sc-controller/sc-controller-0.4.8.6-r2.ebuild
+++ b/games-util/sc-controller/sc-controller-0.4.8.6_p20211211.ebuild
@@ -8,9 +8,10 @@ DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1 linux-info xdg
+COMMIT="3ce2d23c873f6f5ecc80ef90f153c14f744368f9"
DESCRIPTION="User-mode driver and GTK-based GUI for Steam Controllers and others"
HOMEPAGE="https://github.com/Ryochan7/sc-controller/"
-SRC_URI="https://github.com/Ryochan7/sc-controller/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/Ryochan7/sc-controller/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2 BSD CC-BY-3.0 CC0-1.0 LGPL-2.1 MIT PSF-2 ZLIB"
SLOT="0"
@@ -30,9 +31,20 @@ RDEPEND="
distutils_enable_tests pytest
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-bluetooth-evdev.patch
+)
+
pkg_setup() {
local CONFIG_CHECK="~INPUT_UINPUT"
linux-info_pkg_setup
python-single-r1_pkg_setup
}
+
+src_install() {
+ distutils-r1_src_install
+ rm -r "${ED}"/usr/lib/udev/ || die
+}