Package Details: xboxdrv 0.8.9-1

Git Clone URL: https://aur.archlinux.org/xboxdrv.git (read-only, click to copy)
Package Base: xboxdrv
Description: Userspace Xbox gamepad driver and input remapper
Upstream URL: https://github.com/xiota/xboxdrv
Licenses: GPL-3.0-or-later
Submitter: None
Maintainer: xiota
Last Packager: xiota
Votes: 258
Popularity: 0.32
First Submitted: 2009-11-17 12:07 (UTC)
Last Updated: 2024-04-05 06:58 (UTC)

Pinned Comments

xiota commented on 2024-04-02 11:20 (UTC) (edited on 2024-04-05 06:59 (UTC) by xiota)

Although other Xbox gamepad drivers are now available, this package is still useful as an input remapper for programs that support only Xbox controllers.

This package now uses a new repo based on the original stable branch. I plan to merge some fixes/updates from other repos.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 14 Next › Last »

Doubl33n commented on 2021-08-17 16:02 (UTC)

@hardas When I tried running the patch -p1 < pkgbuild.patch command, it complained that the latter patch file is invalid Hunk #2 FAILED at 34. I think the different metadata you get when creating it makes the patch file invalid for makepkg.

But it is not going to be an issue once you run sha512sum fix-99-scons-unsupported-has_key.patch inside the source directory, copy the resulting sha512 sum, and replace 7ba08694be005eae98320957e4be6a84ff77f8b2ea2973dafc300527380074cdb6a3e0692d6c1e285d919cb6f795c494955997782c59a30e9672b65548c86a2f with your new sum.

Once I did this, it worked absolutely fine. So thanks a lot for this, I was eagerly waiting for a fix and just created this account to respond!

hardas commented on 2021-08-16 11:20 (UTC) (edited on 2021-08-16 11:30 (UTC) by hardas)

The way I installed it was as follows:

Download the file using the helper script of my choice (trizen) trizen -G xboxdrv

Create a new patch file with the necessary changes by running the following:

cat > fix-99-scons-unsupported-has_key.patch <<EOF
--- a/SConstruct        2015-11-09 12:19:35.000000000 +0200
+++ b/SConstruct        2021-08-16 13:47:50.103369128 +0300
@@ -36,7 +36,7 @@
     with open(target[0].get_path(), "w") as fout:
         fout.write("// autogenerated by scons Bin2H builder, do not edit by hand!\n\n")

-        if env.has_key("BIN2H_NAMESPACE"):
+        if "BIN2H_NAMESPACE" in env:
             fout.write("namespace %s {\n\n" % env["BIN2H_NAMESPACE"])

         # write down data
@@ -62,7 +62,7 @@
                                     for src in source], ",\n"))
             fout.write("\n}\n\n")

-        if env.has_key("BIN2H_NAMESPACE"):
+        if "BIN2H_NAMESPACE" in env:
             fout.write("} // namespace %s\n\n" % env["BIN2H_NAMESPACE"])

         fout.write("/* EOF */\n")
EOF

Modify the existing PKGBUILD file to apply the new patch

cat > pkgbuild.patch << EOF
--- a/PKGBUILD  2021-08-16 14:10:44.000000000 +0300
+++ b/PKGBUILD  2021-08-16 14:09:15.904713382 +0300
@@ -18,13 +18,15 @@
         xboxdrv.default
         fix-60-sec-delay.patch
         scons-py3.patch
-        xboxdrvctl-py3.patch)
+        xboxdrvctl-py3.patch
+        fix-99-scons-unsupported-has_key.patch)
 sha512sums=('3f27856da211a14e27a84fa5919da7965262adc36da16c75eed9bae891098183b5751a3e707573b4ab64e69096ea74d455e8f64827c88b38b65af94cc13b34ad'
             'f1a4e7b1a06e951c3a4f5bcdec5f14db542b34963950619f0d4b1ee324d64b18ca2f63642719ef65a63e424702fb0eb33e0259937906732e587b96a9582c2e6b'
             '4f6e9a12b208254e19daba477dd7787147a8b2c8a83007d92f8cfce6212c21ce3306f23a2669080f0e46986ca102ab08c262b42c678caf1a891326b4e2c40b5f'
             '58170b3f96f02e5ba0af5f6641482fb1c612ca70650e475d68b55c05a62ec0831033190b90e591d593fd6b25c2a155e6c4975f37eef1534245947156a5e3285f'
             'b3a3bbb51fa1c4ad4dd898136c3bf7c0f13193bdd07bbcb5c8243edb747c68223fe8c5bd2fd578f6c2b18844827524abb0533ce98b6e0e60fe936597cdba811d'
-            '4e6de460523c1ddfc608b3bd6fb211a7ca0516b64a2d91e01b51deaa4fcc57d64985bb2ccfca43873efef4987e0d04741f0e97dbd6b77037a4417a97cb8d0bf9')
+            '4e6de460523c1ddfc608b3bd6fb211a7ca0516b64a2d91e01b51deaa4fcc57d64985bb2ccfca43873efef4987e0d04741f0e97dbd6b77037a4417a97cb8d0bf9'
+            '7ba08694be005eae98320957e4be6a84ff77f8b2ea2973dafc300527380074cdb6a3e0692d6c1e285d919cb6f795c494955997782c59a30e9672b65548c86a2f')

 prepare() {
   cd ${pkgname}-${pkgver}
@@ -32,6 +34,7 @@
   patch -p1 < "${srcdir}/fix-60-sec-delay.patch"
   patch -p1 < "${srcdir}/scons-py3.patch"
   patch -p1 < "${srcdir}/xboxdrvctl-py3.patch"
+  patch -p1 < "${srcdir}/fix-99-scons-unsupported-has_key.patch"
 }

 build() {
EOF

Apply the modifications patch -p1 < pkgbuild.patch

Build and install the package makepkg -si

(Updated to fix invalid sha512sum and typos)

lygamac commented on 2021-08-11 18:51 (UTC)

SCons has dropped support for has_key. I bypassed this error by adding has_key = __contains__ in the python file. However, a new error appears (a variable wasn't declared).

@Wodger If you want to install the package now, try this, which worked for me:

  1. Clone this repo
  2. Open the PKGBUILD file with your favorite editor
  3. Where makedepends, remove scons
  4. Where build(), change scons to python3 ~/.local/bin/scons
  5. save the file
  6. pip install 'scons==4.1' and makepkg -si

Wodger commented on 2021-08-06 05:59 (UTC)

Fails to build at the moment:

File "/usr/lib/python3.9/site-packages/SCons/Environment.py", line 2384, in getattr attr = getattr(self.dict['__subject'], name) AttributeError: 'SConsEnvironment' object has no attribute 'has_key' scons: building terminated because of errors. ==> ERROR: A failure occurred in build(). Aborting...

nautes commented on 2021-05-18 01:05 (UTC)

Steps provided by Papyrus works out of the box, however, I made a few changes to them to make them easier for the peeps giving their first steps:

  1. Download the package build. I use yay, so the command would be yay -G xboxdrv (a similar command will exist in your AUR helper). Alternatively, you can also download it from this page (Download snapshot option, then untar it: tar -zxvf /path/to/file/xboxdrv.tar.gz)
  2. Open the PKGBUILD file with your favorite text editor and edit the depends section of the package as mentioned by Papyrus (replace 'python2-dbus' with 'python-dbus')
  3. Execute makepkg -si to install the package while syncing its dependencies

Notice that pip install SCons can be ommited as the package builds perfectly with the version provided in extra (3.1.2-4 at the time this comment was written) and some folks might want to avoid pip if they are giving their first steps / are unsure on how pip packages works.

Also, it seems they forgot (or left behind the version-tagging) as there have been a few fixes in the develop branch since the last version was released, package xboxdrv-develop-git seems to be following that branch, so you may want to check that package should you stumble accross any bugs while using this application (though it will need some fine-tunning on the PKGBUILD as well...)

Zverob commented on 2021-04-26 15:31 (UTC)

python2-dbus not found

Papyrus commented on 2021-04-12 04:07 (UTC) (edited on 2021-04-12 04:09 (UTC) by Papyrus)

Hey first contrib to aur comments

I got it to work by:
1. Cloning the repo
2. Changing python2-dbus to python-dbus in the PKGBUILD depends variable
3. pip install SCons
4. makepkg -si