efivar: update to 34.

Closes: #12013 [via git-merge-pr]
This commit is contained in:
maxice8 2018-02-12 14:54:37 -02:00 committed by Michael Aldridge
parent c7a5540953
commit f752c233a7
4 changed files with 4 additions and 65 deletions

View file

@ -1,15 +0,0 @@
When other bits of the source got fixed to use a different include path
for efivars, the test directory did not.
--- src/test/tester.c
+++ src/test/tester.c
@@ -26,7 +26,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <efivar.h>
+#include <efivar/efivar.h>
#define TEST_GUID EFI_GUID(0x84be9c3e,0x8a32,0x42c0,0x891c,0x4c,0xd3,0xb0,0x72,0xbe,0xcc)

View file

@ -1,32 +0,0 @@
From c9b54ee2cd504542cac4ed95fa7842bd14b39f9c Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Fri, 18 Aug 2017 20:36:03 -0500
Subject: [PATCH] makeguids: Ensure compatibility with other libcs
The musl libc does not provide __bswap_constant_XX.
If <endian.h> does not provide these macros, use our own.
This fixes issue #84.
---
src/makeguids.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- src/makeguids.c
+++ src/makeguids.c
@@ -152,6 +152,15 @@ main(int argc, char *argv[])
fprintf(symout, "#include <efivar/efivar.h>\n");
fprintf(symout, "#include <endian.h>\n");
fprintf(symout, """\n\
+#ifndef __bswap_constant_16\n\
+#define __bswap_constant_16(x)\\\n\
+ ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))\n\
+#endif\n\
+#ifndef __bswap_constant_32\n\
+#define __bswap_constant_32(x)\\\n\
+ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \\\n\
+ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))\n\
+#endif\n\
#if BYTE_ORDER == BIG_ENDIAN\n\
#define cpu_to_be32(n) (n)\n\
#define cpu_to_be16(n) (n)\n\

View file

@ -1,13 +0,0 @@
--- src/linux.c 2017-02-13 17:52:14.000000000 +0100
+++ src/linux.c 2017-02-18 04:42:13.893911649 +0100
@@ -44,6 +44,10 @@
#include <efivar.h>
#include <efiboot.h>
+#if !defined(__GLIBC__)
+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
+#endif
+
#include "dp.h"
#include "linux.h"
#include "util.h"

View file

@ -1,20 +1,19 @@
# Template file for 'efivar'
pkgname=efivar
version=32
version=34
revision=1
build_style=gnu-makefile
make_build_args="libdir=/usr/lib"
make_build_target="all test"
make_install_args="libdir=/usr/lib"
hostmakedepends="pkg-config"
makedepends="popt-devel"
short_desc="Tools to manipulate EFI variables"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="LGPL-2.1"
license="LGPL-2.1-or-later"
homepage="https://github.com/rhinstaller/efivar"
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
distfiles="https://github.com/rhinstaller/efivar/archive/${version}/${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=44e3db4241c14dfc167dd5bf8c399ef41a7bf966cbc49519694d605f3c843420
distfiles="https://github.com/rhboot/efivar/releases/download/${version}/efivar-${version}.tar.bz2"
checksum=1b7e34e728b4b4c294a10734e601212e4c31ce4cf409e27d1d630daa8d0f4325
CFLAGS="-D_GNU_SOURCE"