1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.13.2
16 alacritty_terminal@0.23.0
21 ambient-authority@0.0.2
23 android_system_properties@0.1.5
36 as-raw-xcb-connection@1.0.1
41 async-attributes@1.1.2
46 async-compression@0.4.6
47 async-dispatcher@0.1.2
51 async-global-executor@2.3.1
56 async-native-tls@0.3.3
57 async-native-tls@0.5.0
66 async-stream-impl@0.3.5
71 async-tungstenite@0.16.1
73 asynchronous-codec@0.7.0
80 aws-credential-types@1.1.5
84 aws-sdk-ssooidc@1.13.0
87 aws-smithy-async@1.1.5
88 aws-smithy-checksums@0.60.5
89 aws-smithy-eventstream@0.60.4
90 aws-smithy-http@0.60.5
91 aws-smithy-json@0.60.5
92 aws-smithy-query@0.60.5
93 aws-smithy-runtime-api@1.1.5
94 aws-smithy-runtime@1.1.5
95 aws-smithy-types@1.1.5
122 borsh-derive-internal@0.10.3
124 borsh-schema-derive-internal@0.10.3
129 bytecheck_derive@0.6.11
131 bytemuck_derive@1.5.0
136 calloop-wayland-source@0.3.0
155 chunked_transfer@1.4.1
168 clickhouse-derive@0.1.1
169 clickhouse-rs-cityhash-sys@0.1.2
173 cocoa-foundation@0.1.2
175 codespan-reporting@0.11.1
179 concurrent-queue@2.2.0
183 const-random-macro@0.1.16
187 core-foundation-sys@0.6.2
188 core-foundation-sys@0.8.6
189 core-foundation@0.9.4
190 core-graphics-types@0.1.3
199 cranelift-bforest@0.106.0
200 cranelift-codegen-meta@0.106.0
201 cranelift-codegen-shared@0.106.0
202 cranelift-codegen@0.106.0
203 cranelift-control@0.106.0
204 cranelift-entity@0.106.0
205 cranelift-frontend@0.106.0
206 cranelift-isle@0.106.0
207 cranelift-native@0.106.0
208 cranelift-wasm@0.106.0
215 crossbeam-channel@0.5.8
216 crossbeam-deque@0.8.3
217 crossbeam-epoch@0.9.15
218 crossbeam-queue@0.3.8
219 crossbeam-utils@0.8.16
227 curl-sys@0.4.67+curl-8.3.0
259 elliptic-curve@0.12.3
266 enumflags2_derive@0.7.9
271 errno-dragonfly@0.1.2
277 event-listener-strategy@0.4.0
278 event-listener-strategy@0.5.0
283 fallible-iterator@0.3.0
301 fontconfig-parser@0.5.6
303 foreign-types-macros@0.2.3
304 foreign-types-shared@0.1.1
305 foreign-types-shared@0.3.1
309 form_urlencoded@1.2.1
318 futures-channel@0.3.30
320 futures-executor@0.3.28
321 futures-intrusive@0.5.0
345 gpu-alloc-types@0.3.0
374 http-range-header@0.3.1
384 iana-time-zone-haiku@0.1.2
385 iana-time-zone@0.1.57
424 lazy-bytes-cast@5.0.1
429 libgit2-sys@0.17.0+1.8.1
433 libmimalloc-sys@0.1.37
434 libsqlite3-sys@0.26.0
442 lmdb-master-sys@0.2.0
452 markup5ever_rcdom@0.3.0
465 minimal-lexical@0.2.1
478 ndk-sys@0.4.1+23.1.7779620
480 new_debug_unreachable@1.0.4
503 num_enum_derive@0.5.11
516 openssl-src@300.2.3+3.2.1
525 ouroboros_macro@0.17.2
532 parity-tokio-ipc@0.9.0
535 parking_lot_core@0.9.8
539 pathfinder_geometry@0.5.1
542 peeking_take_while@0.1.2
545 percent-encoding@2.3.1
555 pin-project-internal@1.1.3
556 pin-project-lite@0.2.13
565 plotters-backend@0.3.5
576 precomputed-hash@0.1.1
577 pretty_assertions@1.4.0
579 proc-macro-crate@0.1.5
580 proc-macro-crate@1.3.1
581 proc-macro-crate@3.1.0
582 proc-macro-error-attr@1.0.4
583 proc-macro-error@1.0.4
585 profiling-procmacros@1.0.15
595 ptr_meta_derive@0.1.4
596 pulldown-cmark@0.10.0
609 raw-window-handle@0.5.2
610 raw-window-handle@0.6.0
611 raw-window-metal@0.4.0
620 regex-automata@0.1.10
643 rust-embed-impl@8.4.0
644 rust-embed-utils@8.4.0
647 rustc-demangle@0.1.23
653 rustls-native-certs@0.6.3
655 rustls-webpki@0.101.7
665 schemars_derive@0.8.15
667 scoped_threadpool@0.1.9
672 sea-orm-macros@0.12.3
674 sea-query-binder@0.5.0
679 security-framework-sys@2.9.1
680 security-framework@2.9.2
685 serde_derive_internals@0.26.0
688 serde_json_lenient@0.1.7
689 serde_path_to_error@0.1.15
692 serde_urlencoded@0.7.1
703 signal-hook-registry@1.4.1
733 sqlx-macros-core@0.7.2
739 stable_deref_trait@1.2.0
740 static_assertions@1.1.0
743 string_cache_codegen@0.5.2
766 system-interface@0.27.1
770 target-lexicon@0.12.13
775 thiserror-impl@1.0.60
784 tiny-skia-path@0.11.4
792 tokio-native-tls@0.3.1
795 tokio-tungstenite@0.20.1
810 tracing-attributes@0.1.27
812 tracing-futures@0.2.5
815 tracing-subscriber@0.3.18
817 tree-sitter-bash@0.20.5
819 tree-sitter-cpp@0.20.5
820 tree-sitter-css@0.20.0
821 tree-sitter-elixir@0.1.1
822 tree-sitter-embedded-template@0.20.0
823 tree-sitter-gomod@1.0.1
824 tree-sitter-html@0.19.0
825 tree-sitter-json@0.20.2
826 tree-sitter-python@0.20.4
827 tree-sitter-regex@0.20.0
828 tree-sitter-ruby@0.20.0
829 tree-sitter-rust@0.20.4
830 tree-sitter-typescript@0.20.5
831 tree-sitter-yaml@0.0.1
840 unicode-bidi-mirroring@0.2.0
844 unicode-linebreak@0.1.5
845 unicode-normalization@0.1.22
846 unicode-properties@0.1.1
848 unicode-segmentation@1.10.1
851 unicode_categories@0.1.1
861 value-bag-serde1@1.9.0
862 value-bag-sval2@1.9.0
871 vte_generate_state_changes@0.1.1
875 wasi@0.11.0+wasi-snapshot-preview1
876 wasi@0.9.0+wasi-snapshot-preview1
877 wasm-bindgen-backend@0.2.92
878 wasm-bindgen-futures@0.4.37
879 wasm-bindgen-macro-support@0.2.92
880 wasm-bindgen-macro@0.2.92
881 wasm-bindgen-shared@0.2.92
884 wasm-metadata@0.201.0
887 wasmtime-asm-macros@19.0.0
888 wasmtime-c-api-impl@19.0.0
889 wasmtime-c-api-macros@19.0.0
890 wasmtime-component-macro@19.0.0
891 wasmtime-component-util@19.0.0
892 wasmtime-cranelift-shared@19.0.0
893 wasmtime-cranelift@19.0.0
894 wasmtime-environ@19.0.0
895 wasmtime-fiber@19.0.0
896 wasmtime-jit-icache-coherence@19.0.0
897 wasmtime-runtime@19.0.0
899 wasmtime-types@19.0.0
900 wasmtime-versioned-export-macros@19.0.0
902 wasmtime-winch@19.0.0
903 wasmtime-wit-bindgen@19.0.0
904 wasmtime-wmemcheck@19.0.0
907 wayland-backend@0.3.3
908 wayland-client@0.31.2
909 wayland-cursor@0.31.1
910 wayland-protocols-plasma@0.2.0
911 wayland-protocols@0.31.2
912 wayland-scanner@0.31.1
920 wiggle-generate@19.0.0
923 winapi-i686-pc-windows-gnu@0.4.0
925 winapi-x86_64-pc-windows-gnu@0.4.0
930 windows-implement@0.57.0
931 windows-interface@0.57.0
936 windows-targets@0.42.2
937 windows-targets@0.48.5
938 windows-targets@0.52.5
943 windows_aarch64_gnullvm@0.42.2
944 windows_aarch64_gnullvm@0.48.5
945 windows_aarch64_gnullvm@0.52.5
946 windows_aarch64_msvc@0.42.2
947 windows_aarch64_msvc@0.48.5
948 windows_aarch64_msvc@0.52.5
949 windows_i686_gnu@0.42.2
950 windows_i686_gnu@0.48.5
951 windows_i686_gnu@0.52.5
952 windows_i686_gnullvm@0.52.5
953 windows_i686_msvc@0.42.2
954 windows_i686_msvc@0.48.5
955 windows_i686_msvc@0.52.5
956 windows_x86_64_gnu@0.42.2
957 windows_x86_64_gnu@0.48.5
958 windows_x86_64_gnu@0.52.5
959 windows_x86_64_gnullvm@0.42.2
960 windows_x86_64_gnullvm@0.48.5
961 windows_x86_64_gnullvm@0.52.5
962 windows_x86_64_msvc@0.42.2
963 windows_x86_64_msvc@0.48.5
964 windows_x86_64_msvc@0.52.5
972 wit-bindgen-core@0.22.0
973 wit-bindgen-rt@0.22.0
974 wit-bindgen-rust-macro@0.22.0
975 wit-bindgen-rust@0.22.0
977 wit-component@0.201.0
982 x11rb-protocol@0.13.0
994 yeslogic-fontconfig-sys@3.2.0
998 zed_extension_api@0.0.4
999 zed_extension_api@0.0.6
1001 zerocopy-derive@0.7.32
1004 zeroize_derive@1.4.2
1006 zstd-safe@5.0.2+zstd.1.5.2
1007 zstd-sys@2.0.8+zstd.1.5.5
1008 zstd@0.11.2+zstd.1.5.2
1010 zvariant_derive@4.0.2
1011 zvariant_utils@1.1.0
1014 declare -A GIT_CRATES=(
1015 [alacritty_terminal]='https://github.com/alacritty/alacritty;cacdb5bb3b72bad2c729227537979d95af75978f;alacritty-%commit%/alacritty_terminal'
1016 [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
1017 [blade-graphics]='https://github.com/zed-industries/blade;33fd51359d113c03b785e28f4a6cf75bacb0b26d;blade-%commit%/blade-graphics'
1018 [blade-macros]='https://github.com/zed-industries/blade;33fd51359d113c03b785e28f4a6cf75bacb0b26d;blade-%commit%/blade-macros'
1019 [blade-util]='https://github.com/zed-industries/blade;33fd51359d113c03b785e28f4a6cf75bacb0b26d;blade-%commit%/blade-util'
1020 [cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
1021 [font-kit]='https://github.com/zed-industries/font-kit;5a5c4d4ca395c74eb0abde38508e170ce0fd761a;font-kit-%commit%'
1022 [lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
1023 [nvim-rs]='https://github.com/KillTheMule/nvim-rs;0d2b1c884f3c39a76b5b7aac0b429f4624843954;nvim-rs-%commit%'
1024 [pathfinder_simd]='https://github.com/servo/pathfinder;30419d07660dc11a21e42ef4a7fa329600cff152;pathfinder-%commit%/simd'
1025 [tree-sitter-go]='https://github.com/tree-sitter/tree-sitter-go;b82ab803d887002a0af11f6ce63d72884580bf33;tree-sitter-go-%commit%'
1026 [tree-sitter-gowork]='https://github.com/d1y/tree-sitter-go-work;a2a4b99b53b3740855ff33f0b54cab0bb4ce6f45;tree-sitter-go-work-%commit%'
1027 [tree-sitter-heex]='https://github.com/phoenixframework/tree-sitter-heex;2e1348c3cf2c9323e87c2744796cf3f3868aa82a;tree-sitter-heex-%commit%'
1028 [tree-sitter-jsdoc]='https://github.com/tree-sitter/tree-sitter-jsdoc;6a6cf9e7341af32d8e2b2e24a37fbfebefc3dc55;tree-sitter-jsdoc-%commit%'
1029 [tree-sitter-markdown]='https://github.com/MDeiml/tree-sitter-markdown;330ecab87a3e3a7211ac69bbadc19eabecdb1cca;tree-sitter-markdown-%commit%'
1030 [tree-sitter-proto]='https://github.com/rewinfrey/tree-sitter-proto;36d54f288aee112f13a67b550ad32634d0c2cb52;tree-sitter-proto-%commit%'
1031 [tree-sitter]='https://github.com/tree-sitter/tree-sitter;7b4894ba2ae81b988846676f54c0988d4027ef4f;tree-sitter-%commit%/lib'
1032 [xim-ctext]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-ctext'
1033 [xim-parser]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-parser'
1034 [xim]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%'
1037 inherit cargo desktop flag-o-matic optfeature toolchain-funcs xdg
1039 DESCRIPTION="high-performance, multiplayer code editor"
1042 https://github.com/zed-industries/zed/
1045 https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
1049 LICENSE="GPL-3+ AGPL-3+ Apache-2.0"
1050 # Dependent crate licenses
1052 Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
1053 CC0-1.0 ISC LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 ZLIB
1058 REQUIRED_USE="lto? ( !debug )"
1064 dev-libs/openssl:0/3
1066 dev-libs/wayland-protocols
1067 dev-util/wayland-scanner
1068 dev-util/vulkan-tools
1070 media-libs/fontconfig
1072 media-libs/vulkan-loader
1077 x11-libs/libxkbcommon
1081 >=virtual/rust-1.78.0
1082 dev-util/vulkan-headers
1083 >=sys-devel/clang-17:*
1089 if use !debug && use lto; then
1090 # NOTE: upstream sets to thinlto by default
1092 einfo "Enforcing lto for CC is Gcc"
1093 export CARGO_PROFILE_RELEASE_LTO="true"
1094 #append-flags "-ffat-lto-objects"
1095 elif tc-is-clang; then
1096 einfo "Enforcing thinlto for CC is Clang"
1097 export CARGO_PROFILE_RELEASE_LTO="thin"
1098 #append-flags "-flto=thin"
1101 export CARGO_PROFILE_RELEASE_LTO="false"
1104 # In case of compiler switch with unsupported flags
1105 strip-unsupported-flags
1106 # flags from upstream
1107 export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
1109 # Upstream explicitly use sys-devel/mold as linker
1110 # Any other linker might just fail
1111 einfo "Enforcing mold linker"
1112 export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-fuse-ld=mold"
1114 # A possible (no warranty!) workaround for other linkers
1115 #export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
1121 # Cargo offline fetch workaround
1122 local PF_COMMIT="30419d07660dc11a21e42ef4a7fa329600cff152"
1123 local PF_GIT="git = \"https://github.com/servo/pathfinder.git\", rev = \"${PF_COMMIT}\""
1124 local PF_PATH="path = \"${WORKDIR}/pathfinder-${PF_COMMIT}/simd\""
1126 local TS_COMMIT="7b4894ba2ae81b988846676f54c0988d4027ef4f"
1127 local TS_GIT="git = \"https://github.com/tree-sitter/tree-sitter\", rev = \"${TS_COMMIT}\""
1128 local TS_PATH="path = \"${WORKDIR}/tree-sitter-${TS_COMMIT}/lib\""
1130 sed -e "s#${PF_GIT}#${PF_PATH}#" \
1131 -e "s#${TS_GIT}#${TS_PATH}#" \
1132 -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed"
1134 export DO_STARTUP_NOTIFY="true"
1135 export APP_ICON="zed"
1136 export APP_NAME="Zed"
1137 export APP_CLI="zeditor"
1139 envsubst < "crates/zed/resources/zed.desktop.in" > zed.desktop || die
1143 cargo_src_configure --all-features
1147 # Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
1148 export RELEASE_VERSION="${PV}"
1149 export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
1150 cargo_src_compile --package zed --package cli
1154 newbin $(cargo_target_dir)/cli zeditor
1155 # hard-coded in crates/cli/src/main.rs
1156 # libexec/zed-editor
1157 exeinto "/usr/libexec"
1158 newexe $(cargo_target_dir)/zed zed-editor
1160 newicon -s 512 crates/zed/resources/app-icon.png zed.png
1161 newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
1162 domenu "${S}/zed.desktop"
1167 optfeature "improved Rust language support" "dev-lang/rust[rust-analyzer]"
1168 optfeature "improved Rust language support" "dev-lang/rust-bin[rust-analyzer]"