sys-kernel/scx: add 1.0.11

Signed-off-by: Violet Purcell <vimproved@inventati.org>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Violet Purcell
2025-04-04 21:46:28 -04:00
committed by Sam James
parent 7c2017d86a
commit 548161ad01
2 changed files with 129 additions and 0 deletions

View File

@@ -162,6 +162,8 @@ DIST ryu-1.0.18.crate 47713 BLAKE2B 409cdf4b4e77685394018371e91ad6fdb175ac57e1df
DIST same-file-1.0.6.crate 10183 BLAKE2B a320c8343e0b38078ba81c4f0159d886bf47764c74efe0d7cd2b3218426e8341b51e523c00a9e5fbc2ee1057618296bd70b576c68751bd55d6ddb352defaca15 SHA512 3ba35309742c8db63210d9ea78bff4ecd80471d69e6238eb96c7bf0673814f221e2d838fe6311bfc5a0e71b4a7ccba33e07859c0b9cff2171969ff08a4214a7c
DIST scx-1.0.10-crates.tar.xz 29845260 BLAKE2B 366a068bfb81f7be8d167831ace5c933c4af51b7ff1ec93e2b0dd398c4a1a098ffe286b750f46554a0440d325ba51f1a5aba5ac91c1e157ab8a2ae2dbd789200 SHA512 5d0e37d703b7c2d70eaef8eb6854d693eb0b32937f64f1d0b4a9186d57872610ef6d7d0cd5419b44dfd5c5063c370cfc9feeba59e97824539fe0573d92d8cf3a
DIST scx-1.0.10.tar.gz 4634807 BLAKE2B 84a396b451a74be275730cd5d00c4476ad9b38008087594d11b80581d851f3ca7449367ace796888dbec66a66a165202c9d7b7bb060fe29cdc8d89673122b3ed SHA512 143bcd93d5c1f73d6d2b366460c702e14d7c6d5c7d83d9c83ff561e8b329d8520a8009c4551fce0775efe4d065f6cb6c2550dc626509170b6a7fe36aa884c3c4
DIST scx-1.0.11-crates.tar.xz 29897084 BLAKE2B a1296db87cdc61b1c78a196878500f6e6a8de8cfa7d4cf55127a1ad589fcfdadca21d7034a1855d712f61e616bd726c12aaadc4823583a5a9b496d9cc9dc7d72 SHA512 5c3e9961b82c2bfa94dddecb01094bd1fec9084c66feb84043e182fc1cedb15bc7d8f5e2219bfb35781046931fae7866d20ce86c5866dba325d5f352c028a8b8
DIST scx-1.0.11.tar.gz 4665784 BLAKE2B fe22bc65e7ffe548d363f000abe6f246d0b22b73c2c1e87eed76c22f62e71390426859e5ae56f15aaeac5786d0a9204b8fe3bce8b29329001ec0233ab16138f8 SHA512 21b75384ce29cae3b0cb8afbc18fa38a5aadc2444b2bd1f20ff44c4ebc81ad1bea8be14e95259c4a2e8753152dd448173f465a9e3ffa479bcd0b145b17630f4b
DIST scx-1.0.8.tar.gz 4206261 BLAKE2B af9b832945ec99a188d437cd4ce898a93768910661bed8a48c8c8d4a93e0550c9f34d356a7b4c78bbf4afb8477f52c475eb0cfd3d6c91913556d473a9972b8b8 SHA512 dc9352a6d131b4dcda1a721dd792bebc159f439cef8b14d2c9b065c3144892931dfec23f5db802efb13d3961a00a36720f0295553099dcfa88b33dce6cbeebcf
DIST scx-1.0.9.tar.gz 4552837 BLAKE2B 5f6aa0c37cc62f59ea87bf881f0aae41d94fb2884e140cffdfdb70a52a7330aaebcc483aff350c80172983061ee339e50dc4d2c480ada0d53c8c7391a51b547e SHA512 d17d0203d0f7144de72ecca37f8a9a8bcfa8b68c70a20a985bfcca16f49bce9cda8a5de57a6f2852ed679721b28bdb53ec3a01d0c17b4d0123eeb56e4ce8990f
DIST scx-v1.0.9-crates.tar.xz 29505484 BLAKE2B 45ebc950b118535630ae0161721aa32fe0f1f9457e0146b26570bf46b7411c335882009ad8c4d640e8cdb06439423618c6ca60485fd21725e6893697ef379adb SHA512 ada609aa5f9d9a5523e037c48f6bbd65e82ea19bc6a0a293cb8f9ff1a3a12a26b3dcab182af2b207051ea4e900af903f3c4352553b2a9147d8c44ed805af74a2

View File

@@ -0,0 +1,127 @@
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {16..19} )
CRATES="
"
RUST_MIN_VER="1.74.1"
inherit llvm-r1 linux-info cargo rust-toolchain 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-r1_pkg_setup
rust_pkg_setup
}
src_prepare() {
default
# 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
# 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
}