sys-kernel/linux-headers: pass xmakeopts to src_test()
[gentoo.git] / sys-kernel / linux-headers / linux-headers-5.6.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 ETYPE="headers"
7 H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa"
8 inherit kernel-2 toolchain-funcs
9 detect_version
10
11 PATCH_PV=${PV} # to ease testing new versions against not existing patches
12 PATCH_VER="1"
13 SRC_URI="${KERNEL_URI}
14         ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
15         ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
16 "
17
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
19
20 DEPEND="app-arch/xz-utils
21         dev-lang/perl"
22 RDEPEND=""
23
24 S=${WORKDIR}/linux-${PV}
25
26 src_unpack() {
27         unpack ${A}
28 }
29
30 src_prepare() {
31         [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch
32
33         default
34 }
35
36 src_install() {
37         kernel-2_src_install
38
39         # hrm, build system sucks
40         find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
41         find "${ED}" -depth -type d -delete 2>/dev/null
42 }
43
44 src_test() {
45         emake headers_check ${xmakeopts}
46 }