From 83ef586986fa7659a91a50f477cb5b225d3a0b8c Mon Sep 17 00:00:00 2001 From: Alexey Min Date: Tue, 18 Jun 2019 01:31:18 +0300 Subject: [PATCH] hybris/pulsecore-private-headers: new package (!448) Essentially needed for packaging pulseaudio-modules-droid. This package is basically a set of headers taken from original pulseaudio tarball and one hand-made pkg-config file. All versions listed in this package and in pulsecore.pc should match pulseaudio's MAJOR.MINOR version, otherwise everything will break. All library paths listed in pulsecore.pc should match pulseaudio paths, too. Because library itself is built and installed by pulseaudio package (pulseaudio-dev). For motivation behind this see: https://git.sailfishos.org/mer-core/pulseaudio/commit/9316d7ba941516cabfc080a0099fad80a231582d TL;DR pulsecore is an internal pulseaudio library needed to build pulseaudio's own modules, not meant to be used py pulseaudio clients. It is not exported since pulseaudio-8. We fake an "export" of this library, since we need it to build an out-of-tree module. --- .../0001-core-util-add-socket-h.patch | 12 +++++++ hybris/pulsecore-private-headers/APKBUILD | 35 +++++++++++++++++++ hybris/pulsecore-private-headers/pulsecore.pc | 10 ++++++ 3 files changed, 57 insertions(+) create mode 100644 hybris/pulsecore-private-headers/0001-core-util-add-socket-h.patch create mode 100644 hybris/pulsecore-private-headers/APKBUILD create mode 100644 hybris/pulsecore-private-headers/pulsecore.pc diff --git a/hybris/pulsecore-private-headers/0001-core-util-add-socket-h.patch b/hybris/pulsecore-private-headers/0001-core-util-add-socket-h.patch new file mode 100644 index 000000000..63368e2a6 --- /dev/null +++ b/hybris/pulsecore-private-headers/0001-core-util-add-socket-h.patch @@ -0,0 +1,12 @@ +diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h +index e28b6aa..fb0f941 100644 +--- a/src/pulsecore/core-util.h ++++ b/src/pulsecore/core-util.h +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_SYS_RESOURCE_H + #include diff --git a/hybris/pulsecore-private-headers/APKBUILD b/hybris/pulsecore-private-headers/APKBUILD new file mode 100644 index 000000000..92c435ff7 --- /dev/null +++ b/hybris/pulsecore-private-headers/APKBUILD @@ -0,0 +1,35 @@ +# Contributor: Alexey Min +# Maintainer: Alexey Min +pkgname=pulsecore-private-headers +pkgver=12.2 +pkgrel=0 +pkgdesc="PulseAudio internal development library (headers and pkg-config)" +url="http://www.freedesktop.org/wiki/Software/PulseAudio" +arch="all" +license="LGPL-2.1-or-later" +depends="pulseaudio-dev libpulse pkgconfig" +options="!check" # No test suite available +source=" + https://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz + pulsecore.pc + 0001-core-util-add-socket-h.patch +" + +builddir="$srcdir/pulseaudio-$pkgver" + +build() { + sed -i "s/@PA_MAJORMINOR@/$pkgver/" "$srcdir"/pulsecore.pc +} + +package() { + install -Dm644 "$srcdir"/pulsecore.pc "$pkgdir"/usr/lib/pkgconfig/pulsecore.pc + + mkdir -p "$pkgdir"/usr/include/pulsecore + mkdir -p "$pkgdir"/usr/include/pulsecore/filter + cp -r "$builddir"/src/pulsecore/*.h "$pkgdir"/usr/include/pulsecore/ + cp -r "$builddir"/src/pulsecore/filter/*.h "$pkgdir"/usr/include/pulsecore/filter/ +} + +sha512sums="877754c1838b3cb042dbc18a5f1cc3cf313ffcaee7a64703330406d1f86279c34f1107634ac3083b158365e6757fbacf5ec406bc3c5788d291de67b77a561a4e pulseaudio-12.2.tar.xz +e419ceab4779e061fb0378fc4ce0d24e2a738610b5d837866c47e9fd8044c206bb32485f7aaf0df336c2944d67b856fdee95ea6ca9e7c12954d15ae521adad66 pulsecore.pc +4e24295e5e03d3f89f5197657e7946c56e9d776c1b64306d2798075df322700ca1f89a19f1fa9ab7f379b1b33196eb316dc17a20efdc5b0e41ff47c41b567e34 0001-core-util-add-socket-h.patch" diff --git a/hybris/pulsecore-private-headers/pulsecore.pc b/hybris/pulsecore-private-headers/pulsecore.pc new file mode 100644 index 000000000..c7aeafbfe --- /dev/null +++ b/hybris/pulsecore-private-headers/pulsecore.pc @@ -0,0 +1,10 @@ +prefix=/usr +libdir=/usr/lib +includedir=${prefix}/include +ver=@PA_MAJORMINOR@ + +Name: pulsecore +Description: Module building interface for pulseaudio +Version: @PA_MAJORMINOR@ +Libs: -L${libdir} -L${libdir}/pulseaudio -L${libdir}/pulse-${ver}/modules -lpulsecore-${ver} -lpulsecommon-${ver} -lpulse +Cflags: -D_REENTRANT -D__INCLUDED_FROM_PULSE_AUDIO -DPA_DEFAULT_CONFIG_DIR=\"/etc/pulse\" -I${includedir}