Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/xpadneo/
Date: Mon, 30 May 2022 03:09:20
Message-Id: 1653880136.3c4d6cf2d04e66e62a6914e7515fa2641ca4fddb.ionen@gentoo
1 commit: 3c4d6cf2d04e66e62a6914e7515fa2641ca4fddb
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 30 03:07:42 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Mon May 30 03:08:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c4d6cf2
7
8 games-util/xpadneo: add 0.9.3
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 games-util/xpadneo/Manifest | 1 +
13 games-util/xpadneo/xpadneo-0.9.3.ebuild | 74 +++++++++++++++++++++++++++++++++
14 2 files changed, 75 insertions(+)
15
16 diff --git a/games-util/xpadneo/Manifest b/games-util/xpadneo/Manifest
17 index 4f6a7bd9839e..875c4aa114a4 100644
18 --- a/games-util/xpadneo/Manifest
19 +++ b/games-util/xpadneo/Manifest
20 @@ -1,2 +1,3 @@
21 DIST xpadneo-0.9.1.tar.gz 1353080 BLAKE2B fc2207e005cae629da50048330cbaa7d27183b0bbb083d35c3c144e91470273b8c7006c4b62d10b947dbe4fd003ca39623630923e477aa4eff3c243405d876bd SHA512 51063d104f165018b8430e26d2ab5a622c214efaaba3f7706cc99892b2054f57667b419672de5c2696189d389401b07024658c36a88343d980de9802789bcb10
22 DIST xpadneo-0.9.2.tar.gz 1342249 BLAKE2B de8ed5314d84cb8d4b90c893938f36cc680617ace10eba5d1a86b5acb66747a9c9214896c8375136681c40b988501d9426e1b18eb4ff01d565219c2d7c10c37f SHA512 84470e37e9e44e84a85a91a0df1bca24e109cf2209ae1b131530539202d00242997f1f069989df79a6345387de62c4651c70c641b533deab8ad9a9246841d12d
23 +DIST xpadneo-0.9.3.tar.gz 1342315 BLAKE2B 040f16e949a301926cc8e4c38212a658ffbc52832e1cd310ce5ae8bc568e2fd0fadad630771812f8b7ff76eaf5ad0f7ea8f158673a834aa1bd4d9407674acea7 SHA512 dd95e4bdbead8c8d93eca7d574989261e12bce232c1845e9bf11b5acdf3b9e47d62afb90f5a4208c788cf02ccaa73e99dc505f35679631119ba014a1f7796562
24
25 diff --git a/games-util/xpadneo/xpadneo-0.9.3.ebuild b/games-util/xpadneo/xpadneo-0.9.3.ebuild
26 new file mode 100644
27 index 000000000000..b193e5517951
28 --- /dev/null
29 +++ b/games-util/xpadneo/xpadneo-0.9.3.ebuild
30 @@ -0,0 +1,74 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +# pkgcheck note: toolchain-funcs is not unused
37 +inherit linux-mod toolchain-funcs udev
38 +
39 +if [[ ${PV} == 9999 ]]; then
40 + inherit git-r3
41 + EGIT_REPO_URI="https://github.com/atar-axis/xpadneo.git"
42 + EGIT_MIN_CLONE_TYPE="single"
43 +else
44 + SRC_URI="https://github.com/atar-axis/xpadneo/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 + KEYWORDS="~amd64 ~x86"
46 +fi
47 +
48 +DESCRIPTION="Advanced Linux Driver for Xbox One Wireless Controller"
49 +HOMEPAGE="https://atar-axis.github.io/xpadneo/"
50 +
51 +LICENSE="GPL-3"
52 +SLOT="0"
53 +
54 +S="${WORKDIR}/${P}/hid-${PN}"
55 +MODULE_NAMES="hid-${PN}(kernel/drivers/hid::src)"
56 +BUILD_PARAMS='V=1 LD="$(tc-getLD)" KERNEL_SOURCE_DIR="${KV_OUT_DIR}"'
57 +BUILD_TARGETS="modules"
58 +
59 +CONFIG_CHECK="INPUT_FF_MEMLESS"
60 +
61 +src_install() {
62 + linux-mod_src_install
63 +
64 + insinto /etc/modprobe.d
65 + doins etc-modprobe.d/${PN}.conf
66 +
67 + udev_dorules etc-udev-rules.d/60-${PN}.rules
68 +
69 + dodoc -r ../docs/{[^i]*.md,descriptors,reports} ../NEWS.md
70 +}
71 +
72 +pkg_postinst() {
73 + linux-mod_pkg_postinst
74 + udev_reload
75 +
76 + local disable_ertm=/sys/module/bluetooth/parameters/disable_ertm
77 + if kernel_is -ge 5 12; then
78 + if [[ $(<${disable_ertm}) == Y ]]; then
79 + elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is disabled."
80 + elog "This is no longer recommended with kernel >=5.12 to use ${PN}."
81 + elog "Can remove ${EROOT}/etc/modprobe.d/no-ertm.conf if it exists, and run:"
82 + elog " echo N > ${disable_ertm}"
83 + elog "After changing, may need to re-pair the gamepad with bluetooth."
84 + fi
85 + elif [[ $(<${disable_ertm}) == N ]]; then
86 + elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is enabled."
87 + elog "While keeping enabled is recommended for rumble usage stability, it can"
88 + elog "cause connection issues without a fix included in kernel >=5.12"
89 + elog "If needed, this mode can be disabled by running:"
90 + elog " echo Y > ${disable_ertm}"
91 + elog " echo 'options bluetooth disable_ertm=y' > ${EROOT}/etc/modprobe.d/no-ertm.conf"
92 + elog "After changing, may need to re-pair the gamepad with bluetooth."
93 + fi
94 +
95 + if [[ ! ${REPLACING_VERSIONS} ]]; then
96 + elog "To pair the gamepad and view module options, see documentation in:"
97 + elog " ${EROOT}/usr/share/doc/${PF}/"
98 + fi
99 +}
100 +
101 +pkg_postrm() {
102 + linux-mod_pkg_postrm
103 + udev_reload
104 +}