blob: 85773778ac69e809715f093789947d3ab7cdeb72 (
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.10
EAPI=8
CRATES="
ahash@0.7.6
aho-corasick@0.7.20
assert_cmd@2.0.5
atty@0.2.14
autocfg@1.1.0
bitflags@1.3.2
bstr@0.2.17
bumpalo@3.11.1
bytecount@0.6.2
cc@1.0.78
cfg-if@1.0.0
clap@3.1.18
clap_lex@0.2.0
const_format@0.2.23
const_format_proc_macros@0.2.22
crossbeam-channel@0.5.8
crossbeam-deque@0.8.1
crossbeam-epoch@0.9.8
crossbeam-utils@0.8.8
crossterm@0.26.1
crossterm_winapi@0.9.0
ctor@0.1.22
diff@0.1.12
difflib@0.4.0
doc-comment@0.3.3
either@1.6.1
env_logger@0.7.1
fixedbitset@0.4.1
float-cmp@0.9.0
fnv@1.0.7
getrandom@0.2.9
glob@0.3.1
hashbrown@0.11.2
hashbrown@0.12.3
heck@0.4.1
hermit-abi@0.1.19
humansize@2.1.3
humantime@1.3.0
indexmap@1.7.0
itertools@0.10.3
lazy_static@1.4.0
libc@0.2.139
libm@0.2.7
libmimalloc-sys@0.1.24
lock_api@0.4.9
log@0.4.17
memchr@2.5.0
memoffset@0.6.5
mimalloc@0.1.28
minimal-lexical@0.2.1
mio@0.8.5
nom@7.1.1
normalize-line-endings@0.3.0
num-traits@0.2.15
num_cpus@1.13.1
once_cell@1.17.1
os_str_bytes@6.0.1
output_vt100@0.1.3
owo-colors@3.5.0
parking_lot@0.12.1
parking_lot_core@0.9.6
petgraph@0.6.1
predicates-core@1.0.3
predicates-tree@1.0.5
predicates@2.1.1
pretty_assertions@1.3.0
pretty_env_logger@0.4.0
proc-macro2@1.0.66
quick-error@1.2.3
quote@1.0.32
radix-heap@0.4.2
rayon-core@1.11.0
rayon@1.7.0
redox_syscall@0.2.16
regex-automata@0.1.10
regex-syntax@0.6.29
regex@1.7.3
rustc-hash@1.1.0
rustversion@1.0.12
same-file@1.0.6
scopeguard@1.1.0
signal-hook-mio@0.2.3
signal-hook-registry@1.4.0
signal-hook@0.3.14
smallvec@1.10.0
strsim@0.10.0
strum@0.25.0
strum_macros@0.25.1
syn@1.0.95
syn@2.0.27
termcolor@1.1.3
terminal_size@0.1.17
termtree@0.2.4
textwrap@0.15.0
tree-sitter@0.20.9
typed-arena@2.0.1
unicode-ident@1.0.0
unicode-width@0.1.9
unicode-xid@0.2.3
version_check@0.9.4
wait-timeout@0.2.0
walkdir@2.3.3
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.42.0
windows_aarch64_gnullvm@0.42.1
windows_aarch64_msvc@0.42.1
windows_i686_gnu@0.42.1
windows_i686_msvc@0.42.1
windows_x86_64_gnu@0.42.1
windows_x86_64_gnullvm@0.42.1
windows_x86_64_msvc@0.42.1
wu-diff@0.1.2
yansi@0.5.1
"
declare -A GIT_CRATES=(
[tree_magic_mini]='https://github.com/Wilfred/tree_magic;13dd6dda15c7062bd8f7dd5bc9bb5b16ce9ee613;tree_magic-%commit%'
)
inherit cargo
DESCRIPTION="A structural diff that understands syntax."
HOMEPAGE="
http://difftastic.wilfred.me.uk/
https://github.com/wilfred/difftastic
"
SRC_URI="
${CARGO_CRATE_URIS}
https://github.com/Wilfred/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz
"
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT Unlicense ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
QA_FLAGS_IGNORED="usr/bin/difft"
DOCS=(
CHANGELOG.md
README.md
manual/
)
src_prepare() {
rm manual/.gitignore || die
# since upstream is using the patch syntax here, the patch syntax in the user cargo config isn't working
local crate commit path _uri sedexpr
local -a sedexpr
for crate in "${!GIT_CRATES[@]}"; do
IFS=";" read -r _uri commit path <<< "${GIT_CRATES[${crate}]}"
sedexpr+=(
"s@^(${crate}[[:space:]]*=[[:space:]]*[{].*)([[:space:]]*git[[:space:]]*=[[:space:]]*'[[:graph:]]+'[[:space:]]*)(.*[}])@\1path = '${WORKDIR}/${path//%commit%/${commit}}'\3@ ;"
"s@^(${crate}[[:space:]]*=[[:space:]]*[{].*)([,][[:space:]]*branch[[:space:]]*=[[:space:]]*'[[:graph:]]+'[[:space:]]*)(.*[}])@\1\3@ ;"
)
done
sed -r -i "${sedexpr[*]}" "${S}/Cargo.toml" || die
default
}
src_install() {
cargo_src_install
dodoc -r "${DOCS[@]}"
}
|