From af57d73ad9def499457cd07ff55ee97e5f6c4825 Mon Sep 17 00:00:00 2001 From: Robert Siebeck Date: Thu, 16 Apr 2026 08:53:18 +0200 Subject: [PATCH] app-editors/zed: add 0.232.2 Signed-off-by: Robert Siebeck Part-of: https://codeberg.org/gentoo/gentoo/pulls/644 Signed-off-by: Joonas Niilola --- app-editors/zed/Manifest | 3 + app-editors/zed/zed-0.232.2.ebuild | 264 +++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+) create mode 100644 app-editors/zed/zed-0.232.2.ebuild diff --git a/app-editors/zed/Manifest b/app-editors/zed/Manifest index 099860773cd56..61482dfa8b84e 100644 --- a/app-editors/zed/Manifest +++ b/app-editors/zed/Manifest @@ -11,6 +11,7 @@ DIST livekit-rust-sdks-147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1.gh.tar.gz 960435 DIST livekit-rust-sdks-37835f840d0070d45ac8b31cce6a6ae7aca3f459.gh.tar.gz 6843725 BLAKE2B dc4c855a63e16ea50c9aabf09b8b3498a6388d0a77dbc1c01f3eab9b2f7ecb4fec61af9d32144ded3ca2d13f3e0642fab5a3e8ec455fa358a0747f495403022b SHA512 40d735c0ab28535b97193d134f3359866780a101967a71c10e4cf35a45f6e7938473554b326e75a9ab8fc38e635a31fa657f19d7d87b0f688fc028dabc0953b7 DIST livekit-rust-sdks-5f04705ac3f356350ae31534ffbc476abc9ea83d.gh.tar.gz 6248604 BLAKE2B d9185f7f05a0f872b4931be08ea6700b17a35d011ece757e8e2188bda1b0257843b925709c1e778f820a728942020bdcbd5f9c17e9cd638acc1c250d6cbb66d4 SHA512 731cdf1781744d25f553f917e030d5009952dfe159852c58d07178e18e88cd8e7b6001e2c6b8c7ccef346ed878010d681a1e841c1bea30d74b480584e3ae6525 DIST lsp-types-a4f410987660bf560d1e617cb78117c6b6b9f599.gh.tar.gz 73865 BLAKE2B 2120cb8a8e9b4df03c2f37d44ec2c6431492c1b16c00fc4b9df9b69eae14909b5b01d879c7004742d81917a231c574c0a035ced64914b52e5d458796955e1f11 SHA512 7f46b369978e63ed9580cc3e82ca2ec8165adac29e49d163e433724b40d05e1946b417da9ed76b9ea6d490530a3a8cddac3d410458534cc780c54ddd8f166028 +DIST lsp-types-c7396459fefc7886b4adfa3b596832405ae1e880.gh.tar.gz 73880 BLAKE2B 72cfef0ef28347dc701bfed5db4e00130583c506014f6a8d271329e787d073c676ee605583d1ec88bb64696a61245f2b66865e45f0d7e240d96a09bb3d40b5db SHA512 f949c8b74227b231d246e1df78ba898de7074782ebedd182d020798aa891347ed4c83d561c49b2892fc48cbe0f2327329231d5da459d0e0f387abde726c44067 DIST mermaid-rs-renderer-374db9ead5426697c6c2111151d9f246899bc638.gh.tar.gz 12938717 BLAKE2B bc092e6f6b66478a443ba801a5f62824032d3f81390166e498f8639fdc119311b7d31fd7b18ad03c3560c4b01215f005fdbd6442dd3f66b8bed83e31a2eac433 SHA512 d59445252b14fbb04d374b3856ca8648c008a6ab0486ed5a8f042c824cdcf5ff2439c5cdd5415392416583c0cb4e9d4dc56869525d9fbcbd81d5c8abff214bb3 DIST mermaid-rs-renderer-9d8360d9cea10dc4bc86d7b8012cc6e9656e6cf2.gh.tar.gz 12935471 BLAKE2B d3d6397174449a13f532fa4bd83112069c7421ac9dab7b1a76cab11672a528769267ea23324962b706073d557ac2109124a6167e701303e9bebc8ac8519f6251 SHA512 3a43df92e2490f98b6d24e6073c38c7922d98757b43440e70b3eb466ec876f4764e1745aee31cfa1183b180038bfbc8034af52d6661122a51b939ddb94b019d5 DIST notify-ce58c24cad542c28e04ced02e20325a4ec28a31d.gh.tar.gz 108952 BLAKE2B ab6a1c7a66b551eb4168ccebf4d61dd792b9d8707ddc66720407c638ede06c74144b45d76e9cb7f33e4dd9fa519f3a020d0fcd231ed8cb3a8f23cae27991f0b9 SHA512 6cbb8b85a58d86b4f62331a84c10b76909542a8e696d4394c0798bb6ed273633c5ea85e495d0e756c4cd636307927880fab5c519defc363d7bceae42bf7a288b @@ -48,3 +49,5 @@ DIST zed-0.230.1-crates.tar.xz 119571256 BLAKE2B 0971ea8e6c35e4d6eaea115c10718cf DIST zed-0.230.1.tar.gz 25435113 BLAKE2B 329fd575a64034d7e0e115a5dd28f46553f5c024f260b650c4bfa2e5eadd679a0cfa67b97c084e85d3aea6dcbfd536546274cc6e33af9adbc5299d72a872bb6a SHA512 859fead0f3936fe7b3129af635f4fb6b50efdd1f7f7bef7bd5fc71996fd46bf562e3738c122605e268ab7d6a3db51b9f56aa5e1441b3f0f3fc2e7cb8748a3177 DIST zed-0.231.2-crates.tar.xz 120017692 BLAKE2B 625ed5ef02839e5d767042141258f6e30ae767fbebf8979b5f843aa4301dba75d83b4cc0ad0a7a891431f10bb5222f5a0ea990cd9d37cd6c48a52fe8d60b1858 SHA512 e040236dcc2a632461be3a0661c162252f2a708c4c8b7551cd627dee469e8dc7ea30d8edb6752292754e08fc6193791b9622d3ff3fc803517463e8c2a34df166 DIST zed-0.231.2.tar.gz 25427592 BLAKE2B 92631dfe700abb478e1b8be05998ac9a56dad15c01fa9ffd77cb0b14a2bb9e00c22a136db6e538ae98f455fbafc25058fc271d5bda8c14a305f1e0209013f432 SHA512 b2173a649137ede4e041cf3fc512d682b956323ae0ea645827ee6f908b67581022f2c7c8b2668318dca21aca3fd9e0cbf0e6a51213774efd99e3fdc4f80bc089 +DIST zed-0.232.2-crates.tar.xz 120525176 BLAKE2B 20251061aeba66477dcb965163fa6667ace233e2ce6d9ac7167ff50bb245c26a6f9fde28f2d66130b620ef1ab620b2e10b1254cb4f2331277e5160fc3c34ec5d SHA512 470a06fc1f9e5414b9aa116b39084f534e0bbfc2edbf8511df0f6504dc2120fcf22593f1f284be02e4e31a1f167d2f32950ca588f4cb5545cced2ebbcab60d10 +DIST zed-0.232.2.tar.gz 25444527 BLAKE2B 3faf6058dae15c92d25271993ce4fbf95c1a507e42d8c3c71998209ebd546cb1705195099017fa417ccb3c6f080bb369cfb9a49f2728eba6e8dd27d06dbc1445 SHA512 ff7cf9dcce4912ddd4805671110f88793ad288001cd5d4900ed0a2b053fa96ff05958f3dd8294fc60fb875ebdaca04fad9c8ff5c066bccb80c06557d6ae1e26c diff --git a/app-editors/zed/zed-0.232.2.ebuild b/app-editors/zed/zed-0.232.2.ebuild new file mode 100644 index 0000000000000..069927ba9ed46 --- /dev/null +++ b/app-editors/zed/zed-0.232.2.ebuild @@ -0,0 +1,264 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.15.1 + +EAPI=8 + +CRATES=" +" + +declare -A GIT_CRATES=( + [alacritty_terminal]='https://github.com/zed-industries/alacritty;9d9640d4e56d67a09d049f9c0a300aae08d4f61e;alacritty-%commit%/alacritty_terminal' + [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%' + [async-task]='https://github.com/smol-rs/async-task;b4486cd71e4e94fbda54ce6302444de14f4d190e;async-task-%commit%' + [calloop]='https://github.com/zed-industries/calloop;eb6b4fd17b9af5ecc226546bdd04185391b3e265;calloop-%commit%' + [candle-core]='https://github.com/zed-industries/candle;724d75eb3deebefe83f2a7381a45d4fac6eda383;candle-%commit%/candle-core' + [candle-nn]='https://github.com/zed-industries/candle;724d75eb3deebefe83f2a7381a45d4fac6eda383;candle-%commit%/candle-nn' + [candle-onnx]='https://github.com/zed-industries/candle;724d75eb3deebefe83f2a7381a45d4fac6eda383;candle-%commit%/candle-onnx' + [dap-types]='https://github.com/zed-industries/dap-types;1b461b310481d01e02b2603c16d7144b926339f8;dap-types-%commit%/dap-types' + [gh-workflow-macros]='https://github.com/zed-industries/gh-workflow;37f3c0575d379c218a9c455ee67585184e40d43f;gh-workflow-%commit%/crates/gh-workflow-macros' + [gh-workflow]='https://github.com/zed-industries/gh-workflow;37f3c0575d379c218a9c455ee67585184e40d43f;gh-workflow-%commit%/crates/gh-workflow' + [libwebrtc]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/libwebrtc' + [livekit-api]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/livekit-api' + [livekit-protocol]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/livekit-protocol' + [livekit-runtime]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/livekit-runtime' + [livekit]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/livekit' + [lsp-types]='https://github.com/zed-industries/lsp-types;c7396459fefc7886b4adfa3b596832405ae1e880;lsp-types-%commit%' + [mermaid-rs-renderer]='https://github.com/zed-industries/mermaid-rs-renderer;374db9ead5426697c6c2111151d9f246899bc638;mermaid-rs-renderer-%commit%' + [naga]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/naga' + [notify-types]='https://github.com/zed-industries/notify;ce58c24cad542c28e04ced02e20325a4ec28a31d;notify-%commit%/notify-types' + [notify]='https://github.com/zed-industries/notify;ce58c24cad542c28e04ced02e20325a4ec28a31d;notify-%commit%/notify' + [nvim-rs]='https://github.com/KillTheMule/nvim-rs;764dd270c642f77f10f3e19d05cc178a6cbe69f3;nvim-rs-%commit%' + [pet-conda]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-conda' + [pet-core]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-core' + [pet-env-var-path]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-env-var-path' + [pet-fs]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-fs' + [pet-global-virtualenvs]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-global-virtualenvs' + [pet-homebrew]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-homebrew' + [pet-jsonrpc]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-jsonrpc' + [pet-linux-global-python]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-linux-global-python' + [pet-mac-commandlinetools]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-mac-commandlinetools' + [pet-mac-python-org]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-mac-python-org' + [pet-mac-xcode]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-mac-xcode' + [pet-pipenv]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-pipenv' + [pet-pixi]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-pixi' + [pet-poetry]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-poetry' + [pet-pyenv]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-pyenv' + [pet-python-utils]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-python-utils' + [pet-reporter]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-reporter' + [pet-telemetry]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-telemetry' + [pet-uv]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-uv' + [pet-venv]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-venv' + [pet-virtualenv]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-virtualenv' + [pet-virtualenvwrapper]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-virtualenvwrapper' + [pet-windows-registry]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-windows-registry' + [pet-windows-store]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-windows-store' + [pet-winpython]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet-winpython' + [pet]='https://github.com/microsoft/python-environment-tools;9e61a22af989fe54937bf07c9f9cff1bc53d9056;python-environment-tools-%commit%/crates/pet' + [proptest-macro]='https://github.com/proptest-rs/proptest;3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b;proptest-%commit%/proptest-macro' + [proptest]='https://github.com/proptest-rs/proptest;3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b;proptest-%commit%/proptest' + [rodio]='https://github.com/RustAudio/rodio;e50e726ddd0292f6ef9de0dda6b90af4ed1fb66a;rodio-%commit%' + [tiktoken-rs]='https://github.com/zed-industries/tiktoken-rs;2570c4387a8505fb8f1d3f3557454b474f1e8271;tiktoken-rs-%commit%/tiktoken-rs' + [tree-sitter-cpp]='https://github.com/tree-sitter/tree-sitter-cpp;5cb9b693cfd7bfacab1d9ff4acac1a4150700609;tree-sitter-cpp-%commit%' + [tree-sitter-gitcommit]='https://github.com/zed-industries/tree-sitter-git-commit;88309716a69dd13ab83443721ba6e0b491d37ee9;tree-sitter-git-commit-%commit%' + [tree-sitter-gomod]='https://github.com/camdencheek/tree-sitter-go-mod;2e886870578eeba1927a2dc4bd2e2b3f598c5f9a;tree-sitter-go-mod-%commit%' + [tree-sitter-gowork]='https://github.com/zed-industries/tree-sitter-go-work;acb0617bf7f4fda02c6217676cc64acb89536dc7;tree-sitter-go-work-%commit%' + [tree-sitter-heex]='https://github.com/zed-industries/tree-sitter-heex;1dd45142fbb05562e35b2040c6129c9bca346592;tree-sitter-heex-%commit%' + [tree-sitter-md]='https://github.com/tree-sitter-grammars/tree-sitter-markdown;9a23c1a96c0513d8fc6520972beedd419a973539;tree-sitter-markdown-%commit%' + [tree-sitter-typescript]='https://github.com/zed-industries/tree-sitter-typescript;e2c53597d6a5d9cf7bbe8dccde576fe1e46c5899;tree-sitter-typescript-%commit%' + [tree-sitter-yaml]='https://github.com/zed-industries/tree-sitter-yaml;baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a;tree-sitter-yaml-%commit%' + [webrtc-sys-build]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/webrtc-sys/build' + [webrtc-sys]='https://github.com/zed-industries/livekit-rust-sdks;147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1;livekit-rust-sdks-%commit%/webrtc-sys' + [wgpu-core-deps-apple]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-core/platform-deps/apple' + [wgpu-core-deps-emscripten]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-core/platform-deps/emscripten' + [wgpu-core-deps-windows-linux-android]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-core/platform-deps/windows-linux-android' + [wgpu-core]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-core' + [wgpu-hal]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-hal' + [wgpu-naga-bridge]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-naga-bridge' + [wgpu-types]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu-types' + [wgpu]='https://github.com/zed-industries/wgpu;a466bc382ea747f8e1ac810efdb6dcd49a514575;wgpu-%commit%/wgpu' + [windows-capture]='https://github.com/zed-industries/windows-capture;f0d6c1b6691db75461b732f6d5ff56eed002eeb9;windows-capture-%commit%' + [wprcontrol]='https://github.com/zed-industries/wprcontrol;cd811f7d744f65291e13131b1d907fda63ed91a1;wprcontrol-%commit%' + [xim-ctext]='https://github.com/zed-industries/xim-rs;16f35a2c881b815a2b6cdfd6687988e84f8447d8;xim-rs-%commit%/xim-ctext' + [xim-parser]='https://github.com/zed-industries/xim-rs;16f35a2c881b815a2b6cdfd6687988e84f8447d8;xim-rs-%commit%/xim-parser' + [zed-font-kit]='https://github.com/zed-industries/font-kit;110523127440aefb11ce0cf280ae7c5071337ec5;font-kit-%commit%' + [zed-reqwest]='https://github.com/zed-industries/reqwest;c15662463bda39148ba154100dd44d3fba5873a4;reqwest-%commit%' + [zed-scap]='https://github.com/zed-industries/scap;4afea48c3b002197176fb19cd0f9b180dd36eaac;scap-%commit%' + [zed-xim]='https://github.com/zed-industries/xim-rs;16f35a2c881b815a2b6cdfd6687988e84f8447d8;xim-rs-%commit%' +) + +LLVM_COMPAT=( 21 ) +RUST_MIN_VER="1.94.0" +RUST_NEEDS_LLVM=1 +WEBRTC_COMMIT="0001d84-2" + +inherit cargo check-reqs desktop flag-o-matic llvm-r1 toolchain-funcs xdg + +DESCRIPTION="The fast, collaborative code editor" +HOMEPAGE="https://zed.dev https://github.com/zed-industries/zed" +SRC_URI=" + https://github.com/zed-industries/zed/archive/refs/tags/v${PV/_/-}.tar.gz -> ${P}.tar.gz + https://github.com/gentoo-crate-dist/zed/releases/download/v${PV/_/-}/${P/_/-}-crates.tar.xz + amd64? ( + https://github.com/livekit/rust-sdks/releases/download/webrtc-${WEBRTC_COMMIT}/webrtc-linux-x64-release.zip -> + webrtc-${WEBRTC_COMMIT}-linux-x64-release.zip + ) + arm64? ( + https://github.com/livekit/rust-sdks/releases/download/webrtc-${WEBRTC_COMMIT}/webrtc-linux-arm64-release.zip -> + webrtc-${WEBRTC_COMMIT}-linux-arm64-release.zip + ) + ${CARGO_CRATE_URIS}" + +S="${WORKDIR}/${PN}-${PV/_/-}" +LICENSE="GPL-3+" +# license for fuchsia-cprng-0.1.1, which is not set correctly in crate +LICENSE+=" BSD" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 ISC + LGPL-3 MIT MIT-0 MPL-2.0 UoI-NCSA openssl Unicode-3.0 ZLIB BZIP2 +" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +CHECKREQS_DISK_BUILD="18G" +CHECKREQS_MEMORY="8G" + +DEPEND=" + dev-libs/glib:2 + dev-libs/wayland + || ( + media-fonts/dejavu + media-fonts/cantarell + media-fonts/noto + media-fonts/ubuntu-font-family + ) + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + media-libs/libpulse + media-libs/vulkan-loader[X] + media-video/pipewire + sys-apps/xdg-desktop-portal + virtual/zlib:= + x11-libs/libX11 + x11-libs/libxcb:= + x11-libs/libxkbcommon[X] +" +RDEPEND="${DEPEND}" +BDEPEND=" + app-arch/unzip + dev-build/cmake + dev-libs/wayland-protocols + dev-util/wayland-scanner + dev-util/vulkan-headers + sys-devel/gettext + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT}= + llvm-core/llvm:${LLVM_SLOT}= + ') +" + +QA_FLAGS_IGNORED="usr/bin/zedit" + +pkg_setup() { + if tc-is-lto; then + if tc-is-gcc; then + export CARGO_PROFILE_RELEASE_LTO="true" + elif tc-is-clang; then + export CARGO_PROFILE_RELEASE_LTO="thin" + fi + else + export CARGO_PROFILE_RELEASE_LTO="false" + fi + + strip-unsupported-flags + # flags from upstream + export RUSTFLAGS="${RUSTFLAGS} -C symbol-mangling-version=v0 --cfg tokio_unstable -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib" + llvm-r1_pkg_setup + rust_pkg_setup +} + +src_prepare() { + default + + export APP_CLI="zedit" + export APP_ICON="zed" + if [[ "${PV}" == *pre ]]; then + export APP_ID="dev.zed.Zed-Preview" + else + export APP_ID="dev.zed.Zed" + fi + export APP_NAME="Zed" + export APP_ARGS="%U" + export DO_STARTUP_NOTIFY="true" + envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die + + # Cargo offline fetch workaround + local ASYNC_TASK_COMMIT="b4486cd71e4e94fbda54ce6302444de14f4d190e" + local ASYNC_TASK_GIT="async-task = { git = \"https://github.com/smol-rs/async-task.git\", rev = \"${ASYNC_TASK_COMMIT}\"" + local ASYNC_TASK_PATH="async-task = \\{ path = \"${WORKDIR}/async-task-${ASYNC_TASK_COMMIT}\"" + + local CALLOOP_COMMIT="eb6b4fd17b9af5ecc226546bdd04185391b3e265" + local CALLOOP_GIT="calloop = { git = \"https://github.com/zed-industries/calloop\"" + local CALLOOP_PATH="calloop = \\{ path = \"${WORKDIR}/calloop-${CALLOOP_COMMIT}\"" + + local LIVEKIT_COMMIT="147fbca3d4b592d96d33f5e6a84b59fc0b5d9bf1" + local LIVEKIT_GIT="livekit = { git = \"https://github.com/zed-industries/livekit-rust-sdks\", rev = \"${LIVEKIT_COMMIT}\"" + local LIVEKIT_PATH="livekit = \\{ path = \"${WORKDIR}/livekit-rust-sdks-${LIVEKIT_COMMIT}/livekit\"" + + local LIBWERBRTC_GIT="libwebrtc = { git = \"https://github.com/zed-industries/livekit-rust-sdks\", rev = \"${LIVEKIT_COMMIT}\"" + local LIBWERBRTC_PATH="libwebrtc = \\{ path = \"${WORKDIR}/livekit-rust-sdks-${LIVEKIT_COMMIT}/libwebrtc\"" + + local WEBRTC_SYS_GIT="webrtc-sys = { git = \"https://github.com/zed-industries/livekit-rust-sdks\", rev = \"${LIVEKIT_COMMIT}\"" + local WEBRTC_SYS_PATH="webrtc-sys = \\{ path = \"${WORKDIR}/livekit-rust-sdks-${LIVEKIT_COMMIT}/webrtc-sys\"" + + local NOTIFY_COMMIT="ce58c24cad542c28e04ced02e20325a4ec28a31d" + local NOTIFY_GIT="notify = { git = \"https://github.com/zed-industries/notify.git\", rev = \"${NOTIFY_COMMIT}\"" + local NOTIFY_PATH="notify = \\{ path = \"${WORKDIR}/notify-${NOTIFY_COMMIT}/notify\"" + local NOTIFY_TYPES_GIT="notify-types = { git = \"https://github.com/zed-industries/notify.git\", rev = \"${NOTIFY_COMMIT}\"" + local NOTIFY_TYPES_PATH="notify-types = \\{ path = \"${WORKDIR}/notify-${NOTIFY_COMMIT}/notify-types\"" + + local WIN_CAP_COMMIT="f0d6c1b6691db75461b732f6d5ff56eed002eeb9" + local WIN_CAP_GIT="windows-capture = { git = \"https://github.com/zed-industries/windows-capture.git\", rev = \"${WIN_CAP_COMMIT}\"" + local WIN_CAP_PATH="windows-capture = \\{ path = \"${WORKDIR}/windows-capture-${WIN_CAP_COMMIT}\"" + + sed -e "s#${ASYNC_TASK_GIT}#${ASYNC_TASK_PATH}#" \ + -e "s#${CALLOOP_GIT}#${CALLOOP_PATH}#" \ + -e "s#${LIVEKIT_GIT}#${LIVEKIT_PATH}#" \ + -e "s#${LIBWERBRTC_GIT}#${LIBWERBRTC_PATH}#" \ + -e "s#${WEBRTC_SYS_GIT}#${WEBRTC_SYS_PATH}#" \ + -e "s#${NOTIFY_GIT}#${NOTIFY_PATH}#" \ + -e "s#${NOTIFY_TYPES_GIT}#${NOTIFY_TYPES_PATH}#" \ + -e "s#${WIN_CAP_GIT}#${WIN_CAP_PATH}#" \ + -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed" +} + +src_compile() { + export RELEASE_VERSION="${PV}" + export ZED_UPDATE_EXPLANATION='Updates are handled by portage' + if use arm64; then + export LK_CUSTOM_WEBRTC="${WORKDIR}/linux-arm64-release" + elif use amd64; then + export LK_CUSTOM_WEBRTC="${WORKDIR}/linux-x64-release" + fi + cargo_src_compile --package zed --package cli +} + +src_install() { + newbin $(cargo_target_dir)/cli ${APP_CLI} + exeinto "/usr/libexec" + newexe $(cargo_target_dir)/zed zed-editor + + newicon -s 512 crates/zed/resources/app-icon.png zed.png + newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png + domenu "${S}/${APP_ID}.desktop" +} + +src_test () { + mkdir -p "${HOME}/.config/zed" || die + mkdir -p "${HOME}/.local/share/zed/logs/" || die + + SHELL=/usr/bin/sh RUST_BACKTRACE=full cargo_src_test -vv \ + -- --skip zed::tests::test_window_edit_state_restoring_enabled +}