summaryrefslogtreecommitdiff
blob: c9a4d40bfb753e56aeca49bfd6cf584f6d7f7efc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CRATES="
	adler32@1.2.0
	ahash@0.7.6
	anstream@0.6.4
	anstyle-parse@0.2.3
	anstyle-query@1.0.1
	anstyle-wincon@3.0.2
	anstyle@1.0.4
	atty@0.2.14
	autocfg@1.1.0
	bitflags@1.3.2
	bitflags@2.3.3
	cfg-if@1.0.0
	clap@3.2.25
	clap@4.4.11
	clap_builder@4.4.11
	clap_derive@4.4.7
	clap_lex@0.2.4
	clap_lex@0.6.0
	colorchoice@1.0.0
	crc-catalog@2.2.0
	crc32fast@1.3.2
	crc@3.0.1
	dlv-list@0.3.0
	getrandom@0.2.10
	gpt@3.1.0
	hashbrown@0.12.3
	heck@0.4.1
	hermit-abi@0.1.19
	indexmap@1.9.3
	libc@0.2.147
	log@0.4.19
	memoffset@0.7.1
	nix@0.26.2
	once_cell@1.18.0
	ordered-multimap@0.4.3
	os_str_bytes@6.5.1
	pin-utils@0.1.0
	proc-macro2@1.0.70
	quote@1.0.33
	rust-ini@0.18.0
	static_assertions@1.1.0
	strsim@0.10.0
	syn@2.0.39
	termcolor@1.2.0
	textwrap@0.16.0
	unicode-ident@1.0.12
	utf8parse@0.2.1
	uuid@1.4.0
	version_check@0.9.4
	wasi@0.11.0+wasi-snapshot-preview1
	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-sys@0.52.0
	windows-targets@0.52.0
	windows_aarch64_gnullvm@0.52.0
	windows_aarch64_msvc@0.52.0
	windows_i686_gnu@0.52.0
	windows_i686_msvc@0.52.0
	windows_x86_64_gnu@0.52.0
	windows_x86_64_gnullvm@0.52.0
	windows_x86_64_msvc@0.52.0
"

inherit cargo linux-info

# Releases are not tagged
COMMIT="36302336f7e07080e289baccda8d07c7c1a9d00d"
MY_P="asahi-nvram-${COMMIT}"
DESCRIPTION="CLI boot disk selector for Apple Silicon Macs"
HOMEPAGE="https://github.com/WhatAmISupposedToPutHere/asahi-nvram"

SRC_URI="
	${CARGO_CRATE_URIS}
	https://github.com/WhatAmISupposedToPutHere/asahi-nvram/archive/${COMMIT}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/${MY_P}/asahi-bless"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+=" MIT Unicode-DFS-2016 ZLIB"
SLOT="0"
KEYWORDS="~arm64"

pkg_setup() {
	linux-info_pkg_setup
	rust_pkg_setup
}

pkg_pretend() {
	if use kernel_linux; then
		linux_config_exists || die "No suitable kernel configuration could be found"
		CONFIG_EXTRA="~MTD_SPI_NOR"
		check_extra_config
	fi
}