aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-11 15:40:33 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-11 15:40:33 -0300
commit0ce8acff361f033525215643e5b25e69988568ac (patch)
treedaaa706f498fcb1e61f0c7617a27bc9422307383 /unmaintained
parent56cab7f354bb286ed0390a96ea8bdc13361508c5 (diff)
unmaintained/efivar: move from testing
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/efivar/APKBUILD34
-rw-r--r--unmaintained/efivar/musl-bswap.patch33
2 files changed, 67 insertions, 0 deletions
diff --git a/unmaintained/efivar/APKBUILD b/unmaintained/efivar/APKBUILD
new file mode 100644
index 00000000000..271d63d3294
--- /dev/null
+++ b/unmaintained/efivar/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Lucas Ramage <ramage.lucas@protonmail.com>
+pkgname=efivar
+pkgver=37
+pkgrel=0
+pkgdesc="Tools and library to manipulate EFI variables"
+url="https://github.com/rhboot/efivar"
+arch="x86 x86_64 armhf armv7 aarch64 ppc64le"
+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"
+builddir="$srcdir/efivar-$pkgver"
+
+build() {
+ cd "$builddir"
+ libdir="/usr/lib" make
+}
+
+package() {
+ cd "$builddir"
+ libdir="/usr/lib" make DESTDIR="$pkgdir" install
+}
+
+check() {
+ LD_LIBRARY_PATH="$builddir"/src \
+ "$builddir"/src/efivar --help > /dev/null
+}
+sha512sums="305a82ed103c7e3d8f723934019d552677c73558768dd5341f87d0364f5c60824d24f5a8e1bf90075e825908085083d4ecdccec5ac757fd38ee6ac8fea28c3e4 efivar-37.tar.bz2
+84fd5baf91df91889cfcfed2bcf59f073dc754f6aba1944059203bbe99f4bbb6dc92addff9fae8f687a2c95f9438b0eb301dd0320728a8a2a6edd5e2b2b5ba94 musl-bswap.patch"
diff --git a/unmaintained/efivar/musl-bswap.patch b/unmaintained/efivar/musl-bswap.patch
new file mode 100644
index 00000000000..8b86d9ae54a
--- /dev/null
+++ b/unmaintained/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\