cwiid: new package
PATCH 1/1 cwiid: new package
This patch only add the native cwiid library and a couple of tools.
The 2 first cwiid patches are retrieved from upstream and fix build issues, so does the 3rd one.
The 4th patch allows to disable wmgui build, so allows to reduce to number of dependencies.
--- package/Config.in | 1 + package/cwiid/Config.in | 23 +++ ...id-0001-fix-link-options-for-as-needed-90.patch | 166 +++++++++++++++++++++ .../cwiid-0002-Update-for-BlueZ-changes.patch | 28 ++++ ...linking-by-adding-the-missing-lbluetooth-.patch | 27 ++++ ...-0004-configure-make-wmgui-build-optional.patch | 64 ++++++++ package/cwiid/cwiid.mk | 30 ++++ 7 files changed, 339 insertions(+) create mode 100644 package/cwiid/Config.in create mode 100644 package/cwiid/cwiid-0001-fix-link-options-for-as-needed-90.patch create mode 100644 package/cwiid/cwiid-0002-Update-for-BlueZ-changes.patch create mode 100644 package/cwiid/cwiid-0003-wmdemo-fix-linking-by-adding-the-missing-lbluetooth-.patch create mode 100644 package/cwiid/cwiid-0004-configure-make-wmgui-build-optional.patch create mode 100644 package/cwiid/cwiid.mk
package/Config.in +1 -0
@@ -264,6 +264,7 @@ source "package/acpid/Config.in" source "package/avrdude/Config.in" source "package/cdrkit/Config.in" source "package/cryptsetup/Config.in" +source "package/cwiid/Config.in" source "package/dbus/Config.in" source "package/dbus-glib/Config.in" source "package/dbus-python/Config.in"
package/cwiid/Config.in new file +23 -0
@@ -0,0 +1,23 @@ +config BR2_PACKAGE_CWIID + bool "cwiid" + depends on !BR2_avr32 # bluez_utils + depends on !BR2_PREFER_STATIC_LIB # bluez_utils + depends on BR2_USE_WCHAR # bluez_utils -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils -> dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # bluez_utils -> dbus, libglib2 + select BR2_PACKAGE_BLUEZ_UTILS + help + A collection of Linux tools written in C for interfacing to the + Nintendo Wiimote. + + http://abstrakraft.org/cwiid/ + +if BR2_PACKAGE_CWIID +config BR2_PACKAGE_CWIID_WMGUI + bool "wmgui" + depends on BR2_PACKAGE_XORG7 # libgtk2 + depends on BR2_USE_WCHAR # libgtk2 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2 + depends on BR2_USE_MMU # libgtk2 -> libglib2 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 -> pango +endif
package/cwiid/cwiid-0001-fix-link-options-for-as-needed-90.patch new file +166 -0
166 lines not on this page · raw message
package/cwiid/cwiid-0002-Update-for-BlueZ-changes.patch new file +28 -0
@@ -0,0 +1,28 @@ +From c5dd7d4a9af5a7d8ead8ad26d9e5e0f8f8292d29 Mon Sep 17 00:00:00 2001 +From: "L. Donnie Smith" <[email protected]> +Date: Sun, 30 Nov 2008 22:34:08 +0000 +Subject: [PATCH] Update for BlueZ changes. + +git-svn-id: http://abstrakraft.org/cwiid/svn/trunk at 183 918edb2d-ff29-0410-9de2-eb38e7f22bc7 +--- + libcwiid/bluetooth.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libcwiid/bluetooth.c b/libcwiid/bluetooth.c +index 63284a8..e986f75 100644 +--- a/libcwiid/bluetooth.c ++++ b/libcwiid/bluetooth.c +@@ -122,8 +122,8 @@ int cwiid_get_bdinfo_array(int dev_id, unsigned int timeout, int max_bdinfo, + } + + /* timeout (10000) in milliseconds */ +- if (hci_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN, +- (*bdinfo)[bdinfo_count].name, 10000)) { ++ if (hci_read_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN, ++ (*bdinfo)[bdinfo_count].name, 10000)) { + cwiid_err(NULL, "Bluetooth name read error"); + err = 1; + goto CODA; +-- +1.8.5.2 +
package/cwiid/cwiid-0003-wmdemo-fix-linking-by-adding-the-missing-lbluetooth-.patch new file +27 -0
@@ -0,0 +1,27 @@ +From af6bffb5b8b71e99e0f9bbbd2cf1fbd695a643c2 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +Date: Sat, 8 Dec 2012 13:32:40 +0100 +Subject: [PATCH 1/2] wmdemo: fix linking by adding the missing -lbluetooth to + LDLIBS + +Signed-off-by: Samuel Martin <[email protected]> +--- + wmdemo/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wmdemo/Makefile.in b/wmdemo/Makefile.in +index 56aed58..1eccc02 100644 +--- a/wmdemo/Makefile.in ++++ b/wmdemo/Makefile.in +@@ -8,7 +8,7 @@ SOURCES = wmdemo.c + + CFLAGS += -I at top_builddir@/libcwiid + LDFLAGS += -L at top_builddir@/libcwiid +-LDLIBS += -lcwiid ++LDLIBS += -lcwiid -lbluetooth + INST_DIR = @bindir@ + + include $(COMMON)/include/app.mak +-- +1.8.5.2 +
package/cwiid/cwiid-0004-configure-make-wmgui-build-optional.patch new file +64 -0
64 lines not on this page · raw message
package/cwiid/cwiid.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# cwiid +# +################################################################################ + +CWIID_VERSION = 0.6.00 +CWIID_SOURCE = cwiid-$(CWIID_VERSION).tgz +CWIID_SITE = http://abstrakraft.org/cwiid/downloads +CWIID_LICENSE = GPLv2+ +CWIID_LICENSE_FILES = COPYING + +CWIID_AUTORECONF = YES +CWIID_INSTALL_STAGING = YES + +CWIID_DEPENDENCIES = host-pkgconf host-bison host-flex bluez_utils + +# Disable python support. This disables the 2 following things: +# - wminput Python plugin support +# - cwiid Python module +CWIID_CONF_OPT = --without-python + +ifeq ($(BR2_PACKAGE_CWIID_WMGUI),y) +CWIID_DEPENDENCIES += libgtk2 libglib2 +CWIID_CONF_OPT += --enable-wmgui +else +CWIID_CONF_OPT += --disable-wmgui +endif + +$(eval $(autotools-package))
Signature · 1 line
1.8.5.2
PATCH v3 1/2 flite: new package
---
changes v1 -> v2:
- fix dependencies
changes v2 -> v3:
- move flite package in package/flite (flat package tree)
- remove duplicate --enable-shared options (Peter, ThomasP)
- misc. cosmetic fixes
- make flite honor the DESTDIR env. var., so add a patch to fix its build system (ThomasP)
--- package/Config.in | 1 + package/flite/Config.in | 16 +++++++++ .../flite-0001-now-honor-DESTDIR-env.-var.patch | 30 ++++++++++++++++ package/flite/flite.mk | 41 ++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 package/flite/Config.in create mode 100644 package/flite/flite-0001-now-honor-DESTDIR-env.-var.patch create mode 100644 package/flite/flite.mk
package/Config.in +1 -0
@@ -9,6 +9,7 @@ source "package/bellagio/Config.in" source "package/faad2/Config.in" source "package/ffmpeg/Config.in" source "package/flac/Config.in" +source "package/flite/Config.in" source "package/gstreamer/Config.in" source "package/gstreamer1/Config.in" source "package/lame/Config.in"
package/flite/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_FLITE + bool "flite" + depends on BR2_USE_WCHAR + help + Flite: a small, fast run time synthesis engine. + + Flite (festival-lite) is a small, fast run-time synthesis engine + developed at CMU and primarily designed for small embedded machines + and/or large servers. Flite is designed as an alternative synthesis + engine to Festival for voices built using the FestVox suite of voice + building tools. + + http://www.speech.cs.cmu.edu/flite + +comment "flite require a toolchain with WCHAR support" + depends on !BR2_USE_WCHAR
package/flite/flite-0001-now-honor-DESTDIR-env.-var.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 658f3243238efe951f6242fa384e990d77078afc Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +Date: Fri, 27 Dec 2013 17:42:39 +0100 +Subject: [PATCH] now honor DESTDIR env. var. + +Flite used a handwritten a Makefile which doesn't honor DESTDIR environment +variable, though it uses autoconf. + +Signed-off-by: Samuel Martin <[email protected]> +--- + config/config.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/config.in b/config/config.in +index 914d2bf..43f1a56 100644 +--- a/config/config.in ++++ b/config/config.in +@@ -49,6 +49,6 @@ include $(TOP)/config/$(langvox).lv + prefix = @prefix@ + exec_prefix = @exec_prefix@ + EXEEXT = @EXEEXT@ +-INSTALLBINDIR = @bindir@ +-INSTALLLIBDIR = @libdir@ +-INSTALLINCDIR = @includedir@/flite ++INSTALLBINDIR = $(DESTDIR)@bindir@ ++INSTALLLIBDIR = $(DESTDIR)@libdir@ ++INSTALLINCDIR = $(DESTDIR)@includedir@/flite +-- +1.8.5.2 +
package/flite/flite.mk new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH v3 1/2 flite: new package
Samuel, All,
On 2014-01-02 15:43 +0100, Samuel Martin spake thusly:
Quoted 2 lines
Cc Eric Jarrige <[email protected]>Signed-off-by Samuel Martin <[email protected]>
[--SNIP--]
Quoted 26 lines
package/flite/flite.mk new file +20
-0@@ -0,0 +1,41 @@ +################################################################################ +# +# flite +# +################################################################################ + +FLITE_VERSION = 1.4 +FLITE_SOURCE = flite-$(FLITE_VERSION)-release.tar.bz2 +FLITE_SITE = http://www.speech.cs.cmu.edu/flite/packed/flite-$(FLITE_VERSION) +FLITE_LICENSE = BSD-4c +FLITE_LICENSE_FILES = COPYING + +FLITE_INSTALL_STAGING = YES + +# Sadly, Flite does not support parallel build, especially when building its +# shared libraries. +FLITE_MAKE = $(MAKE1) + +# $ tar tf flite-1.4-release.tar.bz2 +# ...
package/flite/flite.mk line 30
Quoted 10 lines
package/flite/flite.mk new file +10
-0+# flite-1.4-release//install-sh +# flite-1.4-release//mkinstalldirs +# flite-1.4-release//Exports.def +# flite-1.4-release//flite.sln +# flite-1.4-release//fliteDll.vcproj +# flite-1.4-release/config/Makefile +# flite-1.4-release/config/common_make_rules +# flite-1.4-release/config/project.mak +# flite-1.4-release/config/config.in +# flite-1.4-release/config/system.mak.in
Did you notice upstream about this issue?
package/flite/flite.mk line 35
Quoted 4 lines
package/flite/flite.mk new file +4
-0+# So, the strip-component trick does not work at all. +# Let's redefine the extract command. +define FLITE_EXTRACT_CMDS + $(RM) -rf $(FLITE_DIR)
This will get rid of the .stamp_downloaded stamp file, and thus will trigger the download everytime make is run (but fortunately, it will find we already have the tarball, so won't actually download anything).
OTOH, this will also re-create .stamp_downloaded, which will be more recent than the existing .stamp_extracted, so will re-run the extract command.
This in turn removes all the .stamp_* files again, so the build and install will be re-done again.
And when you re-run make later on, since .stamp_downloaded will be missing, you're good for a free ride... For ever and ever...
Simply don't remove FLITE_DIR at all.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 2/2 canfestival: new package
In reply to Samuel Martin---
changes v1 -> v2:
- clean/fix *.mk
changes v2 -> v3:
- rename package libcanfestival -> canfestival (follow upstream name)
- add option to install examples
- use latest revision
- use tarball instead of hg clone
- cosmetic fixes and typos (Peter and Yegor)
- add note about the standard mainline can interface (Peter)
- set default max bus number to 1 (Peter)
--- package/Config.in | 1 + package/canfestival/Config.in | 95 +++ .../canfestival-0001-now-honor-DESTDIR.patch | 787 +++++++++++++++++++++ package/canfestival/canfestival.mk | 44 ++ 4 files changed, 927 insertions(+) create mode 100644 package/canfestival/Config.in create mode 100644 package/canfestival/canfestival-0001-now-honor-DESTDIR.patch create mode 100644 package/canfestival/canfestival.mk
package/Config.in +1 -0
@@ -638,6 +638,7 @@ source "package/cppzmq/Config.in" source "package/czmq/Config.in" source "package/filemq/Config.in" source "package/glib-networking/Config.in" +source "package/canfestival/Config.in" source "package/libcgi/Config.in" source "package/libcgicc/Config.in" source "package/libcurl/Config.in"
package/canfestival/Config.in new file +95 -0
95 lines not on this page · raw message
package/canfestival/canfestival-0001-now-honor-DESTDIR.patch new file +787 -0
787 lines not on this page · raw message
package/canfestival/canfestival.mk new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH v3 2/2 canfestival: new package
Samuel, All,
On 2014-01-02 15:43 +0100, Samuel Martin spake thusly:
Quoted 2 lines
Cc Eric Jarrige <[email protected]>Signed-off-by Samuel Martin <[email protected]>
[--SNIP--]
package/canfestival/canfestival-0001-now-honor-DESTDIR.patch line 6
Quoted 12 lines
package/canfestival/canfestival-0001-now-honor-DESTDIR.patch new file +6
-0@@ -0,0 +1,787 @@ +From 9b76c8c97344472bc58e38cc28f734687d1a2aab Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +Date: Fri, 27 Dec 2013 19:01:02 +0100 +Subject: [PATCH] now honor DESTDIR + +Signed-off-by: Samuel Martin <[email protected]>
Did you try to send this upstream?
[--SNIP--]
Quoted 13 lines
package/canfestival/canfestival.mk new file +7
-0@@ -0,0 +1,44 @@ +################################################################################ +# +# canfestival +# +################################################################################ + +# Revision 789:
package/canfestival/canfestival.mk line 17
Quoted 10 lines
package/canfestival/canfestival.mk new file +10
-0+CANFESTIVAL_VERSION = a82d867e7850 +CANFESTIVAL_SOURCE = $(CANFESTIVAL_VERSION).tar.bz2 +CANFESTIVAL_SITE = http://dev.automforge.net/CanFestival-3/archive +# Runtime code is licensed LGPLv2, whereas accompanying developer tools and few +# drivers (virtual_kernel, lincan and copcican_linux) are licensed GPLv2. +CANFESTIVAL_LICENSE = LGPLv2.1, GPLv2 +CANFESTIVAL_LICENSE_FILES = COPYING, LICENCE +CANFESTIVAL_INSTALL_STAGING = YES +CANFESTIVAL_TO_BE_INSTALLED = src drivers \ + $(if $(BR2_PACKAGE_CANFESTIVAL_INSTALL_EXAMPLES),examples)
Although in your case it does not really improve the code, it seems we are currently seeing a trend toward this constructs:
CANFESTIVAL_TO_BE_INSTALLED-y = src drivers CANFESTIVAL_TO_BE_INSTALLED-$(BR2_PACKAGE_CANFESTIVAL_INSTALL_EXAMPLES) += examples
But this is not a rulle set in stone^Wthe manual. ;-)
package/canfestival/canfestival.mk line 25
Quoted 7 lines
package/canfestival/canfestival.mk new file +7
-0+define CANFESTIVAL_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) ./configure \ + --binutils=$(TARGET_CROSS) --cc="$(TARGET_CC)" \ + --cxx="$(TARGET_CC)" --ld="$(TARGET_CC)" \ + --can=$(BR2_PACKAGE_CANFESTIVAL_DRIVER) \ + --MAX_CAN_BUS_ID=$(BR2_PACKAGE_CANFESTIVAL_NBMMAXCAN)
It looks like configure has a --kerneldir= to specify the path to the kernel. Is it need when BR2_PACKAGE_CANFESTIVAL_DRIVER is one of the kernel drivers?
Also, there is --target to speicify the target system: unix, win32 or hcs12. The configure script uses 'uname' to detect that. Granted, we only really support building on Linux, but I think it would be better to force it to 'unix'.
Then, there is --arch to specify the architecture. Again, configure uses 'uname', which is broken for cross-compilation. And configure only supports thos archs: x86, x86_64, powerpc, powerpc64, and arm. Maybe we want canfestival to have the proper "depends on"?
Then, there's --timers to specify the types of timers to use: unix, xeno, rtai, kernel, kernel_xeno, win32 or none. Maybe it would be nice to set the timers to use depending on the kernel extensions that are enabled? Or force unix or none to be safe, at least.
Otherwise: any reason to provide an config option for MAX_CAN_BUS_ID but not for the other knobs (SDO_MAX_LENGTH_TRANSFER, SDO_BLOCK_SIZE and so on)?
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 2/2 canfestival: new package
In reply to Samuel MartinOn Thu, Jan 02, 2014 at 03:43:40PM +0100, Samuel Martin wrote:
...
package/canfestival/canfestival.mk line 26
Quoted 8 lines
package/canfestival/canfestival.mk new file +8
-0+define CANFESTIVAL_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) ./configure \ + --binutils=$(TARGET_CROSS) --cc="$(TARGET_CC)" \ + --cxx="$(TARGET_CC)" --ld="$(TARGET_CC)" \ + --can=$(BR2_PACKAGE_CANFESTIVAL_DRIVER) \ + --MAX_CAN_BUS_ID=$(BR2_PACKAGE_CANFESTIVAL_NBMMAXCAN) +endef
I've tested the patch with an arm toolchain and noticed that installed files end up not properly prefixed (i.e. /usr/arm-buildroot-linux-gnueabi/lib)
It can be fixed by passing "--prefix=/usr" to configure
regards,
Davide