1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.13.3
15 alacritty_terminal@0.23.0
21 ambient-authority@0.0.2
23 android_system_properties@0.1.5
34 arg_enum_proc_macro@0.3.4
37 as-raw-xcb-connection@1.0.1
42 async-attributes@1.1.2
47 async-compression@0.4.6
48 async-dispatcher@0.1.2
52 async-global-executor@2.3.1
57 async-native-tls@0.3.3
58 async-native-tls@0.5.0
67 async-stream-impl@0.3.5
72 async-tungstenite@0.16.1
75 asynchronous-codec@0.7.0
84 aws-credential-types@1.1.5
88 aws-sdk-ssooidc@1.13.0
91 aws-smithy-async@1.1.5
92 aws-smithy-checksums@0.60.5
93 aws-smithy-eventstream@0.60.4
94 aws-smithy-http@0.60.5
95 aws-smithy-json@0.60.5
96 aws-smithy-query@0.60.5
97 aws-smithy-runtime-api@1.1.5
98 aws-smithy-runtime@1.1.5
99 aws-smithy-types@1.1.5
100 aws-smithy-xml@0.60.5
128 borsh-derive-internal@0.10.3
130 borsh-schema-derive-internal@0.10.3
136 bytecheck_derive@0.6.11
138 bytemuck_derive@1.5.0
144 calloop-wayland-source@0.3.0
164 chunked_transfer@1.4.1
177 clickhouse-derive@0.1.1
178 clickhouse-rs-cityhash-sys@0.1.2
182 cocoa-foundation@0.1.2
184 codespan-reporting@0.11.1
188 concurrent-queue@2.2.0
192 const-random-macro@0.1.16
196 core-foundation-sys@0.6.2
197 core-foundation-sys@0.8.6
198 core-foundation@0.9.4
199 core-graphics-types@0.1.3
208 cranelift-bforest@0.106.0
209 cranelift-codegen-meta@0.106.0
210 cranelift-codegen-shared@0.106.0
211 cranelift-codegen@0.106.0
212 cranelift-control@0.106.0
213 cranelift-entity@0.106.0
214 cranelift-frontend@0.106.0
215 cranelift-isle@0.106.0
216 cranelift-native@0.106.0
217 cranelift-wasm@0.106.0
224 crossbeam-channel@0.5.8
225 crossbeam-deque@0.8.3
226 crossbeam-epoch@0.9.15
227 crossbeam-queue@0.3.8
228 crossbeam-utils@0.8.16
236 curl-sys@0.4.67+curl-8.3.0
267 elliptic-curve@0.12.3
274 enumflags2_derive@0.7.9
279 errno-dragonfly@0.1.2
285 event-listener-strategy@0.4.0
286 event-listener-strategy@0.5.0
292 fallible-iterator@0.3.0
310 fontconfig-parser@0.5.6
312 foreign-types-macros@0.2.3
313 foreign-types-shared@0.1.1
314 foreign-types-shared@0.3.1
318 form_urlencoded@1.2.1
327 futures-channel@0.3.30
329 futures-executor@0.3.28
330 futures-intrusive@0.5.0
354 gpu-alloc-types@0.3.0
384 http-range-header@0.3.1
394 iana-time-zone-haiku@0.1.2
395 iana-time-zone@0.1.57
411 interpolate_name@0.2.4
437 lazy-bytes-cast@5.0.1
444 libgit2-sys@0.17.0+1.8.1
448 libmimalloc-sys@0.1.37
449 libsqlite3-sys@0.26.0
457 lmdb-master-sys@0.2.0
468 markup5ever_rcdom@0.3.0
482 minimal-lexical@0.2.1
493 ndk-sys@0.4.1+23.1.7779620
495 new_debug_unreachable@1.0.4
500 noop_proc_macro@0.3.0
519 num_enum_derive@0.5.11
532 openssl-src@300.3.0+3.3.0
541 ouroboros_macro@0.17.2
548 parity-tokio-ipc@0.9.0
551 parking_lot_core@0.9.8
555 pathfinder_geometry@0.5.1
558 peeking_take_while@0.1.2
561 percent-encoding@2.3.1
571 pin-project-internal@1.1.3
572 pin-project-lite@0.2.13
581 plotters-backend@0.3.5
591 precomputed-hash@0.1.1
592 pretty_assertions@1.4.0
594 proc-macro-crate@0.1.5
595 proc-macro-crate@1.3.1
596 proc-macro-crate@3.1.0
597 proc-macro-error-attr@1.0.4
598 proc-macro-error@1.0.4
600 profiling-procmacros@1.0.15
610 ptr_meta_derive@0.1.4
611 pulldown-cmark@0.10.0
628 raw-window-handle@0.5.2
629 raw-window-handle@0.6.0
630 raw-window-metal@0.4.0
639 regex-automata@0.1.10
662 rust-embed-impl@8.4.0
663 rust-embed-utils@8.4.0
666 rustc-demangle@0.1.23
672 rustls-native-certs@0.6.3
674 rustls-webpki@0.101.7
684 schemars_derive@0.8.15
690 sea-orm-macros@0.12.3
692 sea-query-binder@0.5.0
697 security-framework-sys@2.9.1
698 security-framework@2.9.2
703 serde_derive_internals@0.26.0
706 serde_json_lenient@0.1.7
707 serde_path_to_error@0.1.15
710 serde_urlencoded@0.7.1
721 signal-hook-registry@1.4.1
752 sqlx-macros-core@0.7.2
758 stable_deref_trait@1.2.0
759 static_assertions@1.1.0
762 string_cache_codegen@0.5.2
786 system-interface@0.27.1
790 target-lexicon@0.12.13
795 thiserror-impl@1.0.60
804 tiny-skia-path@0.11.4
812 tokio-native-tls@0.3.1
815 tokio-tungstenite@0.20.1
830 tracing-attributes@0.1.27
832 tracing-futures@0.2.5
835 tracing-subscriber@0.3.18
837 tree-sitter-bash@0.20.5
839 tree-sitter-cpp@0.20.5
840 tree-sitter-css@0.20.0
841 tree-sitter-elixir@0.1.1
842 tree-sitter-embedded-template@0.20.0
843 tree-sitter-gomod@1.0.1
844 tree-sitter-html@0.19.0
845 tree-sitter-json@0.20.2
846 tree-sitter-python@0.20.4
847 tree-sitter-regex@0.20.0
848 tree-sitter-ruby@0.20.0
849 tree-sitter-rust@0.20.4
850 tree-sitter-typescript@0.20.5
851 tree-sitter-yaml@0.0.1
860 unicode-bidi-mirroring@0.2.0
864 unicode-linebreak@0.1.5
865 unicode-normalization@0.1.22
866 unicode-properties@0.1.1
868 unicode-segmentation@1.10.1
871 unicode_categories@0.1.1
882 value-bag-serde1@1.9.0
883 value-bag-sval2@1.9.0
886 version-compare@0.2.0
893 vte_generate_state_changes@0.1.1
897 wasi@0.11.0+wasi-snapshot-preview1
898 wasi@0.9.0+wasi-snapshot-preview1
899 wasm-bindgen-backend@0.2.92
900 wasm-bindgen-futures@0.4.37
901 wasm-bindgen-macro-support@0.2.92
902 wasm-bindgen-macro@0.2.92
903 wasm-bindgen-shared@0.2.92
906 wasm-metadata@0.201.0
909 wasmtime-asm-macros@19.0.0
910 wasmtime-c-api-impl@19.0.0
911 wasmtime-c-api-macros@19.0.0
912 wasmtime-component-macro@19.0.0
913 wasmtime-component-util@19.0.0
914 wasmtime-cranelift-shared@19.0.0
915 wasmtime-cranelift@19.0.0
916 wasmtime-environ@19.0.0
917 wasmtime-fiber@19.0.0
918 wasmtime-jit-icache-coherence@19.0.0
919 wasmtime-runtime@19.0.0
921 wasmtime-types@19.0.0
922 wasmtime-versioned-export-macros@19.0.0
924 wasmtime-winch@19.0.0
925 wasmtime-wit-bindgen@19.0.0
926 wasmtime-wmemcheck@19.0.0
929 wayland-backend@0.3.3
930 wayland-client@0.31.2
931 wayland-cursor@0.31.1
932 wayland-protocols-plasma@0.2.0
933 wayland-protocols@0.31.2
934 wayland-scanner@0.31.1
942 wiggle-generate@19.0.0
945 winapi-i686-pc-windows-gnu@0.4.0
947 winapi-x86_64-pc-windows-gnu@0.4.0
952 windows-implement@0.57.0
953 windows-interface@0.57.0
958 windows-targets@0.42.2
959 windows-targets@0.48.5
960 windows-targets@0.52.5
965 windows_aarch64_gnullvm@0.42.2
966 windows_aarch64_gnullvm@0.48.5
967 windows_aarch64_gnullvm@0.52.5
968 windows_aarch64_msvc@0.42.2
969 windows_aarch64_msvc@0.48.5
970 windows_aarch64_msvc@0.52.5
971 windows_i686_gnu@0.42.2
972 windows_i686_gnu@0.48.5
973 windows_i686_gnu@0.52.5
974 windows_i686_gnullvm@0.52.5
975 windows_i686_msvc@0.42.2
976 windows_i686_msvc@0.48.5
977 windows_i686_msvc@0.52.5
978 windows_x86_64_gnu@0.42.2
979 windows_x86_64_gnu@0.48.5
980 windows_x86_64_gnu@0.52.5
981 windows_x86_64_gnullvm@0.42.2
982 windows_x86_64_gnullvm@0.48.5
983 windows_x86_64_gnullvm@0.52.5
984 windows_x86_64_msvc@0.42.2
985 windows_x86_64_msvc@0.48.5
986 windows_x86_64_msvc@0.52.5
994 wit-bindgen-core@0.22.0
995 wit-bindgen-rt@0.22.0
996 wit-bindgen-rust-macro@0.22.0
997 wit-bindgen-rust@0.22.0
999 wit-component@0.201.0
1004 x11rb-protocol@0.13.0
1016 yeslogic-fontconfig-sys@3.2.0
1020 zed_extension_api@0.0.4
1021 zed_extension_api@0.0.6
1023 zerocopy-derive@0.7.32
1026 zeroize_derive@1.4.2
1028 zstd-safe@5.0.2+zstd.1.5.2
1029 zstd-sys@2.0.8+zstd.1.5.5
1030 zstd@0.11.2+zstd.1.5.2
1035 zvariant_derive@4.0.2
1036 zvariant_utils@1.1.0
1039 declare -A GIT_CRATES=(
1040 [alacritty_terminal]='https://github.com/alacritty/alacritty;cacdb5bb3b72bad2c729227537979d95af75978f;alacritty-%commit%/alacritty_terminal'
1041 [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
1042 [blade-graphics]='https://github.com/kvark/blade;21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7;blade-%commit%/blade-graphics'
1043 [blade-macros]='https://github.com/kvark/blade;21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7;blade-%commit%/blade-macros'
1044 [blade-util]='https://github.com/kvark/blade;21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7;blade-%commit%/blade-util'
1045 [cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
1046 [font-kit]='https://github.com/zed-industries/font-kit;5a5c4d4ca395c74eb0abde38508e170ce0fd761a;font-kit-%commit%'
1047 [lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
1048 [nvim-rs]='https://github.com/KillTheMule/nvim-rs;0d2b1c884f3c39a76b5b7aac0b429f4624843954;nvim-rs-%commit%'
1049 [pathfinder_simd]='https://github.com/servo/pathfinder;4968e819c0d9b015437ffc694511e175801a17c7;pathfinder-%commit%/simd'
1050 [tree-sitter-go]='https://github.com/tree-sitter/tree-sitter-go;b82ab803d887002a0af11f6ce63d72884580bf33;tree-sitter-go-%commit%'
1051 [tree-sitter-gowork]='https://github.com/d1y/tree-sitter-go-work;a2a4b99b53b3740855ff33f0b54cab0bb4ce6f45;tree-sitter-go-work-%commit%'
1052 [tree-sitter-heex]='https://github.com/phoenixframework/tree-sitter-heex;2e1348c3cf2c9323e87c2744796cf3f3868aa82a;tree-sitter-heex-%commit%'
1053 [tree-sitter-jsdoc]='https://github.com/tree-sitter/tree-sitter-jsdoc;6a6cf9e7341af32d8e2b2e24a37fbfebefc3dc55;tree-sitter-jsdoc-%commit%'
1054 [tree-sitter-markdown]='https://github.com/MDeiml/tree-sitter-markdown;330ecab87a3e3a7211ac69bbadc19eabecdb1cca;tree-sitter-markdown-%commit%'
1055 [tree-sitter-proto]='https://github.com/rewinfrey/tree-sitter-proto;36d54f288aee112f13a67b550ad32634d0c2cb52;tree-sitter-proto-%commit%'
1056 [tree-sitter]='https://github.com/tree-sitter/tree-sitter;7b4894ba2ae81b988846676f54c0988d4027ef4f;tree-sitter-%commit%/lib'
1057 [xim-ctext]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-ctext'
1058 [xim-parser]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-parser'
1059 [xim]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%'
1062 inherit cargo desktop edo flag-o-matic optfeature toolchain-funcs xdg
1064 DESCRIPTION="high-performance, multiplayer code editor"
1067 https://github.com/zed-industries/zed/
1070 https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
1074 # OFL-1.1 for IBM Plex
1076 LICENSE="GPL-3+ AGPL-3+ Apache-2.0 OFL-1.1"
1077 # Dependent crate licenses
1079 Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
1080 CC0-1.0 ISC LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 ZLIB
1085 REQUIRED_USE="lto? ( !debug )"
1091 dev-libs/openssl:0/3
1093 dev-libs/wayland-protocols
1094 dev-util/wayland-scanner
1095 dev-util/vulkan-tools
1097 media-libs/fontconfig
1099 media-libs/vulkan-loader
1104 x11-libs/libxkbcommon
1108 >=dev-util/cargo-about-0.6.1
1109 dev-util/vulkan-headers
1110 >=sys-devel/clang-17:*
1113 >=virtual/rust-1.78.0
1117 if use !debug && use lto; then
1118 # NOTE: upstream sets to thinlto by default
1120 einfo "Enforcing lto for CC is Gcc"
1121 export CARGO_PROFILE_RELEASE_LTO="true"
1122 #append-flags "-ffat-lto-objects"
1123 elif tc-is-clang; then
1124 einfo "Enforcing thinlto for CC is Clang"
1125 export CARGO_PROFILE_RELEASE_LTO="thin"
1126 #append-flags "-flto=thin"
1129 export CARGO_PROFILE_RELEASE_LTO="false"
1132 # In case of compiler switch with unsupported flags
1133 strip-unsupported-flags
1134 # flags from upstream
1135 export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
1137 # Upstream explicitly use sys-devel/mold as linker
1138 # Any other linker might just fail
1139 einfo "Enforcing mold linker"
1140 export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-fuse-ld=mold"
1142 # A possible (no warranty!) workaround for other linkers
1143 #export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
1148 "${FILESDIR}/${P}-remove-cargo-install-in-generate-licenses.patch"
1153 # Cargo offline fetch workaround
1154 local PF_COMMIT="4968e819c0d9b015437ffc694511e175801a17c7"
1155 local PF_GIT="git = \"https://github.com/servo/pathfinder.git\", rev = \"${PF_COMMIT}\""
1156 local PF_PATH="path = \"${WORKDIR}/pathfinder-${PF_COMMIT}/simd\""
1158 local TS_COMMIT="7b4894ba2ae81b988846676f54c0988d4027ef4f"
1159 local TS_GIT="git = \"https://github.com/tree-sitter/tree-sitter\", rev = \"${TS_COMMIT}\""
1160 local TS_PATH="path = \"${WORKDIR}/tree-sitter-${TS_COMMIT}/lib\""
1162 sed -e "s#${PF_GIT}#${PF_PATH}#" \
1163 -e "s#${TS_GIT}#${TS_PATH}#" \
1164 -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed"
1166 export DO_STARTUP_NOTIFY="true"
1167 export APP_ICON="zed"
1168 export APP_NAME="Zed"
1169 export APP_CLI="zeditor"
1170 export APP_ID="dev.zed.Zed"
1172 envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die
1174 # For "View Denpendency licenses" Button in menu
1175 # This requires package *cargo-about*
1176 # Without this the button leads to crash
1177 edo ${BASH} ./script/generate-licenses
1181 cargo_src_configure --all-features
1185 # Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
1186 export RELEASE_VERSION="${PV}"
1187 export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
1188 cargo_src_compile --package zed --package cli
1192 newbin $(cargo_target_dir)/cli zeditor
1193 # hard-coded in crates/cli/src/main.rs
1194 # ["../libexec/zed-editor", "../lib/zed/zed-editor", "./zed"]
1195 exeinto "/usr/libexec"
1196 newexe $(cargo_target_dir)/zed zed-editor
1198 newicon -s 512 crates/zed/resources/app-icon.png zed.png
1199 newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
1200 domenu "${S}/${APP_ID}.desktop"
1205 optfeature "improved Rust language support" "dev-lang/rust[rust-analyzer]"
1206 optfeature "improved Rust language support" "dev-lang/rust-bin[rust-analyzer]"