aboutsummaryrefslogtreecommitdiffstats
path: root/main/bluez
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-04 08:59:50 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-04 08:59:50 +0000
commit773d84f2725e48dc8ea37a2848fe045d74b54dce (patch)
treef5573856970fa19192d868e8c0785c117f20e71d /main/bluez
parent1296a3cb7e6a60473e54d3a69a910db7effb4acd (diff)
downloadaports-773d84f2725e48dc8ea37a2848fe045d74b54dce.tar.bz2
aports-773d84f2725e48dc8ea37a2848fe045d74b54dce.tar.xz
main/bluez: fix musl build
Diffstat (limited to 'main/bluez')
-rw-r--r--main/bluez/APKBUILD25
-rw-r--r--main/bluez/fix-includes.patch80
2 files changed, 104 insertions, 1 deletions
diff --git a/main/bluez/APKBUILD b/main/bluez/APKBUILD
index e2209ae449..82ba644649 100644
--- a/main/bluez/APKBUILD
+++ b/main/bluez/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bluez
pkgver=4.101
-pkgrel=2
+pkgrel=3
pkgdesc="Tools for the Bluetooth protocol stack"
url="http://www.bluez.org/"
arch="all"
@@ -13,12 +13,24 @@ makedepends="dbus-dev gst-plugins-base-dev alsa-lib-dev libusb-compat-dev
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-alsa
$pkgname-cups $pkgname-gstreamer $pkgname-hid2hci"
source="http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2
+ fix-includes.patch
bluetooth.initd
rfcomm.initd
rfcomm.confd
"
_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ update_config_sub || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
build() {
cd "$_builddir"
./configure \
@@ -88,6 +100,17 @@ hid2hci() {
}
md5sums="902b390af95c6c5d6d1a17d94c8344ab bluez-4.101.tar.bz2
+664785224a0f8d678f527c2a4940fc9d fix-includes.patch
701636b72c4fb72b1d81a050471b130c bluetooth.initd
7672edb8e33c4495ee9febb9864feb10 rfcomm.initd
7f4bb093adb0f519c621f2ea68712f35 rfcomm.confd"
+sha256sums="88f170b52119d576281a20ee98d65319b52cf4fb71aa7a7af1c9e928779baaa0 bluez-4.101.tar.bz2
+6aba767ec14dae7e7f8d9ac5ab6b6600f4c0559d7bf368b6bbfaa5374ed6ee54 fix-includes.patch
+547ad2659d508fb6f4080aed078cb4811b3feda84f677afff64bf92f7fc9bea8 bluetooth.initd
+4430703a9bec9a9482416b2d24aa47492264768a0b61356b361bbc8b1229a83e rfcomm.initd
+672498957049fd301f9c9c1dc9fa49430e5e6d3c3f1f3cdce80df3af7d425d08 rfcomm.confd"
+sha512sums="a47c3e0943ae50adbcc78b00b4f170f0de8ff12672468e5e09897a669df061b97d99a13b3871f8ec9a85785c3e2839ea2c64e304cb9dd632e33244c222684e1a bluez-4.101.tar.bz2
+be356e156e96f440f6506235b103efb8d835acf7a5a8f061553619b8bac8549288444e2ca86199a81cba87df12297e1d589403e1afef15c4b93fe0ee229a1bc7 fix-includes.patch
+f648437b9fbc9789fc3d83b544458759236be7f99d5d6029dc38e81660b1c129b2055b62fad86e4e833cb43a040bf59e5fc1ddf95e0d832e13df23775961cf06 bluetooth.initd
+8f14b4e05c9ecaf4586ed2fdc2d2519de6b613de62ae5c95508baa682630f3112c5b6db6850f76679afc49e06f2ad035d148fa30b9b980747b6fb423f7bebe88 rfcomm.initd
+a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb rfcomm.confd"
diff --git a/main/bluez/fix-includes.patch b/main/bluez/fix-includes.patch
new file mode 100644
index 0000000000..a8962b0b7a
--- /dev/null
+++ b/main/bluez/fix-includes.patch
@@ -0,0 +1,80 @@
+--- bluez-4.101.orig/audio/ipc.c
++++ bluez-4.101/audio/ipc.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "ipc.h"
++#include <string.h>
+
+ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
+--- bluez-4.101.orig/compat/bnep.c
++++ bluez-4.101/compat/bnep.c
+@@ -32,6 +32,7 @@
+ #include <stdlib.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
++#include <sys/time.h>
+
+ #include <bluetooth/bluetooth.h>
+ #include <bluetooth/bnep.h>
+--- bluez-4.101.orig/compat/dund.c
++++ bluez-4.101/compat/dund.c
+@@ -67,7 +67,7 @@
+ static int persist;
+ static int use_sdp = 1;
+ static int auth;
+-static int encrypt;
++static int do_encrypt;
+ static int secure;
+ static int master;
+ static int type = LANACCESS;
+@@ -146,7 +146,7 @@
+ lm |= RFCOMM_LM_MASTER;
+ if (auth)
+ lm |= RFCOMM_LM_AUTH;
+- if (encrypt)
++ if (do_encrypt)
+ lm |= RFCOMM_LM_ENCRYPT;
+ if (secure)
+ lm |= RFCOMM_LM_SECURE;
+@@ -492,7 +492,7 @@
+ break;
+
+ case 'E':
+- encrypt = 1;
++ do_encrypt = 1;
+ break;
+
+ case 'S':
+--- bluez-4.101.orig/network/common.c
++++ bluez-4.101/network/common.c
+@@ -29,6 +29,7 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+--- bluez-4.101.orig/network/connection.c
++++ bluez-4.101/network/connection.c
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <sys/time.h>
+ #include <netinet/in.h>
+
+ #include <bluetooth/bluetooth.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,