diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2017-10-11 11:25:07 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2017-10-11 11:26:05 +0200 |
commit | f31278a38b0ac4700b23649cd5e1d5647b7a2343 (patch) | |
tree | 29e67524c1d3081fd1e75becdf0836ca8cfb38ca /testing/efivar | |
parent | 422aa783fa2d19e37e1ff5efccd7cbb1df722e65 (diff) | |
download | aports-f31278a38b0ac4700b23649cd5e1d5647b7a2343.tar.bz2 aports-f31278a38b0ac4700b23649cd5e1d5647b7a2343.tar.xz |
testing/efivar: new aport
Diffstat (limited to 'testing/efivar')
-rw-r--r-- | testing/efivar/APKBUILD | 36 | ||||
-rw-r--r-- | testing/efivar/musl-bswap.patch | 33 | ||||
-rw-r--r-- | testing/efivar/musl-strndupa.patch | 13 |
3 files changed, 82 insertions, 0 deletions
diff --git a/testing/efivar/APKBUILD b/testing/efivar/APKBUILD new file mode 100644 index 0000000000..b1436b9692 --- /dev/null +++ b/testing/efivar/APKBUILD @@ -0,0 +1,36 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=efivar +pkgver=31 +pkgrel=0 +pkgdesc="Tools and library to manipulate EFI variables" +url="https://github.com/rhboot/efivar" +arch="all" +license="LGPL-2.1" +depends="" +depends_dev="" +makedepends="$depends_dev popt-dev linux-headers" +install="" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" +source="https://github.com/rhboot/efivar/releases/download/$pkgver/efivar-$pkgver.tar.bz2 + musl-bswap.patch + musl-strndupa.patch" +builddir="$srcdir/efivar-$pkgver" + +build() { + cd "$builddir" + libdir="/usr/lib" make +} + +package() { + cd "$builddir" + libdir="/usr/lib" make DESTDIR="$pkgdir" install +} + +check() { + "$builddir"/src/efivar --help > /dev/null +} + +sha512sums="5055f690fd99cf59895dcf3d11103494d917d4923567626f0bee816ea5e4dd56cec23627ede5f21bdc57b7306522471ad19cc8ab22ae94591dbd1925c084f163 efivar-31.tar.bz2 +84fd5baf91df91889cfcfed2bcf59f073dc754f6aba1944059203bbe99f4bbb6dc92addff9fae8f687a2c95f9438b0eb301dd0320728a8a2a6edd5e2b2b5ba94 musl-bswap.patch +d7c0ed2cbb4e3b93921ef5adad9667d2a2f18bc5da8d4dba71edb5b424c68c24e9d1c495d4dcccc1cd563cdfdc598308a74ae5b4d4ed78ff4391f4456554a18a musl-strndupa.patch" diff --git a/testing/efivar/musl-bswap.patch b/testing/efivar/musl-bswap.patch new file mode 100644 index 0000000000..8b86d9ae54 --- /dev/null +++ b/testing/efivar/musl-bswap.patch @@ -0,0 +1,33 @@ +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(+) + +diff --git a/src/makeguids.c b/src/makeguids.c +index ec75a86..6b0d80e 100644 +--- a/src/makeguids.c ++++ b/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\ diff --git a/testing/efivar/musl-strndupa.patch b/testing/efivar/musl-strndupa.patch new file mode 100644 index 0000000000..5fcc1847c2 --- /dev/null +++ b/testing/efivar/musl-strndupa.patch @@ -0,0 +1,13 @@ +--- ./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" |