mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
119 lines
6.2 KiB
Bash
119 lines
6.2 KiB
Bash
# Copyright 2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# Autogenerated by pycargoebuild 0.15.0
|
|
|
|
EAPI=8
|
|
|
|
RUST_MIN_VER="1.92.0"
|
|
|
|
CRATES=" "
|
|
|
|
TYPST_HASH="391c2dcd698aabf2917db0336868d16f197057d9"
|
|
TYPST_TS_HASH="bd58ec034584828c272fac1b842acad5b1d79e61"
|
|
XILEM_HASH="abe7da9eae473d4f09a7e69a058c31cfe6d3b2e3"
|
|
|
|
declare -A GIT_CRATES=(
|
|
[docx-rs]="https://github.com/Myriad-Dreamin/docx-rs;db49a729f68dbdb9e8e91857fbb1c3d414209871;docx-rs-%commit%/docx-core"
|
|
[linebender_include_doc_path]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/include_doc_path"
|
|
[masonry]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/masonry"
|
|
[masonry_core]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/masonry_core"
|
|
[masonry_testing]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/masonry_testing"
|
|
[masonry_winit]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/masonry_winit"
|
|
[tree_arena]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/tree_arena"
|
|
[xilem]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/xilem"
|
|
[xilem_core]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/xilem_core"
|
|
[xilem_masonry]="https://github.com/Myriad-dreamin/xilem;${XILEM_HASH};xilem-%commit%/xilem_masonry"
|
|
[reflexo-typst2vec]="https://github.com/Myriad-Dreamin/typst.ts;${TYPST_TS_HASH};typst.ts-%commit%/crates/conversion/typst2vec"
|
|
[reflexo-typst]="https://github.com/Myriad-Dreamin/typst.ts;${TYPST_TS_HASH};typst.ts-%commit%/crates/reflexo-typst"
|
|
[reflexo-vec2svg]="https://github.com/Myriad-Dreamin/typst.ts;${TYPST_TS_HASH};typst.ts-%commit%/crates/conversion/vec2svg"
|
|
[reflexo]="https://github.com/Myriad-Dreamin/typst.ts;${TYPST_TS_HASH};typst.ts-%commit%/crates/reflexo"
|
|
[typst-bundle]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-bundle"
|
|
[typst-eval]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-eval"
|
|
[typst-html]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-html"
|
|
[typst-layout]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-layout"
|
|
[typst-library]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-library"
|
|
[typst-macros]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-macros"
|
|
[typst-pdf]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-pdf"
|
|
[typst-realize]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-realize"
|
|
[typst-render]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-render"
|
|
[typst-svg]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-svg"
|
|
[typst-syntax]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-syntax"
|
|
[typst-timing]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-timing"
|
|
[typst-utils]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst-utils"
|
|
[typst]="https://github.com/Myriad-Dreamin/typst;${TYPST_HASH};typst-%commit%/crates/typst"
|
|
[typstfmt]="https://github.com/Myriad-Dreamin/typstfmt;cdfe44ed065a90d80040c3b29dee7ed431a710ee;typstfmt-%commit%"
|
|
[typst-ansi-hl]="https://github.com/Myriad-Dreamin/typst-ansi-hl;3867cb7229ec6b3e3c8f5b1222af96f98bba9bff;typst-ansi-hl-%commit%/lib"
|
|
[typstyle-core]="https://github.com/Myriad-Dreamin/typstyle;992f36112200bc0ea61df8a7c2af6d9ae56781dd;typstyle-%commit%/crates/typstyle-core"
|
|
[typst-dev-assets]="https://github.com/typst/typst-dev-assets;29753d6069349e7fe4e5f75dcb2e77ff1adc5fac;typst-dev-assets-%commit%"
|
|
[wasm-minimal-protocol]="https://github.com/astrale-sharp/wasm-minimal-protocol;c51acd43095fe9da8fa943e064618e486fd2b58d;wasm-minimal-protocol-%commit%/crates/macro"
|
|
)
|
|
|
|
inherit cargo shell-completion
|
|
|
|
DESCRIPTION="An integrated language service for Typst"
|
|
HOMEPAGE="https://github.com/Myriad-Dreamin/tinymist"
|
|
SRC_URI="
|
|
https://github.com/Myriad-Dreamin/tinymist/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
|
https://github.com/TimovVeen/tinymist/releases/download/v${PV}/tinymist-${PV}-crates.tar.xz
|
|
${CARGO_CRATE_URIS}
|
|
"
|
|
|
|
LICENSE="Apache-2.0"
|
|
# Dependent crate licenses
|
|
LICENSE+="
|
|
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
|
|
CC0-1.0 CDLA-Permissive-2.0 EUPL-1.2 ISC LGPL-3+ MIT MPL-2.0
|
|
Unicode-3.0 ZLIB
|
|
"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64"
|
|
|
|
# e2e tests hang
|
|
RESTRICT="test"
|
|
|
|
QA_FLAGS_IGNORED="usr/bin/tinymist"
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
# Taken from app-laptop/framework_tool::gentoo,
|
|
# adapted to also remove the tag field
|
|
# 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}]}"
|
|
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|;"
|
|
"s|^(${crate}[[:space:]]*=[[:space:]]*[{].*)([,][[:space:]]*tag[[:space:]]*=[[:space:]]*['\"][[:graph:]]+['\"][[:space:]]*)(.*[}])|\1\3|;"
|
|
"s|^(${crate}[[:space:]]*=[[:space:]]*[{].*)([,][[:space:]]*rev[[:space:]]*=[[:space:]]*['\"][[:graph:]]+['\"][[:space:]]*)(.*[}])|\1\3|;"
|
|
)
|
|
done
|
|
sed -i -E -e "${sed_scripts[*]}" Cargo.toml ||
|
|
die "Failed to override dependencies in Cargo.toml"
|
|
}
|
|
|
|
src_configure() {
|
|
cargo_src_configure --bin tinymist
|
|
}
|
|
|
|
src_compile() {
|
|
cargo_src_compile
|
|
|
|
"$(cargo_target_dir)"/tinymist completion bash > tinymist || die
|
|
"$(cargo_target_dir)"/tinymist completion fish > tinymist.fish || die
|
|
"$(cargo_target_dir)"/tinymist completion zsh > _tinymist || die
|
|
}
|
|
|
|
src_install() {
|
|
cargo_src_install --path ./crates/tinymist-cli
|
|
|
|
dobashcomp tinymist
|
|
dofishcomp tinymist.fish
|
|
dozshcomp _tinymist
|
|
}
|