diff --git a/srcpkgs/libffado/patches/musl-sigval_t.patch b/srcpkgs/libffado/patches/musl-sigval_t.patch new file mode 100644 index 00000000000..504278390d2 --- /dev/null +++ b/srcpkgs/libffado/patches/musl-sigval_t.patch @@ -0,0 +1,26 @@ +--- src/libutil/PosixMessageQueue.h 2009-12-19 17:26:20.000000000 +0100 ++++ src/libtuil/PosixMessageQueue.h 2016-10-03 18:40:48.996217777 +0200 +@@ -36,7 +36,13 @@ + #include ++#include + #include + ++#if !defined(__GLIBC__) ++/* In musl libc this type is not defined. */ ++typedef union sigval sigval_t; ++#endif ++ + namespace Util + { + + +--- src/libutil/IpcRingBuffer.h 2008-06-08 19:17:32.000000000 +0200 ++++ src/libutil/IpcRingBuffer.h 2016-10-03 18:53:00.310710281 +0200 +@@ -37,6 +37,7 @@ + #include "PosixMessageQueue.h" + + #include ++#include + + namespace Util { + diff --git a/srcpkgs/libffado/patches/musl-stdint_h.patch b/srcpkgs/libffado/patches/musl-stdint_h.patch new file mode 100644 index 00000000000..1f47f23f498 --- /dev/null +++ b/srcpkgs/libffado/patches/musl-stdint_h.patch @@ -0,0 +1,12 @@ +Need to explicitly include stdint.h for musl libc. + +--- libffado/ffado.h.in 2016-10-03 18:42:35.335302853 +0200 ++++ libffado/ffado.h.in 2016-10-03 18:43:56.999358778 +0200 +@@ -31,6 +31,7 @@ + #define FFADO_MAX_NAME_LEN 256 + + #include ++#include + + #define FFADO_STREAMING_MAX_URL_LENGTH 2048 + diff --git a/srcpkgs/libffado/template b/srcpkgs/libffado/template index 81556b76080..3bebd3e664c 100644 --- a/srcpkgs/libffado/template +++ b/srcpkgs/libffado/template @@ -21,6 +21,18 @@ if [ -z "$CROSS_BUILD" ]; then makedepends+=" python-PyQt4-devel python-PyQt4-dbus python-dbus-devel" subpackages+=" libffado-python" fi +case "$XBPS_TARGET_MACHINE" in + *-musl) makedepends+=" argp-standalone" ;; +esac + +pre_configure() { + case "$XBPS_TARGET_MACHINE" in + *-musl) # Requires argp functions + sed -i 's;-lffado";-lffado -largp";' support/tools/SConscript + sed -i 's;-lpthread";-lpthread -largp";' support/firmware/SConscript + sed -i 's;"pthread";"pthread", "argp";' support/dbus/SConscript + esac +} post_install() { vinstall support/xdg/ffado.org-ffadomixer.desktop 644 usr/share/applications ffadomixer.desktop