aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormacmpi <spam@ipik.org>2022-07-05 17:59:28 +0200
committeralice <alice@ayaya.dev>2022-07-07 02:49:27 +0000
commit43255dc3e1a9b44e4cc234fdc5e709636d16efa4 (patch)
tree68073ebffcd400e6824e91bb4dc1b1cbf755af66
parent7ee02ce86d320135161bb8aa8143324b449e0a58 (diff)
community/bluez-alsa: build all utilities into a utils sub-package
remove rt.h reference to BSD headers to avoid warnings and extra time-related headers (keep safe for musl time64). Optional hcitop tool still relies on BSD definitions for it's own part.
-rw-r--r--community/bluez-alsa/0001-remove-bsd-sys-time.h-include.patch26
-rw-r--r--community/bluez-alsa/APKBUILD21
2 files changed, 44 insertions, 3 deletions
diff --git a/community/bluez-alsa/0001-remove-bsd-sys-time.h-include.patch b/community/bluez-alsa/0001-remove-bsd-sys-time.h-include.patch
new file mode 100644
index 00000000000..7b1c2a715c5
--- /dev/null
+++ b/community/bluez-alsa/0001-remove-bsd-sys-time.h-include.patch
@@ -0,0 +1,26 @@
+diff --git a/src/shared/rt.h b/src/shared/rt.h
+index 24deb81..8a96542 100644
+--- a/src/shared/rt.h
++++ b/src/shared/rt.h
+@@ -20,9 +20,7 @@
+ #include <sys/time.h>
+ #include <time.h>
+
+-#if HAVE_LIBBSD
+-# include <bsd/sys/time.h>
+-#else
++// timespecadd & timespecsub definitions come from <bsd/sys/time.h>
+ # define timespecadd(ts_a, ts_b, dest) do { \
+ (dest)->tv_sec = (ts_a)->tv_sec + (ts_b)->tv_sec; \
+ (dest)->tv_nsec = (ts_a)->tv_nsec + (ts_b)->tv_nsec; \
+@@ -39,7 +37,6 @@
+ (dest)->tv_nsec += 1000000000L; \
+ } \
+ } while (0)
+-#endif
+
+ /**
+ * Structure used for time synchronization.
+--
+2.30.2
+
diff --git a/community/bluez-alsa/APKBUILD b/community/bluez-alsa/APKBUILD
index 58f65692a7e..0a6577b577e 100644
--- a/community/bluez-alsa/APKBUILD
+++ b/community/bluez-alsa/APKBUILD
@@ -1,18 +1,19 @@
# Maintainer: Bradley Saulteaux <-@bradso.to>
pkgname=bluez-alsa
pkgver=4.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Bluetooth Audio ALSA Backend"
url="https://github.com/Arkq/bluez-alsa"
arch="all"
license="MIT"
depends="bluez"
-subpackages="$pkgname-openrc"
+subpackages="$pkgname-openrc $pkgname-utils"
makedepends="automake autoconf libtool alsa-lib-dev bluez-dev glib-dev sbc-dev
- dbus-dev fdk-aac-dev"
+ dbus-dev fdk-aac-dev libbsd-dev ncurses-dev readline-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/Arkq/bluez-alsa/archive/v$pkgver.tar.gz
bluealsa.initd
bluealsa.confd
+ 0001-remove-bsd-sys-time.h-include.patch
"
prepare() {
@@ -29,6 +30,9 @@ build() {
--enable-aac \
--enable-ofono \
--enable-cli \
+ --enable-rfcomm \
+ --enable-a2dpconf \
+ --enable-hcitop \
--disable-static \
--with-dbusconfdir=/usr/share/dbus-1/system.d
make
@@ -46,8 +50,19 @@ package() {
install -Dm644 ../../bluealsa.confd "$pkgdir"/etc/conf.d/bluealsa
}
+utils() {
+ pkgdesc="Bluetooth Audio ALSA Backend utils"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/bluealsa-aplay "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/bluealsa-cli "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/bluealsa-rfcomm "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/a2dpconf "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/hcitop "$subpkgdir"/usr/bin/
+}
+
sha512sums="
8a79e5a1189db2d39b2d772cb8f8cd51ebb96b9bd91489556195e83dfd16f40a581dce68c5ad9e886b66cec8a03ae7f959e8288bb4c5c87ea5a2bbd6aee9c5f0 bluez-alsa-4.0.0.tar.gz
3a631e940cc56f3f7b9a49f5e69d057be08e876334d29ec9e0839ad80e8829d970e099d01f180a1e4fef237f324bcb16abdc702dbb6d0b46e3d318625e805cae bluealsa.initd
ae50f9c39b8f725f793f362336d1823b1c20ebf877b1ae736601ef48e030b8c79094018d270e098476dc98ef888aae577e7a0ebda70451c3168d79c5e2baf859 bluealsa.confd
+f84519d08f55bdde495f1cb881628288301478ef5ed10e58df0787a12535e08c55ccac7a62d6f8857d650335a0161f5fa92ba14ce8405c0d02e3b2a8b08e36ac 0001-remove-bsd-sys-time.h-include.patch
"