diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-util/xboxdrv/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-util/xboxdrv/files')
-rw-r--r-- | games-util/xboxdrv/files/github-144.patch | 15 | ||||
-rw-r--r-- | games-util/xboxdrv/files/org.seul.Xboxdrv.conf | 7 | ||||
-rw-r--r-- | games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch | 16 | ||||
-rw-r--r-- | games-util/xboxdrv/files/xboxdrv-0.8.8-scons.patch | 13 | ||||
-rw-r--r-- | games-util/xboxdrv/files/xboxdrv.confd | 5 | ||||
-rw-r--r-- | games-util/xboxdrv/files/xboxdrv.initd | 18 | ||||
-rw-r--r-- | games-util/xboxdrv/files/xboxdrv.service | 14 | ||||
-rw-r--r-- | games-util/xboxdrv/files/xboxdrv.udev-rules | 5 |
8 files changed, 93 insertions, 0 deletions
diff --git a/games-util/xboxdrv/files/github-144.patch b/games-util/xboxdrv/files/github-144.patch new file mode 100644 index 000000000000..5782e1a8cd52 --- /dev/null +++ b/games-util/xboxdrv/files/github-144.patch @@ -0,0 +1,15 @@ +diff -Naur xboxdrv-linux-0.8.5.orig/src/usb_gsource.cpp xboxdrv-linux-0.8.5/src/usb_gsource.cpp +--- xboxdrv-linux-0.8.5.orig/src/usb_gsource.cpp 2013-04-07 18:27:49.000000000 +0100 ++++ xboxdrv-linux-0.8.5/src/usb_gsource.cpp 2016-07-02 12:35:41.692355904 +0100 +@@ -174,7 +174,10 @@ + gboolean + USBGSource::on_source() + { +- libusb_handle_events(NULL); ++ struct timeval to; ++ to.tv_sec = 0; ++ to.tv_usec = 0; ++ libusb_handle_events_timeout_completed(NULL, &to, NULL); + return TRUE; + } + diff --git a/games-util/xboxdrv/files/org.seul.Xboxdrv.conf b/games-util/xboxdrv/files/org.seul.Xboxdrv.conf new file mode 100644 index 000000000000..fc685d6e8e83 --- /dev/null +++ b/games-util/xboxdrv/files/org.seul.Xboxdrv.conf @@ -0,0 +1,7 @@ +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <policy context="default"> + <allow own="org.seul.Xboxdrv"/> + </policy> +</busconfig> diff --git a/games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch b/games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch new file mode 100644 index 000000000000..80a8d8f550e1 --- /dev/null +++ b/games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch @@ -0,0 +1,16 @@ +Cast boost::shared_ptr explicitly for C++14. +See also: https://bugs.gentoo.org/show_bug.cgi?id=594674 + +--- a/src/controller_slot.cpp ++++ b/src/controller_slot.cpp +@@ -67,9 +67,9 @@ ControllerSlot::disconnect() + } + + bool + ControllerSlot::is_connected() const + { +- return m_thread; ++ return static_cast<bool>(m_thread); + } + + /* EOF */ diff --git a/games-util/xboxdrv/files/xboxdrv-0.8.8-scons.patch b/games-util/xboxdrv/files/xboxdrv-0.8.8-scons.patch new file mode 100644 index 000000000000..d6df8d99e32e --- /dev/null +++ b/games-util/xboxdrv/files/xboxdrv-0.8.8-scons.patch @@ -0,0 +1,13 @@ +https://dev.gentoo.org/~vapier/scons-blows.txt + +diff -Naur xboxdrv-linux-0.8.8.orig/SConstruct xboxdrv-linux-0.8.8/SConstruct +--- xboxdrv-linux-0.8.8.orig/SConstruct 2015-11-09 10:19:35.000000000 +0000 ++++ xboxdrv-linux-0.8.8/SConstruct 2016-07-02 16:13:52.560961836 +0100 +@@ -84,6 +84,7 @@ + opts.Add('CXXFLAGS', 'C++ Compiler flags') + opts.Add('LINKFLAGS', 'Linker Compiler flags') + opts.Add('AR', 'Library archiver') ++opts.Add('RANLIB', 'Archive indexer') + opts.Add('CC', 'C Compiler') + opts.Add('CXX', 'C++ Compiler') + opts.Add('BUILD', 'Build type: release, custom, development') diff --git a/games-util/xboxdrv/files/xboxdrv.confd b/games-util/xboxdrv/files/xboxdrv.confd new file mode 100644 index 000000000000..99363c95dafb --- /dev/null +++ b/games-util/xboxdrv/files/xboxdrv.confd @@ -0,0 +1,5 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +XBOXDRV_OPTS="" +#XBOXDRV_OPTS="${XBOXDRV_OPTS} --next-controller --config /etc/xboxdrv/controller.ini" diff --git a/games-util/xboxdrv/files/xboxdrv.initd b/games-util/xboxdrv/files/xboxdrv.initd new file mode 100644 index 000000000000..8602c7e12531 --- /dev/null +++ b/games-util/xboxdrv/files/xboxdrv.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE="/var/run/${SVCNAME}.pid" + +start() { + ebegin "Starting xboxdrv" + start-stop-daemon --start --pidfile "${PIDFILE}" --exec /usr/bin/xboxdrv -- \ + --daemon --detach --pid-file "${PIDFILE}" ${XBOXDRV_OPTS} + eend $? +} + +stop() { + ebegin "Stopping xboxdrv" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} diff --git a/games-util/xboxdrv/files/xboxdrv.service b/games-util/xboxdrv/files/xboxdrv.service new file mode 100644 index 000000000000..b0d372696e0a --- /dev/null +++ b/games-util/xboxdrv/files/xboxdrv.service @@ -0,0 +1,14 @@ +[Unit] +Description=Userspace Xbox 360 Controller driver +BindsTo=sys-subsystem-usb-xbox-controller0.device +After=sys-subsystem-usb-xbox-controller0.device + +[Service] +BusName=org.seul.Xboxdrv +ExecStart=/usr/bin/xboxdrv --silent --daemon +KillSignal=SIGINT +# xboxdrv can not stop gracefully if controller gets unplugged +TimeoutStopSec=2 + +[Install] +WantedBy=multi-user.target diff --git a/games-util/xboxdrv/files/xboxdrv.udev-rules b/games-util/xboxdrv/files/xboxdrv.udev-rules new file mode 100644 index 000000000000..c571b2b5ab02 --- /dev/null +++ b/games-util/xboxdrv/files/xboxdrv.udev-rules @@ -0,0 +1,5 @@ +SUBSYSTEM=="usb", ACTION=="add",\ + ENV{ID_MODEL_FROM_DATABASE}=="Xbox*Controller|Xbox*Controller S",\ + TAG+="systemd",\ + ENV{SYSTEMD_ALIAS}="/sys/subsystem/usb/xbox/controller$number",\ + ENV{SYSTEMD_WANTS}+="xboxdrv.service" |