summaryrefslogtreecommitdiff
path: root/extra/bluez
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-07 00:01:25 +0000
committerroot <root@rshg054.dnsready.net>2012-03-07 00:01:25 +0000
commit5a680f7689b01b4b7a0bfade1a6c1f659f8cbed4 (patch)
treee7b6c472f6deee81a237a1ce4b8c12e90aadac67 /extra/bluez
parentb8afacf1f28ac27321feb9b92bd50dd8961b7736 (diff)
Wed Mar 7 00:01:25 UTC 2012
Diffstat (limited to 'extra/bluez')
-rw-r--r--extra/bluez/PKGBUILD28
-rw-r--r--extra/bluez/fix-compile-issue.patch50
2 files changed, 66 insertions, 12 deletions
diff --git a/extra/bluez/PKGBUILD b/extra/bluez/PKGBUILD
index 28132c5ca..6e2a5dc6b 100644
--- a/extra/bluez/PKGBUILD
+++ b/extra/bluez/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 150898 2012-02-23 13:54:59Z allan $
-# Maintainer:
+# $Id: PKGBUILD 152235 2012-03-05 13:54:25Z andrea $
+# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
pkgname=bluez
pkgver=4.98
-pkgrel=3
+pkgrel=4
pkgdesc="Libraries and tools for the Bluetooth protocol stack"
url="http://www.bluez.org/"
arch=('i686' 'x86_64')
@@ -13,28 +13,32 @@ license=('GPL2')
depends=('dbus-core')
makedepends=('gstreamer0.10-base' 'libusb-compat' 'libsndfile')
optdepends=("gstreamer0.10-base: bluetooth GStreamer support"
- "alsa-lib: Audio bluetooth devices support"
- "dbus-python: to run bluez-simple-agent"
- "pygobject: to run bluez-simple-agent"
- "libusb-compat: USB adapters support"
- "cups: CUPS backend")
+ "alsa-lib: Audio bluetooth devices support"
+ "dbus-python: to run bluez-simple-agent"
+ "pygobject: to run bluez-simple-agent"
+ "libusb-compat: USB adapters support"
+ "cups: CUPS backend")
conflicts=('bluez-libs' 'bluez-utils')
provides=('bluez-libs' 'bluez-utils')
replaces=('bluez-libs' 'bluez-utils')
-options=('!libtool' 'emptydirs')
+options=('!libtool')
backup=(etc/bluetooth/{main,rfcomm,audio,network,input,serial}.conf
'etc/conf.d/bluetooth' 'etc/dbus-1/system.d/bluetooth.conf')
source=("http://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.bz2"
- 'bluetooth.conf.d' 'rc.bluetooth' 'fix-a2dp.patch')
+ 'bluetooth.conf.d' 'rc.bluetooth'
+ 'fix-a2dp.patch'
+ 'fix-compile-issue.patch')
md5sums=('4aca8a0929250212e9a75fb60dd75b05'
'7412982b440f29fa7f76a41a87fef985'
'8f9498707f809506928b2e480d3b6789'
- 'd6a34317e56b7c2bd990791d89d6c3cb')
+ 'd6a34317e56b7c2bd990791d89d6c3cb'
+ 'd81860cd0d7c3ddd2515591453a85e65')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/fix-a2dp.patch"
+ patch -p1 -i "${srcdir}/fix-a2dp.patch"
+ patch -p1 -i "${srcdir}/fix-compile-issue.patch"
./configure --prefix=/usr \
--sysconfdir=/etc \
diff --git a/extra/bluez/fix-compile-issue.patch b/extra/bluez/fix-compile-issue.patch
new file mode 100644
index 000000000..ddb5d94e8
--- /dev/null
+++ b/extra/bluez/fix-compile-issue.patch
@@ -0,0 +1,50 @@
+From 4002cf271e3939714296c535a1ed8d4f0d5ac005 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick.ohly@intel.com>
+Date: Mon, 16 Jan 2012 11:11:55 +0100
+Subject: [PATCH] lib: Fix compile issue when using in C++
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+The compiler error is:
+ /usr/include/bluetooth/bluetooth.h::131:9: error: invalid conversion from 'void*' to 'bt_get_le64(void*)::<anonymous struct>*'
+ ...
+
+The reason is that C++, in contrast to C, does not allow conversion of
+void * to anything, and this code gets compiled as C++ when the app is
+written in C++. The macro with the assignment itself is older, but only
+recent Bluez starts to use it in inline functions, thus triggering the
+problem.
+
+This patch keeps the "struct __attribute__((packed))" magic and merely
+changes the typecast so that it works in C and C++. Like the existing
+macro this patch relies on support for typeof.
+---
+ lib/bluetooth.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/bluetooth.h b/lib/bluetooth.h
+index ea7373d..0541842 100644
+--- a/lib/bluetooth.h
++++ b/lib/bluetooth.h
+@@ -141,7 +141,7 @@ enum {
+ ({ \
+ struct __attribute__((packed)) { \
+ typeof(*(ptr)) __v; \
+- } *__p = (void *) (ptr); \
++ } *__p = (typeof(__p)) (ptr); \
+ __p->__v; \
+ })
+
+@@ -149,7 +149,7 @@ enum {
+ do { \
+ struct __attribute__((packed)) { \
+ typeof(*(ptr)) __v; \
+- } *__p = (void *) (ptr); \
++ } *__p = (typeof(__p)) (ptr); \
+ __p->__v = (val); \
+ } while(0)
+
+--
+1.7.6.5
+