Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux headers cleanup #24682

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

ETYPE="headers"
H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
Expand All @@ -11,23 +11,24 @@ detect_version
PATCH_VER="1"
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
S="${WORKDIR}/gentoo-headers-base-${PV}"

KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"

DEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"
RDEPEND=""

S=${WORKDIR}/gentoo-headers-base-${PV}
[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} )

src_unpack() {
unpack ${A}
# avoid kernel-2_src_unpack
default
}

src_prepare() {
# avoid kernel-2_src_prepare
default

[[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch
}

src_test() {
Expand All @@ -43,9 +44,10 @@ src_test() {
src_install() {
kernel-2_src_install

find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
find "${ED}" -depth -type d -delete 2>/dev/null
find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die

# provided by libdrm (for now?)
rm -rf "${ED}"/$(kernel_header_destdir)/drm
rm -rf "${ED}"/$(kernel_header_destdir)/drm || die
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

ETYPE="headers"
H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
Expand All @@ -11,23 +11,24 @@ detect_version
PATCH_VER="1"
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
S="${WORKDIR}/gentoo-headers-base-${PV}"

KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"

DEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"
RDEPEND=""

S=${WORKDIR}/gentoo-headers-base-${PV}
[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} )

src_unpack() {
unpack ${A}
# avoid kernel-2_src_unpack
default
}

src_prepare() {
# avoid kernel-2_src_prepare
default

[[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch
}

src_test() {
Expand All @@ -43,6 +44,7 @@ src_test() {
src_install() {
kernel-2_src_install

find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
find "${ED}" -depth -type d -delete 2>/dev/null
find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="6"
EAPI=7

ETYPE="headers"
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"
Expand All @@ -12,25 +12,25 @@ PATCH_VER="1"
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
https://dev.gentoo.org/~sam/distfiles/gentoo-headers-base-${PV}.tar.xz
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}
${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}
"
${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
S="${WORKDIR}/gentoo-headers-base-${PV}"

KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"

DEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"
RDEPEND=""

S=${WORKDIR}/gentoo-headers-base-${PV}
[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} )

src_unpack() {
unpack ${A}
# avoid kernel-2_src_unpack
default
}

src_prepare() {
# avoid kernel-2_src_prepare
default

[[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch
}

src_test() {
Expand All @@ -46,6 +46,7 @@ src_test() {
src_install() {
kernel-2_src_install

find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
find "${ED}" -depth -type d -delete 2>/dev/null
find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

ETYPE="headers"
H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
Expand All @@ -11,23 +11,24 @@ detect_version
PATCH_VER="1"
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
S="${WORKDIR}/gentoo-headers-base-${PV}"

KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"

DEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"
RDEPEND=""

S=${WORKDIR}/gentoo-headers-base-${PV}
[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} )

src_unpack() {
unpack ${A}
# avoid kernel-2_src_unpack
default
}

src_prepare() {
# avoid kernel-2_src_prepare
default

[[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch
}

src_test() {
Expand All @@ -43,6 +44,7 @@ src_test() {
src_install() {
kernel-2_src_install

find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
find "${ED}" -depth -type d -delete 2>/dev/null
find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

ETYPE="headers"
H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
Expand All @@ -11,23 +11,24 @@ detect_version
PATCH_VER="1"
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
S="${WORKDIR}/gentoo-headers-base-${PV}"

KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"

DEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"
RDEPEND=""

S=${WORKDIR}/gentoo-headers-base-${PV}
[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} )

src_unpack() {
unpack ${A}
# avoid kernel-2_src_unpack
default
}

src_prepare() {
# avoid kernel-2_src_prepare
default

[[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch
}

src_test() {
Expand All @@ -43,6 +44,7 @@ src_test() {
src_install() {
kernel-2_src_install

find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
find "${ED}" -depth -type d -delete 2>/dev/null
find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}
28 changes: 16 additions & 12 deletions sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EAPI=7

ETYPE="headers"
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"
inherit kernel-2 toolchain-funcs
inherit kernel-2
detect_version

PATCH_PV=${PV} # to ease testing new versions against not existing patches
Expand All @@ -14,25 +14,28 @@ SRC_URI="${KERNEL_URI}
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
"
S="${WORKDIR}"/linux-${PV}
S="${WORKDIR}/linux-${PV}"

KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"

BDEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"

[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} )

src_unpack() {
unpack ${A}
# avoid kernel-2_src_unpack
default
}

src_prepare() {
[[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch

if use elibc_musl ; then
# TODO: May need forward porting to newer versions
eapply "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
fi
# TODO: May need forward porting to newer versions
use elibc_musl && PATCHES+=(
"${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
)

# avoid kernel-2_src_prepare
default
}

Expand All @@ -43,6 +46,7 @@ src_test() {
src_install() {
kernel-2_src_install

find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
find "${ED}" -depth -type d -delete 2>/dev/null
find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}
17 changes: 10 additions & 7 deletions sys-kernel/linux-headers/linux-headers-5.15-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EAPI=7

ETYPE="headers"
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"
inherit kernel-2 toolchain-funcs
inherit kernel-2
detect_version

PATCH_PV=${PV} # to ease testing new versions against not existing patches
Expand All @@ -17,7 +17,8 @@ S="${WORKDIR}/linux-${PV}"

KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"

BDEPEND="app-arch/xz-utils
BDEPEND="
app-arch/xz-utils
dev-lang/perl"

# bug #816762
Expand All @@ -31,11 +32,11 @@ src_unpack() {
}

src_prepare() {
if use elibc_musl ; then
# TODO: May need forward porting to newer versions
eapply "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
eapply "${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch
fi
# TODO: May need forward porting to newer versions
use elibc_musl && PATCHES+=(
"${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
"${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch
)

# avoid kernel-2_src_prepare
default
Expand All @@ -49,4 +50,6 @@ src_install() {
kernel-2_src_install

find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}
14 changes: 8 additions & 6 deletions sys-kernel/linux-headers/linux-headers-5.16.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EAPI=7

ETYPE="headers"
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"
inherit kernel-2 toolchain-funcs
inherit kernel-2
detect_version

PATCH_PV=${PV} # to ease testing new versions against not existing patches
Expand All @@ -31,11 +31,11 @@ src_unpack() {
}

src_prepare() {
if use elibc_musl ; then
# TODO: May need forward porting to newer versions
eapply "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
eapply "${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch
fi
# TODO: May need forward porting to newer versions
use elibc_musl && PATCHES+=(
"${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
"${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch
)

# avoid kernel-2_src_prepare
default
Expand All @@ -49,4 +49,6 @@ src_install() {
kernel-2_src_install

find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die
# delete empty directories
find "${ED}" -empty -type d -delete || die
}