summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthoine Bourgeois <anthoine.bourgeois@gmail.com>2012-02-07 21:30:09 +0100
committerAnthoine Bourgeois <anthoine.bourgeois@gmail.com>2012-02-07 21:30:09 +0100
commit0fd88494793c165dfb724224f071833f5ee1d2f0 (patch)
tree2467e214ae91620206038419d81b641f284e848f
parentMove space nagivator ebuilds to main tree (diff)
downloadaluco-0fd88494793c165dfb724224f071833f5ee1d2f0.tar.gz
aluco-0fd88494793c165dfb724224f071833f5ee1d2f0.tar.bz2
aluco-0fd88494793c165dfb724224f071833f5ee1d2f0.zip
+spacenavd-0.5-r2.ebuild
changes from 0.5-r1: - The kernel config is change from HOTPLUG to INPUT_EVDEV.
-rw-r--r--app-misc/spacenavd/Manifest6
-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/spnavd27
-rw-r--r--app-misc/spacenavd/metadata.xml22
-rw-r--r--app-misc/spacenavd/spacenavd-0.5-r2.ebuild69
6 files changed, 207 insertions, 0 deletions
diff --git a/app-misc/spacenavd/Manifest b/app-misc/spacenavd/Manifest
new file mode 100644
index 0000000..d39c804
--- /dev/null
+++ b/app-misc/spacenavd/Manifest
@@ -0,0 +1,6 @@
+AUX spacenavd-0.5-custom-flags.patch 2008 RMD160 c665becac1ff1b31eec94fe3ef70b98f851a2488 SHA1 79909d72d9da7ff0af369685869bb6709edadc90 SHA256 78c8aebbd33f0c135501e6dea132c4f6edd9068bfddf741bfc8fe11d5269f546
+AUX spacenavd-0.5-destdir.patch 649 RMD160 3ffb705f3a0a2a940e4e4a9c3d34c3ede6c95f33 SHA1 8a946d85a1d8d454579e635c2248bc17dc1a399d SHA256 df58f5006d3b1be15a40182ca91ea964d62572a6e0a47b05c037958674db5366
+AUX spnavd 579 RMD160 13e324d36ffb8900eb672492b7d8e10ae6a6c718 SHA1 dbef423d85a95f9fc329cfa379256a7331bdd7ac SHA256 2ad811c9c2de7ffa054e22a3d1a8c597b0a1cdc9fda719a7cc94a4fd8ca7ad42
+DIST spacenavd-0.5.tar.gz 41746 RMD160 7b455d4cd96074707e671103e45cd0a5423cafc3 SHA1 76438d6fce981337b272210311124fe711606235 SHA256 0eecc5b5ad47ee6376d1521f2bc7c8f8fc02904cf3fede3f77e59f4795b592e3
+EBUILD spacenavd-0.5-r2.ebuild 1658 RMD160 692c3ff7f794c6e3060bd0d043c690c5ba7479ea SHA1 315ac81dec1f87299d2b4c6b4ce7882bc7b1d047 SHA256 25ac0929b29642c8d361bc4553de140c210da372a522f9e3c8d20d831a36c980
+MISC metadata.xml 843 RMD160 4e1c3eaba52e4bf6288364151cf6159b12b195cd SHA1 098de8c59b5b3f7e721df2067a7762e8914bd34d SHA256 40d478c2563fec01498586ee132dd94f6c9c7acef0ada92812f8bdbe73dd7f21
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 0000000..3b834a4
--- /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 0000000..5b23722
--- /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/spnavd b/app-misc/spacenavd/files/spnavd
new file mode 100644
index 0000000..383a2ad
--- /dev/null
+++ b/app-misc/spacenavd/files/spnavd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# 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 0000000..11a8f95
--- /dev/null
+++ b/app-misc/spacenavd/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>anthoine.bourgeois@gmail.com</email>
+ <name>Anthoine Bourgeois</name>
+ </maintainer>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</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>
+</pkgmetadata>
diff --git a/app-misc/spacenavd/spacenavd-0.5-r2.ebuild b/app-misc/spacenavd/spacenavd-0.5-r2.ebuild
new file mode 100644
index 0000000..62d2256
--- /dev/null
+++ b/app-misc/spacenavd/spacenavd-0.5-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit eutils linux-info toolchain-funcs
+
+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 ~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
+}
+
+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 || die
+
+ # Init script
+ newinitd "${FILESDIR}/spnavd" spacenavd || die
+
+ # 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\`"
+ 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
+ ewarn "You must restart spnavd \`/etc/init.d/spacenavd restart\` to run"
+ ewarn "the new version of the daemon."
+}