diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2011-04-15 09:55:37 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2011-04-16 13:50:43 +0200 |
commit | 3a493483b59cfe700400737a38b8147583685de6 (patch) | |
tree | e5f308b746425a8cf59813fea4e333a1fa9caaa3 | |
parent | dc4339fae98fa38dfee39b74f52ba7407e600809 (diff) | |
download | meta-openembedded-3a493483b59cfe700400737a38b8147583685de6.tar.gz |
bluez4: merge .inc file to .bb file itself
* .inc file are not so usefull with one version per package rule
* remove unsupported configure options
* fix --enable-pand option, there is not extra 'd'
* remove update-rc.d inherit as init.d script is not created anymore
* enable udevrules by default (distros can override it from their layer)
* use FILESPATH from oe-core layer for patches instead of duplicating them here
* netlink option removed in http://git.kernel.org/?p=bluetooth/bluez.git;a=blobdiff;f=configure.ac;h=63a0fd89f5836ab6d114bb52c49f73adba26369a;hp=eee4c01bd1dd72b53f121c7820b6b93ba3d48032;hb=ecb835fca7e7134f38a3d061d186eb38d83bcb8b;hpb=c681fac492394bb95f164296056068dad1254921
* sbc-thumb.patch was applied upstream
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
6 files changed, 63 insertions, 152 deletions
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4.inc b/meta-oe/recipes-connectivity/bluez/bluez4.inc deleted file mode 100644 index 747ae77e6d..0000000000 --- a/meta-oe/recipes-connectivity/bluez/bluez4.inc +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | DESCRIPTION = "Linux Bluetooth Stack Userland V4" | ||
2 | HOMEPAGE = "http://www.bluez.org" | ||
3 | SECTION = "libs" | ||
4 | PRIORITY = "optional" | ||
5 | LICENSE = "GPLv2/LGPLv2.1" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | ||
7 | file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ | ||
8 | " | ||
9 | DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib" | ||
10 | INC_PR = "r8" | ||
11 | |||
12 | # temporary solution until bug 5176 is properly fixed | ||
13 | PROVIDES += "bluez-utils bluez-libs bluez-utils-dbus" | ||
14 | RPROVIDES_bluez4 += "bluez-utils bluez-libs bluez-utils-dbus" | ||
15 | RPROVIDES_bluez4-dev = "bluez-libs-dev" | ||
16 | |||
17 | SRC_URI = "\ | ||
18 | http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \ | ||
19 | file://fix-dfutool-usb-declaration-mismatch.patch \ | ||
20 | file://bluetooth.conf \ | ||
21 | " | ||
22 | S = "${WORKDIR}/bluez-${PV}" | ||
23 | |||
24 | inherit autotools update-rc.d | ||
25 | |||
26 | EXTRA_OECONF = "\ | ||
27 | --enable-gstreamer \ | ||
28 | --enable-alsa \ | ||
29 | --enable-usb \ | ||
30 | --enable-netlink \ | ||
31 | --enable-tools \ | ||
32 | --enable-bccmd \ | ||
33 | --enable-hid2hci \ | ||
34 | --enable-dfutool \ | ||
35 | --enable-hidd \ | ||
36 | --enable-pand \ | ||
37 | --enable-dund \ | ||
38 | --disable-cups \ | ||
39 | --enable-test \ | ||
40 | --enable-manpages \ | ||
41 | --enable-configfiles \ | ||
42 | --enable-initscripts \ | ||
43 | --disable-pcmciarules \ | ||
44 | " | ||
45 | |||
46 | do_install_append() { | ||
47 | install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/ | ||
48 | install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/ | ||
49 | install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/ | ||
50 | # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT | ||
51 | install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/ | ||
52 | } | ||
53 | |||
54 | INITSCRIPT_NAME = "bluetooth" | ||
55 | INITSCRIPT_PARAMS = "defaults 23 19" | ||
56 | |||
57 | PACKAGES =+ "gst-plugin-bluez libasound-module-bluez" | ||
58 | |||
59 | FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so" | ||
60 | FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa/bluetooth.conf" | ||
61 | FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev" | ||
62 | FILES_${PN}-dev += "\ | ||
63 | ${libdir}/bluetooth/plugins/*.la \ | ||
64 | ${libdir}/alsa-lib/*.la \ | ||
65 | ${libdir}/gstreamer-0.10/*.la \ | ||
66 | " | ||
67 | |||
68 | FILES_${PN}-dbg += "\ | ||
69 | ${libdir}/bluetooth/plugins/.debug \ | ||
70 | ${libdir}/*/.debug \ | ||
71 | " | ||
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf b/meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf deleted file mode 100644 index ca5e9e4f2f..0000000000 --- a/meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | <!-- This configuration file specifies the required security policies | ||
2 | for Bluetooth core daemon to work. --> | ||
3 | |||
4 | <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
5 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
6 | <busconfig> | ||
7 | |||
8 | <!-- ../system.conf have denied everything, so we just punch some holes --> | ||
9 | |||
10 | <policy context="default"> | ||
11 | <allow own="org.bluez"/> | ||
12 | <allow send_destination="org.bluez"/> | ||
13 | <allow send_interface="org.bluez.Agent"/> | ||
14 | </policy> | ||
15 | |||
16 | </busconfig> | ||
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch b/meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch deleted file mode 100644 index b1ee510e8b..0000000000 --- a/meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | Index: bluez-4.27/tools/dfutool.c | ||
2 | =================================================================== | ||
3 | --- bluez-4.27.orig/tools/dfutool.c | ||
4 | +++ bluez-4.27/tools/dfutool.c | ||
5 | @@ -59,7 +59,7 @@ | ||
6 | #endif | ||
7 | |||
8 | #ifdef NEED_USB_GET_BUSSES | ||
9 | -static inline struct usb_bus *usb_get_busses(void) | ||
10 | +inline struct usb_bus *usb_get_busses(void) | ||
11 | { | ||
12 | return usb_busses; | ||
13 | } | ||
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch b/meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch deleted file mode 100644 index ed15fd5a1b..0000000000 --- a/meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | # Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
2 | # | ||
3 | # Use the new usb1 API for usb_init() and check for fails from | ||
4 | # usb_init (). Currently we see a crash on a system which does | ||
5 | # not have USB because usb_init() fails and it cleans up all initialized | ||
6 | # data (e.g. ctx) which is used in subsequent calls to libusb | ||
7 | # We return immediately if usb_init() fails for some reason. | ||
8 | |||
9 | Index: bluez-4.24/tools/hid2hci.c | ||
10 | =================================================================== | ||
11 | --- bluez-4.24.orig/tools/hid2hci.c 2008-10-25 23:40:34.000000000 -0700 | ||
12 | +++ bluez-4.24/tools/hid2hci.c 2008-12-29 22:06:04.000000000 -0800 | ||
13 | @@ -337,7 +337,7 @@ | ||
14 | int main(int argc, char *argv[]) | ||
15 | { | ||
16 | struct device_info dev[16]; | ||
17 | - int i, opt, num, quiet = 0, mode = HCI; | ||
18 | + int i, ret, opt, num, quiet = 0, mode = HCI; | ||
19 | |||
20 | while ((opt = getopt_long(argc, argv, "+01qh", main_options, NULL)) != -1) { | ||
21 | switch (opt) { | ||
22 | @@ -361,8 +361,9 @@ | ||
23 | argc -= optind; | ||
24 | argv += optind; | ||
25 | optind = 0; | ||
26 | - | ||
27 | - usb_init(); | ||
28 | + ret = libusb_init(); | ||
29 | + if (ret < 0) | ||
30 | + return ret; | ||
31 | |||
32 | num = find_devices(mode, dev, sizeof(dev) / sizeof(dev[0])); | ||
33 | if (num <= 0) { | ||
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch b/meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch deleted file mode 100644 index 3505426053..0000000000 --- a/meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- bluez/sbc/sbc_math.h~ 2008-03-05 20:18:03.000000000 +0000 | ||
2 | +++ bluez/sbc/sbc_math.h 2008-10-27 13:39:27.000000000 +0000 | ||
3 | @@ -59,7 +59,7 @@ | ||
4 | |||
5 | #define SBC_FIXED_0(val) { val = 0; } | ||
6 | #define MUL(a, b) ((a) * (b)) | ||
7 | -#ifdef __arm__ | ||
8 | +#if defined(__arm__) && !defined(__thumb__) | ||
9 | #define MULA(a, b, res) ({ \ | ||
10 | int tmp = res; \ | ||
11 | __asm__( \ | ||
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb b/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb index ebb2dab584..8806946a59 100644 --- a/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb +++ b/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb | |||
@@ -1,15 +1,70 @@ | |||
1 | require bluez4.inc | 1 | SUMMARY = "Linux Bluetooth Stack Userland V4" |
2 | DESCRIPTION = "Linux Bluetooth stack V4 userland components. These include a system configurations, daemons, tools and system libraries." | ||
3 | HOMEPAGE = "http://www.bluez.org" | ||
4 | SECTION = "libs" | ||
5 | PRIORITY = "optional" | ||
6 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | ||
8 | file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ | ||
9 | file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e \ | ||
10 | file://sbc/sbc.c;beginline=1;endline=25;md5=1a40781ed30d50d8639323a184aeb191" | ||
11 | DEPENDS = "gst-plugins-base alsa-lib libusb dbus-glib libnl" | ||
12 | RDEPENDS_${PN}-dev = "bluez-hcidump" | ||
13 | |||
14 | ASNEEDED = "" | ||
15 | |||
16 | PR = "r9" | ||
17 | |||
18 | # to find bluez patches from oe-core | ||
19 | FILESPATH =. "${POKYBASE}/meta/recipes-connectivity/bluez/bluez4-4.82/:" | ||
20 | SRC_URI = "\ | ||
21 | ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.gz \ | ||
22 | file://fix-dfutool-usb-declaration-mismatch.patch \ | ||
23 | file://bluetooth.conf \ | ||
24 | " | ||
2 | 25 | ||
3 | SRC_URI[md5sum] = "3059b7ef5168c84cd0c6a67034ce79f9" | 26 | SRC_URI[md5sum] = "3059b7ef5168c84cd0c6a67034ce79f9" |
4 | SRC_URI[sha256sum] = "11e9279e2669db996afd464b96d2c68f41f157f6eb9b8842a0bbcad8a4eac18d" | 27 | SRC_URI[sha256sum] = "11e9279e2669db996afd464b96d2c68f41f157f6eb9b8842a0bbcad8a4eac18d" |
28 | S = "${WORKDIR}/bluez-${PV}" | ||
29 | |||
30 | inherit autotools | ||
31 | |||
32 | EXTRA_OECONF = "\ | ||
33 | --enable-gstreamer \ | ||
34 | --enable-alsa \ | ||
35 | --enable-usb \ | ||
36 | --enable-tools \ | ||
37 | --enable-bccmd \ | ||
38 | --enable-hid2hci \ | ||
39 | --enable-dfutool \ | ||
40 | --enable-hidd \ | ||
41 | --enable-pand \ | ||
42 | --enable-dund \ | ||
43 | --disable-cups \ | ||
44 | --enable-test \ | ||
45 | --enable-configfiles \ | ||
46 | " | ||
5 | 47 | ||
6 | DEPENDS += "libsndfile1" | 48 | do_install_append() { |
49 | install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/ | ||
50 | install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/ | ||
51 | install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/ | ||
52 | # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT | ||
53 | install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/ | ||
54 | } | ||
7 | 55 | ||
8 | PR = "${INC_PR}.0" | 56 | PACKAGES =+ "gst-plugin-bluez libasound-module-bluez" |
9 | 57 | ||
10 | # Not all distros have a recent enough udev | 58 | FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so" |
11 | BTUDEV = " --disable-udevrules" | 59 | FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so" |
12 | BTUDEV_angstrom = " --enable-udevrules" | 60 | FILES_${PN} += "${libdir}/bluetooth/plugins/*.so" |
13 | BTUDEV_shr = " --enable-udevrules" | 61 | FILES_${PN}-dev += "\ |
62 | ${libdir}/bluetooth/plugins/*.la \ | ||
63 | ${libdir}/alsa-lib/*.la \ | ||
64 | ${libdir}/gstreamer-0.10/*.la \ | ||
65 | " | ||
14 | 66 | ||
15 | EXTRA_OECONF += "${BTUDEV}" | 67 | FILES_${PN}-dbg += "\ |
68 | ${libdir}/bluetooth/plugins/.debug \ | ||
69 | ${libdir}/*/.debug \ | ||
70 | " | ||