1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.13.3
21 ambient-authority@0.0.2
24 android_system_properties@0.1.5
35 arg_enum_proc_macro@0.3.4
38 as-raw-xcb-connection@1.0.1
43 async-attributes@1.1.2
48 async-compression@0.4.12
49 async-dispatcher@0.1.2
53 async-global-executor@2.4.1
58 async-native-tls@0.5.0
67 async-stream-impl@0.3.5
73 async-tungstenite@0.23.0
76 asynchronous-codec@0.7.0
84 aws-credential-types@1.2.1
88 aws-sdk-ssooidc@1.41.0
91 aws-smithy-async@1.2.1
92 aws-smithy-checksums@0.60.12
93 aws-smithy-eventstream@0.60.4
94 aws-smithy-http@0.60.10
95 aws-smithy-json@0.60.7
96 aws-smithy-query@0.60.7
97 aws-smithy-runtime-api@1.7.2
98 aws-smithy-runtime@1.7.1
99 aws-smithy-types@1.2.4
100 aws-smithy-xml@0.60.8
136 bytecheck_derive@0.6.12
138 bytemuck_derive@1.7.1
144 calloop-wayland-source@0.3.0
154 cargo_metadata@0.18.1
168 chunked_transfer@1.5.0
179 clickhouse-derive@0.1.1
180 clickhouse-rs-cityhash-sys@0.1.2
183 cocoa-foundation@0.1.2
184 cocoa-foundation@0.2.0
187 codespan-reporting@0.11.1
191 concurrent-queue@2.5.0
194 const-random-macro@0.1.16
198 core-foundation-sys@0.8.7
199 core-foundation@0.10.0
200 core-foundation@0.9.4
201 core-graphics-types@0.1.3
202 core-graphics-types@0.2.0
212 cranelift-bforest@0.108.1
213 cranelift-codegen-meta@0.108.1
214 cranelift-codegen-shared@0.108.1
215 cranelift-codegen@0.108.1
216 cranelift-control@0.108.1
217 cranelift-entity@0.108.1
218 cranelift-frontend@0.108.1
219 cranelift-isle@0.108.1
220 cranelift-native@0.108.1
221 cranelift-wasm@0.108.1
228 crossbeam-channel@0.5.13
229 crossbeam-deque@0.8.5
230 crossbeam-epoch@0.9.18
231 crossbeam-queue@0.3.11
232 crossbeam-utils@0.8.20
239 curl-sys@0.4.74+curl-8.9.0
270 elliptic-curve@0.12.3
278 enum-ordinalize-derive@4.3.1
279 enum-ordinalize@4.3.0
281 enumflags2_derive@0.7.10
287 errno-dragonfly@0.1.2
293 event-listener-strategy@0.5.2
299 fallible-iterator@0.3.0
316 fontconfig-parser@0.5.7
318 foreign-types-macros@0.2.3
319 foreign-types-shared@0.1.1
320 foreign-types-shared@0.3.1
324 form_urlencoded@1.2.1
332 futures-channel@0.3.30
334 futures-executor@0.3.30
335 futures-intrusive@0.5.0
360 gpu-alloc-types@0.3.0
390 html_to_markdown@0.1.0
394 http-range-header@0.3.1
405 iana-time-zone-haiku@0.1.2
406 iana-time-zone@0.1.60
423 interpolate_name@0.2.4
433 is_terminal_polyfill@1.70.1
457 libgit2-sys@0.17.0+1.8.1
460 libmimalloc-sys@0.1.39
462 libsqlite3-sys@0.28.0
469 lmdb-master-sys@0.2.4
481 markup5ever_rcdom@0.3.0
496 minimal-lexical@0.2.1
509 ndk-sys@0.5.0+25.2.9519653
511 new_debug_unreachable@1.0.6
515 noop_proc_macro@0.3.0
517 notify-debouncer-mini@0.4.1
534 num_enum_derive@0.7.3
548 openssl-src@300.3.1+3.3.1
556 ouroboros_macro@0.17.2
563 parity-tokio-ipc@0.9.0
566 parking_lot_core@0.9.10
570 pathfinder_geometry@0.5.1
571 pathfinder_simd@0.5.4
575 percent-encoding@2.3.1
578 pest_generator@2.7.11
589 pin-project-internal@1.1.5
590 pin-project-lite@0.2.14
599 plotters-backend@0.3.6
610 precomputed-hash@0.1.1
611 pretty_assertions@1.4.0
613 proc-macro-crate@3.2.0
614 proc-macro-error-attr@1.0.4
615 proc-macro-error@1.0.4
617 profiling-procmacros@1.0.15
625 protols-tree-sitter-proto@0.2.0
628 ptr_meta_derive@0.1.4
629 pulldown-cmark-escape@0.10.1
630 pulldown-cmark@0.10.3
647 raw-window-handle@0.6.2
648 raw-window-metal@0.4.0
657 regex-automata@0.1.10
678 rust-embed-impl@8.5.0
679 rust-embed-utils@8.5.0
682 rustc-demangle@0.1.24
688 rustls-native-certs@0.6.3
690 rustls-webpki@0.101.7
699 schemars_derive@0.8.21
705 sea-orm-macros@1.1.0-rc.1
707 sea-query-binder@0.7.0-rc.1
708 sea-query@0.32.0-rc.1
712 security-framework-sys@2.11.1
713 security-framework@2.11.1
718 serde_derive_internals@0.26.0
719 serde_derive_internals@0.29.1
722 serde_json_lenient@0.1.8
723 serde_path_to_error@0.1.16
728 serde_urlencoded@0.7.1
737 signal-hook-registry@1.4.2
763 spirv@0.3.0+sdk-1.3.268.0
769 sqlx-macros-core@0.8.0
775 stable_deref_trait@1.2.0
776 static_assertions@1.1.0
779 string_cache_codegen@0.5.2
804 system-configuration-sys@0.5.0
805 system-configuration@0.5.1
807 system-interface@0.27.2
811 target-lexicon@0.12.16
816 thiserror-impl@1.0.63
825 tiny-skia-path@0.11.4
833 tokio-native-tls@0.3.1
837 tokio-tungstenite@0.20.1
838 tokio-tungstenite@0.21.0
847 topological-sort@0.2.2
853 tracing-attributes@0.1.27
855 tracing-futures@0.2.5
858 tracing-subscriber@0.3.18
860 tree-sitter-bash@0.21.0
862 tree-sitter-cpp@0.22.3
863 tree-sitter-css@0.21.1
864 tree-sitter-elixir@0.2.0
865 tree-sitter-embedded-template@0.20.0
866 tree-sitter-go@0.21.2
867 tree-sitter-html@0.20.4
868 tree-sitter-jsdoc@0.21.0
869 tree-sitter-json@0.21.0
870 tree-sitter-python@0.21.0
871 tree-sitter-regex@0.21.0
872 tree-sitter-ruby@0.21.0
873 tree-sitter-rust@0.21.2
874 tree-sitter-typescript@0.21.2
875 tree-sitter-yaml@0.6.1
885 unicode-bidi-mirroring@0.2.0
889 unicode-linebreak@0.1.5
890 unicode-normalization@0.1.23
891 unicode-properties@0.1.2
893 unicode-segmentation@1.11.0
896 unicode_categories@0.1.1
907 value-bag-serde1@1.9.0
908 value-bag-sval2@1.9.0
911 version-compare@0.2.0
918 vte_generate_state_changes@0.1.2
923 wasi@0.11.0+wasi-snapshot-preview1
924 wasi@0.9.0+wasi-snapshot-preview1
926 wasm-bindgen-backend@0.2.93
927 wasm-bindgen-futures@0.4.43
928 wasm-bindgen-macro-support@0.2.93
929 wasm-bindgen-macro@0.2.93
930 wasm-bindgen-shared@0.2.93
934 wasm-metadata@0.201.0
938 wasmtime-asm-macros@21.0.1
939 wasmtime-c-api-impl@21.0.1
940 wasmtime-c-api-macros@21.0.1
941 wasmtime-component-macro@21.0.1
942 wasmtime-component-util@21.0.1
943 wasmtime-cranelift@21.0.1
944 wasmtime-environ@21.0.1
945 wasmtime-fiber@21.0.1
946 wasmtime-jit-icache-coherence@21.0.1
948 wasmtime-types@21.0.1
949 wasmtime-versioned-export-macros@21.0.1
951 wasmtime-winch@21.0.1
952 wasmtime-wit-bindgen@21.0.1
955 wayland-backend@0.3.6
956 wayland-client@0.31.5
957 wayland-cursor@0.31.5
958 wayland-protocols-plasma@0.2.0
959 wayland-protocols@0.31.2
960 wayland-scanner@0.31.4
968 wiggle-generate@21.0.1
971 winapi-i686-pc-windows-gnu@0.4.0
973 winapi-x86_64-pc-windows-gnu@0.4.0
979 windows-implement@0.58.0
980 windows-interface@0.58.0
983 windows-strings@0.1.0
988 windows-targets@0.42.2
989 windows-targets@0.48.5
990 windows-targets@0.52.6
995 windows_aarch64_gnullvm@0.42.2
996 windows_aarch64_gnullvm@0.48.5
997 windows_aarch64_gnullvm@0.52.6
998 windows_aarch64_msvc@0.42.2
999 windows_aarch64_msvc@0.48.5
1000 windows_aarch64_msvc@0.52.6
1001 windows_i686_gnu@0.42.2
1002 windows_i686_gnu@0.48.5
1003 windows_i686_gnu@0.52.6
1004 windows_i686_gnullvm@0.52.6
1005 windows_i686_msvc@0.42.2
1006 windows_i686_msvc@0.48.5
1007 windows_i686_msvc@0.52.6
1008 windows_x86_64_gnu@0.42.2
1009 windows_x86_64_gnu@0.48.5
1010 windows_x86_64_gnu@0.52.6
1011 windows_x86_64_gnullvm@0.42.2
1012 windows_x86_64_gnullvm@0.48.5
1013 windows_x86_64_gnullvm@0.52.6
1014 windows_x86_64_msvc@0.42.2
1015 windows_x86_64_msvc@0.48.5
1016 windows_x86_64_msvc@0.52.6
1025 wit-bindgen-core@0.22.0
1026 wit-bindgen-rt@0.22.0
1027 wit-bindgen-rust-macro@0.22.0
1028 wit-bindgen-rust@0.22.0
1030 wit-component@0.201.0
1036 x11rb-protocol@0.13.1
1047 yeslogic-fontconfig-sys@6.0.0
1051 zed_extension_api@0.1.0
1053 zerocopy-derive@0.7.35
1056 zeroize_derive@1.4.2
1058 zstd-safe@5.0.2+zstd.1.5.2
1059 zstd-sys@2.0.13+zstd.1.5.6
1060 zstd@0.11.2+zstd.1.5.2
1065 zvariant_derive@4.2.0
1066 zvariant_utils@2.1.0
1069 declare -A GIT_CRATES=(
1070 [alacritty_terminal]='https://github.com/alacritty/alacritty;91d034ff8b53867143c005acfaa14609147c9a2c;alacritty-%commit%/alacritty_terminal'
1071 [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
1072 [blade-graphics]='https://github.com/kvark/blade;e142a3a5e678eb6a13e642ad8401b1f3aa38e969;blade-%commit%/blade-graphics'
1073 [blade-macros]='https://github.com/kvark/blade;e142a3a5e678eb6a13e642ad8401b1f3aa38e969;blade-%commit%/blade-macros'
1074 [blade-util]='https://github.com/kvark/blade;e142a3a5e678eb6a13e642ad8401b1f3aa38e969;blade-%commit%/blade-util'
1075 [cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
1076 [font-kit]='https://github.com/zed-industries/font-kit;40391b7c0041d8a8572af2afa3de32ae088f0120;font-kit-%commit%'
1077 [lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
1078 [nvim-rs]='https://github.com/KillTheMule/nvim-rs;69500bae73b8b3f02a05b7bee621a0d0e633da6c;nvim-rs-%commit%'
1079 [tree-sitter-gomod]='https://github.com/camdencheek/tree-sitter-go-mod;1f55029bacd0a6a11f6eb894c4312d429dcf735c;tree-sitter-go-mod-%commit%'
1080 [tree-sitter-gowork]='https://github.com/d1y/tree-sitter-go-work;dcbabff454703c3a4bc98a23cf8778d4be46fd22;tree-sitter-go-work-%commit%'
1081 [tree-sitter-heex]='https://github.com/phoenixframework/tree-sitter-heex;6dd0303acf7138dd2b9b432a229e16539581c701;tree-sitter-heex-%commit%'
1082 [tree-sitter-language]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib/language'
1083 [tree-sitter-md]='https://github.com/zed-industries/tree-sitter-markdown;e3855e37f8f2c71aa7513c18a9c95fb7461b1b10;tree-sitter-markdown-%commit%'
1084 [tree-sitter]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib'
1085 [xim-ctext]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-ctext'
1086 [xim-parser]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-parser'
1087 [xim]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%'
1088 [xkbcommon]='https://github.com/ConradIrwin/xkbcommon-rs;fcbb4612185cc129ceeff51d22f7fb51810a03b2;xkbcommon-rs-%commit%'
1091 inherit cargo desktop edo toolchain-funcs xdg
1093 DESCRIPTION="high-performance, multiplayer code editor"
1096 https://github.com/zed-industries/zed/
1099 https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
1103 # OFL-1.1 for IBM Plex
1105 LICENSE="GPL-3+ AGPL-3+ Apache-2.0 OFL-1.1"
1106 # Dependent crate licenses
1108 Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 ISC
1109 LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 ZLIB
1114 REQUIRED_USE="lto? ( !debug )"
1117 >=dev-db/sqlite-3.38.0:3
1119 dev-libs/openssl:0/3
1121 dev-libs/wayland-protocols
1122 dev-util/wayland-scanner
1123 dev-util/vulkan-tools
1125 media-libs/fontconfig
1127 media-libs/vulkan-loader
1132 x11-libs/libxkbcommon
1136 >=dev-util/cargo-about-0.6.1
1137 dev-util/vulkan-headers
1138 >=sys-devel/clang-17:*
1141 >=virtual/rust-1.80.1
1145 if use !debug && use lto; then
1146 # NOTE: upstream sets to thinlto by default
1148 einfo "Enforcing lto for CC is Gcc"
1149 export CARGO_PROFILE_RELEASE_LTO="true"
1150 elif tc-is-clang; then
1151 einfo "Enforcing thinlto for CC is Clang"
1152 export CARGO_PROFILE_RELEASE_LTO="thin"
1155 export CARGO_PROFILE_RELEASE_LTO="false"
1157 # flags from upstream
1158 export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
1160 # Upstream explicitly use sys-devel/mold as linker
1161 # Any other linker might just fail
1162 einfo "Enforcing mold linker"
1163 export RUSTFLAGS="${RUSTFLAGS} -C linker=clang -C link-arg=-fuse-ld=mold"
1165 # A possible (no warranty!) workaround for other linkers
1166 #export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
1171 "${FILESDIR}/${PN}-0.142.6-remove-cargo-install-in-generate-licenses.patch"
1172 "${FILESDIR}/${P}-unbundle-sqlite.patch"
1177 # Cargo offline fetch workaround
1178 local TS_COMMIT="7f4a57817d58a2f134fe863674acad6bbf007228"
1179 local TS_GIT="git = \"https://github.com/tree-sitter/tree-sitter\", rev = \"${TS_COMMIT}\""
1180 local TS_PATH="path = \"${WORKDIR}/tree-sitter-${TS_COMMIT}/lib\""
1182 sed -e "s#${TS_GIT}#${TS_PATH}#" -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed"
1184 export DO_STARTUP_NOTIFY="true"
1185 export APP_ICON="zed"
1186 export APP_NAME="Zed"
1187 export APP_CLI="zeditor"
1188 export APP_ID="dev.zed.Zed"
1189 export APP_ARGS="%U"
1191 envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die
1193 # For "View Denpendency licenses" Button in menu
1194 # This requires package *cargo-about*
1195 # Without this the button leads to crash
1196 edo ${BASH} ./script/generate-licenses
1200 # Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
1201 export RELEASE_VERSION="${PV}"
1202 export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
1203 cargo_src_compile --package zed --package cli
1207 cargo_src_test --all-features
1211 newbin $(cargo_target_dir)/cli zeditor
1212 # hard-coded in crates/cli/src/main.rs
1213 # ["../libexec/zed-editor", "../lib/zed/zed-editor", "./zed"]
1214 exeinto "/usr/libexec"
1215 newexe $(cargo_target_dir)/zed zed-editor
1217 newicon -s 512 crates/zed/resources/app-icon.png zed.png
1218 newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
1219 domenu "${S}/${APP_ID}.desktop"