summaryrefslogtreecommitdiff
path: root/system/libbpf
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-10-16 01:12:16 +0000
committerZach van Rijn <me@zv.io>2021-10-16 01:12:16 +0000
commit6ca2ba5c92a7b0679a552725678a40ed5eb4ded5 (patch)
treeddc300a108dc4d10ed5ed0188175f54452e8bb0e /system/libbpf
parentaa90e62ce757fa863685f44ce23f129f56b3225f (diff)
parentc0f3f757abe6ea39579119b99e9996c4e2bf0e11 (diff)
downloadpackages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.gz
packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.bz2
packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.xz
packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.zip
Merge branch 'master' into 'awilfox/bump/2021-09-system-abipreserve'
# Conflicts: # system/curl/APKBUILD
Diffstat (limited to 'system/libbpf')
-rw-r--r--system/libbpf/10-include-stddef.patch12
-rw-r--r--system/libbpf/20-consolidate-lib-dirs.patch11
-rw-r--r--system/libbpf/APKBUILD31
3 files changed, 54 insertions, 0 deletions
diff --git a/system/libbpf/10-include-stddef.patch b/system/libbpf/10-include-stddef.patch
new file mode 100644
index 000000000..e3fe4d1a9
--- /dev/null
+++ b/system/libbpf/10-include-stddef.patch
@@ -0,0 +1,12 @@
+diff --git a/src/libbpf.c b/src/libbpf.c
+index b38dcbe..bc3ac5d 100644
+--- a/src/libbpf.c
++++ b/src/libbpf.c
+@@ -29,6 +29,7 @@
+ #include <linux/filter.h>
+ #include <linux/list.h>
+ #include <linux/limits.h>
++#include <linux/stddef.h>
+ #include <linux/perf_event.h>
+ #include <linux/ring_buffer.h>
+ #include <sys/stat.h>
diff --git a/system/libbpf/20-consolidate-lib-dirs.patch b/system/libbpf/20-consolidate-lib-dirs.patch
new file mode 100644
index 000000000..0455ae8de
--- /dev/null
+++ b/system/libbpf/20-consolidate-lib-dirs.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile 2021-10-06 21:38:50.758641729 +0000
++++ b/src/Makefile 2021-10-06 21:39:12.096413542 +0000
+@@ -62,7 +62,7 @@
+ DESTDIR ?=
+
+ ifeq ($(filter-out %64 %64be %64eb %64le %64el s390x, $(shell uname -m)),)
+- LIBSUBDIR := lib64
++ LIBSUBDIR := lib
+ else
+ LIBSUBDIR := lib
+ endif
diff --git a/system/libbpf/APKBUILD b/system/libbpf/APKBUILD
new file mode 100644
index 000000000..296878162
--- /dev/null
+++ b/system/libbpf/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Dan Theisen <djt@hxx.in>
+# Maintainer: Dan Theisen <djt@hxx.in>
+pkgname=libbpf
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="A library for interacting with the Linux kernel's Berkeley Packet Filter (BPF) facility from user space"
+url="https://github.com/libbpf/libbpf"
+arch="all"
+options="!check" # no tests
+license="LGPL-2.1 OR BSD-2-Clause"
+depends=""
+makedepends="zlib-dev libelf-dev linux-headers"
+subpackages="$pkgname-dev"
+source="libbpf-$pkgver.tar.gz::https://github.com/libbpf/libbpf/archive/refs/tags/v$pkgver.tar.gz
+ 10-include-stddef.patch
+ 20-consolidate-lib-dirs.patch
+ "
+
+build() {
+ cd src
+ make
+}
+
+package() {
+ cd src
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="3c578d3e6e93a306a1f182978e54f35fec8acfa51fad5d7de72c5003f10c266d7474e82d6dd045311fcaf8c18aa8cebe64a3336a458a9ea477e5a58e5111dd85 libbpf-0.5.0.tar.gz
+946e445ffa4c5df42ebac77b7a1c6478b37dc7b55e0883aee195c6a8c4f8718b4dbf98b7c6d3016e1619e59440d8e4a76dad1e843114dfe2f9a2610e5cbb7943 10-include-stddef.patch
+9398dd33df9e93f7bd4f68d6bb1da3731075e2f95fdcc3b9cc471e823c2f6700351d458976b804d3f56be50b824a8ce7cda482945a1e78522a3973b22bdbf4d5 20-consolidate-lib-dirs.patch"