summaryrefslogtreecommitdiff
path: root/app-misc/spacenavd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/spacenavd
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/spacenavd')
-rw-r--r--app-misc/spacenavd/Manifest16
-rw-r--r--app-misc/spacenavd/files/99-space-navigator.rules5
-rw-r--r--app-misc/spacenavd/files/99-space-navigator.rules-r16
-rw-r--r--app-misc/spacenavd/files/99-space-navigator.rules-r26
-rw-r--r--app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch67
-rw-r--r--app-misc/spacenavd/files/spacenavd-0.5-destdir.patch16
-rw-r--r--app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch13
-rw-r--r--app-misc/spacenavd/files/spacenavd.service8
-rw-r--r--app-misc/spacenavd/files/spnavd27
-rw-r--r--app-misc/spacenavd/metadata.xml28
-rw-r--r--app-misc/spacenavd/spacenavd-0.5-r5.ebuild81
-rw-r--r--app-misc/spacenavd/spacenavd-0.5-r6.ebuild80
-rw-r--r--app-misc/spacenavd/spacenavd-0.6.ebuild78
13 files changed, 431 insertions, 0 deletions
diff --git a/app-misc/spacenavd/Manifest b/app-misc/spacenavd/Manifest
new file mode 100644
index 000000000000..7a270ddcd800
--- /dev/null
+++ b/app-misc/spacenavd/Manifest
@@ -0,0 +1,16 @@
+AUX 99-space-navigator.rules 319 SHA256 7606fc2c35138d5c601438b49e01a54a7acc51eb01169d0e60700498723b4063 SHA512 c66c5738ff980515cc0e6e77f873888b09f30bca54b5c947cc9c8276c388f37c9492d7c2a92420fa3713ca7d7d9f9f3ec5449fa01a71c6897b3204c0ac68fd3c WHIRLPOOL e72fc896a1c5593a6912465fdd9c36635e1fae3d454e3204c3fcbdbc4d89038843929ff6903c8d83559ded3adf68816b2821388676b213a33af167ac26f4a1b5
+AUX 99-space-navigator.rules-r1 478 SHA256 e0936f6a80171dbcd5644b66f107e95fc99b3232770c10c0776a80bf6f12da78 SHA512 6398a8859c4d6e75f8885cf937543adab0c2d58ac80dc151ba814fa28b93086d4848eadb50ee2bbb3059fc11c17b78f334bf8805aaec75dbad41e672b07c8aa1 WHIRLPOOL 635a66f544a1e3f4d7456dde840bd82267870b00088ccff8cee30971be351f3e2840a57070253ea7e7044129827c0d9b477b41b4cbd7818d44251c79f1a04906
+AUX 99-space-navigator.rules-r2 461 SHA256 4182ccdb4e0d2fcf2dab375cf085b23b973bc723ff34d0fad0f857ca4b3494f7 SHA512 6871c629999c5f6c6988709bf15ae2821d8375fe80e3f8271cf285734163b523541dc04e70571a3578eba567e1b04ecb3cc2a57f1fd9f138c62226c07a09e18f WHIRLPOOL da9b22769e08e484d5807b52de2b6e3b1da4c6649614a75ce38a3fb0a335c4112b2c43ead1b1b337978205276c6d2373566bdc62cbed59f96f71d51bc3f253b9
+AUX spacenavd-0.5-custom-flags.patch 2008 SHA256 78c8aebbd33f0c135501e6dea132c4f6edd9068bfddf741bfc8fe11d5269f546 SHA512 547d9f3098846901418acb71be996cec39bf18616e4a7eee5fc09bc201bfb2a534ff70f38d515b0f6c685330d002ea277c03b448ba70de4a3df65e6286780174 WHIRLPOOL da8e4d838d91e8334b7adb16751e928193ac27dde496d2304a9fa4f9412f70791ff2df785ee0662dde805ff813f7e17f83291671629f54e704544725e6dd9466
+AUX spacenavd-0.5-destdir.patch 649 SHA256 df58f5006d3b1be15a40182ca91ea964d62572a6e0a47b05c037958674db5366 SHA512 4330ae7b49e661a60f01931716f9924c01cade4e169b3de48ec08039099ce10c6dfe5c8df9a3b01c1890ccb83b3c92d45ea06f5fd9465c3f1514902cc375e1f0 WHIRLPOOL d90f63eb471509eae6cc3bd4e28e08f56882ae8e8a04b5867b75afba271c938da424d7625ead6166bfdfd31039cc482ccef53748bb055260bf2de9088dec59e9
+AUX spacenavd-0.5-no-x11.patch 388 SHA256 1c4a16f41176da31e61cb4a0984d4d3b158d334e598325c2eda9e8f6ab6ef933 SHA512 d6cb2d6337b3e19ef56f5e0ccbfdc731b038009df852b3d1f7272001aa18e70a1701c3af2d1b4976cac7392a6176c0f4cee787d2c9b4b96ba029d1cc0db3d7ae WHIRLPOOL 7ea4516dc404900377d44dc056b2056b32c066759ebdf3363fc43379069d90b4eaecc32f3156173a9a030b1bc392c7665d33b11749fc05bec50a781b5c1f94ef
+AUX spacenavd.service 143 SHA256 d6e8831b5fc37da1fa14ea4ae7568cec1c0964bb080c3217cbd78df1a279f349 SHA512 1f2fd8bf2bdffe3e52f5e2e53e0643e0d5ad5134bfd636ebc2c98f397da5c87bca3582fd76f9e987fb6ed3d17130196f4eee193998f97e388dc04877277c04d5 WHIRLPOOL 62804c40afc19a2fba63ee5f98441b90b765c09b710a58802749e015870e491f714c9cd0b4d51afd47b79a32c7798a0c43e03cdffb6edbbb39417194886375c1
+AUX spnavd 580 SHA256 3def256ac80038fda4f4d6978298dfd2d54ea926144675d0f75ca6063445f957 SHA512 460ce173a1a68ab571fb39a0a00bdedcffaee5251037cc5787ecf90054f67333537087b3fabfd4a0e5b28acb5f72a7ef9b2bf50e9279336cdf95a18ecec13ce5 WHIRLPOOL c9ea7d5ede9a5c05c008ec90d99a73cc781b7985282769819f1dcae34686f0447327b03a355e00853b4a3b0170107290ea2660a602dd09d9eacc1a475aa745ce
+DIST spacenavd-0.5.tar.gz 41746 SHA256 0eecc5b5ad47ee6376d1521f2bc7c8f8fc02904cf3fede3f77e59f4795b592e3 SHA512 908f598e4ba5febbc1191cc32cd444817acd40c22e79b1f139c50787e1e25d4cd8328dc3fd6d9dde09bb80232b52f0e75ae429fb3345eb51fbe5a47577b038e2 WHIRLPOOL e2cf70c7e9cc4b8e32b15ab79dae565c8c2a4bc32a6485a0a1857ea4d4667859ac0bb82e32cd54b722d51c34b9ea094fe8bcb1459a9f60077bde8a01207ab910
+DIST spacenavd-0.6.tar.gz 54730 SHA256 c2d203bf96c5a959590146a43fe5d6e5e8c5c38a8b2f55aa199d967d0d88d0ab SHA512 ff039e169805365ce8c1df1258eda6d263a0724c087b22a9e78269629455580817027d936e6bb7014b7654f48aa23232e8059585175003034e4bd3e0d6ed8200 WHIRLPOOL 2f7ff91302c9970d54c7983e7e3ee75d2254d2a8640d701e1449f9a31dfab0937c811491acfdf15356ebfe4914462468031090954c28ffab59a30068a60f19cf
+EBUILD spacenavd-0.5-r5.ebuild 2319 SHA256 c2549ef92c5912df46075618b57aaf7d85ebe95a774884b19de88f3e4ce646a2 SHA512 4fca63971153edfb5a69ca8cf40e543edcfd3f8c97ec729fc3afb550d00027566097f409a46c15bc2585dfe833e63208f709e3d713e58cdef2e730cd58c95444 WHIRLPOOL ddc82f961a6d5ebda0c534bc74d7036c3fa4461c5f916d468361919dac8c1c0f1a3cbaddf6c44a5f66bf86b878eca284878c63990a6c2a9e938a1972befc38af
+EBUILD spacenavd-0.5-r6.ebuild 2303 SHA256 72fbdd2f1a299c4d8d67ab59e32b9f9d413ab433970a447e000267e592885460 SHA512 aeb2e1501a7a0c40f94c809994c29dc902a142362b5d5802d4a3354b62dd9c7880699eb2ba9c79a3f288cc301d453177e24ec9850c40b26758c2bfd82740d31b WHIRLPOOL 29cd0403bdf2a1ef19bb15d060ee717b6fc616d29b1bc6ac241500a022754652b302ac4b8416caf26b64e216ee36c43f6b74371d0f77b98328b89ff5e630b57a
+EBUILD spacenavd-0.6.ebuild 2232 SHA256 72e1226cc6c60245abf7c44079f54b08893e235c44b5ed5757f01908f33c61ed SHA512 c555cefdb0c7e09a3398e1897c4b0305d3697011aaa595a7a57ebb0e0581f5f1d0844166ccb3342132b4f98714f8528f9eaa7ffe5c6d55a59799edcb5de36a12 WHIRLPOOL b234281631edd49d65b8fb147deca3f296bf6c6bd282ee0d66b594e5009437ea5b356253d87bf4a5ba73ac20a39352aa94031829f50b448763c0f9ccd053a205
+MISC ChangeLog 2904 SHA256 f323bd3a37cc628339a4eee752d572fa1dc069b64ce0c23e29c7b3ce97bd4a86 SHA512 a98e326bf8aad4ceea1c579b0b4f753d73cb101598c687212d651c91e89c06caa9c5e71c50d6b37bbcdb8cc184886fc7b40a74d58536b4788380a537217642f8 WHIRLPOOL 711c759d384b73b48debc7e319b3934a02f9c5b75f6348e185cdd191c26b1f4dfdef612f4c8e4a7927812a5a99334e2f5a24eda44f53e73d8bb5eca77d6f5dae
+MISC ChangeLog-2015 3313 SHA256 446a7b9225df0b30e7113ed715d793e62c7c203c510ba38030e0912bfabf7802 SHA512 a493d152382f2450c123ccbdf1659fdb9cc98ebb01ef4b7d7dbf3838b4ef75c0e1e83572352d9a95728b6df7d2a29a5a975750cf937b54293a1e7e588532a19e WHIRLPOOL 9b7e5f74d3e70088227f5139f5947859ed4b8da888913cfb776e2c7853d21f9319eef702ebae053d25aa5907ff29ab58ac4f658064031a1c7342fe5dbef0f24d
+MISC metadata.xml 1044 SHA256 a02f67b861bcd108eec317743e01c4d00e7bb1fea24e498d79eb942859272730 SHA512 04b15a567deac4a6bc1a0b250c585d863d9bebdca0a5160a3b77e1830190abadf1b98371b33e60a8d67978de3f0db117d51d598a861782663cf7b35e74a5d859 WHIRLPOOL df6075690580d11e00a019fee67a61ee7b3baa933068329ff17b13ee7f0481d9ecdb2f7247d40f347ea24f9f6581859e49c202101021d68fd8e6b2417b26ca18
diff --git a/app-misc/spacenavd/files/99-space-navigator.rules b/app-misc/spacenavd/files/99-space-navigator.rules
new file mode 100644
index 000000000000..ef2640e65715
--- /dev/null
+++ b/app-misc/spacenavd/files/99-space-navigator.rules
@@ -0,0 +1,5 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2 or later
+
+# Start daemon on insertion of a SpaceNavigator device
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="Space Navigator", RUN+="/etc/init.d/spacenavd --quiet start"
diff --git a/app-misc/spacenavd/files/99-space-navigator.rules-r1 b/app-misc/spacenavd/files/99-space-navigator.rules-r1
new file mode 100644
index 000000000000..fa5dc93fcca5
--- /dev/null
+++ b/app-misc/spacenavd/files/99-space-navigator.rules-r1
@@ -0,0 +1,6 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2 or later
+
+# Start daemon on insertion of a SpaceNavigator device
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="Space Navigator", RUN+="/etc/init.d/spacenavd --quiet start"
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="SpaceNavigator", TAG+="systemd", ENV{SYSTEMD_WANTS}+="spacenavd.service"
diff --git a/app-misc/spacenavd/files/99-space-navigator.rules-r2 b/app-misc/spacenavd/files/99-space-navigator.rules-r2
new file mode 100644
index 000000000000..47d013275b61
--- /dev/null
+++ b/app-misc/spacenavd/files/99-space-navigator.rules-r2
@@ -0,0 +1,6 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2 or later
+
+# Start daemon on insertion of a SpaceNavigator device
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="Space*", RUN+="/etc/init.d/spacenavd --quiet start"
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="Space*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="spacenavd.service"
diff --git a/app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch b/app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch
new file mode 100644
index 000000000000..3b834a43952d
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch
@@ -0,0 +1,67 @@
+diff -Npur spacenavd-0.5.orig/Makefile.in spacenavd-0.5/Makefile.in
+--- spacenavd-0.5.orig/Makefile.in 2012-01-31 22:22:20.460368687 +0100
++++ spacenavd-0.5/Makefile.in 2012-01-31 22:23:18.170367675 +0100
+@@ -6,8 +6,8 @@ ctl = spnavd_ctl
+
+ CC = gcc
+ INSTALL = install
+-CFLAGS = -pedantic -Wall $(dbg) $(opt) -fno-strict-aliasing -I$(srcdir)/src
+-LDFLAGS = $(xlib)
++CFLAGS = $(opt) -fno-strict-aliasing -I$(srcdir)/src
++LDFLAGS = $(ldopt) $(xlib)
+
+ $(bin): $(obj)
+ $(CC) -o $@ $(obj) $(LDFLAGS)
+diff -Npur spacenavd-0.5.orig/configure spacenavd-0.5/configure
+--- spacenavd-0.5.orig/configure 2012-01-31 22:22:20.460368687 +0100
++++ spacenavd-0.5/configure 2012-01-31 22:22:49.257368187 +0100
+@@ -28,6 +28,7 @@ test_kver() {
+
+ PREFIX=/usr/local
+ OPT=yes
++LDOPT=yes
+ DBG=yes
+ X11=yes
+ HOTPLUG=yes
+@@ -70,6 +71,11 @@ for arg; do
+ --disable-opt)
+ OPT=no;;
+
++ --enable-ldopt)
++ LDOPT=yes;;
++ --disable-ldopt)
++ LDOPT=no;;
++
+ --enable-debug)
+ DBG=yes;;
+ --disable-debug)
+@@ -95,6 +101,8 @@ for arg; do
+ echo ' --disable-hotplug: disable hotplug, fallback to polling for the device'
+ echo ' --enable-opt: enable speed optimizations (default)'
+ echo ' --disable-opt: disable speed optimizations'
++ echo ' --enable-ldopt: enable link optimizations (default)'
++ echo ' --disable-ldopt: disable link optimizations'
+ echo ' --enable-debug: include debugging symbols (default)'
+ echo ' --disable-debug: do not include debugging symbols'
+ echo 'all invalid options are silently ignored'
+@@ -105,6 +113,7 @@ done
+
+ echo " prefix: $PREFIX"
+ echo " optimize for speed: $OPT"
++echo " optimize link: $LDOPT"
+ echo " include debugging symbols: $DBG"
+ echo " x11 communication method: $X11"
+ echo " use hotplug: $HOTPLUG"
+@@ -128,7 +137,11 @@ if [ "$DBG" = 'yes' ]; then
+ fi
+
+ if [ "$OPT" = 'yes' ]; then
+- echo 'opt = -O3' >>Makefile
++ echo "opt = ${CFLAGS:--O3}" >>Makefile
++fi
++
++if [ "$LDOPT" = 'yes' ]; then
++ echo "ldopt = ${LDFLAGS}" >>Makefile
+ fi
+
+ if [ "$X11" = 'yes' ]; then
diff --git a/app-misc/spacenavd/files/spacenavd-0.5-destdir.patch b/app-misc/spacenavd/files/spacenavd-0.5-destdir.patch
new file mode 100644
index 000000000000..5b2372242e14
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd-0.5-destdir.patch
@@ -0,0 +1,16 @@
+diff -Npur spacenavd-0.5.orig/Makefile.in spacenavd-0.5/Makefile.in
+--- spacenavd-0.5.orig/Makefile.in 2011-11-16 21:43:53.210859753 +0100
++++ spacenavd-0.5/Makefile.in 2011-11-16 21:45:36.386857932 +0100
+@@ -24,9 +24,9 @@ clean:
+
+ .PHONY: install
+ install: $(bin)
+- $(INSTALL) -d $(PREFIX)/bin
+- $(INSTALL) -m 755 $(bin) $(PREFIX)/bin/$(bin)
+- $(INSTALL) -m 755 $(srcdir)/$(ctl) $(PREFIX)/bin/$(ctl)
++ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
++ $(INSTALL) -m 755 $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
++ $(INSTALL) -m 755 $(srcdir)/$(ctl) $(DESTDIR)$(PREFIX)/bin/$(ctl)
+ cd $(srcdir) && ./setup_init --no-install
+
+ # [ -d /etc/hal/fdi/policy ] && \
diff --git a/app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch b/app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch
new file mode 100644
index 000000000000..bbdd7d6196ec
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch
@@ -0,0 +1,13 @@
+diff -Npur spacenavd-0.5.old/src/event.c spacenavd-0.5/src/event.c
+--- src/event.c 2012-03-21 22:15:37.093401293 +0100
++++ src/event.c 2012-03-21 22:14:10.734401301 +0100
+@@ -20,7 +20,9 @@ along with this program. If not, see <h
+ #include <stdlib.h>
+ #include "event.h"
+ #include "client.h"
++#ifdef USE_X11
+ #include "proto_x11.h"
++#endif
+ #include "proto_unix.h"
+ #include "spnavd.h"
+
diff --git a/app-misc/spacenavd/files/spacenavd.service b/app-misc/spacenavd/files/spacenavd.service
new file mode 100644
index 000000000000..b9b14d80086a
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=3Dconnexion Input Devices Userspace Driver
+
+[Service]
+ExecStart=/usr/bin/spacenavd -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/spacenavd/files/spnavd b/app-misc/spacenavd/files/spnavd
new file mode 100644
index 000000000000..6bbe49a7bbf0
--- /dev/null
+++ b/app-misc/spacenavd/files/spnavd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting Spacenav system daemon"
+
+ start-stop-daemon --start --pidfile /var/run/spnavd.pid --exec /usr/bin/spacenavd
+ eend $?
+}
+
+stop() {
+ local retval
+
+ ebegin "Stopping Spacenav system daemon"
+
+ start-stop-daemon --stop --pidfile /var/run/spnavd.pid
+ retval=$?
+
+ eend ${retval}
+ return ${retval}
+}
diff --git a/app-misc/spacenavd/metadata.xml b/app-misc/spacenavd/metadata.xml
new file mode 100644
index 000000000000..3e3914927158
--- /dev/null
+++ b/app-misc/spacenavd/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>anthoine.bourgeois@gmail.com</email>
+ <name>Anthoine Bourgeois</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ The spacenavd daemon can be used directly as a drop-in replacement
+ to the 3DxWare daemon. It can communicate with the official magellan
+ SDK, and thus any program compiled with it can work with spacenavd
+ transparently without any change or need of recompilation.
+ Also, spacenavd provides an alternative communication protocol, for
+ programs that use libspnav, that doesn't require an X server, as the
+ original protocol does.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">spacenav</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-misc/spacenavd/spacenavd-0.5-r5.ebuild b/app-misc/spacenavd/spacenavd-0.5-r5.ebuild
new file mode 100644
index 000000000000..e586369f045c
--- /dev/null
+++ b/app-misc/spacenavd/spacenavd-0.5-r5.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils linux-info systemd toolchain-funcs udev
+
+MY_PN='spacenav'
+DESCRIPTION="The spacenavd daemon provides free alternative to the 3dxserv daemon"
+HOMEPAGE="http://spacenav.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20daemon/${PN}%20${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE="X"
+
+RDEPEND="X? ( x11-apps/xdpyinfo )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ CONFIG_CHECK="~INPUT_EVDEV"
+ ERROR_CFG="Your kernel needs INPUT_EVDEV for the spacenavd to work properly"
+ check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch
+ epatch "${FILESDIR}"/${P}-custom-flags.patch
+ epatch "${FILESDIR}"/${P}-no-x11.patch
+}
+
+src_configure() {
+ econf \
+ --enable-opt --enable-ldopt \
+ $(use_enable X x11)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ # Config file
+ insinto /etc
+ newins "${S}/doc/example-spnavrc" spnavrc.sample
+
+ # Init script
+ newinitd "${FILESDIR}/spnavd" spacenavd
+ systemd_dounit "${FILESDIR}/spacenavd.service"
+
+ # Install udev rule but leave activiation to the user
+ # since Xorg may be configured to grab the device already
+ insinto "$(get_udevdir)"
+ newins "${FILESDIR}"/99-space-navigator.rules-r1 99-space-navigator.rules.ignored
+
+ # Daemon
+ dobin "${S}/spacenavd"
+ use X && dobin "${S}/spnavd_ctl"
+}
+
+pkg_postinst() {
+ elog "To start the Spacenav daemon system-wide by default"
+ elog "you should add it to the default runlevel :"
+ elog "\`rc-update add spacenavd default\` (for openRC)"
+ elog "\`systemctl enable spacenavd\` (for systemd)"
+ elog
+ if use X; then
+ elog "To start generating Spacenav X events by default"
+ elog "you should add this command in your user startup"
+ elog "scripts such as .gnomerc or .xinitrc :"
+ elog "\`spnavd_ctl x11 start\`"
+ elog
+ fi
+ elog
+ elog "If you want to auto-start the daemon when you plug in"
+ elog "a SpaceNavigator device, activate the related udev rule :"
+ elog "\`sudo ln -s $(get_udevdir)/rules.d/99-space-navigator.rules.ignored /etc/udev/rules.d\`"
+ ewarn "You must restart spnavd \`/etc/init.d/spacenavd restart\` to run"
+ ewarn "the new version of the daemon or \`systemctl restart spacenavd\`"
+ ewarn "if using systemd."
+}
diff --git a/app-misc/spacenavd/spacenavd-0.5-r6.ebuild b/app-misc/spacenavd/spacenavd-0.5-r6.ebuild
new file mode 100644
index 000000000000..21dab6b21ab9
--- /dev/null
+++ b/app-misc/spacenavd/spacenavd-0.5-r6.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils linux-info systemd toolchain-funcs udev
+
+MY_PN='spacenav'
+DESCRIPTION="The spacenavd daemon provides free alternative to the 3dxserv daemon"
+HOMEPAGE="http://spacenav.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20daemon/${PN}%20${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="X"
+
+RDEPEND="X? ( x11-apps/xdpyinfo )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ CONFIG_CHECK="~INPUT_EVDEV"
+ ERROR_CFG="Your kernel needs INPUT_EVDEV for the spacenavd to work properly"
+ check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch
+ epatch "${FILESDIR}"/${P}-custom-flags.patch
+ epatch "${FILESDIR}"/${P}-no-x11.patch
+}
+
+src_configure() {
+ econf \
+ --enable-opt --enable-ldopt \
+ $(use_enable X x11)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ # Config file
+ insinto /etc
+ newins "${S}/doc/example-spnavrc" spnavrc.sample
+
+ # Init script
+ newinitd "${FILESDIR}/spnavd" spacenavd
+ systemd_dounit "${FILESDIR}/spacenavd.service"
+
+ # Install udev rule but leave activiation to the user
+ # since Xorg may be configured to grab the device already
+ udev_newrules "${FILESDIR}"/99-space-navigator.rules-r1 99-space-navigator.rules.ignored
+
+ # Daemon
+ dobin "${S}/spacenavd"
+ use X && dobin "${S}/spnavd_ctl"
+}
+
+pkg_postinst() {
+ elog "To start the Spacenav daemon system-wide by default"
+ elog "you should add it to the default runlevel :"
+ elog "\`rc-update add spacenavd default\` (for openRC)"
+ elog "\`systemctl enable spacenavd\` (for systemd)"
+ elog
+ if use X; then
+ elog "To start generating Spacenav X events by default"
+ elog "you should add this command in your user startup"
+ elog "scripts such as .gnomerc or .xinitrc :"
+ elog "\`spnavd_ctl x11 start\`"
+ elog
+ fi
+ elog
+ elog "If you want to auto-start the daemon when you plug in"
+ elog "a SpaceNavigator device, activate the related udev rule :"
+ elog "\`sudo ln -s $(get_udevdir)/rules.d/99-space-navigator.rules.ignored /etc/udev/rules.d\`"
+ ewarn "You must restart spnavd \`/etc/init.d/spacenavd restart\` to run"
+ ewarn "the new version of the daemon or \`systemctl restart spacenavd\`"
+ ewarn "if using systemd."
+}
diff --git a/app-misc/spacenavd/spacenavd-0.6.ebuild b/app-misc/spacenavd/spacenavd-0.6.ebuild
new file mode 100644
index 000000000000..df16c9432ab2
--- /dev/null
+++ b/app-misc/spacenavd/spacenavd-0.6.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit linux-info systemd toolchain-funcs udev
+
+MY_PN='spacenav'
+DESCRIPTION="The spacenavd daemon provides free alternative to the 3dxserv daemon"
+HOMEPAGE="http://spacenav.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20daemon/${PN}%20${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ppc64 ~x86"
+IUSE="X"
+
+RDEPEND="X? ( x11-apps/xdpyinfo )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ CONFIG_CHECK="~INPUT_EVDEV"
+ ERROR_CFG="Your kernel needs INPUT_EVDEV for the spacenavd to work properly"
+ check_extra_config
+}
+
+src_configure() {
+ econf \
+ --disable-debug \
+ --enable-hotplug \
+ --disable-opt \
+ $(use_enable X x11)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ add_cflags="${CFLAGS}" \
+ add_ldflags="${LDFLAGS}"
+}
+
+src_install() {
+ # Config file
+ insinto /etc
+ newins "${S}/doc/example-spnavrc" spnavrc.sample
+
+ # Init script
+ newinitd "${FILESDIR}/spnavd" spacenavd
+ systemd_dounit "${FILESDIR}/spacenavd.service"
+
+ # Install udev rule but leave activiation to the user
+ # since Xorg may be configured to grab the device already
+ udev_newrules "${FILESDIR}"/99-space-navigator.rules-r2 99-space-navigator.rules.ignored
+
+ # Daemon
+ dobin "${S}/spacenavd"
+ use X && dobin "${S}/spnavd_ctl"
+}
+
+pkg_postinst() {
+ elog "To start the Spacenav daemon system-wide by default"
+ elog "you should add it to the default runlevel :"
+ elog "\`rc-update add spacenavd default\` (for openRC)"
+ elog "\`systemctl enable spacenavd\` (for systemd)"
+ elog
+ if use X; then
+ elog "To start generating Spacenav X events by default"
+ elog "you should add this command in your user startup"
+ elog "scripts such as .gnomerc or .xinitrc :"
+ elog "\`spnavd_ctl x11 start\`"
+ elog
+ fi
+ elog
+ elog "If you want to auto-start the daemon when you plug in"
+ elog "a SpaceNavigator device, activate the related udev rule :"
+ elog "\`sudo ln -s $(get_udevdir)/rules.d/99-space-navigator.rules.ignored /etc/udev/rules.d\`"
+ ewarn "You must restart spnavd \`/etc/init.d/spacenavd restart\` to run"
+ ewarn "the new version of the daemon or \`systemctl restart spacenavd\`"
+ ewarn "if using systemd."
+}