+++ /dev/null
-require bluez-utils3.inc
-
-PR = "r1"
-
-DEPENDS += "cups"
-
-# TI patch landed upstream sometime between 3.35 and 3.36,
-# albeit in a somewhat different form
-SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --disable-alsa \
- --enable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-
-FILES_${PN} = "${libdir}/cups/backend/bluetooth"
-RDEPENDS_${PN} = "cups"
+++ /dev/null
-require bluez-utils3.inc
-
-
-DEPENDS += "cups"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --disable-alsa \
- --enable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-
-FILES_${PN} = "${libdir}/cups/backend/bluetooth"
-RDEPENDS_${PN} = "cups"
+++ /dev/null
-require bluez-utils3.inc
-
-PR = "r1"
-
-DEPENDS += "gstreamer gst-plugins-base "
-
-# TI patch landed upstream sometime between 3.35 and 3.36,
-# albeit in a somewhat different form
-SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-alsa \
- --disable-cups \
- --enable-glib \
- --enable-gstreamer \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-
-FILES_${PN} = "${libdir}/gstreamer-0.10/libgstbluetooth.so"
+++ /dev/null
-require bluez-utils3.inc
-
-
-DEPENDS += "gstreamer gst-plugins-base "
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-alsa \
- --disable-cups \
- --enable-glib \
- --enable-gstreamer \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-
-FILES_${PN} = "${libdir}/gstreamer-0.10/libgstbluetooth.so"
--- /dev/null
+Upstream-Status: Pending [package obsolete/not maintained by upstream]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd bluez-hcidump-2.5/configure.ac bluez-hcidump-2.5/configure.ac
+--- bluez-hcidump-2.5/configure.ac 2012-11-30 10:29:41.000000000 +0200
++++ bluez-hcidump-2.5/configure.ac 2013-01-12 10:02:10.609511463 +0200
+@@ -2,7 +2,7 @@
+ AC_INIT(bluez-hcidump, 2.5)
+
+ AM_INIT_AUTOMAKE([foreign subdir-objects])
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack HCI Debugger Tool."
-SECTION = "console"
-PRIORITY = "optional"
-DEPENDS = "bluez-libs"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "http://bluez.sourceforge.net/download/bluez-hcidump-${PV}.tar.gz"
-S = "${WORKDIR}/bluez-hcidump-${PV}"
-
-EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR}"
-
-inherit autotools
--- /dev/null
+SUMMARY = "Linux Bluetooth Stack HCI Debugger Tool"
+DESCRIPTION = "The hcidump tool reads raw HCI data coming from and going to a Bluetooth device \
+and displays the commands, events and data in a human-readable form."
+
+SECTION = "console"
+# hcidump was integrated into bluez5
+DEPENDS = "bluez4"
+RCONFLICTS_${PN} = "bluez5"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+ file://src/hcidump.c;beginline=1;endline=23;md5=3bee3a162dff43a5be7470710b99fbcf"
+PR = "r1"
+
+SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/bluez-hcidump-${PV}.tar.gz \
+ file://obsolete_automake_macros.patch;patch=1 \
+"
+
+SRC_URI[md5sum] = "2eab54bbd2b59a2ed4274ebb9390cf18"
+SRC_URI[sha256sum] = "9b7c52b375081883738cf049ecabc103b97d094b19c6544fb241267905d88881"
+S = "${WORKDIR}/bluez-hcidump-${PV}"
+
+inherit autotools
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland Libaries."
-SECTION = "libs"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "http://bluez.sourceforge.net/download/bluez-libs-${PV}.tar.gz"
-
-inherit autotools pkgconfig
-
-HEADERS = "bluetooth.h bnep.h cmtp.h hci.h hci_lib.h hidp.h l2cap.h rfcomm.h sco.h sdp.h sdp_lib.h"
-
-do_stage() {
- oe_libinstall -a -so -C src libbluetooth ${STAGING_LIBDIR}
-
- install -d ${STAGING_INCDIR}/bluetooth/
- for f in ${HEADERS}
- do
- install -m 0644 include/$f ${STAGING_INCDIR}/bluetooth/$f
- done
-}
+++ /dev/null
-upstream: not applicable
-comment from pb: not needed upstream, it's just a consequence of splitting the
- package into -libs and -apps. But, equally, it wouldn't do any harm upstream
- either. I might send it to them and see what they say.
-
---- tools/Makefile.am.old 2009-05-22 11:27:06.000000000 +0100
-+++ tools/Makefile.am 2009-05-22 11:27:29.000000000 +0100
-@@ -1,8 +1,10 @@
-
- if TOOLS
- tools_programs = hcitool l2ping sdptool ciptool
-+avinfo_programs = avinfo
- tools_manfiles = hcitool.1 l2ping.1 sdptool.1 ciptool.1
- else
-+avinfo_programs =
- tools_programs =
- tools_manfiles =
- endif
-@@ -41,7 +43,7 @@
-
- bin_PROGRAMS = $(tools_programs) $(dfutool_programs) $(dfubabel_programs)
-
--noinst_PROGRAMS = hcieventmask hcisecfilter ppporc avinfo $(usb_programs)
-+noinst_PROGRAMS = hcieventmask hcisecfilter ppporc $(avinfo_programs) $(usb_programs)
-
- hcieventmask_LDADD = @BLUEZ_LIBS@
-
+++ /dev/null
-require bluez-libs.inc
+++ /dev/null
-require bluez-libs.inc
-
-PR = "r1"
+++ /dev/null
-require bluez4-libs.inc
-
-PR = "${INC_PR}.1"
-DEFAULT_PREFERENCE = "-1"
+++ /dev/null
-upstream: accepted, this patch has landed upstream albeit in a different form
-sometime between 3.35 and 3.36. see the commit message in "git log e1d12d8bb5b40a6313cce52974f174fd76cbf32c"
-
---- bluez-utils-3.1/tools/hciattach.c.orig 2006-07-23 14:02:14.000000000 +0200
-+++ bluez-utils-3.1/tools/hciattach.c 2006-07-23 14:06:29.000000000 +0200
-@@ -60,6 +60,8 @@
- #define HCI_UART_3WIRE 2
- #define HCI_UART_H4DS 3
-
-+#include "ti_bts.h"
-+
- struct uart_t {
- char *type;
- int m_id;
-@@ -70,6 +72,7 @@
- int flags;
- char *bdaddr;
- int (*init) (int fd, struct uart_t *u, struct termios *ti);
-+ char *bts; /* bluetooth script */
- };
-
- #define FLOW_CTL 0x0001
-@@ -279,6 +282,114 @@
- return 0;
- }
-
-+static int brf6150(int fd, struct uart_t *u, struct termios *ti)
-+{
-+ bts_t *bfp;
-+ int i;
-+ unsigned long vers;
-+ unsigned char actionbuf[256];
-+ unsigned char resp[128]; /* Response */
-+ unsigned long count;
-+ unsigned short atype;
-+
-+ if (u->bts == NULL) /* no script, ignore */
-+ return 0;
-+
-+ bfp = bts_load_script( u->bts, &vers );
-+ if (bfp == NULL)
-+ return -1;
-+
-+ fprintf( stderr, "Loading BTS script version %lu\n", vers );
-+
-+ while ((count = bts_next_action( bfp, actionbuf,
-+ sizeof actionbuf - 1, &atype )) != 0) {
-+ if (atype == ACTION_REMARKS) {
-+ if (actionbuf[0] != 0)
-+ fprintf( stderr, "%s\n", actionbuf );
-+ }
-+ else if (atype == ACTION_SEND_COMMAND) {
-+#if 0
-+ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
-+ for (i=0; i<count; i++) {
-+ fprintf( stderr, "0x%02x ", actionbuf[i] );
-+ }
-+ fprintf( stderr, "\n" );
-+#endif
-+ int n;
-+ n = write(fd, actionbuf, count);
-+ if (n < 0 || n < count) {
-+ perror("Failed to write TI action command");
-+ return -1;
-+ }
-+ }
-+ else if (atype == ACTION_WAIT_EVENT) {
-+ action_wait_t *wait = (action_wait_t *)actionbuf;
-+#if 0
-+ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
-+ for (i=0; i<wait->size; i++) {
-+ fprintf( stderr, "0x%02x ", wait->data[i] );
-+ }
-+ fprintf( stderr, "\n" );
-+#endif
-+ usleep(wait->msec); /* seems they give usec, not msec */
-+ /* Read reply. */
-+ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
-+ perror("Failed to read TI command response");
-+ return -1;
-+ }
-+ if (count < wait->size) {
-+ fprintf( stderr, "TI command response is short.");
-+ }
-+ for (i=0; i<wait->size; i++) {
-+ if (i == 3) continue; /* ignore */
-+ if (resp[i] != wait->data[i]) {
-+ fprintf( stderr, "TI command response does not match expected result.\n" );
-+ }
-+ }
-+ }
-+ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
-+ action_serial_t *sercmd = (action_serial_t *)actionbuf;
-+
-+ /* Set actual baudrate */
-+ fprintf( stderr,
-+ "BTS changing baud rate to %u, flow control to %u\n",
-+ sercmd->baud, sercmd->flow_control );
-+
-+ tcflush(fd, TCIOFLUSH);
-+
-+ if (sercmd->flow_control)
-+ ti->c_cflag |= CRTSCTS;
-+ else
-+ ti->c_cflag &= ~CRTSCTS;
-+ if (tcsetattr(fd, TCSANOW, ti) < 0) {
-+ perror("Can't set port settings");
-+ return -1;
-+ }
-+
-+ u->speed = sercmd->baud;
-+
-+ tcflush(fd, TCIOFLUSH);
-+ if (set_speed(fd, ti, sercmd->baud) < 0) {
-+ perror("Can't set baud rate");
-+ return -1;
-+ }
-+ }
-+ else if (atype == ACTION_DELAY) {
-+ action_delay_t *delay = (action_delay_t *)actionbuf;
-+ usleep(delay->msec); /* seems they give usec, not msec */
-+ }
-+ else {
-+ fprintf( stderr, "BTS action type = %d: ", (int)atype );
-+ for (i=0; i<count; i++) {
-+ fprintf( stderr, "0x%02x ", actionbuf[i] );
-+ }
-+ fprintf( stderr, "\n" );
-+ }
-+ }
-+ bts_unload_script( bfp );
-+ return 0;
-+}
-+
- static int texas(int fd, struct uart_t *u, struct termios *ti)
- {
- struct timespec tm = {0, 50000};
-@@ -328,6 +439,17 @@
- /* Print LMP subversion */
- fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
-
-+ if ((resp[14] >> 2) == 3) {
-+ /* BRF6150 */
-+ int err;
-+
-+ nanosleep(&tm, NULL);
-+ if ((err = brf6150(fd, u, ti)) != 0) {
-+ fprintf(stderr, "Texas module script failed (err=%d)\n", err);
-+ return -1;
-+ }
-+ }
-+
- nanosleep(&tm, NULL);
- return 0;
- }
-@@ -1204,7 +1326,7 @@
- {
- printf("hciattach - HCI UART driver initialization utility\n");
- printf("Usage:\n");
-- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
-+ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
- printf("\thciattach -l\n");
- }
-
-@@ -1219,11 +1341,12 @@
- struct sigaction sa;
- struct pollfd p;
- char dev[PATH_MAX];
-+ char *bts = NULL;
-
- detach = 1;
- printpid = 0;
-
-- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
-+ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
- switch(opt) {
- case 'b':
- send_break = 1;
-@@ -1245,6 +1368,10 @@
- init_speed = atoi(optarg);
- break;
-
-+ case 'S':
-+ bts = optarg;
-+ break;
-+
- case 'l':
- for (i = 0; uart[i].type; i++) {
- printf("%-10s0x%04x,0x%04x\n", uart[i].type,
-@@ -1320,6 +1447,8 @@
- if (init_speed)
- u->init_speed = init_speed;
-
-+ u->bts = bts;
-+
- memset(&sa, 0, sizeof(sa));
- sa.sa_flags = SA_NOCLDSTOP;
- sa.sa_handler = sig_alarm;
---- bluez-utils-3.1/tools/ti_bts.h.orig 2006-07-23 14:07:26.000000000 +0200
-+++ bluez-utils-3.1/tools/ti_bts.h 2006-07-23 14:07:46.000000000 +0200
-@@ -0,0 +1,116 @@
-+/*
-+ * Copyright (c) 2005 Texas Instruments, Inc.
-+ * Ported by SDG Systems, LLC
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
-+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ *
-+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
-+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
-+ * SOFTWARE IS DISCLAIMED.
-+ *
-+ */
-+
-+#ifndef BT_SCRIPT_H
-+#define BT_SCRIPT_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*
-+ * Define the interface of Bluetooth Script
-+ */
-+
-+typedef void bts_t;
-+
-+
-+#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */
-+#define ACTION_WAIT_EVENT 2 /* Wait for data */
-+#define ACTION_SERIAL_PORT_PARAMETERS 3
-+#define ACTION_DELAY 4
-+#define ACTION_RUN_SCRIPT 5
-+#define ACTION_REMARKS 6
-+
-+/*
-+ * Structure for ACTION_SEND_COMMAND
-+ */
-+typedef struct tagCActionCommand
-+{
-+ unsigned char data[1]; /* Data to send */
-+} action_command_t;
-+
-+/*
-+ * Structure for ACTION_WAIT_EVENT
-+ */
-+typedef struct tagCActionWaitEvent
-+{
-+ unsigned long msec; /* in milliseconds */
-+ unsigned long size;
-+ unsigned char data[1]; /* Data to wait for */
-+} action_wait_t;
-+
-+
-+/*
-+ * Structure for ACTION_SERIAL_PORT_PARAMETERS
-+ */
-+typedef struct tagCActionSerialPortParameters
-+{
-+ unsigned long baud;
-+ unsigned long flow_control;
-+} action_serial_t;
-+
-+/* Flow Control Type */
-+#define FCT_NONE 0
-+#define FCT_HARDWARE 1
-+
-+#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */
-+
-+
-+/*
-+ * Structure for ACTION_DELAY
-+ */
-+typedef struct tagCActionDelay
-+{
-+ unsigned long msec; /* in milliseconds */
-+} action_delay_t;
-+
-+/*
-+ * Structure for ACTION_RUN_SCRIPT
-+ */
-+typedef struct tagCActionRunScript
-+{
-+ char filename[1];
-+} action_run_t;
-+
-+/*
-+ * Structure for ACTION_REMARKS
-+ */
-+typedef struct tagCActionRemarks
-+{
-+ char m_szRemarks[1];
-+} action_remarks_t;
-+
-+
-+const char *cis_create_filename(const unsigned char* cmdparms);
-+bts_t * bts_load_script(const char* fname, unsigned long* version);
-+unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
-+ unsigned long nMaxSize, unsigned short* ptype);
-+void bts_unload_script(bts_t* bts_fp);
-+
-+#ifdef __cplusplus
-+};
-+#endif
-+
-+#endif /* BT_SCRIPT_H */
-+
---- bluez-utils-3.1/tools/ti_bts.c.orig 2006-07-23 14:07:28.000000000 +0200
-+++ bluez-utils-3.1/tools/ti_bts.c 2006-07-23 14:07:46.000000000 +0200
-@@ -0,0 +1,149 @@
-+/*
-+ * Copyright (c) 2005 Texas Instruments, Inc.
-+ * Ported by SDG Systems, LLC
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
-+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ *
-+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
-+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
-+ * SOFTWARE IS DISCLAIMED.
-+ *
-+ */
-+
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include "ti_bts.h"
-+
-+#ifndef MAKEWORD
-+#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8))
-+#endif
-+
-+#define TI_MANUFACTURER_ID 13
-+
-+/*
-+ * Common Init Script specific
-+ */
-+const char *
-+cis_create_filename(const unsigned char* cmdparms)
-+{
-+ static char bts_file[50];
-+
-+ /* Check for TI's id */
-+ unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]);
-+
-+ if (TI_MANUFACTURER_ID == manfid) {
-+ unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]);
-+
-+ unsigned short chip = (version & 0x7C00) >> 10;
-+ unsigned short min_ver = (version & 0x007F);
-+ unsigned short maj_ver = (version & 0x0380) >> 7;
-+
-+ if (0 != (version & 0x8000)) {
-+ maj_ver |= 0x0008;
-+ }
-+
-+ sprintf( bts_file, "TIInit_%d.%d.%d.bts",
-+ (int)chip, (int)maj_ver, (int)min_ver);
-+
-+ return &bts_file[0];
-+ }
-+ return NULL;
-+}
-+
-+typedef struct tagCHeader
-+{
-+ unsigned long magic;
-+ unsigned long version;
-+ unsigned char future[24];
-+} cheader_t;
-+
-+
-+/* The value 0x42535442 stands for (in ASCII) BTSB */
-+/* which is Bluetooth Script Binary */
-+#define FILE_HEADER_MAGIC 0x42535442
-+
-+
-+bts_t *
-+bts_load_script(const char* fname, unsigned long* version)
-+{
-+ bts_t* bts = NULL;
-+ FILE* fp = fopen(fname, "rb");
-+
-+ if (NULL != fp) {
-+ /* Read header */
-+ cheader_t header;
-+
-+ /* Read header */
-+ if (1 == fread(&header, sizeof(header), 1, fp)) {
-+ /* Check magic number for correctness */
-+ if (header.magic == FILE_HEADER_MAGIC) {
-+ /* If user wants the version number */
-+ if (NULL != version) {
-+ *version = header.version;
-+ }
-+ bts = (bts_t*)fp;
-+ }
-+ }
-+ /* If failed reading the file, close it */
-+ if (NULL == bts) {
-+ fclose(fp);
-+ }
-+ }
-+ return bts;
-+}
-+
-+unsigned long
-+bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
-+ unsigned long nMaxSize, unsigned short* ptype)
-+{
-+ unsigned long bytes = 0;
-+ FILE* fp = (FILE*)bts_fp;
-+ unsigned char action_hdr[4];
-+
-+ if (bts_fp == NULL)
-+ return 0;
-+
-+ /* Each Action has the following: */
-+ /* UINT16 type of this action */
-+ /* UINT16 size of rest */
-+ /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */
-+
-+ if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) {
-+ unsigned short type = *(unsigned short*)&action_hdr[0];
-+ unsigned short size = *(unsigned short*)&action_hdr[2];
-+
-+ if (size <= nMaxSize) {
-+ int nread = fread(action_buf, sizeof(action_buf[0]), size, fp);
-+
-+ if (nread == size) {
-+ *ptype = type;
-+ bytes = (unsigned long)size;
-+ }
-+ }
-+ }
-+
-+ return bytes;
-+}
-+
-+void
-+bts_unload_script(bts_t* bts_fp)
-+{
-+ FILE* fp = (FILE*)bts_fp;
-+
-+ if (NULL != fp) {
-+ fclose(fp);
-+ }
-+}
-+
---- bluez-utils-3.1/tools/Makefile.am.orig 2006-07-23 14:06:59.000000000 +0200
-+++ bluez-utils-3.1/tools/Makefile.am 2006-07-23 14:07:18.000000000 +0200
-@@ -45,7 +45,7 @@
-
- noinst_PROGRAMS = hcisecfilter ppporc
-
--hciattach_SOURCES = hciattach.c hciattach_st.c
-+hciattach_SOURCES = hciattach.c hciattach_st.c ti_bts.h ti_bts.c
- hciattach_LDADD = @BLUEZ_LIBS@
-
- hciconfig_SOURCES = hciconfig.c csr.h csr.c
+++ /dev/null
-upstream: accepted, this patch has landed upstream albeit in a different form
-sometime between 3.35 and 3.36. see the commit message in "git log e1d12d8bb5b40a6313cce52974f174fd76cbf32c"
-
---- bluez-utils-2.24/tools/hciattach.c.orig 2005-12-10 15:14:36.000000000 +0100
-+++ bluez-utils-2.24/tools/hciattach.c 2006-01-22 13:56:13.000000000 +0100
-@@ -57,6 +57,8 @@
- #define HCI_UART_3WIRE 2
- #define HCI_UART_H4DS 3
-
-+#include "ti_bts.h"
-+
- struct uart_t {
- char *type;
- int m_id;
-@@ -66,6 +68,7 @@
- int speed;
- int flags;
- int (*init) (int fd, struct uart_t *u, struct termios *ti);
-+ char *bts; /* bluetooth script */
- };
-
- #define FLOW_CTL 0x0001
-@@ -241,6 +244,114 @@
- return 0;
- }
-
-+static int brf6150(int fd, struct uart_t *u, struct termios *ti)
-+{
-+ bts_t *bfp;
-+ int i;
-+ unsigned long vers;
-+ unsigned char actionbuf[256];
-+ unsigned char resp[128]; /* Response */
-+ unsigned long count;
-+ unsigned short atype;
-+
-+ if (u->bts == NULL) /* no script, ignore */
-+ return 0;
-+
-+ bfp = bts_load_script( u->bts, &vers );
-+ if (bfp == NULL)
-+ return -1;
-+
-+ fprintf( stderr, "Loading BTS script version %lu\n", vers );
-+
-+ while ((count = bts_next_action( bfp, actionbuf,
-+ sizeof actionbuf - 1, &atype )) != 0) {
-+ if (atype == ACTION_REMARKS) {
-+ if (actionbuf[0] != 0)
-+ fprintf( stderr, "%s\n", actionbuf );
-+ }
-+ else if (atype == ACTION_SEND_COMMAND) {
-+#if 0
-+ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
-+ for (i=0; i<count; i++) {
-+ fprintf( stderr, "0x%02x ", actionbuf[i] );
-+ }
-+ fprintf( stderr, "\n" );
-+#endif
-+ int n;
-+ n = write(fd, actionbuf, count);
-+ if (n < 0 || n < count) {
-+ perror("Failed to write TI action command");
-+ return -1;
-+ }
-+ }
-+ else if (atype == ACTION_WAIT_EVENT) {
-+ action_wait_t *wait = (action_wait_t *)actionbuf;
-+#if 0
-+ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
-+ for (i=0; i<wait->size; i++) {
-+ fprintf( stderr, "0x%02x ", wait->data[i] );
-+ }
-+ fprintf( stderr, "\n" );
-+#endif
-+ usleep(wait->msec); /* seems they give usec, not msec */
-+ /* Read reply. */
-+ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
-+ perror("Failed to read TI command response");
-+ return -1;
-+ }
-+ if (count < wait->size) {
-+ fprintf( stderr, "TI command response is short.");
-+ }
-+ for (i=0; i<wait->size; i++) {
-+ if (i == 3) continue; /* ignore */
-+ if (resp[i] != wait->data[i]) {
-+ fprintf( stderr, "TI command response does not match expected result.\n" );
-+ }
-+ }
-+ }
-+ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
-+ action_serial_t *sercmd = (action_serial_t *)actionbuf;
-+
-+ /* Set actual baudrate */
-+ fprintf( stderr,
-+ "BTS changing baud rate to %u, flow control to %u\n",
-+ sercmd->baud, sercmd->flow_control );
-+
-+ tcflush(fd, TCIOFLUSH);
-+
-+ if (sercmd->flow_control)
-+ ti->c_cflag |= CRTSCTS;
-+ else
-+ ti->c_cflag &= ~CRTSCTS;
-+ if (tcsetattr(fd, TCSANOW, ti) < 0) {
-+ perror("Can't set port settings");
-+ return -1;
-+ }
-+
-+ u->speed = sercmd->baud;
-+
-+ tcflush(fd, TCIOFLUSH);
-+ if (set_speed(fd, ti, sercmd->baud) < 0) {
-+ perror("Can't set baud rate");
-+ return -1;
-+ }
-+ }
-+ else if (atype == ACTION_DELAY) {
-+ action_delay_t *delay = (action_delay_t *)actionbuf;
-+ usleep(delay->msec); /* seems they give usec, not msec */
-+ }
-+ else {
-+ fprintf( stderr, "BTS action type = %d: ", (int)atype );
-+ for (i=0; i<count; i++) {
-+ fprintf( stderr, "0x%02x ", actionbuf[i] );
-+ }
-+ fprintf( stderr, "\n" );
-+ }
-+ }
-+ bts_unload_script( bfp );
-+ return 0;
-+}
-+
- static int texas(int fd, struct uart_t *u, struct termios *ti)
- {
- struct timespec tm = {0, 50000};
-@@ -281,14 +392,25 @@
- } while (resp[4] != cmd[1] && resp[5] != cmd[2]);
-
- /* Verify manufacturer */
-- if ((resp[11] & 0xFF) != 0x0d)
-+ if (resp[11] != 0x0d)
- fprintf(stderr,"WARNING : module's manufacturer is not Texas Instrument\n");
-
- /* Print LMP version */
-- fprintf(stderr, "Texas module LMP version : 0x%02x\n", resp[10] & 0xFF);
-+ fprintf(stderr, "TI module LMP version : 0x%02x\n", resp[10]);
-
- /* Print LMP subversion */
-- fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
-+ fprintf(stderr, "TI module LMP sub-version : 0x%02x%02x\n", resp[14], resp[13]);
-+ if ((resp[14] >> 2) == 3) {
-+ int err;
-+ nanosleep(&tm, NULL);
-+
-+ /* BRF6150 */
-+ if ((err=brf6150( fd, u, ti )) != 0) {
-+ fprintf( stderr, "TI script failed (err=%d)\n",
-+ err );
-+ return -1;
-+ }
-+ }
-
- nanosleep(&tm, NULL);
- return 0;
-@@ -953,7 +1075,7 @@
- {
- printf("hciattach - HCI UART driver initialization utility\n");
- printf("Usage:\n");
-- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow]\n");
-+ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow]\n");
- printf("\thciattach -l\n");
- }
-
-@@ -970,11 +1092,12 @@
- pid_t pid;
- struct sigaction sa;
- char dev[PATH_MAX];
-+ char *bts = NULL;
-
- detach = 1;
- printpid = 0;
-
-- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
-+ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
- switch(opt) {
- case 'b':
- send_break = 1;
-@@ -996,6 +1119,10 @@
- init_speed = atoi(optarg);
- break;
-
-+ case 'S':
-+ bts = optarg;
-+ break;
-+
- case 'l':
- for (i = 0; uart[i].type; i++) {
- printf("%-10s0x%04x,0x%04x\n", uart[i].type,
-@@ -1067,6 +1194,8 @@
- if (init_speed)
- u->init_speed = init_speed;
-
-+ u->bts = bts;
-+
- memset(&sa, 0, sizeof(sa));
- sa.sa_flags = SA_NOCLDSTOP;
- sa.sa_handler = sig_alarm;
---- bluez-utils-2.24/tools/Makefile.am.orig 2005-12-03 07:22:16.000000000 +0100
-+++ bluez-utils-2.24/tools/Makefile.am 2006-01-22 13:53:59.000000000 +0100
-@@ -37,6 +37,9 @@
-
- noinst_PROGRAMS = hcisecfilter ppporc
-
-+hciattach_SOURCES = hciattach.c ti_bts.h ti_bts.c
-+hciattach_LDADD = @BLUEZ_LIBS@
-+
- hciconfig_SOURCES = hciconfig.c csr.h csr.c
- hciconfig_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libtextfile.a
-
---- bluez-utils-2.24/tools/ti_bts.h.orig 2006-01-22 13:56:38.000000000 +0100
-+++ bluez-utils-2.24/tools/ti_bts.h 2006-01-22 13:53:59.000000000 +0100
-@@ -0,0 +1,116 @@
-+/*
-+ * Copyright (c) 2005 Texas Instruments, Inc.
-+ * Ported by SDG Systems, LLC
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
-+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ *
-+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
-+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
-+ * SOFTWARE IS DISCLAIMED.
-+ *
-+ */
-+
-+#ifndef BT_SCRIPT_H
-+#define BT_SCRIPT_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*
-+ * Define the interface of Bluetooth Script
-+ */
-+
-+typedef void bts_t;
-+
-+
-+#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */
-+#define ACTION_WAIT_EVENT 2 /* Wait for data */
-+#define ACTION_SERIAL_PORT_PARAMETERS 3
-+#define ACTION_DELAY 4
-+#define ACTION_RUN_SCRIPT 5
-+#define ACTION_REMARKS 6
-+
-+/*
-+ * Structure for ACTION_SEND_COMMAND
-+ */
-+typedef struct tagCActionCommand
-+{
-+ unsigned char data[1]; /* Data to send */
-+} action_command_t;
-+
-+/*
-+ * Structure for ACTION_WAIT_EVENT
-+ */
-+typedef struct tagCActionWaitEvent
-+{
-+ unsigned long msec; /* in milliseconds */
-+ unsigned long size;
-+ unsigned char data[1]; /* Data to wait for */
-+} action_wait_t;
-+
-+
-+/*
-+ * Structure for ACTION_SERIAL_PORT_PARAMETERS
-+ */
-+typedef struct tagCActionSerialPortParameters
-+{
-+ unsigned long baud;
-+ unsigned long flow_control;
-+} action_serial_t;
-+
-+/* Flow Control Type */
-+#define FCT_NONE 0
-+#define FCT_HARDWARE 1
-+
-+#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */
-+
-+
-+/*
-+ * Structure for ACTION_DELAY
-+ */
-+typedef struct tagCActionDelay
-+{
-+ unsigned long msec; /* in milliseconds */
-+} action_delay_t;
-+
-+/*
-+ * Structure for ACTION_RUN_SCRIPT
-+ */
-+typedef struct tagCActionRunScript
-+{
-+ char filename[1];
-+} action_run_t;
-+
-+/*
-+ * Structure for ACTION_REMARKS
-+ */
-+typedef struct tagCActionRemarks
-+{
-+ char m_szRemarks[1];
-+} action_remarks_t;
-+
-+
-+const char *cis_create_filename(const unsigned char* cmdparms);
-+bts_t * bts_load_script(const char* fname, unsigned long* version);
-+unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
-+ unsigned long nMaxSize, unsigned short* ptype);
-+void bts_unload_script(bts_t* bts_fp);
-+
-+#ifdef __cplusplus
-+};
-+#endif
-+
-+#endif /* BT_SCRIPT_H */
-+
---- bluez-utils-2.24/tools/ti_bts.c.orig 2006-01-22 13:56:36.000000000 +0100
-+++ bluez-utils-2.24/tools/ti_bts.c 2006-01-22 13:56:31.000000000 +0100
-@@ -0,0 +1,149 @@
-+/*
-+ * Copyright (c) 2005 Texas Instruments, Inc.
-+ * Ported by SDG Systems, LLC
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
-+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ *
-+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
-+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
-+ * SOFTWARE IS DISCLAIMED.
-+ *
-+ */
-+
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include "ti_bts.h"
-+
-+#ifndef MAKEWORD
-+#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8))
-+#endif
-+
-+#define TI_MANUFACTURER_ID 13
-+
-+/*
-+ * Common Init Script specific
-+ */
-+const char *
-+cis_create_filename(const unsigned char* cmdparms)
-+{
-+ static char bts_file[50];
-+
-+ /* Check for TI's id */
-+ unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]);
-+
-+ if (TI_MANUFACTURER_ID == manfid) {
-+ unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]);
-+
-+ unsigned short chip = (version & 0x7C00) >> 10;
-+ unsigned short min_ver = (version & 0x007F);
-+ unsigned short maj_ver = (version & 0x0380) >> 7;
-+
-+ if (0 != (version & 0x8000)) {
-+ maj_ver |= 0x0008;
-+ }
-+
-+ sprintf( bts_file, "TIInit_%d.%d.%d.bts",
-+ (int)chip, (int)maj_ver, (int)min_ver);
-+
-+ return &bts_file[0];
-+ }
-+ return NULL;
-+}
-+
-+typedef struct tagCHeader
-+{
-+ unsigned long magic;
-+ unsigned long version;
-+ unsigned char future[24];
-+} cheader_t;
-+
-+
-+/* The value 0x42535442 stands for (in ASCII) BTSB */
-+/* which is Bluetooth Script Binary */
-+#define FILE_HEADER_MAGIC 0x42535442
-+
-+
-+bts_t *
-+bts_load_script(const char* fname, unsigned long* version)
-+{
-+ bts_t* bts = NULL;
-+ FILE* fp = fopen(fname, "rb");
-+
-+ if (NULL != fp) {
-+ /* Read header */
-+ cheader_t header;
-+
-+ /* Read header */
-+ if (1 == fread(&header, sizeof(header), 1, fp)) {
-+ /* Check magic number for correctness */
-+ if (header.magic == FILE_HEADER_MAGIC) {
-+ /* If user wants the version number */
-+ if (NULL != version) {
-+ *version = header.version;
-+ }
-+ bts = (bts_t*)fp;
-+ }
-+ }
-+ /* If failed reading the file, close it */
-+ if (NULL == bts) {
-+ fclose(fp);
-+ }
-+ }
-+ return bts;
-+}
-+
-+unsigned long
-+bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
-+ unsigned long nMaxSize, unsigned short* ptype)
-+{
-+ unsigned long bytes = 0;
-+ FILE* fp = (FILE*)bts_fp;
-+ unsigned char action_hdr[4];
-+
-+ if (bts_fp == NULL)
-+ return 0;
-+
-+ /* Each Action has the following: */
-+ /* UINT16 type of this action */
-+ /* UINT16 size of rest */
-+ /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */
-+
-+ if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) {
-+ unsigned short type = *(unsigned short*)&action_hdr[0];
-+ unsigned short size = *(unsigned short*)&action_hdr[2];
-+
-+ if (size <= nMaxSize) {
-+ int nread = fread(action_buf, sizeof(action_buf[0]), size, fp);
-+
-+ if (nread == size) {
-+ *ptype = type;
-+ bytes = (unsigned long)size;
-+ }
-+ }
-+ }
-+
-+ return bytes;
-+}
-+
-+void
-+bts_unload_script(bts_t* bts_fp)
-+{
-+ FILE* fp = (FILE*)bts_fp;
-+
-+ if (NULL != fp) {
-+ fclose(fp);
-+ }
-+}
-+
+++ /dev/null
-#
-# HCI daemon configuration file.
-#
-# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
-#
-
-# HCId options
-options {
- # Automatically initialize new devices
- autoinit yes;
-
- # Security Manager mode
- # none - Security manager disabled
- # auto - Use local PIN for incoming connections
- # user - Always ask user for a PIN
- #
- security auto;
-
- # Pairing mode
- # none - Pairing disabled
- # multi - Allow pairing with already paired devices
- # once - Pair once and deny successive attempts
- pairing multi;
-
- # PIN helper
- pin_helper /bin/bluepin;
-
- # D-Bus PIN helper
- # dbus_pin_helper;
-}
-
-# Default settings for HCI devices
-device {
- # Local device name
- # %d - device id
- # %h - host name
- name "%h";
-
- # Local device class
- class 0x120112;
-
- # Default packet type
- #pkt_type DH1,DM1,HV1;
-
- # Inquiry and Page scan
- iscan enable; pscan enable;
-
- # Default link mode
- # none - no specific policy
- # accept - always accept incoming connections
- # master - become master on incoming connections,
- # deny role switch on outgoing connections
- #
- #lm accept,master;
- #
- lm accept;
-
- # Default link policy
- # none - no specific policy
- # rswitch - allow role switch
- # hold - allow hold mode
- # sniff - allow sniff mode
- # park - allow park mode
- #
- #lp hold,sniff;
- #
- lp rswitch,hold,sniff,park;
-
- # Authentication and Encryption
- #auth enable;
- encrypt enable;
-}
+++ /dev/null
-require bluez-utils3.inc
-
-PR = "r1"
-
-DEPENDS += "alsa-lib"
-
-# TI patch landed upstream sometime between 3.35 and 3.36,
-# albeit in a somewhat different form
-SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --disable-hid2hci \
- --enable-alsa \
- --disable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-FILES_${PN} = "${libdir}/alsa-lib/libasound*"
+++ /dev/null
-require bluez-utils3.inc
-
-
-DEPENDS += "alsa-lib"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --disable-hid2hci \
- --enable-alsa \
- --disable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-FILES_${PN} = "${libdir}/alsa-lib/libasound*"
+++ /dev/null
---- bluez-utils-2.24/acinclude.m4.orig 2006-01-12 08:21:38.000000000 +0100
-+++ bluez-utils-2.24/acinclude.m4 2006-01-12 08:23:18.000000000 +0100
-@@ -131,46 +131,15 @@
- ])
-
- AC_DEFUN([AC_PATH_DBUS], [
-- dbus_prefix=${prefix}
--
-- AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [
-- if (test "${withval}" != "yes"); then
-- dbus_prefix=${withval}
-- fi
-- ])
--
-- ac_save_CPPFLAGS=$CPPFLAGS
-- ac_save_LDFLAGS=$LDFLAGS
--
-- DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE"
-- test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0"
-- if (test "${prefix}" = "${bluez_prefix}"); then
-- test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include"
-- else
-- test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include"
-- test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include"
-- fi
-+ if pkg-config --exists dbus-1; then
-+ dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
-+ DBUS_LIBS="`pkg-config --libs dbus-1`"
-
- CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
-- AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no)
--
-- DBUS_LIBS=""
-- if (test "${prefix}" = "${dbus_prefix}"); then
-- test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}"
-- else
-- test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64"
-- test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib"
-- fi
--
- LDFLAGS="$LDFLAGS $DBUS_LIBS"
-- AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no)
-- AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, dummy=yes, dbus_found=no)
--
-- CPPFLAGS=$ac_save_CPPFLAGS
-- LDFLAGS=$ac_save_LDFLAGS
--
- AC_SUBST(DBUS_CFLAGS)
- AC_SUBST(DBUS_LIBS)
-+ fi
- ])
-
- AC_DEFUN([AC_PATH_FUSE], [
+++ /dev/null
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- bluez-utils-2.20/acinclude.m4~dbus.patch
-+++ bluez-utils-2.20/acinclude.m4
-@@ -211,46 +211,15 @@
- ])
-
- AC_DEFUN([AC_PATH_DBUS], [
-- dbus_prefix=${prefix}
--
-- AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [
-- if (test "${withval}" != "yes"); then
-- dbus_prefix=${withval}
-- fi
-- ])
--
-- ac_save_CPPFLAGS=$CPPFLAGS
-- ac_save_LDFLAGS=$LDFLAGS
--
-- DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE"
-- test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0"
-- if (test "${prefix}" = "${bluez_prefix}"); then
-- test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include"
-- else
-- test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include"
-- test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include"
-- fi
-+ if pkg-config --exists dbus-1; then
-+ dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
-+ DBUS_LIBS="`pkg-config --libs dbus-1`"
-
- CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
-- AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no)
--
-- DBUS_LIBS=""
-- if (test "${prefix}" = "${dbus_prefix}"); then
-- test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}"
-- else
-- test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64"
-- test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib"
-- fi
--
- LDFLAGS="$LDFLAGS $DBUS_LIBS"
-- AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no)
-- AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_GET_BASIC, 1, [Define to 1 if you have the dbus_message_iter_get_basic() function.]))
--
-- CPPFLAGS=$ac_save_CPPFLAGS
-- LDFLAGS=$ac_save_LDFLAGS
--
- AC_SUBST(DBUS_CFLAGS)
- AC_SUBST(DBUS_LIBS)
-+ fi
- ])
-
- AC_DEFUN([AC_ARG_BLUEZ], [
+++ /dev/null
---- bluez-utils-2.20/hcid/dbus.c.orig 2005-09-21 11:27:26 +0200
-+++ bluez-utils-2.20/hcid/dbus.c 2005-09-21 11:27:35 +0200
-@@ -120,6 +121,7 @@
- DBusMessage *message;
- #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
- uint8_t *addr = (uint8_t *) &ci->bdaddr;
-+ uint32_t ci_out = ci->out;
- #else
- DBusMessageIter iter;
- #endif
-@@ -138,7 +140,7 @@
- bacpy(&req->bda, &ci->bdaddr);
-
- #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
-- dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci->out,
-+ dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci_out,
- DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE,
- &addr, sizeof(bdaddr_t), DBUS_TYPE_INVALID);
- #else
-@@ -261,6 +263,8 @@
- DBusMessage *message;
- #ifndef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
- DBusMessageIter iter;
-+#else
-+ int32_t tmp_rssi = rssi;
- #endif
- char *local_addr, *peer_addr;
- bdaddr_t tmp;
-@@ -276,11 +280,12 @@
- }
-
- #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
-+
- dbus_message_append_args(message,
- DBUS_TYPE_STRING, &local_addr,
- DBUS_TYPE_STRING, &peer_addr,
- DBUS_TYPE_UINT32, &class,
-- DBUS_TYPE_INT32, &rssi,
-+ DBUS_TYPE_INT32, &tmp_rssi,
- DBUS_TYPE_INVALID);
- #else
- dbus_message_append_iter_init(message, &iter);
+++ /dev/null
-#
-# HCI daemon configuration file.
-#
-# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
-#
-
-# HCId options
-options {
- # Automatically initialize new devices
- autoinit yes;
-
- # Security Manager mode
- # none - Security manager disabled
- # auto - Use local PIN for incoming connections
- # user - Always ask user for a PIN
- #
- security auto;
-
- # Pairing mode
- # none - Pairing disabled
- # multi - Allow pairing with already paired devices
- # once - Pair once and deny successive attempts
- pairing multi;
-
- # PIN helper
- # pin_helper /usr/bin/bluepin;
-
- # D-Bus PIN helper
- dbus_pin_helper;
-}
-
-# Default settings for HCI devices
-device {
- # Local device name
- # %d - device id
- # %h - host name
- name "%h";
-
- # Local device class
- class 0x120112;
-
- # Default packet type
- #pkt_type DH1,DM1,HV1;
-
- # Inquiry and Page scan
- iscan enable; pscan enable;
-
- # Default link mode
- # none - no specific policy
- # accept - always accept incoming connections
- # master - become master on incoming connections,
- # deny role switch on outgoing connections
- #
- #lm accept,master;
- #
- lm accept;
-
- # Default link policy
- # none - no specific policy
- # rswitch - allow role switch
- # hold - allow hold mode
- # sniff - allow sniff mode
- # park - allow park mode
- #
- #lp hold,sniff;
- #
- lp rswitch,hold,sniff,park;
-
- # Authentication and Encryption
- #auth enable;
- encrypt enable;
-}
+++ /dev/null
---- bluez-utils-2.11/hcid/dbus.c.old 2004-12-31 16:35:12.000000000 +0000
-+++ bluez-utils-2.11/hcid/dbus.c 2004-12-31 16:39:58.000000000 +0000
-@@ -89,6 +89,8 @@
-
- memset(&pr, 0, sizeof(pr));
- bacpy(&pr.bdaddr, &req->bda);
-+ if (len > sizeof (pr.pin_code))
-+ goto error;
- memcpy(pr.pin_code, pin, len);
- pr.pin_len = len;
- hci_send_cmd(req->dev, OGF_LINK_CTL, OCF_PIN_CODE_REPLY,
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
-SECTION = "console"
-PRIORITY = "optional"
-DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} virtual/libusb0 dbus cups"
-PROVIDES = "bluez-utils-dbus"
-RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
-RREPLACES = "bluez-utils-dbus"
-RCONFLICTS_${PN} = "bluez-utils-nodbus"
-LICENSE = "GPL"
-
-SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
- file://hcid.conf \
- file://hciattach-ti-bts.patch;patch=1 \
- file://handle-eintr.patch;patch=1;status=applied"
-SRC_URI_append_r1000 = " file://hciattach.sh"
-SRC_URI_append_ghi270 = " file://hciattach.sh"
-
-# Almost all serial CF cards w/ manfid 0x0000,0x0000 seem to use the bcs protocol
-# Let's default to that instead of 'any' until further notice...
-SRC_URI += " file://default-manfid-0x0-to-bcps.patch;patch=1"
-
-S = "${WORKDIR}/bluez-utils-${PV}"
-
-EXTRA_OECONF = "--enable-initscripts --enable-bccmd --enable-bcm203x --enable-hid2hci --enable-cups"
-# --enable-obex enable OBEX support
-# --enable-alsa enable ALSA support
-# --enable-cups install CUPS backend support
-# --enable-bccmd install BCCMD interface utility
-# --enable-avctrl install Audio/Video control utility
-# --enable-hid2hci install HID mode switching utility
-# --enable-dfutool install DFU firmware upgrade utility
-
-inherit autotools update-rc.d
-
-INITSCRIPT_NAME = "bluetooth"
-INITSCRIPT_PARAMS = "defaults 23 19"
-
-do_install_append() {
- install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/
- mv ${D}${sbindir}/* ${D}${base_sbindir}/
- mv ${D}${bindir}/* ${D}${base_bindir}/
- rmdir ${D}${bindir} ${D}${sbindir}
- chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
- install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
- install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/
-}
-
-do_install_append_r1000() {
- install -d ${D}${sysconfdir} ${D}${sysconfdir}/bluetooth
- install -m 0755 ${WORKDIR}/hciattach.sh ${D}${sysconfdir}/bluetooth/hciattach
-}
-
-do_install_append_ghi270() {
- install -d ${D}${sysconfdir} ${D}${sysconfdir}/bluetooth
- install -m 0755 ${WORKDIR}/hciattach.sh ${D}${sysconfdir}/bluetooth/hciattach
-}
-
-CONFFILES_${PN} = "${sysconfdir}/bluetooth/hcid.conf ${sysconfdir}/bluetooth/rfcomm.conf \
- ${sysconfdir}/default/bluetooth"
-
-PACKAGES =+ " bluez-cups-backend"
-
-FILES_${PN} += " ${libdir}/alsa-lib/*.so "
-FILES_${PN}-dev += " ${libdir}/alsa-lib/*.la "
-
-FILES_bluez-cups-backend = "${libdir}/cups/backend/bluetooth"
-RDEPENDS_bluez-cups-backend = "cups"
+++ /dev/null
---- bluez-utils-3.9.org/tools/hciattach.c 2007-01-28 20:16:48.000000000 +0000
-+++ bluez-utils-3.9/tools/hciattach.c 2007-02-12 16:50:49.000000000 +0000
-@@ -1135,7 +1256,7 @@
- int main(int argc, char *argv[])
- {
- struct uart_t *u = NULL;
-- int detach, printpid, opt, i, n, ld;
-+ int detach, printpid, opt, i, n, ld, err;
- int to = 5;
- int init_speed = 0;
- int send_break = 0;
-@@ -1286,7 +1414,10 @@
-
- while (!__io_canceled) {
- p.revents = 0;
-- if (poll(&p, 1, 500))
-+ err = poll(&p, 1, 500);
-+ if (err < 0 && errno == EINTR)
-+ continue;
-+ if (err)
- break;
- }
-
+++ /dev/null
-#
-# HCI daemon configuration file.
-#
-
-# HCId options
-options {
- # Automatically initialize new devices
- autoinit yes;
-
- # Security Manager mode
- # none - Security manager disabled
- # auto - Use local PIN for incoming connections
- # user - Always ask user for a PIN
- #
- security auto;
-
- # Pairing mode
- # none - Pairing disabled
- # multi - Allow pairing with already paired devices
- # once - Pair once and deny successive attempts
- pairing multi;
-
- # Default PIN code for incoming connections
- passkey "1234";
-}
-
-# Default settings for HCI devices
-device {
- # Local device name
- # %d - device id
- # %h - host name
- name "%h (%d)";
-
- # Local device class
- class 0x120112;
-
- # Default packet type
- #pkt_type DH1,DM1,HV1;
-
- # Inquiry and Page scan
- iscan enable; pscan enable;
-
- # Default link mode
- # none - no specific policy
- # accept - always accept incoming connections
- # master - become master on incoming connections,
- # deny role switch on outgoing connections
- lm accept;
-
- # Default link policy
- # none - no specific policy
- # rswitch - allow role switch
- # hold - allow hold mode
- # sniff - allow sniff mode
- # park - allow park mode
- lp rswitch,hold,sniff,park;
-}
+++ /dev/null
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# Use the new usb1 API for usb_init() and check for fails from
-# usb_init (). Currently we see a crash on a system which does
-# not have USB because usb_init() fails and it cleans up all initialized
-# data (e.g. ctx) which is used in subsequent calls to libusb
-# We return immediately if usb_init() fails for some reason.
-
-Index: bluez-4.24/tools/hid2hci.c
-===================================================================
---- bluez-4.24.orig/tools/hid2hci.c 2008-10-25 23:40:34.000000000 -0700
-+++ bluez-4.24/tools/hid2hci.c 2008-12-29 22:06:04.000000000 -0800
-@@ -337,7 +337,7 @@
- int main(int argc, char *argv[])
- {
- struct device_info dev[16];
-- int i, opt, num, quiet = 0, mode = HCI;
-+ int i, ret, opt, num, quiet = 0, mode = HCI;
-
- while ((opt = getopt_long(argc, argv, "+01qh", main_options, NULL)) != -1) {
- switch (opt) {
-@@ -361,8 +361,9 @@
- argc -= optind;
- argv += optind;
- optind = 0;
--
-- usb_init();
-+ ret = libusb_init();
-+ if (ret < 0)
-+ return ret;
-
- num = find_devices(mode, dev, sizeof(dev) / sizeof(dev[0]));
- if (num <= 0) {
+++ /dev/null
-Index: bluez-utils-3.9/common/ppoll.h
-===================================================================
---- bluez-utils-3.9.orig/common/ppoll.h 2007-05-17 17:42:23.000000000 +0200
-+++ bluez-utils-3.9/common/ppoll.h 2007-05-17 17:43:18.000000000 +0200
-@@ -1,4 +1,8 @@
--static inline int ppoll(struct pollfd *fds, nfds_t nfds,
-+#ifdef ppoll
-+#undef ppoll
-+#endif
-+#define ppoll bluez_ppoll
-+static inline int bluez_ppoll(struct pollfd *fds, nfds_t nfds,
- const struct timespec *timeout, const sigset_t *sigmask)
- {
- return poll(fds, nfds, timeout ? timeout->tv_sec * 1000 : 500);
+++ /dev/null
---- bluez/sbc/sbc_math.h~ 2008-03-05 20:18:03.000000000 +0000
-+++ bluez/sbc/sbc_math.h 2008-10-27 13:39:27.000000000 +0000
-@@ -59,7 +59,7 @@
-
- #define SBC_FIXED_0(val) { val = 0; }
- #define MUL(a, b) ((a) * (b))
--#ifdef __arm__
-+#if defined(__arm__) && !defined(__thumb__)
- #define MULA(a, b, res) ({ \
- int tmp = res; \
- __asm__( \
+++ /dev/null
-Uclibc doesn't define or support speeds above 115200. So check the existence
-of the defines before allowing them to actually be used.
-
-Index: bluez-utils-3.9/tools/hciattach.c
-===================================================================
---- bluez-utils-3.9.orig/tools/hciattach.c 2007-05-17 12:34:28.000000000 +1000
-+++ bluez-utils-3.9/tools/hciattach.c 2007-05-17 12:40:20.000000000 +1000
-@@ -105,22 +105,38 @@
- return B57600;
- case 115200:
- return B115200;
-+#ifdef B230400
- case 230400:
- return B230400;
-+#endif
-+#ifdef B460800
- case 460800:
- return B460800;
-+#endif
-+#ifdef B500000
- case 500000:
- return B500000;
-+#endif
-+#ifdef B576000
- case 576000:
- return B576000;
-+#endif
-+#ifdef B921600
- case 921600:
- return B921600;
-+#endif
-+#ifdef B1000000
- case 1000000:
- return B1000000;
-+#endif
-+#ifdef B1152000
- case 1152000:
- return B1152000;
-+#endif
-+#ifdef B1500000
- case 1500000:
- return B1500000;
-+#endif
- default:
- return B57600;
- }
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
-SECTION = "console"
-PRIORITY = "optional"
-DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} virtual/libusb0 dbus glib-2.0"
-PROVIDES = "bluez-utils-dbus"
-RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
-RREPLACES = "bluez-utils-dbus"
-RCONFLICTS_${PN} = "bluez-utils-nodbus"
-LICENSE = "GPL"
-
-FILESPATH = "${FILE_DIRNAME}/bluez-utils-${PV}:${FILE_DIRNAME}/bluez-utils"
-
-SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
- file://hcid.conf \
- file://sbc-thumb.patch;patch=1"
-
-
-S = "${WORKDIR}/bluez-utils-${PV}"
-
-inherit autotools update-rc.d
-
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-alsa \
- --enable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- "
-
-# The config options are explained below:
-
-# --enable-obex enable OBEX support
-# --enable-alsa enable ALSA support, not needed for nokia770, nokia800 and om-gtao1
-# --enable-cups install CUPS backend support
-# --enable-bccmd install BCCMD interface utility
-# --enable-avctrl install Audio/Video control utility
-# --enable-hid2hci install HID mode switching utility
-# --enable-dfutool install DFU firmware upgrade utility
-
-# --enable-glib For systems that use and install GLib anyway
-# --disable-sdpd The sdpd is obsolete and should no longer be used. This of course requires that hcid will be started with -s to enable the SDP server
-
-#Following services can be enabled so far:
-# --enable-network
-# --enable-serial
-# --enable-input
-# --enable-audio
-# --enable-echo
-
-#There is no need to modify any init script. They will be started
-#automatically or on demand. Only /etc/bluetooth/*.service files should
-#be patched to change name or the autostart value.
-# --enable-configfile
-# --enable-initscripts
-
-#For even smaller -doc packages
-# --disable-manpages
-# --disable-pcmciarules
-
-#I haven't seen any embedded device with HID proxy support. So simply
-#disable it:
-# --disable-hid2hci
-
-OE_LT_RPATH_ALLOW = "any"
-OE_LT_RPATH_ALLOW[export]="1"
-
-do_install_append() {
- install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/
- if [ "${sbindir}" != "${base_sbindir}" ]; then
- mv ${D}${sbindir}/* ${D}${base_sbindir}/
- rmdir ${D}${sbindir}
- fi
- if [ "${bindir}" != "${base_bindir}" ]; then
- mv ${D}${bindir}/* ${D}${base_bindir}/
- rmdir ${D}${bindir}
- fi
- chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
- install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
- install -m 0644 ${S}/rfcomm/rfcomm.conf ${D}${sysconfdir}/bluetooth/
- install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/ ||true
- install -m 0755 ${S}/test/.libs/passkey-agent ${D}${base_bindir}/ ||true
-}
-
-
-INITSCRIPT_NAME = "bluetooth"
-INITSCRIPT_PARAMS = "defaults 23 19"
-
-
-PACKAGES =+ "${PN}-compat"
-
-
-FILES_${PN} = " \
- ${base_sbindir}/hcid \
- ${libdir}/bluetooth \
- ${sysconfdir}/init.d/bluetooth \
- ${sysconfdir}/bluetooth/*.service \
- ${sysconfdir}/bluetooth/hcid.conf \
- ${sysconfdir}/default \
- ${sysconfdir}/dbus-1 \
- ${base_sbindir}/hciattach \
- "
-
-FILES_${PN}-dbg += " \
- ${libdir}/bluetooth/.debug \
- ${libdir}/cups/backend/.debug \
- ${libdir}/alsa-lib/.debug \
- "
-
-FILES_${PN}-compat = " \
- ${base_bindir}/sdptool \
- ${base_bindir}/dund \
- ${base_bindir}/rctest \
- ${base_bindir}/ciptool \
- ${base_bindir}/l2test \
- ${base_bindir}/rfcomm \
- ${base_bindir}/hcitool \
- ${base_bindir}/pand \
- ${base_bindir}/hidd \
- ${base_bindir}/l2ping \
- ${base_sbindir}/hciconfig \
- ${base_sbindir}/bccmd \
- ${base_sbindir}/hciemu \
- ${base_sbindir}/hid2hci \
- ${base_bindir}/passkey-agent \
- ${sysconfdir}/bluetooth/rfcomm.conf \
- "
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-require bluez-utils3.inc
-
-PR = "r3"
-
-# TI patch landed upstream sometime between 3.35 and 3.36,
-# albeit in a somewhat different form
-SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --disable-alsa \
- --disable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- --enable-hidd \
- --enable-obex \
- --enable-pand \
- --enable-dund \
- --enable-avctrl \
- --enable-hid2hci \
- --enable-dfutool \
- "
-
-CONFFILES_${PN} = " \
- ${sysconfdir}/bluetooth/hcid.conf \
- ${sysconfdir}/default/bluetooth \
- "
-
-CONFFILES_${PN}-compat = " \
- ${sysconfdir}/bluetooth/rfcomm.conf \
- "
-
-PACKAGES =+ "bluez-audio"
-
-FILES_${PN} = " \
- ${base_sbindir}/hcid \
- ${libdir}/bluetooth/plugins/*.so \
- ${sysconfdir}/init.d/bluetooth \
- ${sysconfdir}/bluetooth/hcid.conf \
- ${sysconfdir}/default \
- ${sysconfdir}/dbus-1 \
- ${base_sbindir}/hciattach \
- "
-
-FILES_bluez-audio = " \
- ${libdir}/bluetooth/plugins/libaudio.so \
- ${libdir}/gstreamer-0.10/*.so \
- "
-
-FILES_${PN}-dbg += " \
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/gstreamer-0.10/.debug \
- "
-
-FILES_${PN}-dev += " \
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/gstreamer-0.10/*.la \
- "
+++ /dev/null
-require bluez-utils3.inc
-
-PR = "r4"
-
-# see bluez-utils3.inc for the explanation of these option
-EXTRA_OECONF = " \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --disable-alsa \
- --disable-cups \
- --enable-glib \
- --disable-sdpd \
- --enable-network \
- --enable-serial \
- --enable-input \
- --enable-audio \
- --enable-echo \
- --enable-configfile \
- --enable-initscripts \
- --enable-test \
- --enable-hidd \
- --enable-obex \
- --enable-pand \
- --enable-dund \
- --enable-avctrl \
- --enable-hid2hci \
- --enable-dfutool \
-"
-
-CONFFILES_${PN} = " \
- ${sysconfdir}/bluetooth/hcid.conf \
- ${sysconfdir}/default/bluetooth \
- "
-
-CONFFILES_${PN}-compat = " \
- ${sysconfdir}/bluetooth/rfcomm.conf \
- "
-
-PACKAGES =+ "bluez-audio"
-
-FILES_${PN} = " \
- ${base_sbindir}/hcid \
- ${libdir}/bluetooth/plugins/*.so \
- ${sysconfdir}/init.d/bluetooth \
- ${sysconfdir}/bluetooth/hcid.conf \
- ${sysconfdir}/default \
- ${sysconfdir}/dbus-1 \
- ${base_sbindir}/hciattach \
- "
-
-FILES_bluez-audio = " \
- ${libdir}/bluetooth/plugins/libaudio.so \
- ${libdir}/gstreamer-0.10/*.so \
- "
-
-FILES_${PN}-dbg += " \
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/gstreamer-0.10/.debug \
- "
-
-FILES_${PN}-dev += " \
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/gstreamer-0.10/*.la \
- "
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland Utilities and libraries."
-SECTION = "console"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
-PR = "r0"
-
-DEPENDS = "gstreamer gst-plugins-base dbus glib-2.0"
-PROVIDES = "bluez-utils-dbus"
-RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
-RREPLACES = "bluez-utils-dbus"
-RCONFLICTS_${PN} = "bluez-utils-nodbus"
-
-FILESPATH = "${FILE_DIRNAME}/bluez-utils-${PV}:${FILE_DIRNAME}/bluez-utils"
-
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools update-rc.d pkgconfig
-
-OE_LT_RPATH_ALLOW = "any"
-OE_LT_RPATH_ALLOW[export]="1"
-
-do_install_append() {
- install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/
- if [ "${sbindir}" != "${base_sbindir}" ]; then
- mv ${D}${sbindir}/* ${D}${base_sbindir}/
- rmdir ${D}${sbindir}
- fi
- if [ "${bindir}" != "${base_bindir}" ]; then
- mv ${D}${bindir}/* ${D}${base_bindir}/
- rmdir ${D}${bindir}
- fi
- chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
- install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
- install -m 0644 ${S}/rfcomm/rfcomm.conf ${D}${sysconfdir}/bluetooth/
- install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/ ||true
- install -m 0755 ${S}/test/.libs/passkey-agent ${D}${base_bindir}/ ||true
-}
-
-
-INITSCRIPT_NAME = "bluetooth"
-INITSCRIPT_PARAMS = "defaults 23 19"
-
-
-PACKAGES =+ "${PN}-compat"
-
-
-FILES_${PN} = " \
- ${base_sbindir}/hcid \
- ${libdir}/bluetooth \
- ${sysconfdir}/init.d/bluetooth \
- ${sysconfdir}/bluetooth/*.service \
- ${sysconfdir}/bluetooth/hcid.conf \
- ${sysconfdir}/default \
- ${sysconfdir}/dbus-1 \
- ${base_sbindir}/hciattach \
- "
-
-FILES_${PN}-dbg += " \
- ${libdir}/bluetooth/.debug \
- ${libdir}/cups/backend/.debug \
- ${libdir}/alsa-lib/.debug \
- "
-
-FILES_${PN}-compat = " \
- ${base_bindir}/sdptool \
- ${base_bindir}/dund \
- ${base_bindir}/rctest \
- ${base_bindir}/ciptool \
- ${base_bindir}/l2test \
- ${base_bindir}/rfcomm \
- ${base_bindir}/hcitool \
- ${base_bindir}/pand \
- ${base_bindir}/hidd \
- ${base_bindir}/l2ping \
- ${base_sbindir}/hciconfig \
- ${base_sbindir}/bccmd \
- ${base_sbindir}/hciemu \
- ${base_sbindir}/hid2hci \
- ${base_bindir}/passkey-agent \
- ${sysconfdir}/bluetooth/rfcomm.conf \
- "
-
-HEADERS = "bluetooth.h bnep.h cmtp.h hci.h hci_lib.h hidp.h l2cap.h rfcomm.h sco.h sdp.h sdp_lib.h"
-
-do_stage_prepend() {
- oe_libinstall -so -C lib libbluetooth ${STAGING_LIBDIR}
-
- install -d ${STAGING_INCDIR}/bluetooth/
- for f in ${HEADERS}
- do
- install -m 0644 include/$f ${STAGING_INCDIR}/bluetooth/$f
- done
-}
-
--- /dev/null
+<!-- This configuration file specifies the required security policies
+ for Bluetooth core daemon to work. -->
+
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+ <!-- ../system.conf have denied everything, so we just punch some holes -->
+
+ <policy context="default">
+ <allow own="org.bluez"/>
+ <allow send_destination="org.bluez"/>
+ <allow send_interface="org.bluez.Agent"/>
+ </policy>
+
+</busconfig>
--- /dev/null
+diff --git a/Makefile.am b/Makefile.am
+index bd587eb..fe8c9ae 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -398,7 +398,7 @@ EXTRA_DIST += audio/bluetooth.conf
+ include Makefile.tools
+
+ if DATAFILES
+-rulesdir = @UDEV_DIR@/rules.d
++rulesdir = @UDEV_RULES_DIR@
+
+ udev_files = scripts/bluetooth.rules
+
+diff --git a/configure.ac b/configure.ac
+index f298909..ab76355 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,5 +71,15 @@ if (test -n "${path_systemdunit}"); then
+ fi
+ AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
+
++AC_ARG_WITH([udevdir],
++ AS_HELP_STRING([--with-udevdir=DIR], [udev directory]),
++ [], [with_udevdir=/lib/udev/])
++AC_SUBST([UDEV_DIR], [$with_udevdir])
++
++AC_ARG_WITH([udevrulesdir],
++ AS_HELP_STRING([--with-udevrulesdir=DIR], [udev rules directory]),
++ [], [with_udevrulesdir=/lib/udev/rules.d])
++AC_SUBST([UDEV_RULES_DIR], [$with_udevrulesdir])
++
+ AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
+ src/bluetoothd.8 src/bluetooth.service bluez.pc)
--- /dev/null
+Avoid namepspace collision with encrypt function from libc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: bluez-4.101/test/l2test.c
+===================================================================
+--- bluez-4.101.orig/test/l2test.c
++++ bluez-4.101/test/l2test.c
+@@ -107,7 +107,7 @@ static char *filename = NULL;
+ static int rfcmode = 0;
+ static int master = 0;
+ static int auth = 0;
+-static int encrypt = 0;
++static int encryption_request = 0;
+ static int secure = 0;
+ static int socktype = SOCK_SEQPACKET;
+ static int linger = 0;
+@@ -340,7 +340,7 @@ static int do_connect(char *svr)
+ opt |= L2CAP_LM_MASTER;
+ if (auth)
+ opt |= L2CAP_LM_AUTH;
+- if (encrypt)
++ if (encryption_request)
+ opt |= L2CAP_LM_ENCRYPT;
+ if (secure)
+ opt |= L2CAP_LM_SECURE;
+@@ -475,7 +475,7 @@ static void do_listen(void (*handler)(in
+ opt |= L2CAP_LM_MASTER;
+ if (auth)
+ opt |= L2CAP_LM_AUTH;
+- if (encrypt)
++ if (encryption_request)
+ opt |= L2CAP_LM_ENCRYPT;
+ if (secure)
+ opt |= L2CAP_LM_SECURE;
+@@ -1407,7 +1407,7 @@ int main(int argc, char *argv[])
+ break;
+
+ case 'E':
+- encrypt = 1;
++ encryption_request = 1;
+ break;
+
+ case 'S':
+Index: bluez-4.101/test/rctest.c
+===================================================================
+--- bluez-4.101.orig/test/rctest.c
++++ bluez-4.101/test/rctest.c
+@@ -79,7 +79,7 @@ static char *filename = NULL;
+
+ static int master = 0;
+ static int auth = 0;
+-static int encrypt = 0;
++static int encryption_request = 0;
+ static int secure = 0;
+ static int socktype = SOCK_STREAM;
+ static int linger = 0;
+@@ -200,7 +200,7 @@ static int do_connect(const char *svr)
+ opt |= RFCOMM_LM_MASTER;
+ if (auth)
+ opt |= RFCOMM_LM_AUTH;
+- if (encrypt)
++ if (encryption_request)
+ opt |= RFCOMM_LM_ENCRYPT;
+ if (secure)
+ opt |= RFCOMM_LM_SECURE;
+@@ -291,7 +291,7 @@ static void do_listen(void (*handler)(in
+ opt |= RFCOMM_LM_MASTER;
+ if (auth)
+ opt |= RFCOMM_LM_AUTH;
+- if (encrypt)
++ if (encryption_request)
+ opt |= RFCOMM_LM_ENCRYPT;
+ if (secure)
+ opt |= RFCOMM_LM_SECURE;
+@@ -701,7 +701,7 @@ int main(int argc, char *argv[])
+ break;
+
+ case 'E':
+- encrypt = 1;
++ encryption_request = 1;
+ break;
+
+ case 'S':
+Index: bluez-4.101/src/textfile.h
+===================================================================
+--- bluez-4.101.orig/src/textfile.h
++++ bluez-4.101/src/textfile.h
+@@ -24,6 +24,8 @@
+ #ifndef __TEXTFILE_H
+ #define __TEXTFILE_H
+
++#include <sys/types.h>
++
+ int create_dirs(const char *filename, const mode_t mode);
+ int create_file(const char *filename, const mode_t mode);
+ int create_name(char *buf, size_t size, const char *path,
+Index: bluez-4.101/test/attest.c
+===================================================================
+--- bluez-4.101.orig/test/attest.c
++++ bluez-4.101/test/attest.c
+@@ -34,6 +34,7 @@
+ #include <termios.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
++#include <sys/select.h>
+
+ #include <bluetooth/bluetooth.h>
+ #include <bluetooth/rfcomm.h>
--- /dev/null
+diff --git a/Makefile.tools b/Makefile.tools
+index f997a3f..1eb30e2 100644
+--- a/Makefile.tools
++++ b/Makefile.tools
+@@ -225,6 +225,17 @@ EXTRA_DIST += test/apitest test/sap-client test/hsplay test/hsmicro \
+ test/service-spp.xml test/service-opp.xml test/service-ftp.xml
+
+
++bluez4_testdir = $(libdir)/bluez4/test/
++dist_bluez4_test_SCRIPTS = test/sap-client test/hsplay test/hsmicro \
++ test/monitor-bluetooth test/list-devices \
++ test/test-discovery test/test-manager test/test-adapter \
++ test/test-device test/test-service test/test-serial \
++ test/test-telephony test/test-network test/simple-agent \
++ test/simple-service test/simple-endpoint test/test-audio \
++ test/test-input test/test-sap-server test/test-oob \
++ test/test-attrib test/test-proximity test/test-thermometer \
++ test/test-serial-proxy test/test-health test/test-health-sink
++
+ if HIDD
+ bin_PROGRAMS += compat/hidd
+
--- /dev/null
+diff --git a/network/connection.c b/network/connection.c
+index 15c781f..842f478 100644
+--- a/network/connection.c
++++ b/network/connection.c
+@@ -554,8 +554,11 @@ static void path_unregister(void *data)
+ }
+
+ static GDBusMethodTable connection_methods[] = {
+- { "Connect", "s", "s", connection_connect,
+- G_DBUS_METHOD_FLAG_ASYNC },
++ { "Connect",
++ GDBUS_ARGS({"uuid", "s"}),
++ GDBUS_ARGS({"interface", "s"}),
++ connection_connect,
++ G_DBUS_METHOD_FLAG_ASYNC },
+ { "Disconnect", "", "", connection_disconnect },
+ { "GetProperties", "", "a{sv}",connection_get_properties },
+ { }
--- /dev/null
+Upstream-Status: Backport
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd bluez-4.101/configure.ac bluez-4.101/configure.ac
+--- bluez-4.101/configure.ac 2012-06-22 19:36:49.000000000 +0300
++++ bluez-4.101/configure.ac 2013-01-07 06:13:18.385888966 +0200
+@@ -2,7 +2,7 @@
+ AC_INIT(bluez, 4.101)
+
+ AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
--- /dev/null
+on x86 and x86_64 gcc 4.7 complains
+
+sbc/sbc_primitives_mmx.c: In function 'sbc_calc_scalefactors_mmx':
+sbc/sbc_primitives_mmx.c:294:4: warning: asm operand 2 probably doesn't match constraints [enabled by default]
+sbc/sbc_primitives_mmx.c:294:4: error: impossible constraint in 'asm'
+
+This patch is taken from https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/911871
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: bluez-4.98/sbc/sbc_primitives_mmx.c
+===================================================================
+--- bluez-4.98.orig/sbc/sbc_primitives_mmx.c 2011-12-21 14:53:54.000000000 -0800
++++ bluez-4.98/sbc/sbc_primitives_mmx.c 2012-02-24 10:07:03.422073800 -0800
+@@ -318,7 +318,7 @@
+ "movl %k0, 4(%3)\n"
+ : "+r" (blk)
+ : "r" (&sb_sample_f[0][ch][sb]),
+- "i" ((char *) &sb_sample_f[1][0][0] -
++ "r" ((char *) &sb_sample_f[1][0][0] -
+ (char *) &sb_sample_f[0][0][0]),
+ "r" (&scale_factor[ch][sb]),
+ "r" (&consts),
--- /dev/null
+Upstream-Status: Inappropriate
+
+use legacy pygobject instead of gobject-introspection
+
+Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
+---
+diff -Nurd bluez-4.101.orig/test/simple-agent bluez-4.101/test/simple-agent
+--- bluez-4.101.orig/test/simple-agent 2013-11-13 17:14:08.138118159 +0800
++++ bluez-4.101/test/simple-agent 2013-11-13 17:14:29.034118107 +0800
+@@ -2,7 +2,7 @@
+
+ from __future__ import absolute_import, print_function, unicode_literals
+
+-from gi.repository import GObject
++import gobject
+
+ import sys
+ import dbus
+@@ -122,7 +122,7 @@
+ path = "/test/agent"
+ agent = Agent(bus, path)
+
+- mainloop = GObject.MainLoop()
++ mainloop = gobject.MainLoop()
+
+ if len(args) > 1:
+ if len(args) > 2:
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland libraries V4"
-SECTION = "libs"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
-INC_PR = "r1"
-
-SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
- file://avinfo-link.patch;patch=1;pnum=0"
-
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools_stage
-AUTOTOOLS_STAGE_PKGCONFIG = "1"
-
-EXTRA_OECONF = "\
- --disable-tools \
- --disable-audio \
- --disable-network \
- --disable-serial \
- --disable-service \
- --disable-usb \
-"
-
-FILES_${PN} = "${libdir}/libbluetooth.so.*"
-DESCRIPTION = "Linux Bluetooth Stack Userland V4"
+SUMMARY = "Linux Bluetooth Stack Userland V4"
+DESCRIPTION = "Linux Bluetooth stack V4 userland components. These include a system configurations, daemons, tools and system libraries."
HOMEPAGE = "http://www.bluez.org"
SECTION = "libs"
-PRIORITY = "optional"
-LICENSE = "GPL"
-DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib"
-INC_PR = "r7"
+LICENSE = "GPLv2+ LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
+ file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e \
+ file://sbc/sbc.c;beginline=1;endline=25;md5=1a40781ed30d50d8639323a184aeb191"
+DEPENDS = "udev libusb dbus-glib glib-2.0 readline libsndfile1"
+# libcheck
+RDEPENDS_${PN}-dev = "bluez-hcidump"
-# temporary solution until bug 5176 is properly fixed
-PROVIDES += "bluez-utils bluez-libs bluez-utils-dbus"
-RPROVIDES_bluez4 += "bluez-utils bluez-libs bluez-utils-dbus"
-RPROVIDES_bluez4-dev = "bluez-libs-dev"
+#PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+#PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,"
+#PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
+
+ASNEEDED = ""
SRC_URI = "\
- http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz;name=bluez-${PV} \
- file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
- file://sbc-thumb.patch;patch=1 \
- file://0001-hciattach_tialt-Implement-texas_change_speed-functio.patch;patch=1 \
- file://firmware_path.patch;patch=1 \
- file://bluetooth.conf \
+ ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.gz \
"
S = "${WORKDIR}/bluez-${PV}"
-inherit autotools_stage update-rc.d
-AUTOTOOLS_STAGE_PKGCONFIG = "1"
+inherit autotools pkgconfig
+# autotools-brokensep systemd
EXTRA_OECONF = "\
- --enable-gstreamer \
- --enable-alsa \
+ --disable-gstreamer \
--enable-usb \
- --enable-netlink \
--enable-tools \
--enable-bccmd \
--enable-hid2hci \
--enable-dfutool \
+ --disable-cups \
+ --enable-test \
+ --enable-datafiles \
+ --with-udevdir=`pkg-config --variable=udevdir udev` \
+ --with-udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d \
+ --enable-alsa \
+ --enable-health \
--enable-hidd \
--enable-pand \
--enable-dund \
- --disable-cups \
- --enable-test \
- --enable-manpages \
- --enable-configfiles \
- --enable-initscripts \
- --disable-pcmciarules \
+ --enable-dbusoob \
+ --enable-wiimote \
+ --enable-gatt \
"
-do_install_append() {
- install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
- # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
- install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-}
-
-INITSCRIPT_NAME = "bluetooth"
-INITSCRIPT_PARAMS = "defaults 23 19"
-
-PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
-
-FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev"
-FILES_${PN}-dev += "\
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/alsa-lib/*.la \
- ${libdir}/gstreamer-0.10/*.la \
-"
-
-FILES_${PN}-dbg += "\
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/*/.debug \
-"
+EXCLUDE_FROM_WORLD = "1"
+++ /dev/null
-Index: bluez-4.27/tools/dfutool.c
-===================================================================
---- bluez-4.27.orig/tools/dfutool.c
-+++ bluez-4.27/tools/dfutool.c
-@@ -59,7 +59,7 @@
- #endif
-
- #ifdef NEED_USB_GET_BUSSES
--static inline struct usb_bus *usb_get_busses(void)
-+inline struct usb_bus *usb_get_busses(void)
- {
- return usb_busses;
- }
+++ /dev/null
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# Use the new usb1 API for usb_init() and check for fails from
-# usb_init (). Currently we see a crash on a system which does
-# not have USB because usb_init() fails and it cleans up all initialized
-# data (e.g. ctx) which is used in subsequent calls to libusb
-# We return immediately if usb_init() fails for some reason.
-
-Index: bluez-4.24/tools/hid2hci.c
-===================================================================
---- bluez-4.24.orig/tools/hid2hci.c 2008-10-25 23:40:34.000000000 -0700
-+++ bluez-4.24/tools/hid2hci.c 2008-12-29 22:06:04.000000000 -0800
-@@ -337,7 +337,7 @@
- int main(int argc, char *argv[])
- {
- struct device_info dev[16];
-- int i, opt, num, quiet = 0, mode = HCI;
-+ int i, ret, opt, num, quiet = 0, mode = HCI;
-
- while ((opt = getopt_long(argc, argv, "+01qh", main_options, NULL)) != -1) {
- switch (opt) {
-@@ -361,8 +361,9 @@
- argc -= optind;
- argv += optind;
- optind = 0;
--
-- usb_init();
-+ ret = libusb_init();
-+ if (ret < 0)
-+ return ret;
-
- num = find_devices(mode, dev, sizeof(dev) / sizeof(dev[0]));
- if (num <= 0) {
+++ /dev/null
---- bluez/sbc/sbc_math.h~ 2008-03-05 20:18:03.000000000 +0000
-+++ bluez/sbc/sbc_math.h 2008-10-27 13:39:27.000000000 +0000
-@@ -59,7 +59,7 @@
-
- #define SBC_FIXED_0(val) { val = 0; }
- #define MUL(a, b) ((a) * (b))
--#ifdef __arm__
-+#if defined(__arm__) && !defined(__thumb__)
- #define MULA(a, b, res) ({ \
- int tmp = res; \
- __asm__( \
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland V4"
-SECTION = "libs"
-PRIORITY = "optional"
-DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
-PR = "r7"
-
-SRC_URI = "\
- http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
- file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
- file://sbc-thumb.patch;patch=1 \
- file://bluetooth.conf \
-# file://hid2hci_usb_init.patch;patch=1 \
-"
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools pkgconfig
-
-OE_LT_RPATH_ALLOW = "any"
-OE_LT_RPATH_ALLOW[export] = "1"
-
-EXTRA_OECONF = "\
- --enable-gstreamer \
- --enable-alsa \
- --enable-usb \
- --enable-netlink \
- --enable-tools \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-dfutool \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --disable-cups \
- --enable-test \
- --enable-manpages \
- --enable-configfiles \
- --enable-initscripts \
- --disable-pcmciarules \
-"
-
-do_install_append() {
- install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
- # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
- install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-}
-
-PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
-
-FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
-FILES_${PN}-dev += "\
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/alsa-lib/*.la \
- ${libdir}/gstreamer-0.10/*.la \
-"
-FILES_${PN}-dbg += "\
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/*/.debug \
-"
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland V4"
-SECTION = "libs"
-PRIORITY = "optional"
-DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
-
-# For angstrom we want this to replace at least bluez-libs
-PROVIDES_append_angstrom = " bluez-utils bluez-libs"
-
-# temporary solution for KaeilOS just to replace at least bluez-libs
-PROVIDES_append_angstrom = " bluez-utils bluez-libs"
-
-PR = "r2"
-
-SRC_URI = "\
- http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
- file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
- file://sbc-thumb.patch;patch=1 \
- file://bluetooth.conf \
-"
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools_stage
-AUTOTOOLS_STAGE_PKGCONFIG = "1"
-
-EXTRA_OECONF = "\
- --enable-gstreamer \
- --enable-alsa \
- --enable-usb \
- --enable-netlink \
- --enable-tools \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-dfutool \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --disable-cups \
- --enable-test \
- --enable-manpages \
- --enable-configfiles \
- --enable-initscripts \
- --disable-pcmciarules \
-"
-
-do_install_append() {
- install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
- # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
- install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-}
-
-PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
-
-FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
-FILES_${PN}-dev += "\
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/alsa-lib/*.la \
- ${libdir}/gstreamer-0.10/*.la \
-"
-
-FILES_${PN}-dbg += "\
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/*/.debug \
-"
+++ /dev/null
-DESCRIPTION = "Linux Bluetooth Stack Userland V4"
-SECTION = "libs"
-PRIORITY = "optional"
-DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
-
-# For angstrom we want this to replace at least bluez-libs
-PROVIDES_append_angstrom = " bluez-utils bluez-libs"
-
-# temporary solution for KaeilOS just to replace at least bluez-libs
-PROVIDES_append_angstrom = " bluez-utils bluez-libs"
-
-PR = "r1"
-
-SRC_URI = "\
- http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
- file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
- file://sbc-thumb.patch;patch=1 \
- file://bluetooth.conf \
-"
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools_stage
-AUTOTOOLS_STAGE_PKGCONFIG = "1"
-
-EXTRA_OECONF = "\
- --enable-gstreamer \
- --enable-alsa \
- --enable-usb \
- --enable-netlink \
- --enable-tools \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-dfutool \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --disable-cups \
- --enable-test \
- --enable-manpages \
- --enable-configfiles \
- --enable-initscripts \
- --disable-pcmciarules \
-"
-
-do_install_append() {
- install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
- # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
- install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-}
-
-PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
-
-FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
-FILES_${PN}-dev += "\
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/alsa-lib/*.la \
- ${libdir}/gstreamer-0.10/*.la \
-"
-
-FILES_${PN}-dbg += "\
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/*/.debug \
-"
+++ /dev/null
-require bluez4.inc
-
-PR = "${INC_PR}.1"
-
+++ /dev/null
-require bluez4.inc
-
-PR = "${INC_PR}.1"
-
+++ /dev/null
-require bluez4.inc
-
-DEPENDS += "libsndfile1"
-PR = "${INC_PR}.1"
-
+++ /dev/null
-require bluez4.inc
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_angstrom = "1"
-
-DEPENDS += "libsndfile1"
-PR = "${INC_PR}.1"
-
-# Not all distros have a recent enough udev
-BTUDEV = " --disable-udevrules"
-BTUDEV_angstrom = " --enable-udevrules"
-EXTRA_OECONF += "${BTUDEV}"
-
+++ /dev/null
-require bluez4.inc
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_angstrom = "1"
-
-DEPENDS += "libsndfile1"
-
-PR = "${INC_PR}.0"
-
-# Not all distros have a recent enough udev
-BTUDEV = " --disable-udevrules"
-BTUDEV_angstrom = " --enable-udevrules"
-EXTRA_OECONF += "${BTUDEV}"
-
+++ /dev/null
-require bluez4.inc
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_angstrom = "1"
-DEFAULT_PREFERENCE_shr = "1"
-
-DEPENDS += "libsndfile1"
-
-PR = "${INC_PR}.0"
-
-# Not all distros have a recent enough udev
-BTUDEV = " --disable-udevrules"
-BTUDEV_angstrom = " --enable-udevrules"
-BTUDEV_shr = " --enable-udevrules"
-EXTRA_OECONF += "${BTUDEV}"
-
+++ /dev/null
-require bluez4.inc
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_angstrom = "1"
-DEFAULT_PREFERENCE_shr = "1"
-
-DEPENDS += "libsndfile1"
-
-PR = "${INC_PR}.0"
-
-# Not all distros have a recent enough udev
-BTUDEV = " --disable-udevrules"
-BTUDEV_angstrom = " --enable-udevrules"
-BTUDEV_shr = " --enable-udevrules"
-EXTRA_OECONF += "${BTUDEV}"
-
+++ /dev/null
-require bluez4.inc
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_angstrom = "1"
-
-DEPENDS += "libsndfile1 libnl"
-
-PR = "${INC_PR}.0"
-
-# Checksums
-SRC_URI[bluez-4.62.md5sum] = "e5bb2f7eb8e8f9bb7ee2733de7080259"
-SRC_URI[bluez-4.62.sha256sum] = "f63203cbbd5be7d9986d5df42c7a96c3edb7442d99539fbe9c7964243b286792"
-
-# Not all distros have a recent enough udev
-BTUDEV = " --disable-udevrules"
-BTUDEV_angstrom = " --enable-udevrules"
-BTUDEV_shr = " --enable-udevrules"
-EXTRA_OECONF += "${BTUDEV}"
--- /dev/null
+require bluez4.inc
+
+PR = "r12"
+
+SRC_URI += "file://bluetooth.conf \
+ file://sbc_mmx.patch;patch=1 \
+ file://fix-udev-paths.patch;patch=1 \
+ file://obsolete_automake_macros.patch;patch=1 \
+# file://network-fix-network-Connect-method-parameters.patch;patch=1 \
+ file://install-test-script.patch;patch=1 \
+# file://use-legacy-pygobject-instead-ofgobject-introspection.patch;patch=1 \
+ file://fix_encrypt_collision.patch;patch=1 \
+ file://0001-hciattach_tialt-Implement-texas_change_speed-functio.patch;patch=1 \
+ file://firmware_path.patch;patch=1 \
+"
+
+SRC_URI[md5sum] = "570aa10692ed890aa0a4297b37824912"
+SRC_URI[sha256sum] = "d884b9aa5d3d9653c076b7646ca14a3e43eb84bccfe8193c49690f802bbd827c"
+
+RCONFLICTS_${PN} = "bluez5"
+
+# temporary solution until bug 5176 is properly fixed
+PROVIDES += "bluez-utils bluez-libs bluez-utils-dbus"
+RPROVIDES_bluez4 += "bluez-utils bluez-libs bluez-utils-dbus"
+RPROVIDES_bluez4-dev = "bluez-libs-dev"
+
+do_install_append() {
+ install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
+ install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
+ install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
+ # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
+ install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
+}
+
+RDEPENDS_${PN}-dev = "bluez-hcidump"
+RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
+
+ALLOW_EMPTY_libasound-module-bluez = "1"
+PACKAGES =+ "libasound-module-bluez ${PN}-testtools"
+
+FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
+FILES_${PN} += "${libdir}/bluetooth/plugins ${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
+FILES_${PN}-dev += "\
+ ${libdir}/bluetooth/plugins/*.la \
+ ${libdir}/alsa-lib/*.la \
+"
+
+FILES_${PN}-testtools = "${libdir}/bluez4/test/*"
+
+FILES_${PN}-dbg += "\
+ ${libdir}/bluetooth/plugins/.debug \
+ ${libdir}/*/.debug \
+ ${base_libdir}/*/.debug \
+ */udev/.debug \
+ "
+
+do_install_append() {
+ # already provided by udev?
+ rm ${D}${base_libdir}/udev/hid2hci
+}
+
+SYSTEMD_SERVICE_${PN} = "bluetooth.service"
--- /dev/null
+require bluez4.inc
+#require recipes-multimedia/gstreamer/gst-plugins-package.inc
+
+PR = "r1"
+
+SRC_URI[md5sum] = "570aa10692ed890aa0a4297b37824912"
+SRC_URI[sha256sum] = "d884b9aa5d3d9653c076b7646ca14a3e43eb84bccfe8193c49690f802bbd827c"
+
+DEPENDS = "bluez4 gst-plugins-base"
+
+EXTRA_OECONF = "\
+ --enable-gstreamer \
+"
+
+# clean unwanted files
+do_install_append() {
+ rm -rf ${D}${bindir}
+ rm -rf ${D}${sbindir}
+ rm -f ${D}${libdir}/lib*
+ rm -rf ${D}${libdir}/pkgconfig
+ rm -rf ${D}${sysconfdir}
+ rm -rf ${D}${base_libdir}
+ rm -rf ${D}${libdir}/bluetooth
+ rm -rf ${D}${localstatedir}
+ rm -rf ${D}${libdir}/alsa-lib
+ rm -rf ${D}${datadir}
+ rm -rf ${D}${includedir}
+# rm -rf ${D}${nonarch_base_libdir}
+}
+
+FILES_${PN} = "${libdir}/gstreamer-0.10/lib*.so"
+FILES_${PN}-dev += "\
+ ${libdir}/gstreamer-0.10/*.la \
+"
+
+FILES_${PN}-dbg += "\
+ ${libdir}/*/.debug \
+"
+