mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-kernel/scx: add 1.0.13
Signed-off-by: Violet Purcell <vimproved@inventati.org> Part-of: https://github.com/gentoo/gentoo/pull/42615 Closes: https://github.com/gentoo/gentoo/pull/42615 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
6186b66680
commit
7cea2a158f
@@ -5,3 +5,5 @@ DIST scx-1.0.11.tar.gz 4665784 BLAKE2B fe22bc65e7ffe548d363f000abe6f246d0b22b73c
|
||||
DIST scx-1.0.12-crates.tar.xz 30612908 BLAKE2B eb18a835fff1a6482ab0a745355de64b9bba557bc574fb7b7f94c3115b8bd23b31fb5ac1944e95f70f9d50b1a146cabbf45ec7117ba03323e53687afcf344355 SHA512 b0fffefdfd44b2f326898bc6fd757d69f2445a8916061128058764e904ee4c21e1a41f0328e1e2db81c1d913442c734f27eb0ba825c935a1aba70ad6ad5f97e0
|
||||
DIST scx-1.0.12-remove-unnecessary-rustc-requirement.patch 917 BLAKE2B 4cb308340492e26fa47c7a1cc01d99ad8c4f5edc76a47136fa7893b005dc09de8b3f05edf84b42bc26860b94d2b47c1056d4a56c5594c849a1d568040251d434 SHA512 da3b83e89aeccbfa241f43422a8f1b2b1a8a678e2948bb8596816e35f65c73cba04af2200c7793def5b78832794b295e7704438ae4e3c6dfa3bc77300438cfc3
|
||||
DIST scx-1.0.12.tar.gz 4702884 BLAKE2B fe812e98986bd6eda63f6a0b51774da08e75832805e27e57085a0eee8f8b5309d56daeee8d28ad7dda54f980442fa7a1834474edaff98fd984e4ed523c9a115e SHA512 5ee06c65c516b3f9a72d81865efb05dab68552ce781b856eb936622b9afe0935f1423f92daddb5b17e3159d6574bb79fa6c4dcc15a8a124ee0c23fe212458632
|
||||
DIST scx-1.0.13-crates.tar.xz 32013000 BLAKE2B ffb07ed99b740a0d76289f6f99cb6432a920cdc049eef030b90a8df256ab359c59a0db438736cbdf9eac1f06faeac6a439765ec0aa4d54c03e21cbc8747bb2c1 SHA512 63dcc8e05045902017dc9d123dd2ca33f95971137369b2b2a42b88bb0eb2e81c0314319222639b499c1b4b62b77ad305572563fbe380a664f842f9fa523999d2
|
||||
DIST scx-1.0.13.tar.gz 4824853 BLAKE2B 9630b758e1b9aca4ac8c3e78541c483384ff0962fe957c4b2ab51d463a5dc9dcd29b59a9414f688e1a5d7e8232cba884a740a18d4a1e11d59fa95c117e61ed06 SHA512 23ebe4dba95d194ad0436a44f750d3104b240c97a22194dc08725a278b62f49ee52bc93623be63fcea167b08400938ed7129594f68d78b194e9c030b5305402d
|
||||
|
||||
129
sys-kernel/scx/scx-1.0.13.ebuild
Normal file
129
sys-kernel/scx/scx-1.0.13.ebuild
Normal file
@@ -0,0 +1,129 @@
|
||||
# Copyright 2024-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( {16..20} )
|
||||
|
||||
CRATES="
|
||||
"
|
||||
|
||||
RUST_MIN_VER="1.74.1"
|
||||
|
||||
inherit llvm-r2 linux-info cargo rust-toolchain toolchain-funcs meson
|
||||
|
||||
DESCRIPTION="sched_ext schedulers and tools"
|
||||
HOMEPAGE="https://github.com/sched-ext/scx"
|
||||
SRC_URI="
|
||||
https://github.com/sched-ext/scx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
if [[ ${PKGBUMPING} != ${PVR} ]]; then
|
||||
SRC_URI+="
|
||||
https://github.com/gentoo-crate-dist/scx/releases/download/v${PV}/scx-${PV}-crates.tar.xz
|
||||
"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
# Dependent crate licenses
|
||||
LICENSE+="
|
||||
Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 Unicode-3.0 ZLIB
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="systemd"
|
||||
|
||||
DEPEND="
|
||||
virtual/libelf:=
|
||||
sys-libs/zlib:=
|
||||
>=dev-libs/libbpf-1.5:=
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
app-misc/jq
|
||||
>=dev-util/bpftool-7.5.0
|
||||
$(llvm_gen_dep '
|
||||
llvm-core/clang:${LLVM_SLOT}=[llvm_targets_BPF(-)]
|
||||
')
|
||||
"
|
||||
|
||||
CONFIG_CHECK="
|
||||
~BPF
|
||||
~BPF_EVENTS
|
||||
~BPF_JIT
|
||||
~BPF_SYSCALL
|
||||
~DEBUG_INFO_BTF
|
||||
~FTRACE
|
||||
~SCHED_CLASS_EXT
|
||||
"
|
||||
|
||||
QA_PREBUILT="/usr/bin/scx_loader"
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
llvm-r2_pkg_setup
|
||||
rust_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
# Inject the rust_abi value into install_rust_user_scheds
|
||||
sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \
|
||||
meson-scripts/install_rust_user_scheds || die
|
||||
fi
|
||||
|
||||
# bug #944832
|
||||
sed -i 's;^#!/usr/bin/;#!/sbin/;' \
|
||||
services/openrc/scx.initrd || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
|
||||
|
||||
local emesonargs=(
|
||||
-Dbpf_clang="$(get_llvm_prefix)/bin/clang"
|
||||
-Dbpftool=disabled
|
||||
-Dlibbpf_a=disabled
|
||||
-Dcargo="${EPREFIX}/usr/bin/cargo"
|
||||
-Dcargo_home="${ECARGO_HOME}"
|
||||
-Doffline=true
|
||||
-Denable_rust=true
|
||||
-Dlibalpm=disabled
|
||||
-Dopenrc=disabled
|
||||
$(meson_feature systemd)
|
||||
)
|
||||
|
||||
cargo_env meson_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cargo_env meson_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cargo_env meson_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cargo_env meson_src_install
|
||||
|
||||
dodoc README.md
|
||||
|
||||
local readme readme_name
|
||||
for readme in scheds/{rust,c}/*/README.md ./rust/*/README.md; do
|
||||
[[ -e ${readme} ]] || continue
|
||||
readme_name="${readme#*/rust/}"
|
||||
readme_name="${readme_name#*/c/}"
|
||||
readme_name="${readme_name%/README.md}"
|
||||
newdoc "${readme}" "${readme_name}.md"
|
||||
done
|
||||
|
||||
newinitd services/openrc/scx.initrd scx
|
||||
insinto /etc/default
|
||||
doins services/scx
|
||||
dosym ../default/scx /etc/conf.d/scx
|
||||
}
|
||||
Reference in New Issue
Block a user