|
| 1 | +# Copyright 2021-2023 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=8 |
| 5 | + |
| 6 | +CRATES=" |
| 7 | + aho-corasick-0.7.20 |
| 8 | + aho-corasick-1.0.1 |
| 9 | + ammonia-3.3.0 |
| 10 | + android_system_properties-0.1.5 |
| 11 | + anstream-0.3.2 |
| 12 | + anstyle-1.0.0 |
| 13 | + anstyle-parse-0.2.0 |
| 14 | + anstyle-query-1.0.0 |
| 15 | + anstyle-wincon-1.0.1 |
| 16 | + anyhow-1.0.71 |
| 17 | + assert_cmd-2.0.11 |
| 18 | + autocfg-1.1.0 |
| 19 | + base64-0.13.1 |
| 20 | + base64-0.21.0 |
| 21 | + bit-set-0.5.3 |
| 22 | + bit-vec-0.6.3 |
| 23 | + bitflags-1.3.2 |
| 24 | + block-buffer-0.10.4 |
| 25 | + bstr-1.4.0 |
| 26 | + bumpalo-3.12.2 |
| 27 | + byteorder-1.4.3 |
| 28 | + bytes-1.4.0 |
| 29 | + cc-1.0.79 |
| 30 | + cfg-if-1.0.0 |
| 31 | + chrono-0.4.24 |
| 32 | + clap-4.2.7 |
| 33 | + clap_builder-4.2.7 |
| 34 | + clap_complete-4.2.3 |
| 35 | + clap_lex-0.4.1 |
| 36 | + colorchoice-1.0.0 |
| 37 | + core-foundation-sys-0.8.4 |
| 38 | + cpufeatures-0.2.7 |
| 39 | + crossbeam-channel-0.5.8 |
| 40 | + crossbeam-utils-0.8.15 |
| 41 | + crypto-common-0.1.6 |
| 42 | + ctor-0.1.26 |
| 43 | + diff-0.1.13 |
| 44 | + difflib-0.4.0 |
| 45 | + digest-0.10.6 |
| 46 | + doc-comment-0.3.3 |
| 47 | + either-1.8.1 |
| 48 | + elasticlunr-rs-3.0.2 |
| 49 | + env_logger-0.10.0 |
| 50 | + errno-0.2.8 |
| 51 | + errno-0.3.1 |
| 52 | + errno-dragonfly-0.1.2 |
| 53 | + fastrand-1.9.0 |
| 54 | + filetime-0.2.21 |
| 55 | + float-cmp-0.9.0 |
| 56 | + fnv-1.0.7 |
| 57 | + form_urlencoded-1.1.0 |
| 58 | + fsevent-sys-4.1.0 |
| 59 | + futf-0.1.5 |
| 60 | + futures-channel-0.3.28 |
| 61 | + futures-core-0.3.28 |
| 62 | + futures-macro-0.3.28 |
| 63 | + futures-sink-0.3.28 |
| 64 | + futures-task-0.3.28 |
| 65 | + futures-util-0.3.28 |
| 66 | + generic-array-0.14.7 |
| 67 | + getrandom-0.2.9 |
| 68 | + globset-0.4.10 |
| 69 | + h2-0.3.19 |
| 70 | + handlebars-4.3.7 |
| 71 | + hashbrown-0.12.3 |
| 72 | + headers-0.3.8 |
| 73 | + headers-core-0.2.0 |
| 74 | + hermit-abi-0.2.6 |
| 75 | + hermit-abi-0.3.1 |
| 76 | + html5ever-0.26.0 |
| 77 | + http-0.2.9 |
| 78 | + http-body-0.4.5 |
| 79 | + httparse-1.8.0 |
| 80 | + httpdate-1.0.2 |
| 81 | + humantime-2.1.0 |
| 82 | + hyper-0.14.26 |
| 83 | + iana-time-zone-0.1.56 |
| 84 | + iana-time-zone-haiku-0.1.2 |
| 85 | + idna-0.3.0 |
| 86 | + ignore-0.4.20 |
| 87 | + indexmap-1.9.3 |
| 88 | + inotify-0.9.6 |
| 89 | + inotify-sys-0.1.5 |
| 90 | + instant-0.1.12 |
| 91 | + io-lifetimes-1.0.10 |
| 92 | + is-terminal-0.4.7 |
| 93 | + itertools-0.10.5 |
| 94 | + itoa-1.0.6 |
| 95 | + js-sys-0.3.62 |
| 96 | + kqueue-1.0.7 |
| 97 | + kqueue-sys-1.0.3 |
| 98 | + lazy_static-1.4.0 |
| 99 | + libc-0.2.144 |
| 100 | + linux-raw-sys-0.1.4 |
| 101 | + linux-raw-sys-0.3.7 |
| 102 | + lock_api-0.4.9 |
| 103 | + log-0.4.17 |
| 104 | + mac-0.1.1 |
| 105 | + maplit-1.0.2 |
| 106 | + markup5ever-0.11.0 |
| 107 | + markup5ever_rcdom-0.2.0 |
| 108 | + memchr-2.5.0 |
| 109 | + mime-0.3.17 |
| 110 | + mime_guess-2.0.4 |
| 111 | + mio-0.8.5 |
| 112 | + new_debug_unreachable-1.0.4 |
| 113 | + normalize-line-endings-0.3.0 |
| 114 | + notify-5.1.0 |
| 115 | + notify-debouncer-mini-0.2.1 |
| 116 | + num-integer-0.1.45 |
| 117 | + num-traits-0.2.15 |
| 118 | + num_cpus-1.15.0 |
| 119 | + once_cell-1.17.1 |
| 120 | + opener-0.5.2 |
| 121 | + output_vt100-0.1.3 |
| 122 | + parking_lot-0.12.1 |
| 123 | + parking_lot_core-0.9.6 |
| 124 | + percent-encoding-2.2.0 |
| 125 | + pest-2.6.0 |
| 126 | + pest_derive-2.6.0 |
| 127 | + pest_generator-2.6.0 |
| 128 | + pest_meta-2.6.0 |
| 129 | + phf-0.10.1 |
| 130 | + phf_codegen-0.10.0 |
| 131 | + phf_generator-0.10.0 |
| 132 | + phf_shared-0.10.0 |
| 133 | + pin-project-1.1.0 |
| 134 | + pin-project-internal-1.1.0 |
| 135 | + pin-project-lite-0.2.9 |
| 136 | + pin-utils-0.1.0 |
| 137 | + ppv-lite86-0.2.17 |
| 138 | + precomputed-hash-0.1.1 |
| 139 | + predicates-2.1.5 |
| 140 | + predicates-3.0.3 |
| 141 | + predicates-core-1.0.6 |
| 142 | + predicates-tree-1.0.9 |
| 143 | + pretty_assertions-1.3.0 |
| 144 | + proc-macro2-1.0.56 |
| 145 | + pulldown-cmark-0.9.3 |
| 146 | + quote-1.0.27 |
| 147 | + rand-0.8.5 |
| 148 | + rand_chacha-0.3.1 |
| 149 | + rand_core-0.6.4 |
| 150 | + redox_syscall-0.2.16 |
| 151 | + regex-1.8.1 |
| 152 | + regex-automata-0.1.10 |
| 153 | + regex-syntax-0.7.1 |
| 154 | + rustix-0.36.7 |
| 155 | + rustix-0.37.19 |
| 156 | + rustls-pemfile-1.0.2 |
| 157 | + ryu-1.0.13 |
| 158 | + same-file-1.0.6 |
| 159 | + scoped-tls-1.0.1 |
| 160 | + scopeguard-1.1.0 |
| 161 | + select-0.6.0 |
| 162 | + semver-1.0.17 |
| 163 | + serde-1.0.163 |
| 164 | + serde_derive-1.0.163 |
| 165 | + serde_json-1.0.96 |
| 166 | + serde_urlencoded-0.7.1 |
| 167 | + sha1-0.10.5 |
| 168 | + sha2-0.10.6 |
| 169 | + shlex-1.1.0 |
| 170 | + siphasher-0.3.10 |
| 171 | + slab-0.4.8 |
| 172 | + smallvec-1.10.0 |
| 173 | + socket2-0.4.9 |
| 174 | + string_cache-0.8.7 |
| 175 | + string_cache_codegen-0.5.2 |
| 176 | + strsim-0.10.0 |
| 177 | + syn-1.0.105 |
| 178 | + syn-2.0.15 |
| 179 | + tempfile-3.4.0 |
| 180 | + tendril-0.4.3 |
| 181 | + termcolor-1.2.0 |
| 182 | + terminal_size-0.2.6 |
| 183 | + termtree-0.4.1 |
| 184 | + thiserror-1.0.40 |
| 185 | + thiserror-impl-1.0.40 |
| 186 | + thread_local-1.1.7 |
| 187 | + tinyvec-1.6.0 |
| 188 | + tinyvec_macros-0.1.1 |
| 189 | + tokio-1.28.1 |
| 190 | + tokio-macros-2.1.0 |
| 191 | + tokio-stream-0.1.14 |
| 192 | + tokio-tungstenite-0.18.0 |
| 193 | + tokio-util-0.7.8 |
| 194 | + toml-0.5.11 |
| 195 | + topological-sort-0.2.2 |
| 196 | + tower-service-0.3.2 |
| 197 | + tracing-0.1.37 |
| 198 | + tracing-core-0.1.31 |
| 199 | + try-lock-0.2.4 |
| 200 | + tungstenite-0.18.0 |
| 201 | + typenum-1.16.0 |
| 202 | + ucd-trie-0.1.5 |
| 203 | + unicase-2.6.0 |
| 204 | + unicode-bidi-0.3.13 |
| 205 | + unicode-ident-1.0.8 |
| 206 | + unicode-normalization-0.1.22 |
| 207 | + url-2.3.1 |
| 208 | + utf-8-0.7.6 |
| 209 | + utf8parse-0.2.1 |
| 210 | + version_check-0.9.4 |
| 211 | + wait-timeout-0.2.0 |
| 212 | + walkdir-2.3.3 |
| 213 | + want-0.3.0 |
| 214 | + warp-0.3.5 |
| 215 | + wasi-0.11.0+wasi-snapshot-preview1 |
| 216 | + wasm-bindgen-0.2.85 |
| 217 | + wasm-bindgen-backend-0.2.85 |
| 218 | + wasm-bindgen-macro-0.2.85 |
| 219 | + wasm-bindgen-macro-support-0.2.85 |
| 220 | + wasm-bindgen-shared-0.2.85 |
| 221 | + winapi-0.3.9 |
| 222 | + winapi-i686-pc-windows-gnu-0.4.0 |
| 223 | + winapi-util-0.1.5 |
| 224 | + winapi-x86_64-pc-windows-gnu-0.4.0 |
| 225 | + windows-0.48.0 |
| 226 | + windows-sys-0.42.0 |
| 227 | + windows-sys-0.48.0 |
| 228 | + windows-targets-0.48.0 |
| 229 | + windows_aarch64_gnullvm-0.42.0 |
| 230 | + windows_aarch64_gnullvm-0.48.0 |
| 231 | + windows_aarch64_msvc-0.42.0 |
| 232 | + windows_aarch64_msvc-0.48.0 |
| 233 | + windows_i686_gnu-0.42.0 |
| 234 | + windows_i686_gnu-0.48.0 |
| 235 | + windows_i686_msvc-0.42.0 |
| 236 | + windows_i686_msvc-0.48.0 |
| 237 | + windows_x86_64_gnu-0.42.0 |
| 238 | + windows_x86_64_gnu-0.48.0 |
| 239 | + windows_x86_64_gnullvm-0.42.0 |
| 240 | + windows_x86_64_gnullvm-0.48.0 |
| 241 | + windows_x86_64_msvc-0.42.0 |
| 242 | + windows_x86_64_msvc-0.48.0 |
| 243 | + xml5ever-0.17.0 |
| 244 | + yansi-0.5.1" |
| 245 | +inherit cargo toolchain-funcs |
| 246 | + |
| 247 | +DESCRIPTION="Create a book from markdown files" |
| 248 | +HOMEPAGE="https://rust-lang.github.io/mdBook/" |
| 249 | +SRC_URI=" |
| 250 | + https://github.com/rust-lang/mdBook/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz |
| 251 | + $(cargo_crate_uris)" |
| 252 | +S="${WORKDIR}/${P/b/B}" |
| 253 | + |
| 254 | +# CC-BY-4.0/OFL-1.1: embeds fonts inside the executable |
| 255 | +LICENSE="Apache-2.0 Artistic-2 BSD CC-BY-4.0 CC0-1.0 ISC MIT MPL-2.0 OFL-1.1 Unicode-DFS-2016" |
| 256 | +SLOT="0" |
| 257 | +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
| 258 | +IUSE="doc" |
| 259 | + |
| 260 | +QA_FLAGS_IGNORED="usr/bin/${PN}" |
| 261 | + |
| 262 | +src_compile() { |
| 263 | + cargo_src_compile |
| 264 | + |
| 265 | + if use doc; then |
| 266 | + if tc-is-cross-compiler; then |
| 267 | + ewarn "html docs were skipped due to cross-compilation" |
| 268 | + else |
| 269 | + target/$(usex debug{,} release)/${PN} build -d html guide || die |
| 270 | + fi |
| 271 | + fi |
| 272 | +} |
| 273 | + |
| 274 | +src_install() { |
| 275 | + cargo_src_install |
| 276 | + |
| 277 | + dodoc CHANGELOG.md README.md |
| 278 | + use doc && ! tc-is-cross-compiler && dodoc -r guide/html |
| 279 | +} |
0 commit comments