summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-08-08 11:44:29 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2016-08-11 10:33:01 -0500
commitac15d5d6191f4a8e90dd307249d7ed8f8bfb466b (patch)
tree422d4902c234033fcec7172de8b09750025e53cf
parenteac9a5905f2ac51b76ef53b409136038cc7b2b89 (diff)
downloadspack-ac15d5d6191f4a8e90dd307249d7ed8f8bfb466b.tar.gz
spack-ac15d5d6191f4a8e90dd307249d7ed8f8bfb466b.tar.bz2
spack-ac15d5d6191f4a8e90dd307249d7ed8f8bfb466b.tar.xz
spack-ac15d5d6191f4a8e90dd307249d7ed8f8bfb466b.zip
Add patch for qt gamepad compilation problems
-rw-r--r--var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch17
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py3
2 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch b/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch
new file mode 100644
index 0000000000..711e209136
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch
@@ -0,0 +1,17 @@
+--- a/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:34:44.517184658 -0500
++++ b/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:36:42.371995567 -0500
+@@ -262,10 +262,10 @@
+ m_buttonsMap[BTN_TR2] = QGamepadManager::ButtonR2;
+ m_buttonsMap[BTN_THUMB] = m_buttonsMap[BTN_THUMBL] = QGamepadManager::ButtonL3;
+ m_buttonsMap[BTN_THUMBR] = QGamepadManager::ButtonR3;
+- m_buttonsMap[BTN_TRIGGER_HAPPY1] = QGamepadManager::ButtonLeft;
+- m_buttonsMap[BTN_TRIGGER_HAPPY2] = QGamepadManager::ButtonRight;
+- m_buttonsMap[BTN_TRIGGER_HAPPY3] = QGamepadManager::ButtonUp;
+- m_buttonsMap[BTN_TRIGGER_HAPPY4] = QGamepadManager::ButtonDown;
++ m_buttonsMap[BTN_TRIGGER_HAPPY1] = 0x2c0;
++ m_buttonsMap[BTN_TRIGGER_HAPPY2] = 0x2c1;
++ m_buttonsMap[BTN_TRIGGER_HAPPY3] = 0x2c2;
++ m_buttonsMap[BTN_TRIGGER_HAPPY4] = 0x2c3;
+
+ if (m_productId)
+ m_backend->saveSettings(m_productId, QVariant());
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 54d475932f..6438714a57 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -50,6 +50,9 @@ class Qt(Package):
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
+ # https://github.com/xboxdrv/xboxdrv/issues/188
+ patch('btn_trigger_happy.patch', when='@5.7.0:')
+
# Use system openssl for security.
# depends_on("openssl")