Accepting request 1105883 from home:alarrosa:branches:multimedia:libs

- Update to version 0.3.78:
  * Highlights
    - An old regression was fixed with where some nodes would not
      run.
    - A regression was fixed where removed events would not be
      shown in some cases. This would result in duplicate entries
      in audio clients.
    - Fix an off-by-one in the vban audio receiver. Tweak the rate
      adaption a little.
    - ACP will now set a UCM verb before probing the pro-audio
      devices.
    - More bugfixes and improvements.
  * PipeWire
    - An old regression was fixed with where some nodes would not
      run. (#3405)
    - Suspend was improved a little to avoid races when the session
      manager would suspend right when a driver was starting.
  * Modules
    - module-rtp-sap does not use the deprecated inet_aton anymore.
    - Fix an off-by-one in the vban audio receiver. Tweak the rate
      adaption a little. (#3380)
  * SPA
    - ACP will now set a UCM verb before probing the pro-audio
      devices. (#3407)
    - The mandatory flag will be set now on the video modifiers.
    - EVL was updated to Xenomai4 r46 and xbuf creation was
      improved.
    - An option was added to force colors in the log even when
      logging to !tty.
    - The return type of spa_pod_builder_control() was fixed.

OBS-URL: https://build.opensuse.org/request/show/1105883
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pipewire?expand=0&rev=150
This commit is contained in:
Antonio Larrosa 2023-08-25 09:41:45 +00:00 committed by Git OBS Bridge
parent 8dc79b365b
commit e4f628e84d
15 changed files with 228 additions and 299 deletions

View File

@ -0,0 +1,28 @@
From b54f7fe90dd16b0f7a7e1e5bb1ef921212236029 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 24 Aug 2023 13:44:10 +0200
Subject: [PATCH] audioconvert: fix typo in neon function
Thanks to Shengjiu Wang
fixes #3463
---
spa/plugins/audioconvert/fmt-ops-neon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spa/plugins/audioconvert/fmt-ops-neon.c b/spa/plugins/audioconvert/fmt-ops-neon.c
index 0006456fc4..55be55fa58 100644
--- a/spa/plugins/audioconvert/fmt-ops-neon.c
+++ b/spa/plugins/audioconvert/fmt-ops-neon.c
@@ -294,7 +294,7 @@ conv_f32d_to_s16_2s_neon(void *data, void * SPA_RESTRICT dst, const void * SPA_R
" beq 4f\n"
"3:"
" ld1 { v0.s }[0], [%[s0]], #4\n"
- " ld1 { v2.s }[0], [%[s1]], #4\n"
+ " ld1 { v1.s }[0], [%[s1]], #4\n"
" subs %[remainder], %[remainder], #1\n"
" sqadd v0.4s, v0.4s, v2.4s\n"
" sqadd v1.4s, v1.4s, v2.4s\n"
--
GitLab

View File

@ -0,0 +1,36 @@
From dbd97020da06450366dca7020eeb62afcd135d83 Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <pav@iki.fi>
Date: Tue, 22 Aug 2023 21:59:52 +0300
Subject: [PATCH] bluez5: fix BAP profiles showing
Now that we only show codec profiles, the logic that showed codecless
profile for BAP has to be removed.
This fixes BAP only showing off profile.
---
spa/plugins/bluez5/bluez5-device.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/spa/plugins/bluez5/bluez5-device.c b/spa/plugins/bluez5/bluez5-device.c
index 3dec1e0aa..ced1d8dc8 100644
--- a/spa/plugins/bluez5/bluez5-device.c
+++ b/spa/plugins/bluez5/bluez5-device.c
@@ -1661,15 +1661,6 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder *
name = spa_bt_profile_name(profile);
- /* If we can't codec switch, emit codecless profile */
- if (current && !can_bap_codec_switch(this)) {
- codec = 0;
- index = get_index_from_profile(this, profile_index, codec);
- } else if ((codec != 0) != can_bap_codec_switch(this)) {
- errno = -EINVAL;
- return NULL;
- }
-
if (codec) {
media_codec = get_supported_media_codec(this, codec, &idx);
if (media_codec == NULL) {
--
GitLab

View File

@ -1,117 +0,0 @@
From 1daae4c369f464c8677696890e2eeb431c0f72a1 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Fri, 4 Aug 2023 17:42:04 +0200
Subject: [PATCH] context: Don't stop setting runnable when meeting the driving
node
Start scanning from a non-driving runnable node in one direction and set
all linked intermedia nodes runnable as well.
This ensure that play -> driving_sink -> effect -> sink also sets the
effect and sink nodes to running.
Fixes #3405
---
src/pipewire/context.c | 60 ++++++++++++++++++++++--------------------
1 file changed, 31 insertions(+), 29 deletions(-)
diff --git a/src/pipewire/context.c b/src/pipewire/context.c
index 8f9745b3f..9d9b629ae 100644
--- a/src/pipewire/context.c
+++ b/src/pipewire/context.c
@@ -787,44 +787,44 @@ static int ensure_state(struct pw_impl_node *node, bool running)
return pw_impl_node_set_state(node, state);
}
-/* From a node (that is runnable) follow all prepared links and groups to
- * active nodes up to the driver and make them recursively runnable as well.
- *
- * We stop at driver nodes so that other paths linked to the driver will stay
- * unrunnable when no other runnable path exists.
+/* From a node (that is runnable) follow all prepared links in the given direction
+ * and groups to active nodes and make them recursively runnable as well.
*/
-static inline int run_nodes(struct pw_context *context, struct pw_impl_node *node, struct spa_list *nodes)
+static inline int run_nodes(struct pw_context *context, struct pw_impl_node *node,
+ struct spa_list *nodes, enum pw_direction direction)
{
struct pw_impl_node *t;
struct pw_impl_port *p;
struct pw_impl_link *l;
- pw_log_debug("node %p: '%s'", node, node->name);
+ pw_log_debug("node %p: '%s' direction:%s", node, node->name,
+ pw_direction_as_string(direction));
- spa_list_for_each(p, &node->input_ports, link) {
- spa_list_for_each(l, &p->links, input_link) {
- t = l->output->node;
+ if (direction == PW_DIRECTION_INPUT) {
+ spa_list_for_each(p, &node->input_ports, link) {
+ spa_list_for_each(l, &p->links, input_link) {
+ t = l->output->node;
- if (!t->active || !l->prepared || t->runnable)
- continue;
+ if (!t->active || !l->prepared || (!t->driving && t->runnable))
+ continue;
- pw_log_debug(" peer %p: '%s'", t, t->name);
- t->runnable = true;
- if (!t->driving)
- run_nodes(context, t, nodes);
+ pw_log_debug(" peer %p: '%s'", t, t->name);
+ t->runnable = true;
+ run_nodes(context, t, nodes, direction);
+ }
}
- }
- spa_list_for_each(p, &node->output_ports, link) {
- spa_list_for_each(l, &p->links, output_link) {
- t = l->input->node;
+ } else {
+ spa_list_for_each(p, &node->output_ports, link) {
+ spa_list_for_each(l, &p->links, output_link) {
+ t = l->input->node;
- if (!t->active || !l->prepared || t->runnable)
- continue;
+ if (!t->active || !l->prepared || (!t->driving && t->runnable))
+ continue;
- pw_log_debug(" peer %p: '%s'", t, t->name);
- t->runnable = true;
- if (!t->driving)
- run_nodes(context, t, nodes);
+ pw_log_debug(" peer %p: '%s'", t, t->name);
+ t->runnable = true;
+ run_nodes(context, t, nodes, direction);
+ }
}
}
/* now go through all the nodes that have the same link group and
@@ -842,7 +842,7 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod
pw_log_debug(" group %p: '%s'", t, t->name);
t->runnable = true;
if (!t->driving)
- run_nodes(context, t, nodes);
+ run_nodes(context, t, nodes, direction);
}
}
return 0;
@@ -944,8 +944,10 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node,
pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, n->runnable);
}
spa_list_for_each(n, collect, sort_link)
- if (!n->driving && n->runnable)
- run_nodes(context, n, collect);
+ if (!n->driving && n->runnable) {
+ run_nodes(context, n, collect, PW_DIRECTION_OUTPUT);
+ run_nodes(context, n, collect, PW_DIRECTION_INPUT);
+ }
return 0;
}
--
GitLab

View File

@ -1,38 +0,0 @@
From 140374d2071e6204fded4ca65645d4e9a3dd053e Mon Sep 17 00:00:00 2001
From: Philippe Normand <philn@igalia.com>
Date: Fri, 4 Aug 2023 10:01:07 +0100
Subject: [PATCH] gst: Prevent a crash when stopping device provider
The provider might fail to connect to the PipeWire core when starting up, so
when stopping we need to check the core is valid before attempting to acquire a
mutex on its loop.
---
src/gst/gstpipewiredeviceprovider.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/gst/gstpipewiredeviceprovider.c b/src/gst/gstpipewiredeviceprovider.c
index a9d8dd8b2..9f82507b3 100644
--- a/src/gst/gstpipewiredeviceprovider.c
+++ b/src/gst/gstpipewiredeviceprovider.c
@@ -665,11 +665,16 @@ gst_pipewire_device_provider_stop (GstDeviceProvider * provider)
{
GstPipeWireDeviceProvider *self = GST_PIPEWIRE_DEVICE_PROVIDER (provider);
- pw_thread_loop_lock (self->core->loop);
+ /* core might be NULL if we failed to connect in _start. */
+ if (self->core != NULL) {
+ pw_thread_loop_lock (self->core->loop);
+ }
GST_DEBUG_OBJECT (self, "stopping provider");
g_clear_pointer ((struct pw_proxy**)&self->registry, pw_proxy_destroy);
- pw_thread_loop_unlock (self->core->loop);
+ if (self->core != NULL) {
+ pw_thread_loop_unlock (self->core->loop);
+ }
g_clear_pointer (&self->core, gst_pipewire_core_release);
}
--
GitLab

View File

@ -0,0 +1,44 @@
From 3b052eaa9986c2f5182eb8a1b2f2b5c10be31a12 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 24 Aug 2023 09:50:28 +0200
Subject: [PATCH] impl-node: improve suspend
Make sure we can only suspend when the node is (going to) IDLE. We don't
really want to allow applications to suspend a node that is running or
starting up.
This might fix a race when a node is suspended at the same time it is
started and cause silence. It also fixes the issue of total silence when
doing "pactl suspend <node> 1" on a running node.
See #3378
---
src/pipewire/impl-node.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c
index ca431c389..ff9effedc 100644
--- a/src/pipewire/impl-node.c
+++ b/src/pipewire/impl-node.c
@@ -591,6 +591,7 @@ static int node_send_command(void *object, const struct spa_command *command)
{
struct resource_data *data = object;
struct pw_impl_node *node = data->node;
+ struct impl *impl = SPA_CONTAINER_OF(node, struct impl, this);
uint32_t id = SPA_NODE_COMMAND_ID(command);
pw_log_debug("%p: got command %d (%s)", node, id,
@@ -598,7 +599,9 @@ static int node_send_command(void *object, const struct spa_command *command)
switch (id) {
case SPA_NODE_COMMAND_Suspend:
- suspend_node(node);
+ if (node->info.state == PW_NODE_STATE_ERROR ||
+ impl->pending_state == PW_NODE_STATE_IDLE)
+ suspend_node(node);
break;
default:
spa_node_send_command(node->node, command);
--
GitLab

View File

@ -0,0 +1,42 @@
From c41c812325ca1b0db1efc2fc06a3c90355be59d9 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 24 Aug 2023 19:28:57 +0200
Subject: [PATCH] jack: make sure we can always find our own ports
find_port_by_name() is used to find our own ports before they become
visible so make sure we can always find them.
Fixes #3485
---
pipewire-jack/src/pipewire-jack.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c
index b93422bd3..ff5b6881d 100644
--- a/pipewire-jack/src/pipewire-jack.c
+++ b/pipewire-jack/src/pipewire-jack.c
@@ -719,12 +719,20 @@ static bool is_port_default(struct client *c, struct object *o)
return false;
}
+static inline bool client_port_visible(struct client *c, struct object *o)
+{
+ if (o->port.port != NULL && o->port.port->client == c)
+ return true;
+ return o->visible;
+}
+
static struct object *find_port_by_name(struct client *c, const char *name)
{
struct object *o;
spa_list_for_each(o, &c->context.objects, link) {
- if (o->type != INTERFACE_Port || o->removed || !o->visible)
+ if (o->type != INTERFACE_Port || o->removed ||
+ (!client_port_visible(c, o)))
continue;
if (spa_streq(o->port.name, name) ||
spa_streq(o->port.alias1, name) ||
--
GitLab

View File

@ -1,54 +0,0 @@
From 31f91ce9f4302cea55244ab741022e40bbd4e716 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 7 Aug 2023 19:57:01 +0200
Subject: [PATCH] jack: ports become visible when the registration is queued
As soon as the port registration is queued (but not yet emited) the port
becomes visible.
See #3416
---
pipewire-jack/src/pipewire-jack.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c
index 3d71f67be..7547d6ffb 100644
--- a/pipewire-jack/src/pipewire-jack.c
+++ b/pipewire-jack/src/pipewire-jack.c
@@ -171,6 +171,7 @@ struct object {
struct spa_hook proxy_listener;
struct spa_hook object_listener;
int registered;
+ unsigned int visible;
unsigned int removing:1;
unsigned int removed:1;
};
@@ -723,7 +724,7 @@ static struct object *find_port_by_name(struct client *c, const char *name)
struct object *o;
spa_list_for_each(o, &c->context.objects, link) {
- if (o->type != INTERFACE_Port || o->removed)
+ if (o->type != INTERFACE_Port || o->removed || !o->visible)
continue;
if (spa_streq(o->port.name, name) ||
spa_streq(o->port.alias1, name) ||
@@ -1056,6 +1057,7 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1,
break;
case NOTIFY_TYPE_PORTREGISTRATION:
emit = c->portregistration_callback != NULL && o != NULL;
+ o->visible = arg1;
break;
case NOTIFY_TYPE_CONNECT:
emit = c->connect_callback != NULL && o != NULL;
@@ -5989,7 +5991,7 @@ const char ** jack_get_ports (jack_client_t *client,
count = 0;
spa_list_for_each(o, &c->context.objects, link) {
- if (o->type != INTERFACE_Port || o->removed)
+ if (o->type != INTERFACE_Port || o->removed || !o->visible)
continue;
pw_log_debug("%p: check port type:%d flags:%08lx name:\"%s\"", c,
o->port.type_id, o->port.flags, o->port.name);
--
GitLab

View File

@ -1,32 +0,0 @@
From 820ca90705ae78124958f1b96de3bdc7889c2d1e Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Tue, 8 Aug 2023 13:01:30 +0200
Subject: [PATCH] pulse-server: set all change_mask flags when removing
So that the logic to emit events will select sink and source objects.
Fixes #3414
---
src/modules/module-protocol-pulse/manager.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/modules/module-protocol-pulse/manager.c b/src/modules/module-protocol-pulse/manager.c
index 91594ce62..76517f112 100644
--- a/src/modules/module-protocol-pulse/manager.c
+++ b/src/modules/module-protocol-pulse/manager.c
@@ -641,9 +641,10 @@ static void registry_event_global_remove(void *data, uint32_t id)
o->this.removing = true;
- if (!o->this.creating)
+ if (!o->this.creating) {
+ o->this.change_mask = ~0;
manager_emit_removed(m, &o->this);
-
+ }
object_destroy(o);
}
--
GitLab

View File

@ -1,44 +0,0 @@
From cbf97d4b00e8fb9d46eb4c53bf64073871d7ce87 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 7 Aug 2023 19:58:20 +0200
Subject: [PATCH] jack: handle node.always-process = false jack nodes
Node that have the node.always-process = false property do not conform
to the jack API because they will be suspended even when they don't
inactivate themselves. Don't hide the ports for those clients when
inactive.
Fixes #3416
---
pipewire-jack/src/pipewire-jack.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c
index 7547d6ffb..051eb1675 100644
--- a/pipewire-jack/src/pipewire-jack.c
+++ b/pipewire-jack/src/pipewire-jack.c
@@ -3075,11 +3075,18 @@ static void node_info(void *data, const struct pw_node_info *info)
{
struct object *n = data;
struct client *c = n->client;
+ const char *str;
+
+ if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) {
+ str = spa_dict_lookup(info->props, PW_KEY_NODE_ALWAYS_PROCESS);
+ n->node.is_jack = str ? spa_atob(str) : false;
+ }
- pw_log_info("DSP node %d state change %s", info->id,
- pw_node_state_as_string(info->state));
+ n->node.is_running = !n->node.is_jack || (info->state == PW_NODE_STATE_RUNNING);
- n->node.is_running = (info->state == PW_NODE_STATE_RUNNING);
+ pw_log_debug("DSP node %d %08"PRIx64" jack:%u state change %s running:%d", info->id,
+ info->change_mask, n->node.is_jack,
+ pw_node_state_as_string(info->state), n->node.is_running);
if (info->change_mask & PW_NODE_CHANGE_MASK_STATE) {
struct object *p;
--
GitLab

View File

@ -3,7 +3,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pipewire/pipewire.git</param>
<param name="revision">0.3.77</param>
<param name="revision">0.3.78</param>
<param name="versionformat">@PARENT_TAG@</param>
<!--
<param name="revision">master</param>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a552a8a57e457157229540865ee8123b6eb9ba74d73fafc52021ff0eec39753
size 12101645

3
pipewire-0.3.78.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d526fe0795980fc1ecb3d872ab7f78a83bfae89e7140a5e378e4009d3b0fe20
size 12108301

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
Fri Aug 25 09:15:38 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 0.3.78:
* Highlights
- An old regression was fixed with where some nodes would not
run.
- A regression was fixed where removed events would not be
shown in some cases. This would result in duplicate entries
in audio clients.
- Fix an off-by-one in the vban audio receiver. Tweak the rate
adaption a little.
- ACP will now set a UCM verb before probing the pro-audio
devices.
- More bugfixes and improvements.
* PipeWire
- An old regression was fixed with where some nodes would not
run. (#3405)
- Suspend was improved a little to avoid races when the session
manager would suspend right when a driver was starting.
* Modules
- module-rtp-sap does not use the deprecated inet_aton anymore.
- Fix an off-by-one in the vban audio receiver. Tweak the rate
adaption a little. (#3380)
* SPA
- ACP will now set a UCM verb before probing the pro-audio
devices. (#3407)
- The mandatory flag will be set now on the video modifiers.
- EVL was updated to Xenomai4 r46 and xbuf creation was
improved.
- An option was added to force colors in the log even when
logging to !tty.
- The return type of spa_pod_builder_control() was fixed.
- inotify errors are handled better now. (#3439)
* pulse-server
- A regression was fixed where removed events would not be
shown in some cases. (#3414)
* Bluetooth
- Improve compatibility with more devices, avoid reusing the
same transport for different media-sink instances to avoid
encoder resets.
- Improve enumeration of codec profiles for BAP and A2DP.
* JACK
- Ensure we can't iterate ports from a deactivated client. Also
make sure the JACK clients with the node.always-process=false
always show their ports. (#3416)
* GStreamer
- A potential crash was fixed in the device provider when
stopping.
- Remove patches already included upstream:
* 0001-context-Dont-stop-setting-runnable-when-meeting-the-driving.patch
* 0001-gst-Prevent-a-crash-when-stopping-device-provider.patch
* 0001-jack-ports-become-visible-when-the-registration-is-queued.patch
* 0002-jack-handle-node.always-process-=-false-jack-nodes.patch
* 0001-pulse-server-set-all-change_mask-flags-when-removing.patch
- Add patch from upstream to fix jack clients:
* 0001-jack-make-sure-we-can-always-find-our-own-ports.patch
- Add patch from upstream to fix typo in neon function that makes
pipewire produce noise:
* 0001-audioconvert-fix-typo-in-neon-function.patch
- Add patch from upstream to fix (among others) a race when a node
is suspended at the same time it is started causing silence:
* 0001-impl-node-improve-suspend.patch
- Add patch from upstream to fix BAP only showing off profile:
* 0001-bluez5-fix-BAP-profiles-showing.patch
-------------------------------------------------------------------
Fri Aug 18 12:01:36 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -1,4 +1,4 @@
name: pipewire
version: 0.3.77
mtime: 1691137537
commit: 31cd694602cc37ada3a6d02a5a381f4e3933ecef
version: 0.3.78
mtime: 1692695544
commit: 188f784430283afb08abb8e6540ddbc674e09399

View File

@ -60,7 +60,7 @@
%bcond_with aptx
Name: pipewire
Version: 0.3.77
Version: 0.3.78
Release: 0
Summary: A Multimedia Framework designed to be an audio and video server and more
License: MIT
@ -70,11 +70,10 @@ Source0: %{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE reduce-meson-dependency.patch
Patch0: reduce-meson-dependency.patch
Patch1: 0001-context-Dont-stop-setting-runnable-when-meeting-the-driving.patch
Patch2: 0001-gst-Prevent-a-crash-when-stopping-device-provider.patch
Patch3: 0001-jack-ports-become-visible-when-the-registration-is-queued.patch
Patch4: 0002-jack-handle-node.always-process-=-false-jack-nodes.patch
Patch5: 0001-pulse-server-set-all-change_mask-flags-when-removing.patch
Patch1: 0001-jack-make-sure-we-can-always-find-our-own-ports.patch
Patch2: 0001-audioconvert-fix-typo-in-neon-function.patch
Patch3: 0001-impl-node-improve-suspend.patch
Patch4: 0001-bluez5-fix-BAP-profiles-showing.patch
BuildRequires: docutils
BuildRequires: doxygen
@ -392,7 +391,6 @@ sed -ie "s/version : '0.3.72'/version : '%{version}'/" %{P:0}
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%if %{pkg_vcmp gcc < 8}