diff --git a/app-editors/zed/Manifest b/app-editors/zed/Manifest index 5b12a8d4ca38a..16fcafae6bf14 100644 --- a/app-editors/zed/Manifest +++ b/app-editors/zed/Manifest @@ -17,6 +17,7 @@ DIST mermaid-rs-renderer-782b89a7da3f0e91e51f98d00a93acba679be6fb.gh.tar.gz 1074 DIST merman-06094471f97acb10d0eebf8b92bac19ba2928eea.gh.tar.gz 26429187 BLAKE2B f1b46c398de07924fb1a28e0624d8c2f31658ac7e82794d48d0f59c80c50df377d497aba74dabf9011de6805fa4e0fd9be6de6cbd3ca5b00a3f18ecf5d329c5c SHA512 ea8fba639ef8e1292ef3f076cafff48c3bb0a68363fdc9c23478796313c2c8500b10a924cbc4ae49e1d9af2432aac557ff7b05b4327ce33c9dd5fdb75b1c71c7 DIST notify-6566ae63331ffd1f2025b18dc00c3049fb8588c9.gh.tar.gz 111740 BLAKE2B 1bdc51c52387a503279403ab883c8c384a14df44a7e1f25930c4fd7a296db4ecd890f6c3a2d4dfb4b37ad4aa0e9666fd7d429dd8f522addbf5ed1d4d9f34e7fd SHA512 c9d9d27b986d5a64f81423639da8d6ebe8abe6f56e15762070477c2983fd1b356ff51d9b9a4530716c3ea7ffda790256465fc0b17507f70b920a3635af50e1d4 DIST notify-ce58c24cad542c28e04ced02e20325a4ec28a31d.gh.tar.gz 108952 BLAKE2B ab6a1c7a66b551eb4168ccebf4d61dd792b9d8707ddc66720407c638ede06c74144b45d76e9cb7f33e4dd9fa519f3a020d0fcd231ed8cb3a8f23cae27991f0b9 SHA512 6cbb8b85a58d86b4f62331a84c10b76909542a8e696d4394c0798bb6ed273633c5ea85e495d0e756c4cd636307927880fab5c519defc363d7bceae42bf7a288b +DIST notify-faecbc33db4f59313e5225ef766bfd9e54a54cfd.gh.tar.gz 183796 BLAKE2B 9295442dd962b798d029886c5a228ed5ab776c4232eaaa5773d43e62bb01868df47c3a708706420dd3bfb7568af031a0e1cbcf8fb443ee055188b599bc71b835 SHA512 4f41e736a26f9fd84d3c5c2b5ddbac05bd464400b12c4751d48063aaf3c7b451cd937364003d45bb8ca8964b576c10db89bf14edbaf6589161ad4f56616c6ef0 DIST nvim-rs-764dd270c642f77f10f3e19d05cc178a6cbe69f3.gh.tar.gz 49979 BLAKE2B 63c2e181cdce292349f07375d5b23e30f0a4de1f872040d3a572f228147d9812bf94ab9799889d89ec0fb5de2fb8a46a8a92af392d65fb221dc91d1954dbcb20 SHA512 1d62d2bd4385dfb15e4aa52d5b823472011ea29a5faf6cc51a01b5c281502aaea78ea103838a4af15f8c36da2d26964f5fad5645cd033c761691d7bf8d2c1fb6 DIST proptest-3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b.gh.tar.gz 342971 BLAKE2B a95c6f840159b1a335b1e2b8696105a0cf42a393c704ff136942a87e6618c13cae30904be08648b6ba7993016733c68be2d0d05e405ad1338f9902e48eac7454 SHA512 c2d1e0e933b7e26fc807934cc508d7437240ea00335e2ae44e830455c3eda91ac26200eaa9ad4695e2354f128454e1d0ad3bf9c882a943f79a7937d375b260a8 DIST python-environment-tools-9e61a22af989fe54937bf07c9f9cff1bc53d9056.gh.tar.gz 1567623 BLAKE2B 173f8dfa42012ddffc867330c443b139203e906fd6d15e4513bc3bce8c9bf32e3ef518b9bd04a7f45b1d86de938cee46b639fc8c43a26c2bda301e0e100381c5 SHA512 884e580ef4e3c0b5273dff87347c4072507cf7fda243148ed9f77bdc0c08841f302173198653d250155cf5f1f2efc5458614fffcad37e6275102f8832748d437 @@ -50,3 +51,5 @@ DIST zed-1.4.2-crates.tar.xz 126909544 BLAKE2B af37a3f75e00f73e6b54b903e4fc02c66 DIST zed-1.4.2.tar.gz 25873630 BLAKE2B 64201cc8203fe17f8e5f350cb03446b023d4b2a54994d61744ba3dd1b92b80c8eb8bdfc71fda36bb2bb288989ed464b407efa4fe17355f642c6b7307ee85792f SHA512 5b4b3aa982abc84ff4f7035391ac43d9a1bdb0ebf1608e81a8f4d0a43bbc09f3e7d29051b4cc20dda7dd3270a90377bad0129a0f70e2f7b68fb4f0433b36c99a DIST zed-1.6.3-crates.tar.xz 128620612 BLAKE2B 3917d9421deb12176139070cd9b5dbedd908759c85325a43686fc9bbd2f11925f137e5c4f54fe20c62b10a29cf9fd1468e5b574cc2ae60ae3cffe460203d5dc0 SHA512 a4967db3fed81751e0441c28e0e4ae8299bb3669e6e9059bad3fe602f2a64ebc1036635053af71da65fca5870cf1e5a202ce174918ae44adfa43f9a2d0e7c6b7 DIST zed-1.6.3.tar.gz 22482062 BLAKE2B 970a37cdb88937a1d4c5903926218f51c18dfef6daecfa2e5918607a4f0eda6ddf6ee04b9571605f3f21833b153cbe0d0cfa38062c69dd1529c8324d9b3c8e2c SHA512 2d1bcf5c868f20e4acaa6f373d7c2c17100bbeae5783cfb45879a8545e23f481f2a4556834c7a483c6fb0d3b1c8ae118141a0d84da20f312194a1921ea2e4b4e +DIST zed-1.7.2-crates.tar.xz 128771124 BLAKE2B 76718a96a8783dd53c1e8ec90d75076550db76c17cdcd441533388418723f9d0fd2482b532de29453320efa0d8ce277f17e36411abec321bd5bda411a18c6976 SHA512 f1b8192a0b40a7a50a0c1abb7d89dbe8feb0688dea3906744a923f5ac4cd1806b432db3f3df829b1962e4331abf7d83df8186ec688f301c976ddda81ccc4bff6 +DIST zed-1.7.2.tar.gz 22562166 BLAKE2B 0980074a236c70e5a7b251978c392f3e772ea661391c0305506ced15f82b2587dab0383ee38d8b9509eb905272f6025fd58b1157ce2d2aa0f5699c003bcdf1a5 SHA512 4335f89f713ea4b0edcd0af9ad32cd70ef8c1c99299205eee631155061a6dc419ea7bea2d23f732d0ea45c970d1082ecefe8c9f2662bcd5969d323e95ab9aa17 diff --git a/app-editors/zed/zed-1.7.2.ebuild b/app-editors/zed/zed-1.7.2.ebuild new file mode 100644 index 0000000000000..1a90e30bf44d1 --- /dev/null +++ b/app-editors/zed/zed-1.7.2.ebuild @@ -0,0 +1,267 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.15.2 + +EAPI=8 + +CRATES=" +" + +declare -A GIT_CRATES=( + [alacritty_terminal]='https://github.com/zed-industries/alacritty;fcf32feacb367b75ec84dd40f041e4fd411d3cc1;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%' + [dap-types]='https://github.com/zed-industries/dap-types;1b461b310481d01e02b2603c16d7144b926339f8;dap-types-%commit%/dap-types' + [dugong-graphlib]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/dugong-graphlib' + [dugong]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/dugong' + [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;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/libwebrtc' + [livekit-api]='https://github.com/zed-industries/livekit-rust-sdks;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/livekit-api' + [livekit-protocol]='https://github.com/zed-industries/livekit-rust-sdks;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/livekit-protocol' + [livekit-runtime]='https://github.com/zed-industries/livekit-rust-sdks;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/livekit-runtime' + [livekit]='https://github.com/zed-industries/livekit-rust-sdks;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/livekit' + [lsp-types]='https://github.com/zed-industries/lsp-types;f4dfa89a21ca35cd929b70354b1583fabae325f8;lsp-types-%commit%' + [manatee]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/manatee' + [merman-core]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/merman-core' + [merman-render]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/merman-render' + [merman]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/merman' + [naga]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/naga' + [notify-types]='https://github.com/zed-industries/notify;faecbc33db4f59313e5225ef766bfd9e54a54cfd;notify-%commit%/notify-types' + [notify]='https://github.com/zed-industries/notify;faecbc33db4f59313e5225ef766bfd9e54a54cfd;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%' + [roughr-merman]='https://github.com/zed-industries/merman;06094471f97acb10d0eebf8b92bac19ba2928eea;merman-%commit%/crates/roughr' + [trash]='https://github.com/zed-industries/trash-rs;3bf27effd4eb8699f2e484d3326b852fe3e53af7;trash-rs-%commit%' + [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;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/webrtc-sys/build' + [webrtc-sys]='https://github.com/zed-industries/livekit-rust-sdks;c3a55bbc207008f1ca3474b6037fdd3c443cad0f;livekit-rust-sdks-%commit%/webrtc-sys' + [wgpu-core-deps-apple]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-core/platform-deps/apple' + [wgpu-core-deps-emscripten]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-core/platform-deps/emscripten' + [wgpu-core-deps-windows-linux-android]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-core/platform-deps/windows-linux-android' + [wgpu-core]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-core' + [wgpu-hal]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-hal' + [wgpu-naga-bridge]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-naga-bridge' + [wgpu-types]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;wgpu-%commit%/wgpu-types' + [wgpu]='https://github.com/zed-industries/wgpu;357a0c56e0070480ad9daea5d2eaa83150b79e88;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;94b0f28166665e8fd2f53ff6d268a14955c82269;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=( 22 ) +RUST_MIN_VER="1.95.0" +RUST_NEEDS_LLVM=1 +WEBRTC_COMMIT="0001d84-4" + +inherit cargo check-reqs desktop flag-o-matic 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/zed-industries/livekit-rust-sdks/releases/download/webrtc-${WEBRTC_COMMIT}/webrtc-linux-x64-release.zip -> + webrtc-${WEBRTC_COMMIT}-linux-x64-release.zip + ) + arm64? ( + https://github.com/zed-industries/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 Boost-1.0 + CC0-1.0 ISC LGPL-3 MIT MIT-0 MPL-2.0 UoI-NCSA Unicode-3.0 ZLIB BZIP2 +" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +CHECKREQS_DISK_BUILD="20G" +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="c3a55bbc207008f1ca3474b6037fdd3c443cad0f" + 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="faecbc33db4f59313e5225ef766bfd9e54a54cfd" + local NOTIFY_GIT="notify = { git = \"https://github.com/zed-industries/notify\", 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\", 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 +}