Skip to content

Commit

Permalink
games-util/xpadneo: add 0.9.3
Browse files Browse the repository at this point in the history
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed May 30, 2022
1 parent 5043bc2 commit 3c4d6cf
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions games-util/xpadneo/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST xpadneo-0.9.1.tar.gz 1353080 BLAKE2B fc2207e005cae629da50048330cbaa7d27183b0bbb083d35c3c144e91470273b8c7006c4b62d10b947dbe4fd003ca39623630923e477aa4eff3c243405d876bd SHA512 51063d104f165018b8430e26d2ab5a622c214efaaba3f7706cc99892b2054f57667b419672de5c2696189d389401b07024658c36a88343d980de9802789bcb10
DIST xpadneo-0.9.2.tar.gz 1342249 BLAKE2B de8ed5314d84cb8d4b90c893938f36cc680617ace10eba5d1a86b5acb66747a9c9214896c8375136681c40b988501d9426e1b18eb4ff01d565219c2d7c10c37f SHA512 84470e37e9e44e84a85a91a0df1bca24e109cf2209ae1b131530539202d00242997f1f069989df79a6345387de62c4651c70c641b533deab8ad9a9246841d12d
DIST xpadneo-0.9.3.tar.gz 1342315 BLAKE2B 040f16e949a301926cc8e4c38212a658ffbc52832e1cd310ce5ae8bc568e2fd0fadad630771812f8b7ff76eaf5ad0f7ea8f158673a834aa1bd4d9407674acea7 SHA512 dd95e4bdbead8c8d93eca7d574989261e12bce232c1845e9bf11b5acdf3b9e47d62afb90f5a4208c788cf02ccaa73e99dc505f35679631119ba014a1f7796562
74 changes: 74 additions & 0 deletions games-util/xpadneo/xpadneo-0.9.3.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 3c4d6cf

Please sign in to comment.