1 |
commit: 6beda972e3fc6a2a32603652855a83da1b61e4b3 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 21 13:52:41 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 21 13:55:35 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6beda972 |
7 |
|
8 |
sys-kernel/linux-headers: add musl patch for 5.10 |
9 |
|
10 |
Stable revbump given this is exactly what's already applied in ::musl |
11 |
and we're only applying this new patch conditionally. We want installs |
12 |
done with the new stages to not have to "downgrade" to the ::gentoo |
13 |
version which lacks the header fixes that this patch _now_ adds. |
14 |
|
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
...-5.10-Use-stddefs.h-instead-of-compiler.h.patch | 27 ++++++++++++ |
18 |
.../linux-headers/linux-headers-5.10-r1.ebuild | 50 ++++++++++++++++++++++ |
19 |
2 files changed, 77 insertions(+) |
20 |
|
21 |
diff --git a/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch b/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch |
22 |
new file mode 100644 |
23 |
index 000000000000..ac8bbe8b55fc |
24 |
--- /dev/null |
25 |
+++ b/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch |
26 |
@@ -0,0 +1,27 @@ |
27 |
+Needed for musl. |
28 |
+ |
29 |
+From 9eb3c31415686ae1296d7d450f886eeba5861ec1 Mon Sep 17 00:00:00 2001 |
30 |
+From: Jory Pratt <anarchy@g.o> |
31 |
+Date: Thu, 3 Jun 2021 18:41:28 -0500 |
32 |
+Subject: [PATCH] Use stddefs.h instead of compiler.h |
33 |
+ |
34 |
+--- |
35 |
+ include/uapi/linux/swab.h | 2 +- |
36 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
37 |
+ |
38 |
+diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h |
39 |
+index 7272f85..3736f2f 100644 |
40 |
+--- a/include/uapi/linux/swab.h |
41 |
++++ b/include/uapi/linux/swab.h |
42 |
+@@ -3,7 +3,7 @@ |
43 |
+ #define _UAPI_LINUX_SWAB_H |
44 |
+ |
45 |
+ #include <linux/types.h> |
46 |
+-#include <linux/compiler.h> |
47 |
++#include <linux/stddef.h> |
48 |
+ #include <asm/bitsperlong.h> |
49 |
+ #include <asm/swab.h> |
50 |
+ |
51 |
+-- |
52 |
+2.31.1 |
53 |
+ |
54 |
|
55 |
diff --git a/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild b/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild |
56 |
new file mode 100644 |
57 |
index 000000000000..d305baff01e2 |
58 |
--- /dev/null |
59 |
+++ b/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild |
60 |
@@ -0,0 +1,50 @@ |
61 |
+# Copyright 1999-2021 Gentoo Authors |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+ |
64 |
+EAPI="6" |
65 |
+ |
66 |
+ETYPE="headers" |
67 |
+H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" |
68 |
+inherit kernel-2 toolchain-funcs |
69 |
+detect_version |
70 |
+ |
71 |
+PATCH_PV=${PV} # to ease testing new versions against not existing patches |
72 |
+PATCH_VER="1" |
73 |
+SRC_URI="${KERNEL_URI} |
74 |
+ ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} |
75 |
+ ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} |
76 |
+" |
77 |
+ |
78 |
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" |
79 |
+ |
80 |
+DEPEND="app-arch/xz-utils |
81 |
+ dev-lang/perl" |
82 |
+RDEPEND="" |
83 |
+ |
84 |
+S=${WORKDIR}/linux-${PV} |
85 |
+ |
86 |
+src_unpack() { |
87 |
+ unpack ${A} |
88 |
+} |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch |
92 |
+ |
93 |
+ if use elibc_musl ; then |
94 |
+ # TODO: May need forward porting to newer versions |
95 |
+ eapply "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch |
96 |
+ fi |
97 |
+ |
98 |
+ default |
99 |
+} |
100 |
+ |
101 |
+src_test() { |
102 |
+ emake headers_check ${xmakeopts} |
103 |
+} |
104 |
+ |
105 |
+src_install() { |
106 |
+ kernel-2_src_install |
107 |
+ |
108 |
+ find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete |
109 |
+ find "${ED}" -depth -type d -delete 2>/dev/null |
110 |
+} |