diff options
Diffstat (limited to 'meta-rcar-gen3-adas')
9 files changed, 327 insertions, 0 deletions
diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0001-libspnav-cross-compile.patch b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0001-libspnav-cross-compile.patch new file mode 100644 index 0000000..3a33da1 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0001-libspnav-cross-compile.patch @@ -0,0 +1,42 @@ +diff -pruN libspnav-0.2.3.orig/configure libspnav-0.2.3/configure +--- libspnav-0.2.3.orig/configure 2011-11-25 18:36:43.000000000 -0800 ++++ libspnav-0.2.3/configure 2016-03-18 04:46:31.327083251 -0700 +@@ -8,7 +8,7 @@ DBG=yes + X11=yes + + srcdir="`dirname "$0"`" +-libdir=lib ++libdir=lib64 + + #if [ "`uname -m`" = 'x86_64' ]; then + # libdir=lib64 +diff -pruN libspnav-0.2.3.orig/Makefile.in libspnav-0.2.3/Makefile.in +--- libspnav-0.2.3.orig/Makefile.in 2014-08-17 18:38:31.000000000 -0700 ++++ libspnav-0.2.3/Makefile.in 2016-03-18 04:46:31.339083251 -0700 +@@ -8,10 +8,11 @@ lib_a = lib$(name).a + incpaths = -I. -I/usr/local/include -I/usr/X11R6/include + libpaths = -L/usr/local/lib -L/usr/X11R6/lib + +-CC = gcc +-AR = ar +-CFLAGS = $(opt) $(dbg) -std=c89 $(pic) -pedantic -Wall -fno-strict-aliasing $(incpaths) $(user_cflags) +-LDFLAGS = $(libpaths) $(user_ldflags) $(xlib) ++CC ?= gcc ++AR ?= ar ++CFLAGS ?= -std=c89 -pedantic -Wall -fno-strict-aliasing ++CFLAGS += $(opt) $(dbg) $(pic) -I. $(user_cflags) ++LDFLAGS ?= $(libpaths) $(user_ldflags) $(xlib) + + ifeq ($(shell uname -s), Darwin) + lib_so = libspnav.dylib +@@ -54,8 +55,8 @@ install: $(lib_a) $(lib_so) + cp $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) + [ -n "$(soname)" ] && \ + rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) && \ +- ln -s $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \ +- ln -s $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \ ++ ln -s $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \ ++ ln -s $(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \ + true + for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done + diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0002-Fix-configuration-for-libdir.patch b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0002-Fix-configuration-for-libdir.patch new file mode 100644 index 0000000..8976eb6 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0002-Fix-configuration-for-libdir.patch @@ -0,0 +1,87 @@ +From c79af49c33f8ce705f63dee9dbc48cd716064e98 Mon Sep 17 00:00:00 2001 +From: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com> +Date: Fri, 22 Apr 2016 13:38:21 +0300 +Subject: [PATCH] Fix configuration for libdir + +Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com> +--- + Makefile.in | 18 +++++++++--------- + configure | 13 +++++++------ + 2 files changed, 16 insertions(+), 15 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index eb996a9..6808e44 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -50,22 +50,22 @@ distclean: + + .PHONY: install + install: $(lib_a) $(lib_so) +- mkdir -p $(DESTDIR)$(PREFIX)/$(libdir) $(DESTDIR)$(PREFIX)/include +- cp $(lib_a) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_a) +- cp $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) ++ mkdir -p $(DESTDIR)/$(libdir) $(DESTDIR)$(PREFIX)/include ++ cp $(lib_a) $(DESTDIR)/$(libdir)/$(lib_a) ++ cp $(lib_so) $(DESTDIR)/$(libdir)/$(lib_so) + [ -n "$(soname)" ] && \ +- rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) && \ +- ln -s $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \ +- ln -s $(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \ ++ rm -f $(DESTDIR)/$(libdir)/$(soname) $(DESTDIR)/$(libdir)/$(devlink) && \ ++ ln -s $(lib_so) $(DESTDIR)/$(libdir)/$(soname) && \ ++ ln -s $(soname) $(DESTDIR)/$(libdir)/$(devlink) || \ + true + for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done + + .PHONY: uninstall + uninstall: +- rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_a) +- rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) ++ rm -f $(DESTDIR)/$(libdir)/$(lib_a) ++ rm -f $(DESTDIR)/$(libdir)/$(lib_so) + [ -n "$(soname)" ] && \ +- rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \ ++ rm -f $(DESTDIR)/$(libdir)/$(soname) $(DESTDIR)/$(libdir)/$(devlink) || \ + true + for i in $(hdr); do rm -f $(DESTDIR)$(PREFIX)/include/$$i; done + +diff --git a/configure b/configure +index 6f85fec..7f6289d 100755 +--- a/configure ++++ b/configure +@@ -8,18 +8,18 @@ DBG=yes + X11=yes + + srcdir="`dirname "$0"`" +-libdir=lib64 +- +-#if [ "`uname -m`" = 'x86_64' ]; then +-# libdir=lib64 +-#fi +- ++libdir=/usr/lib ++echo "initial $prefix" + for arg; do + case "$arg" in + --prefix=*) + value=`echo $arg | sed 's/--prefix=//'` + PREFIX=${value:-$prefix} + ;; ++ --libdir=*) ++ value=`echo $arg | sed 's/--libdir=//'` ++ libdir=${value:-$libdir} ++ ;; + + --enable-opt) + OPT=yes;; +@@ -53,6 +53,7 @@ for arg; do + done + + echo " prefix: $PREFIX" ++echo " libdir: $libdir" + echo " optimize for speed: $OPT" + echo " include debugging symbols: $DBG" + echo " x11 communication method: $X11" +-- +2.1.4 + diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/libspnav-0.2.3.tar.gz b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/libspnav-0.2.3.tar.gz Binary files differnew file mode 100644 index 0000000..ed9da47 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/libspnav-0.2.3.tar.gz diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav_0.2.3.bb b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav_0.2.3.bb new file mode 100644 index 0000000..8586a7c --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav_0.2.3.bb @@ -0,0 +1,24 @@ +SUMMARY = "SpaceNavigator 3D-mouse daemon interface library" +SECTION = "libs/multimedia" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://README;md5=a8f5600270c9340ba8f2d956133a91d3" + +SRC_URI = " \ + file://libspnav-0.2.3.tar.gz \ + file://0001-libspnav-cross-compile.patch \ + file://0002-Fix-configuration-for-libdir.patch \ +" + +SRC_URI[md5sum] = "44d840540d53326d4a119c0f1aa7bf0a" +SRC_URI[sha256sum] = "7ae4d7bb7f6a5dda28b487891e01accc856311440f582299760dace6ee5f1f93" + +S = "${WORKDIR}/libspnav-${PV}" + +inherit autotools pkgconfig + +B = "${WORKDIR}/libspnav-${PV}" + +# Disable X11 protocol +EXTRA_OECONF = "--disable-x11" + +FILES_${PN} = " ${libdir} " diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/0001-spacenavd-cross-compile.patch b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/0001-spacenavd-cross-compile.patch new file mode 100644 index 0000000..ed4cc51 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/0001-spacenavd-cross-compile.patch @@ -0,0 +1,95 @@ +diff -pruN spacenavd-0.6.orig/configure spacenavd-0.6/configure +--- spacenavd-0.6.orig/configure 2012-05-16 20:56:12.000000000 -0700 ++++ spacenavd-0.6/configure 2016-03-18 04:35:24.259067397 -0700 +@@ -154,25 +154,25 @@ cat "$srcdir/Makefile.in" >>Makefile + + # create config.h + echo 'creating config.h' +-echo '#ifndef CONFIG_H_' >src/config.h +-echo '#define CONFIG_H_' >>src/config.h +-echo >>src/config.h ++echo '#ifndef CONFIG_H_' >$srcdir/src/config.h ++echo '#define CONFIG_H_' >>$srcdir/src/config.h ++echo >>$srcdir/src/config.h + if [ "$X11" = yes ]; then +- echo '#define USE_X11' >>src/config.h +- echo >>src/config.h ++ echo '#define USE_X11' >>$srcdir/src/config.h ++ echo >>$srcdir/src/config.h + fi + if [ "$HOTPLUG" = yes ]; then +- echo '#define USE_NETLINK' >>src/config.h +- echo >>src/config.h ++ echo '#define USE_NETLINK' >>$srcdir/src/config.h ++ echo >>$srcdir/src/config.h + fi +-echo '#define VERSION "'$VER'"' >>src/config.h +-echo >>src/config.h ++echo '#define VERSION "'$VER'"' >>$srcdir/src/config.h ++echo >>$srcdir/src/config.h + + # check for alloca.h +-check_header alloca.h >>src/config.h ++check_header alloca.h >>$srcdir/src/config.h + +-echo >>src/config.h +-echo '#endif /* CONFIG_H_ */' >>src/config.h ++echo >>$srcdir/src/config.h ++echo '#endif /* CONFIG_H_ */' >>$srcdir/src/config.h + + echo '' + echo 'Done. You can now type make (or gmake) to compile spacenavd.' +diff -pruN spacenavd-0.6.orig/Makefile.in spacenavd-0.6/Makefile.in +--- spacenavd-0.6.orig/Makefile.in 2013-06-25 17:12:28.000000000 -0700 ++++ spacenavd-0.6/Makefile.in 2016-03-18 04:44:10.451079903 -0700 +@@ -1,14 +1,14 @@ +-src = $(wildcard src/*.c) $(wildcard src/serial/*.c) $(wildcard src/magellan/*.c) +-hdr = $(wildcard src/*.h) $(wildcard src/serial/*.h) $(wildcard src/magellan/*.h) ++src = $(wildcard $(srcdir)/src/*.c) $(wildcard $(srcdir)/src/serial/*.c) $(wildcard $(srcdir)/src/magellan/*.c) ++hdr = $(wildcard $(srcdir)/src/*.h) $(wildcard $(srcdir)/src/serial/*.h) $(wildcard $(srcdir)/src/magellan/*.h) + obj = $(src:.c=.o) + dep = $(obj:.o=.d) + bin = spacenavd +-ctl = spnavd_ctl + +-CC = gcc ++CC ?= gcc + INSTALL = install +-CFLAGS = -pedantic -Wall $(dbg) $(opt) -fno-strict-aliasing -I$(srcdir)/src -I/usr/local/include $(add_cflags) +-LDFLAGS = -L/usr/local/lib $(xlib) $(add_ldflags) ++CFLAGS ?= -pedantic -Wall -fno-strict-aliasing -I/usr/local/include $(add_cflags) ++CFLAGS += $(dbg) $(opt) -I$(srcdir)/src ++LDFLAGS ?= -L/usr/local/lib $(xlib) $(add_ldflags) + + $(bin): $(obj) + $(CC) -o $@ $(obj) $(LDFLAGS) +@@ -36,7 +36,6 @@ cleandep: + install: $(bin) + $(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 ] && \ +@@ -45,7 +44,5 @@ install: $(bin) + .PHONY: uninstall + uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) +- rm -f $(DESTDIR)$(PREFIX)/bin/$(ctl) +- rm -f $(DESTDIR)/etc/hal/fdi/policy/spacenav.fdi + + # cd $(srcdir) && ./setup_init remove +diff -pruN spacenavd-0.6.orig/src/config.h spacenavd-0.6/src/config.h +--- spacenavd-0.6.orig/src/config.h 1969-12-31 16:00:00.000000000 -0800 ++++ spacenavd-0.6/src/config.h 2016-03-18 04:35:24.295067398 -0700 +@@ -0,0 +1,10 @@ ++#ifndef CONFIG_H_ ++#define CONFIG_H_ ++ ++#define USE_NETLINK ++ ++#define VERSION "" ++ ++#define HAVE_ALLOCA_H ++ ++#endif /* CONFIG_H_ */ diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/0002-Fix-build-configuration.patch b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/0002-Fix-build-configuration.patch new file mode 100644 index 0000000..a2500b9 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/0002-Fix-build-configuration.patch @@ -0,0 +1,27 @@ +From 10138bf87a7d4c23ce3c067455fb299410b37a49 Mon Sep 17 00:00:00 2001 +From: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com> +Date: Fri, 22 Apr 2016 13:36:28 +0300 +Subject: [PATCH] Fix build configuration + +Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com> +--- + Makefile.in | 6 +++--- + configure | 16 ++++++++-------- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 27d1a21..48dc517 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -8,7 +8,7 @@ CC ?= gcc + INSTALL = install + CFLAGS ?= -pedantic -Wall -fno-strict-aliasing -I/usr/local/include $(add_cflags) + CFLAGS += $(dbg) $(opt) -I$(srcdir)/src +-LDFLAGS ?= -L/usr/local/lib $(xlib) $(add_ldflags) ++LDFLAGS ?= -L/usr/lib64 $(xlib) $(add_ldflags) + + $(bin): $(obj) + $(CC) -o $@ $(obj) $(LDFLAGS) +diff --git a/configure b/configure +index 2795a3c..c016b33 100755 + diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/spacenavd-0.6.tar.gz b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/spacenavd-0.6.tar.gz Binary files differnew file mode 100644 index 0000000..fa9fa37 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/spacenavd-0.6.tar.gz diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/spacenavd.service b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/spacenavd.service new file mode 100644 index 0000000..46302a6 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd/spacenavd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Spacenavd startup +RequiresMountsFor=/run + +[Service] +User=root +EnvironmentFile=-/etc/default/spacenavd +ExecStart=/usr/bin/spacenavd $OPTARGS +Type=forking + +[Install] +WantedBy=multi-user.target + diff --git a/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd_0.6.bb b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd_0.6.bb new file mode 100644 index 0000000..943aa9a --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-support/spacenav/spacenavd_0.6.bb @@ -0,0 +1,39 @@ +SUMMARY = "Userspace library to SpaceNavigator 3D-mouse" +SECTION = "libs/multimedia" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI = " \ + file://spacenavd-0.6.tar.gz \ + file://0001-spacenavd-cross-compile.patch \ + file://0002-Fix-build-configuration.patch \ +" + +SRC_URI[md5sum] = "7e2c04fb8dbb7d39b9ee7b64565e0c4f" +SRC_URI[sha256sum] = "c2d203bf96c5a959590146a43fe5d6e5e8c5c38a8b2f55aa199d967d0d88d0ab" + +S = "${WORKDIR}/spacenavd-${PV}" +B = "${S}" + +inherit autotools pkgconfig useradd systemd + +# Don't configure udev by default since it will cause a circular +# dependecy with udev package, which depends on libusb +EXTRA_OECONF = " --disable-x11" + +SRC_URI_append = " file://spacenavd.service" + +SYSTEMD_SERVICE_${PN} = "spacenavd.service" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system spacenavd" + +do_install_append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/spacenavd.service ${D}${systemd_unitdir}/system/ + fi +} + |