From 570b99ac0d62d75157b3aa243cbe9c1f4cbc0e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 29 Mar 2021 14:55:23 -0300 Subject: [PATCH] fwupd: update to 1.5.8. --- srcpkgs/fwupd/patches/musl.patch | 44 ++++++++++++++++++++++++++++++++ srcpkgs/fwupd/template | 5 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/fwupd/patches/musl.patch diff --git a/srcpkgs/fwupd/patches/musl.patch b/srcpkgs/fwupd/patches/musl.patch new file mode 100644 index 000000000000..fd7dfb19308b --- /dev/null +++ b/srcpkgs/fwupd/patches/musl.patch @@ -0,0 +1,44 @@ +Upstream: https://github.com/fwupd/fwupd/pull/3080 + +diff --git a/meson.build b/meson.build +index 86e70573..e870f7b6 100644 +--- a/meson.build ++++ b/meson.build +@@ -309,6 +309,12 @@ endif + if cc.has_header('fnmatch.h') + conf.set('HAVE_FNMATCH_H', '1') + endif ++if cc.has_header('malloc.h') ++ conf.set('HAVE_MALLOC_H', '1') ++ if cc.has_function('malloc_trim', prefix: '#include ') ++ conf.set('HAVE_MALLOC_TRIM', '1') ++ endif ++endif + if cc.has_header('cpuid.h') and cc.has_header_symbol('cpuid.h', '__get_cpuid_count') and (host_cpu == 'x86' or host_cpu == 'x86_64') + conf.set('HAVE_CPUID_H', '1') + else +diff --git a/src/fu-main.c b/src/fu-main.c +index b7afde98..5f5de334 100644 +--- a/src/fu-main.c ++++ b/src/fu-main.c +@@ -14,7 +14,9 @@ + #include + #include + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #ifdef HAVE_POLKIT + #include + #endif +@@ -2037,8 +2039,10 @@ main (int argc, char *argv[]) + else if (timed_exit) + g_timeout_add_seconds (5, fu_main_timed_exit_cb, priv->loop); + ++#ifdef HAVE_MALLOC_TRIM + /* drop heap except one page */ + malloc_trim (4096); ++#endif + + /* wait */ + g_message ("Daemon ready for requests (locale %s)", g_getenv ("LANG")); diff --git a/srcpkgs/fwupd/template b/srcpkgs/fwupd/template index a2b66a212af4..b0828273d2f0 100644 --- a/srcpkgs/fwupd/template +++ b/srcpkgs/fwupd/template @@ -1,6 +1,6 @@ # Template file for 'fwupd' pkgname=fwupd -version=1.5.5 +version=1.5.8 revision=1 build_style=meson build_helper="gir" @@ -27,8 +27,9 @@ maintainer="Érico Nogueira " license="LGPL-2.1-or-later" homepage="https://github.com/hughsie/fwupd" distfiles="https://github.com/hughsie/fwupd/archive/${version}.tar.gz" -checksum=1a6d5026ae37708718b7c0bb277050c96934acb636605f1c0295eba8ff627ea3 +checksum=4abecf930f02fc5b165831682f3915cc7f0e82e73be2e187e761220ae275a1a3 replaces="fwupdate>=0" +patch_args=-Np1 case "$XBPS_TARGET_MACHINE" in x86_64*|i686*)