games-util/xboxdrv: Version bump to 0.8.8, EAPI bump to 6, bug #567182
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 2 Jul 2016 15:33:32 +0000 (16:33 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 2 Jul 2016 15:35:10 +0000 (16:35 +0100)
Includes patch to fix 60 second delay, upstream GitHub issue #144.

Package-Manager: portage-2.3.0

games-util/xboxdrv/Manifest
games-util/xboxdrv/files/github-144.patch [new file with mode: 0644]
games-util/xboxdrv/files/xboxdrv-0.8.8-scons.patch [new file with mode: 0644]
games-util/xboxdrv/xboxdrv-0.8.8.ebuild [new file with mode: 0644]

index 4f53fe707bccc8567407834b2f2e11c7cd5679e4..a5eaa4a4edcddb1e4eb5857a7f1598dbcf959a20 100644 (file)
@@ -1 +1,2 @@
 DIST xboxdrv-linux-0.8.5.tar.bz2 265805 SHA256 411195c4f5310a1a5f21f015daaf00b277f75da89df710308f8abfcf8f337e78 SHA512 954a3664462dfeff63a455f3dfea4bc14f8c3e07fa9b0c299bb523b4089faad7f8d634511eb66c023bd289adbbf18e96ce26cbcf5b8ffc9bb3088f1afe532601 WHIRLPOOL f47cdbcf40bd237715ff2b55354c6570ebbccd9cd0beb09b91869fa37db247c57019593b317d2acd767044fe92019defa01c9592bb3b63d2283103ff10dae844
+DIST xboxdrv-linux-0.8.8.tar.bz2 267919 SHA256 f4fb8c09c0ce3841798f129ae4c2caf3f6db9786d78ad941994e425e3ffc168a SHA512 2978b33d23636431ee0cc393ea32d3d26ebe9f2b914f0bf8bc0e096f98202726768142e653bc5765ac55084b105ff3a6214bdf6e745fdd8aa167260c54c10494 WHIRLPOOL a27c0c68171cb08c6edc12aeafb84ae3a2edb14b8d4a87ad607f722581a58955d11808acb8c0b7169581850f52dd76be2c100de5e284a1521d10f0ae108a867d
diff --git a/games-util/xboxdrv/files/github-144.patch b/games-util/xboxdrv/files/github-144.patch
new file mode 100644 (file)
index 0000000..5782e1a
--- /dev/null
@@ -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/xboxdrv-0.8.8-scons.patch b/games-util/xboxdrv/files/xboxdrv-0.8.8-scons.patch
new file mode 100644 (file)
index 0000000..7900b25
--- /dev/null
@@ -0,0 +1,13 @@
+http://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/xboxdrv-0.8.8.ebuild b/games-util/xboxdrv/xboxdrv-0.8.8.ebuild
new file mode 100644 (file)
index 0000000..04d3c7d
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit linux-info scons-utils toolchain-funcs systemd udev
+
+MY_P=${PN}-linux-${PV}
+DESCRIPTION="Userspace Xbox 360 Controller driver"
+HOMEPAGE="http://pingus.seul.org/~grumbel/xboxdrv/"
+SRC_URI="http://pingus.seul.org/~grumbel/xboxdrv/${MY_P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-libs/boost:=
+       dev-libs/dbus-glib:=
+       virtual/libudev:=
+       sys-apps/dbus:=
+       dev-libs/glib:2=
+       virtual/libusb:1=
+       x11-libs/libX11:="
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+       "${FILESDIR}"/${P}-scons.patch
+       "${FILESDIR}"/github-144.patch
+)
+
+CONFIG_CHECK="~INPUT_EVDEV ~INPUT_JOYDEV ~INPUT_UINPUT ~!JOYSTICK_XPAD"
+
+src_compile() {
+       escons \
+               BUILD=custom \
+               CXX="$(tc-getCXX)" \
+               AR="$(tc-getAR)" \
+               RANLIB="$(tc-getRANLIB)" \
+               CXXFLAGS="-Wall ${CXXFLAGS}" \
+               LINKFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+       dobin xboxdrv
+       doman doc/xboxdrv.1
+       dodoc AUTHORS NEWS PROTOCOL README.md TODO
+
+       newinitd "${FILESDIR}"/xboxdrv.initd xboxdrv
+       newconfd "${FILESDIR}"/xboxdrv.confd xboxdrv
+
+       insinto /etc/dbus-1/system.d/
+       doins "${FILESDIR}/org.seul.Xboxdrv.conf"
+
+       udev_newrules "${FILESDIR}"/xboxdrv.udev-rules 99-xbox-controller.rules
+       systemd_dounit "${FILESDIR}"/xboxdrv.service
+}
+
+pkg_postinst() {
+       udev_reload
+}