app-laptop/framework_tool: Add 0.2.1

Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
This commit is contained in:
Yuan Liao
2025-02-13 19:42:42 -05:00
parent 613b8345f3
commit 5051c733aa
2 changed files with 304 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ DIST errno-dragonfly-0.1.2.crate 1810 BLAKE2B 781fc26dce5c33d83b9a1fd9be2b2ce9ac
DIST form_urlencoded-1.1.0.crate 8734 BLAKE2B eaca73d73d16242f3fa3e38e23531c67c01404697bc7b7eb7c64fa04167dcb403a41818487fc46c5d9118842818472d549a2f5fcef5e4d962461e1c103d895d1 SHA512 9e245495dbf235b147e4216b313f2e6a96357d2782a66d71c08c2902c6a065701ca8ecdbb6b2035983a83c44cf36c921b5c71d63af0e02dd39bf5f8347117e11
DIST framework-system-0.1.0_p20240930.tar.gz 1162911 BLAKE2B 3bb12344979ce1eba86cfe51f661bf667d1ce3e48d8ca84a5cdd921439daeed007936cdfe9ed91bf2bc29897386a523907834744dc125dfd6537ae7403b8afa1 SHA512 b09b8d8d1c4cfcdf0e316a4474d8efcd8beca20d4870858eefec4f461b1109beae50d9f2c19557e44ef7d4e454da03c0da58a0d38de4ebfd466aac1ae2bbb65a
DIST framework-system-0.2.0.tar.gz 1169615 BLAKE2B 9197be2e95c3e550c234928d90213215f915cc8cf97b4a526e48b1e91d6c2d532ea101c10cab37a76feb1f3f9f23abb7384c12cd9955bfa75b6b15d852176ca4 SHA512 a31ec2984b215ae407493904e92edb004bdc16ca24e5bc439597ae69dc2544585d02f96951af4de655da759c18621aca13267f3f796bbda8ad01327ee7bac904
DIST framework-system-0.2.1.tar.gz 1169623 BLAKE2B bb3bba98d41c999ca95f5d17cbdd3ceb064f71405dd10a4234d24eb9abe7755ba5b01491dffc57826d382f07093fde17d48e4899089cd3ef0ac11370716282d5 SHA512 35200d08ad6fd753d5578ebee83e05f5d1e36076ecf062c014cae93e13538f2452f97ba9b4f5d0b73c53251510e612e7480ffc716948dfa3e3a78d42dd610496
DIST futures-0.3.30.crate 53828 BLAKE2B 4e595639500f7147ceb994359ef1656ed096ea679409a5721c05ff84ba439fe4e82563a7cf8dca9aed4cd16b03e89ba1385b0a34feed9d4923871225e131b91e SHA512 98fc67bf1047609c8bb0763c00ab9cb39b6a6d0cb7d993bce4966ddc2492a6578b789e98095981b207ddd73ac4b1dfcd5224b352a0e970eed347537c6fbea43e
DIST futures-channel-0.3.30.crate 31736 BLAKE2B 57461dbb723fd53daa07b2fe6164125508cc3901e0138d2a60da5c814ade415a3611baa45c71487f1853812282ef358c132785ff40c630408e8544d57eee3483 SHA512 689531748821529c528772a6dd0f27362078ff5803d2e0b431ee5a0ecf8787b5a15262d65d52f48486ded46b88f7a9c477ad95cc2c5a3e8f5f9b9f53f367832c
DIST futures-core-0.3.30.crate 14071 BLAKE2B 76a9fa5aedd0d4ae8dd9db9639839b6b342125759c1b9f9bbf58aacb4ecca316ff1f24ff8f3c15f559ffbf974e4c2cd02a5418cb4c4d7612dac8449c8234eeb8 SHA512 3c7259ddacbe02e47a84178b75e5f13523bd0c8f8bc0b2375f7ecca60b7075695ee0a5cc4e1c1de26665cf250271173be803661e2f2f53e2a3b96380a8efe7c4

View File

@@ -0,0 +1,303 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
is_live() {
[[ ${PV} == 9999 ]]
}
CRATES="
aho-corasick@1.1.3
android_system_properties@0.1.5
anstream@0.6.15
anstyle-parse@0.2.5
anstyle-query@1.1.1
anstyle-wincon@3.0.4
anstyle@1.0.8
autocfg@1.1.0
bit_field@0.10.1
bitflags@1.3.2
bitflags@2.6.0
block-buffer@0.10.3
built@0.5.2
bumpalo@3.12.1
cargo-lock@8.0.3
cc@1.0.79
cfg-if@1.0.0
cfg_aliases@0.2.1
chrono@0.4.24
clap-verbosity-flag@2.2.1
clap@4.5.13
clap_builder@4.5.13
clap_derive@4.5.13
clap_lex@0.7.2
codespan-reporting@0.11.1
colorchoice@1.0.2
convert_case@0.4.0
core-foundation-sys@0.6.2
core-foundation-sys@0.8.4
core-foundation@0.6.4
cpufeatures@0.2.5
crypto-common@0.1.6
cxx-build@1.0.94
cxx@1.0.94
cxxbridge-flags@1.0.94
cxxbridge-macro@1.0.94
derive_more@0.99.17
digest@0.10.7
env_filter@0.1.2
env_logger@0.11.5
form_urlencoded@1.1.0
futures-channel@0.3.30
futures-core@0.3.30
futures-executor@0.3.30
futures-io@0.3.30
futures-macro@0.3.30
futures-sink@0.3.30
futures-task@0.3.30
futures-util@0.3.30
futures@0.3.30
generic-array@0.14.6
getopts@0.2.21
git2@0.15.0
heck@0.5.0
hidapi@2.6.1
humantime@2.1.0
iana-time-zone-haiku@0.1.1
iana-time-zone@0.1.56
idna@0.3.0
io-kit-sys@0.1.0
is_terminal_polyfill@1.70.1
itoa@1.0.5
jobserver@0.1.26
js-sys@0.3.61
lazy_static@1.4.0
libc@0.2.155
libgit2-sys@0.14.2+1.5.1
libusb1-sys@0.7.0
libz-sys@1.1.9
link-cplusplus@1.0.8
lock_api@0.4.9
log@0.4.22
mach@0.2.3
mach@0.3.2
memchr@2.7.2
memoffset@0.6.5
nix@0.25.1
nix@0.29.0
no-std-compat@0.4.1
num-complex@0.4.2
num-derive@0.4.2
num-integer@0.1.45
num-iter@0.1.43
num-rational@0.4.1
num-traits@0.2.15
num@0.4.0
once_cell@1.16.0
percent-encoding@2.2.0
pin-project-lite@0.2.14
pin-utils@0.1.0
pkg-config@0.3.26
plain@0.2.3
proc-macro2@1.0.86
ptr_meta@0.2.0
ptr_meta_derive@0.2.0
quote@1.0.26
regex-automata@0.4.6
regex-syntax@0.8.3
regex@1.10.6
rusb@0.9.4
rustc_version@0.4.0
ryu@1.0.12
scopeguard@1.1.0
scratch@1.0.5
semver@1.0.17
serde@1.0.151
serde_derive@1.0.151
serde_json@1.0.91
sha2@0.10.8
slab@0.4.9
spin@0.5.2
spin@0.9.8
static_vcruntime@2.0.0
strsim@0.11.1
syn@1.0.107
syn@2.0.13
termcolor@1.1.3
thiserror-impl@1.0.40
thiserror@1.0.40
tinyvec@1.6.0
tinyvec_macros@0.1.1
toml@0.5.11
typenum@1.16.0
ucs2@0.3.2
uefi-macros@0.11.0
unicode-bidi@0.3.13
unicode-ident@1.0.6
unicode-normalization@0.1.22
unicode-width@0.1.10
url@2.3.1
utf8parse@0.2.2
vcpkg@0.2.15
version_check@0.9.4
wasm-bindgen-backend@0.2.84
wasm-bindgen-macro-support@0.2.84
wasm-bindgen-macro@0.2.84
wasm-bindgen-shared@0.2.84
wasm-bindgen@0.2.84
winapi-i686-pc-windows-gnu@0.4.0
winapi-util@0.1.5
winapi-x86_64-pc-windows-gnu@0.4.0
winapi@0.3.9
windows-core@0.52.0
windows-core@0.59.0
windows-implement@0.52.0
windows-implement@0.59.0
windows-interface@0.52.0
windows-interface@0.59.0
windows-result@0.3.0
windows-strings@0.3.0
windows-sys@0.48.0
windows-sys@0.52.0
windows-targets@0.48.0
windows-targets@0.52.6
windows-targets@0.53.0
windows@0.48.0
windows@0.52.0
windows@0.59.0
windows_aarch64_gnullvm@0.48.0
windows_aarch64_gnullvm@0.52.6
windows_aarch64_gnullvm@0.53.0
windows_aarch64_msvc@0.48.0
windows_aarch64_msvc@0.52.6
windows_aarch64_msvc@0.53.0
windows_i686_gnu@0.48.0
windows_i686_gnu@0.52.6
windows_i686_gnu@0.53.0
windows_i686_gnullvm@0.52.6
windows_i686_gnullvm@0.53.0
windows_i686_msvc@0.48.0
windows_i686_msvc@0.52.6
windows_i686_msvc@0.53.0
windows_x86_64_gnu@0.48.0
windows_x86_64_gnu@0.52.6
windows_x86_64_gnu@0.53.0
windows_x86_64_gnullvm@0.48.0
windows_x86_64_gnullvm@0.52.6
windows_x86_64_gnullvm@0.53.0
windows_x86_64_msvc@0.48.0
windows_x86_64_msvc@0.52.6
windows_x86_64_msvc@0.53.0
wmi@0.13.3
"
if ! is_live; then
GIT_COMMIT_RUST_HWIO="9bcff4277d8f3d7dce2b12c6ad81d092ae35c4ba"
GIT_COMMIT_SMBIOS_LIB="b3e2fff8a6f4b8c2d729467cbbf0c8c41974cd1c"
GIT_COMMIT_UEFI_RS="76130a0f1c1585012e598b8c514526bac09c68e0"
declare -A GIT_CRATES=(
[redox_hwio]="https://github.com/FrameworkComputer/rust-hwio;${GIT_COMMIT_RUST_HWIO};rust-hwio-%commit%"
[smbios-lib]="https://github.com/FrameworkComputer/smbios-lib;${GIT_COMMIT_SMBIOS_LIB}"
[uefi]="https://github.com/FrameworkComputer/uefi-rs;${GIT_COMMIT_UEFI_RS};uefi-rs-%commit%/uefi"
[uefi-services]="https://github.com/FrameworkComputer/uefi-rs;${GIT_COMMIT_UEFI_RS};uefi-rs-%commit%/uefi-services"
)
fi
inherit cargo
MY_PN="framework-system"
if is_live; then
inherit git-r3
EGIT_REPO_URI="https://github.com/FrameworkComputer/framework-system.git"
else
if [[ ${PV} == *_pre* || ${PV} == *_p* ]]; then
GIT_COMMIT=""
[[ -n ${GIT_COMMIT} ]] ||
die "GIT_COMMIT is not defined for snapshot ebuild"
MY_PV="${GIT_COMMIT}"
MY_P="${MY_PN}-${MY_PV}"
else
MY_PV="v${PV}"
MY_P="${MY_PN}-${PV}"
fi
SRC_URI="
https://github.com/FrameworkComputer/framework-system/archive/${MY_PV}.tar.gz -> ${MY_PN}-${PV}.tar.gz
${CARGO_CRATE_URIS}
"
S="${WORKDIR}/${MY_P}"
KEYWORDS="~amd64"
fi
DESCRIPTION="Tool to interact with a Framework Laptop's hardware system"
HOMEPAGE="https://github.com/FrameworkComputer/framework-system"
LICENSE="BSD"
# Crate licenses
LICENSE+=" Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 Boost-1.0 MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
SLOT="0"
RDEPEND="
virtual/libudev:=
virtual/libusb:1
"
DEPEND="
${RDEPEND}
"
DOCS=( README.md support-matrices.md )
# Usual setting for a Rust package
QA_FLAGS_IGNORED="usr/bin/framework_tool"
src_unpack() {
if is_live; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_prepare() {
default
# Upstream uses [patch] on some dependencies in Cargo.toml,
# which are not patched by cargo.eclass's ${ECARGO_HOME}/config
local crate commit crate_uri crate_dir
local -a sed_scripts
for crate in "${!GIT_CRATES[@]}"; do
IFS=';' read -r \
crate_uri commit crate_dir <<< "${GIT_CRATES[${crate}]}"
# Taken from dev-util/difftastic::gentoo ebuilds
sed_scripts+=(
"s|^(${crate}[[:space:]]*=[[:space:]]*[{].*)([[:space:]]*git[[:space:]]*=[[:space:]]*['\"][[:graph:]]+['\"][[:space:]]*)(.*[}])|\1path = '${WORKDIR}/${crate_dir//%commit%/${commit}}'\3|;"
"s|^(${crate}[[:space:]]*=[[:space:]]*[{].*)([,][[:space:]]*branch[[:space:]]*=[[:space:]]*['\"][[:graph:]]+['\"][[:space:]]*)(.*[}])|\1\3|;"
)
done
sed -i -E -e "${sed_scripts[*]}" Cargo.toml ||
die "Failed to override dependencies in Cargo.toml"
}
src_install() {
dobin "$(cargo_target_dir)/framework_tool"
einstalldocs
}
pkg_postinst() {
[[ -n ${REPLACING_VERSIONS} ]] && return
elog "Framework Laptop 13 Ryzen 7040 Series users might need to"
elog "follow these steps to use most features of framework_tool:"
elog
elog "1. Disable kernel_lockdown(7)"
elog "2. Run 'framework_tool' with option '--driver portio'"
elog
elog "For more information, please consult:"
elog " https://github.com/FrameworkComputer/framework-system/issues/20"
}