summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <sudinave@gmail.com>2021-01-24 17:13:45 -0500
committerSam James <sam@gentoo.org>2021-03-16 14:50:21 +0000
commit992a35642a2f076882ba39cf10799186c35da36d (patch)
tree1b76b8c1871f77114e3ef45dc99f9cf3b73d7aa1 /games-util/xpadneo/xpadneo-9999.ebuild
parentnet-analyzer/tcptrace: drop 6.6.7_p4_p1, 6.6.7_p5 (diff)
downloadgentoo-992a35642a2f076882ba39cf10799186c35da36d.tar.gz
gentoo-992a35642a2f076882ba39cf10799186c35da36d.tar.bz2
gentoo-992a35642a2f076882ba39cf10799186c35da36d.zip
games-util/xpadneo: new package 0.9
Signed-off-by: Ionen Wolkens <sudinave@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/19203 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-util/xpadneo/xpadneo-9999.ebuild')
-rw-r--r--games-util/xpadneo/xpadneo-9999.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/games-util/xpadneo/xpadneo-9999.ebuild b/games-util/xpadneo/xpadneo-9999.ebuild
new file mode 100644
index 000000000000..a40a337a9918
--- /dev/null
+++ b/games-util/xpadneo/xpadneo-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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+="/hid-${PN}"
+MODULE_NAMES="hid-${PN}(kernel/drivers/hid::src)"
+BUILD_PARAMS='V=1 LD="$(tc-getLD)" KERNEL_SOURCE_DIR="${KERNEL_DIR}"'
+BUILD_TARGETS="src/version.h 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/98-${PN}.rules
+
+ dodoc -r ../docs/{[^i]*.md,descriptors,reports} ../NEWS.md
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ udev_reload
+
+ local ertm=/sys/module/bluetooth/parameters/disable_ertm
+ if ! [[ ${REPLACING_VERSIONS} && $(<${ertm}) == Y ]]; then
+ elog "To pair the gamepad and view module options, see documentation in:"
+ elog " ${EROOT}/usr/share/doc/${PF}"
+ elog
+ elog "Be warned that bluetooth's ERTM (Enhanced ReTransmission Mode) can"
+ elog "cause the gamepad to enter a re-connection loop."
+ elog "- To disable immediately:"
+ elog " echo Y > ${ertm}"
+ elog "- To disable for next and subsequent boot:"
+ elog " echo 'options bluetooth disable_ertm=y' > ${EROOT}/etc/modprobe.d/no-ertm.conf"
+ elog "- Or, if bluetooth isn't a module, add to the kernel's command line:"
+ elog " bluetooth.disable_ertm=y"
+ fi
+}
+
+pkg_postrm() {
+ linux-mod_pkg_postrm
+ udev_reload
+}