diff options
Diffstat (limited to 'games-util')
-rw-r--r-- | games-util/Manifest.gz | bin | 7680 -> 7681 bytes | |||
-rw-r--r-- | games-util/joycond/Manifest | 4 | ||||
-rw-r--r-- | games-util/joycond/files/joycond-systemd-paranoia.patch | 45 | ||||
-rw-r--r-- | games-util/joycond/files/joycond-systemd-paths.patch | 32 | ||||
-rw-r--r-- | games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild (renamed from games-util/joycond/joycond-0.1.0_p20210730.ebuild) | 6 | ||||
-rw-r--r-- | games-util/sc-controller/Manifest | 5 | ||||
-rw-r--r-- | games-util/sc-controller/files/sc-controller-bluetooth-evdev.patch | 38 | ||||
-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 |
8 files changed, 139 insertions, 5 deletions
diff --git a/games-util/Manifest.gz b/games-util/Manifest.gz Binary files differindex dae694cae1da..ce24a5ad14d9 100644 --- a/games-util/Manifest.gz +++ b/games-util/Manifest.gz diff --git a/games-util/joycond/Manifest b/games-util/joycond/Manifest index 81e9e2bcca5c..c0871c3b36c6 100644 --- a/games-util/joycond/Manifest +++ b/games-util/joycond/Manifest @@ -1,4 +1,6 @@ +AUX joycond-systemd-paranoia.patch 1095 BLAKE2B a69fca57e6857265021f1a2b709d06d08cf00dd23f3eea3fc91cc2ac264d77b425e22bc26f30b2e2e8680dbb80e7777419ec95bbacb398f87a66e1a7b6e5a886 SHA512 d3f9c3a88d01201d2872afabf178204f836315c8bd276e5b4090142ad57c42ca102642a256358cca44c85c3f3031b61736622cab5da40a147d6ea7164d2ad774 +AUX joycond-systemd-paths.patch 1626 BLAKE2B 6df9c18daf72949e5cc96a99be9da4af9e15d20101c513a5c2db79d912b0ef61348dd442cdc3172a042bce171e05c2d82deed4c05dbb088bd76520d5ac9c4609 SHA512 2c8e912f3f5a6b10d59b01fb40240bb725e75a7d900d9e808c6f501de9f48e89ac3b4028eb0df0d6fe1bf1b4a01fa861b593035ed9fc02fbcee7b5aba4b5e00b AUX joycond.initd 205 BLAKE2B e5da9bf96d39796897bd0f819c874c40285a85578c61c12c38c702e1719c238e8ad6e106d282846f8576a38ddd3c1960efdaeed2ab9e186b25e86cc40b0035e0 SHA512 2d96fe9af653f88adc8918733f729e9bf5e7c43ed5a6ae5f24f8ad73d45d05f59b142634377de74a3fccda6704233a862bb4a066068b1aabc428d6d54cd4cb0d DIST joycond-0.1.0_p20210730.tar.gz 29947 BLAKE2B d151e9a798a358e142c44722ce5d9892bc63a7c2992aa6b962a02ab971a8aec9bd343bd56cc26ae36e63d5977d1d0a99c52c35aeb779d352f1bbe2d15010e43c SHA512 1d0a82bd9e2aeecef3215232ffb6acb77008845fe0e8094e81d2b81627cca1e5d581986fad6631c5efd2b29514370fbac8a65d9996df762543d050628327a564 -EBUILD joycond-0.1.0_p20210730.ebuild 756 BLAKE2B 0cd4d88b137eb29d43c94c2748727fdace281c57b5d70f074c4059205d86c923d10d0ca1e54a1977b3b88ca07791cd06ca828f2b3b4bfce7b80ccd84a4820b0f SHA512 12c55cacef7844a7f7d061bff509e48045425e144f9ed457cdbe049e5638d087014b931f2289ffcddf23b8ac790df3c9874381471b9f9fd92ad95b35a331eee4 +EBUILD joycond-0.1.0_p20210730-r1.ebuild 812 BLAKE2B e9312a59a5859c335e16c5d3668161b632ea444e2607e3f33e356ee69dc0bd9e03c4c5614d49f3399543df49492f6dc78afed3fa4b6bc871a554fbe064fd242a SHA512 2d58ad8387f6d15832b6fcb5bf7a90a27d1f3c8f54838aee669be4b9d2b3390cf4778622d498103b75b753c9dcaff7a5c660a01fa2add59b5e12fcf9e0078510 MISC metadata.xml 342 BLAKE2B f256215b8ff7fe2d8b1d360f3a3da2a530a5c7b8137a2f38d21a51e303ead2fc3b28c20a9199bd7885a940908cd2b084ce58db14cb9578b3d63c5e86be5f45e8 SHA512 a68b62631acf469245b1c78ad35487390937f5a555251cc0ae75d7756677d760d2c730f891854e16e06cbf0382a649992006a1c7f13b843c03551aa1754f106c diff --git a/games-util/joycond/files/joycond-systemd-paranoia.patch b/games-util/joycond/files/joycond-systemd-paranoia.patch new file mode 100644 index 000000000000..f6803d074f17 --- /dev/null +++ b/games-util/joycond/files/joycond-systemd-paranoia.patch @@ -0,0 +1,45 @@ +From d39ce9de9420560494d92519f4e29a40d685a5b4 Mon Sep 17 00:00:00 2001 +From: Andrew Udvare <audvare@gmail.com> +Date: Sun, 12 Dec 2021 22:02:00 -0500 +Subject: [PATCH] systemd service: paranoia mode + +--- + systemd/joycond.service | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/systemd/joycond.service b/systemd/joycond.service +index cc8e408..5a8b045 100644 +--- a/systemd/joycond.service ++++ b/systemd/joycond.service +@@ -4,12 +4,26 @@ After=network.target + + [Service] + ExecStart=/usr/bin/joycond +-WorkingDirectory=/root +-StandardOutput=inherit +-StandardError=inherit + Restart=always +-User=root ++ ++DeviceAllow=char-input ++DevicePolicy=closed ++LockPersonality=yes ++MemoryDenyWriteExecute=yes ++NoNewPrivileges=yes ++ProtectClock=yes ++PrivateTmp=yes ++ProtectHome=yes ++ProtectHostname=yes ++ProtectControlGroups=yes ++ProtectKernelModules=yes ++ProtectProc=noaccess ++ProtectSystem=strict ++RestrictAddressFamilies=AF_NETLINK ++RestrictNetworkInterfaces= ++RestrictRealtime=yes ++RestrictSUIDSGID=yes ++SocketBindDeny=any + + [Install] + WantedBy=multi-user.target +- diff --git a/games-util/joycond/files/joycond-systemd-paths.patch b/games-util/joycond/files/joycond-systemd-paths.patch new file mode 100644 index 000000000000..8b8288350a3e --- /dev/null +++ b/games-util/joycond/files/joycond-systemd-paths.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9d6e93..4e05976 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,12 +28,24 @@ add_subdirectory(src) + install(TARGETS joycond DESTINATION /usr/bin/ + PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) +-install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION /lib/udev/rules.d/ ++ ++pkg_get_variable(UDEV_RULES_PATH udev udevdir) ++install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION ${UDEV_RULES_PATH}/rules.d/ + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) +-install(FILES systemd/joycond.service DESTINATION /etc/systemd/system ++ ++execute_process(COMMAND systemd-path systemd-system-unit OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE UNIT_RETVAL) ++if(NOT "${UNIT_RETVAL}" EQUAL 0) ++ set(SYSTEMD_SYSTEM_UNIT_PATH "/usr/lib/systemd/system") ++endif() ++install(FILES systemd/joycond.service DESTINATION ${SYSTEMD_SYSTEM_UNIT_PATH} + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) +-install(FILES systemd/joycond.conf DESTINATION /etc/modules-load.d ++ ++execute_process(COMMAND systemd-path modules-load OUTPUT_VARIABLE SYSTEMD_MODULES_LOAD_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE MODULES_RETVAL) ++if(NOT "${MODULES_RETVAL}" EQUAL 0) ++ set(SYSTEMD_MODULES_LOAD_PATH "/usr/lib/modules-load.d") ++endif() ++install(FILES systemd/joycond.conf DESTINATION ${SYSTEMD_MODULES_LOAD_PATH} + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) diff --git a/games-util/joycond/joycond-0.1.0_p20210730.ebuild b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild index e06a319c6811..89a5d6774449 100644 --- a/games-util/joycond/joycond-0.1.0_p20210730.ebuild +++ b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild @@ -31,9 +31,13 @@ CONFIG_CHECK=" S="${WORKDIR}/${PN}-${COMMIT}" +PATCHES=( + "${FILESDIR}"/${PN}-systemd-paths.patch + "${FILESDIR}"/${PN}-systemd-paranoia.patch +) + src_install() { cmake_src_install - rm -r "${ED}"/etc/modules-load.d/ || die newinitd "${FILESDIR}"/${PN}.initd ${PN} doman doc/${PN}.1 } 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 +} |