Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-kernel/linux-headers/, sys-kernel/linux-headers/files/
Date: Thu, 08 Jul 2021 23:08:41
Message-Id: 1625785710.e9a03616c762b689a02860e17347eb484d14addf.anarchy@gentoo
1 commit: e9a03616c762b689a02860e17347eb484d14addf
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 8 23:08:30 2021 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 8 23:08:30 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=e9a03616
7
8 sys-kernel/linux-headers: Fix headers for newer kernels with musl
9
10 Closes: https://bugs.gentoo.org/791364
11 Package-Manager: Portage-3.0.20, Repoman-3.0.2
12 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
13
14 sys-kernel/linux-headers/Manifest | 2 +
15 .../0001-Use-stddefs.h-instead-of-compiler.h.patch | 25 +++++++++++
16 .../linux-headers/linux-headers-5.10-r1.ebuild | 48 ++++++++++++++++++++++
17 sys-kernel/linux-headers/metadata.xml | 11 +++++
18 4 files changed, 86 insertions(+)
19
20 diff --git a/sys-kernel/linux-headers/Manifest b/sys-kernel/linux-headers/Manifest
21 new file mode 100644
22 index 0000000..537ef88
23 --- /dev/null
24 +++ b/sys-kernel/linux-headers/Manifest
25 @@ -0,0 +1,2 @@
26 +DIST gentoo-headers-5.10-1.tar.xz 4304 BLAKE2B b5006ff13c8ef8394806919d547f1b15ac32cc4d290e8c5f5a5073f54112db194a9e743177ae54941d8a504e15b662751258259183c47c574936744d7c51b405 SHA512 3154558df20e3a8821af23b2a585eaccb6c40877850b1cf752c435c170f7f322a48e77cee63bcc061b69aff8602987f4506d803c73f394929716295aface4f3d
27 +DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e
28
29 diff --git a/sys-kernel/linux-headers/files/0001-Use-stddefs.h-instead-of-compiler.h.patch b/sys-kernel/linux-headers/files/0001-Use-stddefs.h-instead-of-compiler.h.patch
30 new file mode 100644
31 index 0000000..5598e02
32 --- /dev/null
33 +++ b/sys-kernel/linux-headers/files/0001-Use-stddefs.h-instead-of-compiler.h.patch
34 @@ -0,0 +1,25 @@
35 +From 9eb3c31415686ae1296d7d450f886eeba5861ec1 Mon Sep 17 00:00:00 2001
36 +From: Jory Pratt <anarchy@g.o>
37 +Date: Thu, 3 Jun 2021 18:41:28 -0500
38 +Subject: [PATCH] Use stddefs.h instead of compiler.h
39 +
40 +---
41 + include/uapi/linux/swab.h | 2 +-
42 + 1 file changed, 1 insertion(+), 1 deletion(-)
43 +
44 +diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
45 +index 7272f85..3736f2f 100644
46 +--- a/include/uapi/linux/swab.h
47 ++++ b/include/uapi/linux/swab.h
48 +@@ -3,7 +3,7 @@
49 + #define _UAPI_LINUX_SWAB_H
50 +
51 + #include <linux/types.h>
52 +-#include <linux/compiler.h>
53 ++#include <linux/stddef.h>
54 + #include <asm/bitsperlong.h>
55 + #include <asm/swab.h>
56 +
57 +--
58 +2.31.1
59 +
60
61 diff --git a/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild b/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild
62 new file mode 100644
63 index 0000000..c38b7aa
64 --- /dev/null
65 +++ b/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild
66 @@ -0,0 +1,48 @@
67 +# Copyright 1999-2021 Gentoo Authors
68 +# Distributed under the terms of the GNU General Public License v2
69 +
70 +EAPI="6"
71 +
72 +ETYPE="headers"
73 +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"
74 +inherit kernel-2 toolchain-funcs
75 +detect_version
76 +
77 +PATCH_PV=${PV} # to ease testing new versions against not existing patches
78 +PATCH_VER="1"
79 +SRC_URI="${KERNEL_URI}
80 + ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
81 + ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
82 +"
83 +
84 +KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
85 +
86 +DEPEND="app-arch/xz-utils
87 + dev-lang/perl"
88 +RDEPEND=""
89 +
90 +S=${WORKDIR}/linux-${PV}
91 +
92 +src_unpack() {
93 + unpack ${A}
94 +}
95 +
96 +src_prepare() {
97 + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch
98 +
99 + eapply "${FILESDIR}"/0001-Use-stddefs.h-instead-of-compiler.h.patch
100 +
101 + default
102 +}
103 +
104 +src_test() {
105 + emake headers_check ${xmakeopts}
106 +}
107 +
108 +src_install() {
109 + kernel-2_src_install
110 +
111 + # hrm, build system sucks
112 + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
113 + find "${ED}" -depth -type d -delete 2>/dev/null
114 +}
115
116 diff --git a/sys-kernel/linux-headers/metadata.xml b/sys-kernel/linux-headers/metadata.xml
117 new file mode 100644
118 index 0000000..fcf3f04
119 --- /dev/null
120 +++ b/sys-kernel/linux-headers/metadata.xml
121 @@ -0,0 +1,11 @@
122 +<?xml version="1.0" encoding="UTF-8"?>
123 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
124 +<pkgmetadata>
125 +<maintainer type="project">
126 + <email>toolchain@g.o</email>
127 + <name>Gentoo Toolchain Project</name>
128 +</maintainer>
129 +<upstream>
130 + <remote-id type="cpe">cpe:/o:linux:linux_kernel</remote-id>
131 +</upstream>
132 +</pkgmetadata>