aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pipewire
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-06-21 14:19:09 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-06-21 10:58:02 -0300
commit7610aefcd30923d9f49b70834c9cf611fa183de7 (patch)
tree3ebc3bcdfb7c4699742e29c4b798a0769420e033 /testing/pipewire
parent695c557ce5a45d84c87933eac2b48c7a25591642 (diff)
downloadaports-7610aefcd30923d9f49b70834c9cf611fa183de7.tar.bz2
aports-7610aefcd30923d9f49b70834c9cf611fa183de7.tar.xz
testing/pipewire: new aport
Diffstat (limited to 'testing/pipewire')
-rw-r--r--testing/pipewire/APKBUILD37
-rw-r--r--testing/pipewire/fix-glibc-error_h-usage.patch281
2 files changed, 318 insertions, 0 deletions
diff --git a/testing/pipewire/APKBUILD b/testing/pipewire/APKBUILD
new file mode 100644
index 0000000000..328a5c1c73
--- /dev/null
+++ b/testing/pipewire/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+pkgname=pipewire
+pkgver=0.2.6
+pkgrel=0
+pkgdesc="Multimedia processing graphs"
+url="https://pipewire.org/"
+arch="all"
+license="LGPL-2.1-or-later"
+makedepends="meson alsa-lib-dev libx11-dev sdl2-dev ffmpeg-dev eudev-dev dbus-dev
+ glib-dev gstreamer-dev gst-plugins-base-dev sbc-dev doxygen xmltoman graphviz"
+options="!check" # no tests
+subpackages="$pkgname-dev $pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/PipeWire/pipewire/archive/${pkgver}.tar.gz
+ fix-glibc-error_h-usage.patch"
+
+build() {
+ meson \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --buildtype=release \
+ -Ddocs=true \
+ -Dman=true \
+ -Dgstreamer=enabled \
+ -Dsystemd=false \
+ . output
+ ninja -C output
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C output install
+}
+
+sha512sums="3d1db41f5beb42a0ee15ae7bc8afb89b54a37c3a6a414e88b5e33ceaf98ec6dda0d9a2d03ac47a8dfce48e9637e647291919e6670bb70589b0d1951fbcbd3ff8 pipewire-0.2.6.tar.gz
+9c6ab4827c55c6aa26e5070e58a79c7054982e9a5c8ec59ff3ed21474338b1356f49555588f2c3cf40bdc17952835e313149eadb001153bf97bb8360191febd5 fix-glibc-error_h-usage.patch"
diff --git a/testing/pipewire/fix-glibc-error_h-usage.patch b/testing/pipewire/fix-glibc-error_h-usage.patch
new file mode 100644
index 0000000000..791f653e74
--- /dev/null
+++ b/testing/pipewire/fix-glibc-error_h-usage.patch
@@ -0,0 +1,281 @@
+error.h isn't available on musl
+
+--- a/spa/tests/test-bluez5.c
++++ b/spa/tests/test-bluez5.c
+@@ -18,7 +18,9 @@
+ */
+
+ #include <math.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -209,6 +211,8 @@ int main(int argc, char *argv[])
+ void *iface;
+
+ spa_zero(data);
++
++#ifdef __GLIBC__
+ if ((res = get_handle(&data, &handle,
+ "build/spa/plugins/support/libspa-support.so",
+ "mapper")) < 0) {
+@@ -216,6 +220,7 @@ int main(int argc, char *argv[])
+ }
+ if ((res = spa_handle_get_interface(handle, 0, &iface)) < 0)
+ error(-1, res, "can't get mapper interface");
++#endif
+
+ data.map = iface;
+ data.support[0].type = SPA_TYPE__TypeMap;
+@@ -224,6 +229,7 @@ int main(int argc, char *argv[])
+ init_type(&data.type, data.map);
+ spa_debug_set_type_map(data.map);
+
++#ifdef __GLIBC__
+ if ((res = get_handle(&data, &handle,
+ "build/spa/plugins/support/libspa-support.so",
+ "logger")) < 0) {
+@@ -234,6 +240,7 @@ int main(int argc, char *argv[])
+ spa_type_map_get_id(data.map, SPA_TYPE__Log),
+ &iface)) < 0)
+ error(-1, res, "can't get log interface");
++#endif
+
+ data.log = iface;
+ data.support[1].type = SPA_TYPE__Log;
+@@ -243,6 +250,7 @@ int main(int argc, char *argv[])
+ if ((str = getenv("SPA_DEBUG")))
+ data.log->level = atoi(str);
+
++#ifdef __GLIBC__
+ if ((res = get_handle(&data, &handle,
+ "build/spa/plugins/support/libspa-support.so",
+ "loop")) < 0) {
+@@ -252,8 +260,11 @@ int main(int argc, char *argv[])
+ spa_type_map_get_id(data.map, SPA_TYPE__Loop),
+ &iface)) < 0)
+ error(-1, res, "can't get loop interface");
++#endif
++
+ data.loop = iface;
+
++#ifdef __GLIBC__
+ if ((res = spa_handle_get_interface(handle,
+ spa_type_map_get_id(data.map, SPA_TYPE__LoopControl),
+ &iface)) < 0)
+@@ -265,6 +276,7 @@ int main(int argc, char *argv[])
+ &iface)) < 0)
+ error(-1, res, "can't get looputils interface");
+ data.loop_utils = iface;
++#endif
+
+ data.support[2].type = SPA_TYPE_LOOP__DataLoop;
+ data.support[2].data = data.loop;
+@@ -276,6 +288,7 @@ int main(int argc, char *argv[])
+ data.support[5].data = data.loop_utils;
+ data.n_support = 6;
+
++#ifdef __GLIBC__
+ if ((res = get_handle(&data, &handle,
+ "build/spa/plugins/support/libspa-dbus.so",
+ "dbus")) < 0) {
+@@ -286,12 +299,14 @@ int main(int argc, char *argv[])
+ spa_type_map_get_id(data.map, SPA_TYPE__DBus),
+ &iface)) < 0)
+ error(-1, res, "can't get dbus interface");
++#endif
+
+ data.dbus = iface;
+ data.support[6].type = SPA_TYPE__DBus;
+ data.support[6].data = data.dbus;
+ data.n_support = 7;
+
++#ifdef __GLIBC__
+ if ((res = get_handle(&data, &handle,
+ "build/spa/plugins/bluez5/libspa-bluez5.so",
+ "bluez5-monitor")) < 0) {
+@@ -302,6 +317,7 @@ int main(int argc, char *argv[])
+ spa_type_map_get_id(data.map, SPA_TYPE__Monitor),
+ &iface)) < 0)
+ error(-1, res, "can't get monitor interface");
++#endif
+
+ data.monitor = iface;
+
+--- a/spa/tests/test-control.c
++++ b/spa/tests/test-control.c
+@@ -18,7 +18,9 @@
+ */
+
+ #include <math.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -358,8 +360,10 @@ static int make_nodes(struct data *data, const char *device)
+ spa_pod_builder_init(&b, buffer, sizeof(buffer));
+ if ((res = spa_node_port_enum_params(data->source, SPA_DIRECTION_OUTPUT, 0,
+ data->type.param_io.idPropsIn, &idx, NULL, &param, &b)) < 1) {
++#ifdef __GLIBC__
+ if (res < 0)
+ error(0, -res, "port_enum_params");
++#endif
+ break;
+ }
+
+@@ -369,19 +373,23 @@ static int make_nodes(struct data *data, const char *device)
+ NULL);
+
+ if (propId == data->type.props_freq) {
++#ifdef __GLIBC__
+ if ((res = spa_node_port_set_io(data->source,
+ SPA_DIRECTION_OUTPUT, 0,
+ id,
+ &data->ctrl_source_freq, sizeof(data->ctrl_source_freq))) < 0)
+ error(0, -res, "set_io freq");
++#endif
+
+ }
+ else if (propId == data->type.props_volume) {
++#ifdef __GLIBC__
+ if ((res = spa_node_port_set_io(data->source,
+ SPA_DIRECTION_OUTPUT, 0,
+ id,
+ &data->ctrl_source_volume, sizeof(data->ctrl_source_volume))) < 0)
+ error(0, -res, "set_io volume");
++#endif
+ }
+ }
+
+--- a/spa/tests/test-mixer.c
++++ b/spa/tests/test-mixer.c
+@@ -18,7 +18,9 @@
+ */
+
+ #include <math.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -369,8 +371,10 @@ static int make_nodes(struct data *data, const char *device)
+ ":", data->type.props_device, "s", device ? device : "hw:0",
+ ":", data->type.props_min_latency, "i", MIN_LATENCY);
+
++#ifdef __GLIBC__
+ if ((res = spa_node_set_param(data->sink, data->type.param.idProps, 0, props)) < 0)
+ error(0, -res, "set_param props");
++#endif
+
+ if ((res = make_node(data, &data->mix,
+ "build/spa/plugins/audiomixer/libspa-audiomixer.so",
+@@ -453,6 +457,7 @@ static int make_nodes(struct data *data, const char *device)
+ data->ctrl_volume[0] = SPA_POD_DOUBLE_INIT(0.5);
+ data->ctrl_volume[1] = SPA_POD_DOUBLE_INIT(0.5);
+
++#ifdef __GLIBC__
+ if ((res = spa_node_port_set_io(data->mix,
+ SPA_DIRECTION_INPUT, data->mix_ports[0],
+ data->type.io_inprop_volume,
+@@ -464,6 +469,7 @@ static int make_nodes(struct data *data, const char *device)
+ data->type.io_inprop_volume,
+ &data->ctrl_volume[1], sizeof(data->ctrl_volume[1]))) < 0)
+ error(0, -res, "set_io volume 1");
++#endif
+
+
+ #ifdef USE_GRAPH
+--- a/spa/tools/spa-inspect.c
++++ b/spa/tools/spa-inspect.c
+@@ -17,7 +17,9 @@
+ * Boston, MA 02110-1301, USA.
+ */
+
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -71,8 +73,10 @@ inspect_node_params(struct data *data, struct spa_node *node)
+ if ((res = spa_node_enum_params(node,
+ data->type.param.idList, &idx1,
+ NULL, &param, &b)) <= 0) {
++#ifdef __GLIBC__
+ if (res != 0)
+ error(0, -res, "enum_params");
++#endif
+ break;
+ }
+
+@@ -88,8 +92,10 @@ inspect_node_params(struct data *data, struct spa_node *node)
+ if ((res = spa_node_enum_params(node,
+ id, &idx2,
+ NULL, &param, &b)) <= 0) {
++#ifdef __GLIBC__
+ if (res != 0)
+ error(0, -res, "enum_params %d", id);
++#endif
+ break;
+ }
+ spa_debug_pod(param, flags);
+@@ -115,8 +121,10 @@ inspect_port_params(struct data *data, struct spa_node *node,
+ direction, port_id,
+ data->type.param.idList, &idx1,
+ NULL, &param, &b)) <= 0) {
++#ifdef __GLIBC__
+ if (res != 0)
+ error(0, -res, "port_enum_params");
++#endif
+ break;
+ }
+ spa_pod_object_parse(param,
+@@ -132,8 +140,10 @@ inspect_port_params(struct data *data, struct spa_node *node,
+ direction, port_id,
+ id, &idx2,
+ NULL, &param, &b)) <= 0) {
++#ifdef __GLIBC__
+ if (res != 0)
+ error(0, -res, "port_enum_params");
++#endif
+ break;
+ }
+
+@@ -204,8 +214,10 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
+ if ((res = spa_handle_factory_enum_interface_info(factory, &info, &index)) <= 0) {
+ if (res == 0)
+ break;
++#ifdef __GLIBC__
+ else
+ error(0, -res, "spa_handle_factory_enum_interface_info");
++#endif
+ }
+ printf(" interface: '%s'\n", info->type);
+ }
+@@ -225,8 +237,10 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
+ if ((res = spa_handle_factory_enum_interface_info(factory, &info, &index)) <= 0) {
+ if (res == 0)
+ break;
++#ifdef __GLIBC__
+ else
+ error(0, -res, "spa_handle_factory_enum_interface_info");
++#endif
+ }
+ printf(" interface: '%s'\n", info->type);
+
+@@ -315,8 +329,10 @@ int main(int argc, char *argv[])
+ const struct spa_handle_factory *factory;
+
+ if ((res = enum_func(&factory, &index)) <= 0) {
++#ifdef __GLIBC__
+ if (res != 0)
+ error(0, -res, "enum_func");
++#endif
+ break;
+ }
+ inspect_factory(&data, factory);