commit:     757576078f8bb360018a22e8ff765788eb9ff471
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 17 23:14:01 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Sep 17 23:14:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75757607

games-util/xpadneo: add 0.9.5

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-util/xpadneo/Manifest             |  1 +
 games-util/xpadneo/xpadneo-0.9.5.ebuild | 74 +++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/games-util/xpadneo/Manifest b/games-util/xpadneo/Manifest
index 5f03162043d5..79e3e12d0a71 100644
--- a/games-util/xpadneo/Manifest
+++ b/games-util/xpadneo/Manifest
@@ -1 +1,2 @@
 DIST xpadneo-0.9.4.tar.gz 1342566 BLAKE2B 
82c5bd4e9d68e0b9465047d446a1ffe0c95b9590d76f1c6cec2d6e1c770a6c3f7c6c47cffef5ce27c449f1ada854dd9b6e6413791360c0d8eee8a697718bb320
 SHA512 
347b0a066044926681863b342a71e5a9a03e9ca58b5f1c5e20b5d7d68d92b373c14ec809b3bd6e0d719f53792b146966a03e169f997a5f65cef762d6058d0d01
+DIST xpadneo-0.9.5.tar.gz 1341366 BLAKE2B 
d04a3e1b626af1f1a9ec114f0a8ed44c50ec8cde9da71483491d1afd7688611fd7548186ea68ef8a144aecec06acba816e81e9f0708c8dceb96fa1d40985bb44
 SHA512 
e7e299faf78c139d4cd189c4adc9bcbd52e1e1011ff90513cc09fc3e6cac1961018883933ad1db23dc02c8d5006f3166fbb42ae66150dff71138f2ed95f4576c

diff --git a/games-util/xpadneo/xpadneo-0.9.5.ebuild 
b/games-util/xpadneo/xpadneo-0.9.5.ebuild
new file mode 100644
index 000000000000..b193e5517951
--- /dev/null
+++ b/games-util/xpadneo/xpadneo-0.9.5.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# pkgcheck note: toolchain-funcs is not unused
+inherit linux-mod toolchain-funcs udev
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/atar-axis/xpadneo.git";
+       EGIT_MIN_CLONE_TYPE="single"
+else
+       SRC_URI="https://github.com/atar-axis/xpadneo/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Advanced Linux Driver for Xbox One Wireless Controller"
+HOMEPAGE="https://atar-axis.github.io/xpadneo/";
+
+LICENSE="GPL-3"
+SLOT="0"
+
+S="${WORKDIR}/${P}/hid-${PN}"
+MODULE_NAMES="hid-${PN}(kernel/drivers/hid::src)"
+BUILD_PARAMS='V=1 LD="$(tc-getLD)" KERNEL_SOURCE_DIR="${KV_OUT_DIR}"'
+BUILD_TARGETS="modules"
+
+CONFIG_CHECK="INPUT_FF_MEMLESS"
+
+src_install() {
+       linux-mod_src_install
+
+       insinto /etc/modprobe.d
+       doins etc-modprobe.d/${PN}.conf
+
+       udev_dorules etc-udev-rules.d/60-${PN}.rules
+
+       dodoc -r ../docs/{[^i]*.md,descriptors,reports} ../NEWS.md
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       udev_reload
+
+       local disable_ertm=/sys/module/bluetooth/parameters/disable_ertm
+       if kernel_is -ge 5 12; then
+               if [[ $(<${disable_ertm}) == Y ]]; then
+                       elog "Warning: bluetooth ERTM (Enhanced ReTransmission 
Mode) is disabled."
+                       elog "This is no longer recommended with kernel >=5.12 
to use ${PN}."
+                       elog "Can remove ${EROOT}/etc/modprobe.d/no-ertm.conf 
if it exists, and run:"
+                       elog "  echo N > ${disable_ertm}"
+                       elog "After changing, may need to re-pair the gamepad 
with bluetooth."
+               fi
+       elif [[ $(<${disable_ertm}) == N ]]; then
+               elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is 
enabled."
+               elog "While keeping enabled is recommended for rumble usage 
stability, it can"
+               elog "cause connection issues without a fix included in kernel 
>=5.12"
+               elog "If needed, this mode can be disabled by running:"
+               elog "  echo Y > ${disable_ertm}"
+               elog "  echo 'options bluetooth disable_ertm=y' > 
${EROOT}/etc/modprobe.d/no-ertm.conf"
+               elog "After changing, may need to re-pair the gamepad with 
bluetooth."
+       fi
+
+       if [[ ! ${REPLACING_VERSIONS} ]]; then
+               elog "To pair the gamepad and view module options, see 
documentation in:"
+               elog "  ${EROOT}/usr/share/doc/${PF}/"
+       fi
+}
+
+pkg_postrm() {
+       linux-mod_pkg_postrm
+       udev_reload
+}

Reply via email to