summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2022-01-17 17:07:24 +0100
committerLars Wendler <polynomial-c@gentoo.org>2022-01-17 17:08:07 +0100
commit79dabb3646d62da12da567c70b2ca83f328b2574 (patch)
treeac16f940a441ef6d68b40fb19b18a8d74d433c12 /sys-apps
parentsys-libs/efivar: drop -march=native (diff)
downloadgentoo-79dabb3646d62da12da567c70b2ca83f328b2574.tar.gz
gentoo-79dabb3646d62da12da567c70b2ca83f328b2574.tar.bz2
gentoo-79dabb3646d62da12da567c70b2ca83f328b2574.zip
sys-apps/fwupd: Fixed build against sys-libs/efivar-38
Closes: https://bugs.gentoo.org/831327 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/fwupd/files/fwupd-1.7.4-efivar38.patch55
-rw-r--r--sys-apps/fwupd/fwupd-1.7.4.ebuild4
2 files changed, 59 insertions, 0 deletions
diff --git a/sys-apps/fwupd/files/fwupd-1.7.4-efivar38.patch b/sys-apps/fwupd/files/fwupd-1.7.4-efivar38.patch
new file mode 100644
index 000000000000..968a0e7222d3
--- /dev/null
+++ b/sys-apps/fwupd/files/fwupd-1.7.4-efivar38.patch
@@ -0,0 +1,55 @@
+From e74d38bfd3097471fe60dbe843a68c16516a78da Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Mon, 17 Jan 2022 14:50:47 +0000
+Subject: [PATCH] Fix compiling with new versions of efivar
+
+Fixes https://github.com/fwupd/fwupd/issues/4181
+---
+ meson.build | 5 +++++
+ plugins/uefi-capsule/fu-uefi-common.h | 3 +++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 833bdbf56..691cc8a58 100644
+--- a/meson.build
++++ b/meson.build
+@@ -412,6 +412,11 @@ endif
+ if build_standalone and get_option('plugin_uefi_capsule')
+ efiboot = dependency('efiboot')
+
++ efivar = dependency('efivar')
++ if cc.has_header_symbol('efivar/efivar-types.h', 'efi_time_t', dependencies : efivar)
++ conf.set('HAVE_EFI_TIME_T', '1')
++ endif
++
+ efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
+ conf.set_quoted('EFI_APP_LOCATION', efi_app_location)
+
+diff --git a/plugins/uefi-capsule/fu-uefi-common.h b/plugins/uefi-capsule/fu-uefi-common.h
+index a21806d6b..1d616c9e0 100644
+--- a/plugins/uefi-capsule/fu-uefi-common.h
++++ b/plugins/uefi-capsule/fu-uefi-common.h
+@@ -9,6 +9,7 @@
+
+ #include <fwupdplugin.h>
+
++#include <efivar/efivar.h>
+ #include <glib.h>
+
+ #define EFI_CAPSULE_HEADER_FLAGS_PERSIST_ACROSS_RESET 0x00010000
+@@ -17,6 +18,7 @@
+
+ #define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED 0x0000000000000004ULL
+
++#ifndef HAVE_EFI_TIME_T
+ typedef struct __attribute__((__packed__)) {
+ guint16 year;
+ guint8 month;
+@@ -30,6 +32,7 @@ typedef struct __attribute__((__packed__)) {
+ guint8 daylight;
+ guint8 pad2;
+ } efi_time_t;
++#endif
+
+ typedef struct __attribute__((__packed__)) {
+ fwupd_guid_t guid;
diff --git a/sys-apps/fwupd/fwupd-1.7.4.ebuild b/sys-apps/fwupd/fwupd-1.7.4.ebuild
index 282861f294ad..aaed0839779c 100644
--- a/sys-apps/fwupd/fwupd-1.7.4.ebuild
+++ b/sys-apps/fwupd/fwupd-1.7.4.ebuild
@@ -86,6 +86,10 @@ DEPEND="
x11-libs/pango[introspection]
"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.7.4-efivar38.patch" #831327
+)
+
pkg_setup() {
python-single-r1_pkg_setup
if use nvme ; then