1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.13.3
20 ambient-authority@0.0.2
22 android_system_properties@0.1.5
33 arg_enum_proc_macro@0.3.4
36 as-raw-xcb-connection@1.0.1
41 async-attributes@1.1.2
46 async-compression@0.4.12
47 async-dispatcher@0.1.2
51 async-global-executor@2.4.1
56 async-native-tls@0.5.0
65 async-stream-impl@0.3.5
71 async-tungstenite@0.23.0
74 asynchronous-codec@0.7.0
82 aws-credential-types@1.2.0
86 aws-sdk-ssooidc@1.38.0
89 aws-smithy-async@1.2.1
90 aws-smithy-checksums@0.60.12
91 aws-smithy-eventstream@0.60.4
92 aws-smithy-http@0.60.9
93 aws-smithy-json@0.60.7
94 aws-smithy-query@0.60.7
95 aws-smithy-runtime-api@1.7.2
96 aws-smithy-runtime@1.6.2
97 aws-smithy-types@1.2.0
135 bytecheck_derive@0.6.12
137 bytemuck_derive@1.7.0
143 calloop-wayland-source@0.3.0
153 cargo_metadata@0.18.1
167 chunked_transfer@1.5.0
177 clickhouse-derive@0.1.1
178 clickhouse-rs-cityhash-sys@0.1.2
181 cocoa-foundation@0.1.2
183 codespan-reporting@0.11.1
187 concurrent-queue@2.5.0
190 const-random-macro@0.1.16
194 core-foundation-sys@0.8.7
195 core-foundation@0.9.4
196 core-graphics-types@0.1.3
205 cranelift-bforest@0.108.1
206 cranelift-codegen-meta@0.108.1
207 cranelift-codegen-shared@0.108.1
208 cranelift-codegen@0.108.1
209 cranelift-control@0.108.1
210 cranelift-entity@0.108.1
211 cranelift-frontend@0.108.1
212 cranelift-isle@0.108.1
213 cranelift-native@0.108.1
214 cranelift-wasm@0.108.1
221 crossbeam-channel@0.5.13
222 crossbeam-deque@0.8.5
223 crossbeam-epoch@0.9.18
224 crossbeam-queue@0.3.11
225 crossbeam-utils@0.8.20
232 curl-sys@0.4.74+curl-8.9.0
261 elliptic-curve@0.12.3
269 enumflags2_derive@0.7.10
275 errno-dragonfly@0.1.2
281 event-listener-strategy@0.5.2
287 fallible-iterator@0.3.0
304 fontconfig-parser@0.5.7
306 foreign-types-macros@0.2.3
307 foreign-types-shared@0.1.1
308 foreign-types-shared@0.3.1
312 form_urlencoded@1.2.1
320 futures-channel@0.3.30
322 futures-executor@0.3.30
323 futures-intrusive@0.5.0
348 gpu-alloc-types@0.3.0
377 html_to_markdown@0.1.0
381 http-range-header@0.3.1
392 iana-time-zone-haiku@0.1.2
393 iana-time-zone@0.1.60
410 interpolate_name@0.2.4
420 is_terminal_polyfill@1.70.1
443 libgit2-sys@0.17.0+1.8.1
446 libmimalloc-sys@0.1.39
448 libsqlite3-sys@0.26.0
455 lmdb-master-sys@0.2.4
466 markup5ever_rcdom@0.3.0
479 minimal-lexical@0.2.1
491 ndk-sys@0.5.0+25.2.9519653
493 new_debug_unreachable@1.0.6
497 noop_proc_macro@0.3.0
514 num_enum_derive@0.7.3
527 openssl-src@300.3.1+3.3.1
535 ouroboros_macro@0.17.2
542 parity-tokio-ipc@0.9.0
545 parking_lot_core@0.9.10
549 pathfinder_geometry@0.5.1
550 pathfinder_simd@0.5.4
552 peeking_take_while@0.1.2
555 percent-encoding@2.3.1
558 pest_generator@2.7.11
569 pin-project-internal@1.1.5
570 pin-project-lite@0.2.14
579 plotters-backend@0.3.6
590 precomputed-hash@0.1.1
591 pretty_assertions@1.4.0
593 proc-macro-crate@3.1.0
594 proc-macro-error-attr@1.0.4
595 proc-macro-error@1.0.4
597 profiling-procmacros@1.0.15
605 protols-tree-sitter-proto@0.2.0
608 ptr_meta_derive@0.1.4
609 pulldown-cmark@0.10.3
626 raw-window-handle@0.6.2
627 raw-window-metal@0.4.0
636 regex-automata@0.1.10
657 rust-embed-impl@8.5.0
658 rust-embed-utils@8.5.0
661 rustc-demangle@0.1.24
667 rustls-native-certs@0.6.3
669 rustls-webpki@0.101.7
678 schemars_derive@0.8.21
684 sea-orm-macros@0.12.15
686 sea-query-binder@0.5.0
691 security-framework-sys@2.11.1
692 security-framework@2.11.1
697 serde_derive_internals@0.26.0
698 serde_derive_internals@0.29.1
701 serde_json_lenient@0.1.8
702 serde_path_to_error@0.1.16
707 serde_urlencoded@0.7.1
716 signal-hook-registry@1.4.2
742 spirv@0.3.0+sdk-1.3.268.0
748 sqlx-macros-core@0.7.2
754 stable_deref_trait@1.2.0
755 static_assertions@1.1.0
758 string_cache_codegen@0.5.2
782 system-configuration-sys@0.5.0
783 system-configuration@0.5.1
785 system-interface@0.27.2
789 target-lexicon@0.12.16
793 thiserror-impl@1.0.63
802 tiny-skia-path@0.11.4
810 tokio-native-tls@0.3.1
813 tokio-tungstenite@0.20.1
828 tracing-attributes@0.1.27
830 tracing-futures@0.2.5
833 tracing-subscriber@0.3.18
835 tree-sitter-bash@0.21.0
837 tree-sitter-cpp@0.22.3
838 tree-sitter-css@0.21.0
839 tree-sitter-elixir@0.2.0
840 tree-sitter-embedded-template@0.20.0
841 tree-sitter-go@0.21.0
842 tree-sitter-html@0.20.3
843 tree-sitter-jsdoc@0.21.0
844 tree-sitter-json@0.21.0
845 tree-sitter-python@0.21.0
846 tree-sitter-regex@0.21.0
847 tree-sitter-ruby@0.21.0
848 tree-sitter-rust@0.21.2
849 tree-sitter-typescript@0.21.2
850 tree-sitter-yaml@0.6.1
859 unicode-bidi-mirroring@0.2.0
863 unicode-linebreak@0.1.5
864 unicode-normalization@0.1.23
865 unicode-properties@0.1.1
867 unicode-segmentation@1.11.0
870 unicode_categories@0.1.1
881 value-bag-serde1@1.9.0
882 value-bag-sval2@1.9.0
885 version-compare@0.2.0
892 vte_generate_state_changes@0.1.2
896 wasi@0.11.0+wasi-snapshot-preview1
897 wasi@0.9.0+wasi-snapshot-preview1
899 wasm-bindgen-backend@0.2.92
900 wasm-bindgen-futures@0.4.42
901 wasm-bindgen-macro-support@0.2.92
902 wasm-bindgen-macro@0.2.92
903 wasm-bindgen-shared@0.2.92
907 wasm-metadata@0.201.0
911 wasmtime-asm-macros@21.0.1
912 wasmtime-c-api-impl@21.0.1
913 wasmtime-c-api-macros@21.0.1
914 wasmtime-component-macro@21.0.1
915 wasmtime-component-util@21.0.1
916 wasmtime-cranelift@21.0.1
917 wasmtime-environ@21.0.1
918 wasmtime-fiber@21.0.1
919 wasmtime-jit-icache-coherence@21.0.1
921 wasmtime-types@21.0.1
922 wasmtime-versioned-export-macros@21.0.1
924 wasmtime-winch@21.0.1
925 wasmtime-wit-bindgen@21.0.1
928 wayland-backend@0.3.6
929 wayland-client@0.31.5
930 wayland-cursor@0.31.5
931 wayland-protocols-plasma@0.2.0
932 wayland-protocols@0.31.2
933 wayland-scanner@0.31.4
941 wiggle-generate@21.0.1
944 winapi-i686-pc-windows-gnu@0.4.0
946 winapi-x86_64-pc-windows-gnu@0.4.0
952 windows-implement@0.58.0
953 windows-interface@0.58.0
956 windows-strings@0.1.0
961 windows-targets@0.42.2
962 windows-targets@0.48.5
963 windows-targets@0.52.6
968 windows_aarch64_gnullvm@0.42.2
969 windows_aarch64_gnullvm@0.48.5
970 windows_aarch64_gnullvm@0.52.6
971 windows_aarch64_msvc@0.42.2
972 windows_aarch64_msvc@0.48.5
973 windows_aarch64_msvc@0.52.6
974 windows_i686_gnu@0.42.2
975 windows_i686_gnu@0.48.5
976 windows_i686_gnu@0.52.6
977 windows_i686_gnullvm@0.52.6
978 windows_i686_msvc@0.42.2
979 windows_i686_msvc@0.48.5
980 windows_i686_msvc@0.52.6
981 windows_x86_64_gnu@0.42.2
982 windows_x86_64_gnu@0.48.5
983 windows_x86_64_gnu@0.52.6
984 windows_x86_64_gnullvm@0.42.2
985 windows_x86_64_gnullvm@0.48.5
986 windows_x86_64_gnullvm@0.52.6
987 windows_x86_64_msvc@0.42.2
988 windows_x86_64_msvc@0.48.5
989 windows_x86_64_msvc@0.52.6
998 wit-bindgen-core@0.22.0
999 wit-bindgen-rt@0.22.0
1000 wit-bindgen-rust-macro@0.22.0
1001 wit-bindgen-rust@0.22.0
1003 wit-component@0.201.0
1009 x11rb-protocol@0.13.1
1020 yeslogic-fontconfig-sys@6.0.0
1024 zed_extension_api@0.0.6
1025 zed_extension_api@0.1.0
1027 zerocopy-derive@0.7.35
1030 zeroize_derive@1.4.2
1032 zstd-safe@5.0.2+zstd.1.5.2
1033 zstd-sys@2.0.13+zstd.1.5.6
1034 zstd@0.11.2+zstd.1.5.2
1039 zvariant_derive@4.2.0
1040 zvariant_utils@2.1.0
1043 declare -A GIT_CRATES=(
1044 [alacritty_terminal]='https://github.com/alacritty/alacritty;cacdb5bb3b72bad2c729227537979d95af75978f;alacritty-%commit%/alacritty_terminal'
1045 [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
1046 [blade-graphics]='https://github.com/kvark/blade;ac25c77ed8d86c386a541c935ffe0a0f6024e701;blade-%commit%/blade-graphics'
1047 [blade-macros]='https://github.com/kvark/blade;ac25c77ed8d86c386a541c935ffe0a0f6024e701;blade-%commit%/blade-macros'
1048 [blade-util]='https://github.com/kvark/blade;ac25c77ed8d86c386a541c935ffe0a0f6024e701;blade-%commit%/blade-util'
1049 [cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
1050 [font-kit]='https://github.com/zed-industries/font-kit;40391b7c0041d8a8572af2afa3de32ae088f0120;font-kit-%commit%'
1051 [lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
1052 [nvim-rs]='https://github.com/KillTheMule/nvim-rs;69500bae73b8b3f02a05b7bee621a0d0e633da6c;nvim-rs-%commit%'
1053 [tree-sitter-gomod]='https://github.com/camdencheek/tree-sitter-go-mod;1f55029bacd0a6a11f6eb894c4312d429dcf735c;tree-sitter-go-mod-%commit%'
1054 [tree-sitter-gowork]='https://github.com/d1y/tree-sitter-go-work;dcbabff454703c3a4bc98a23cf8778d4be46fd22;tree-sitter-go-work-%commit%'
1055 [tree-sitter-heex]='https://github.com/phoenixframework/tree-sitter-heex;6dd0303acf7138dd2b9b432a229e16539581c701;tree-sitter-heex-%commit%'
1056 [tree-sitter-language]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib/language'
1057 [tree-sitter-md]='https://github.com/zed-industries/tree-sitter-markdown;e3855e37f8f2c71aa7513c18a9c95fb7461b1b10;tree-sitter-markdown-%commit%'
1058 [tree-sitter]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib'
1059 [xim-ctext]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-ctext'
1060 [xim-parser]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-parser'
1061 [xim]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%'
1062 [xkbcommon]='https://github.com/ConradIrwin/xkbcommon-rs;fcbb4612185cc129ceeff51d22f7fb51810a03b2;xkbcommon-rs-%commit%'
1065 inherit cargo desktop edo toolchain-funcs xdg
1067 DESCRIPTION="high-performance, multiplayer code editor"
1070 https://github.com/zed-industries/zed/
1073 https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
1077 # OFL-1.1 for IBM Plex
1079 LICENSE="GPL-3+ AGPL-3+ Apache-2.0 OFL-1.1"
1080 # Dependent crate licenses
1082 Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 ISC
1083 LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 ZLIB
1088 REQUIRED_USE="lto? ( !debug )"
1091 >=dev-db/sqlite-3.38.0:3
1093 dev-libs/openssl:0/3
1095 dev-libs/wayland-protocols
1096 dev-util/wayland-scanner
1097 dev-util/vulkan-tools
1099 media-libs/fontconfig
1101 media-libs/vulkan-loader
1106 x11-libs/libxkbcommon
1110 >=dev-util/cargo-about-0.6.1
1111 dev-util/vulkan-headers
1112 >=sys-devel/clang-17:*
1115 >=virtual/rust-1.80.1
1119 if use !debug && use lto; then
1120 # NOTE: upstream sets to thinlto by default
1122 einfo "Enforcing lto for CC is Gcc"
1123 export CARGO_PROFILE_RELEASE_LTO="true"
1124 elif tc-is-clang; then
1125 einfo "Enforcing thinlto for CC is Clang"
1126 export CARGO_PROFILE_RELEASE_LTO="thin"
1129 export CARGO_PROFILE_RELEASE_LTO="false"
1131 # flags from upstream
1132 export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
1134 # Upstream explicitly use sys-devel/mold as linker
1135 # Any other linker might just fail
1136 einfo "Enforcing mold linker"
1137 export RUSTFLAGS="${RUSTFLAGS} -C linker=clang -C link-arg=-fuse-ld=mold"
1139 # A possible (no warranty!) workaround for other linkers
1140 #export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
1145 "${FILESDIR}/${PN}-0.142.6-remove-cargo-install-in-generate-licenses.patch"
1146 # From https://github.com/getsolus/packages/tree/main/packages/z/zed
1147 "${FILESDIR}/${PN}-0.143.7-use-system-libs.patch"
1148 "${FILESDIR}/${PN}-0.147.2-fix-cargo-eclass-rustflags-merge.patch"
1153 # Cargo offline fetch workaround
1154 local TS_COMMIT="7f4a57817d58a2f134fe863674acad6bbf007228"
1155 local TS_GIT="git = \"https://github.com/tree-sitter/tree-sitter\", rev = \"${TS_COMMIT}\""
1156 local TS_PATH="path = \"${WORKDIR}/tree-sitter-${TS_COMMIT}/lib\""
1158 sed -e "s#${TS_GIT}#${TS_PATH}#" -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed"
1160 export DO_STARTUP_NOTIFY="true"
1161 export APP_ICON="zed"
1162 export APP_NAME="Zed"
1163 export APP_CLI="zeditor"
1164 export APP_ID="dev.zed.Zed"
1165 export APP_ARGS="%U"
1167 envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die
1169 # For "View Denpendency licenses" Button in menu
1170 # This requires package *cargo-about*
1171 # Without this the button leads to crash
1172 edo ${BASH} ./script/generate-licenses
1176 # Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
1177 export RELEASE_VERSION="${PV}"
1178 export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
1179 cargo_src_compile --package zed --package cli
1183 cargo_src_test --all-features
1187 newbin $(cargo_target_dir)/cli zeditor
1188 # hard-coded in crates/cli/src/main.rs
1189 # ["../libexec/zed-editor", "../lib/zed/zed-editor", "./zed"]
1190 exeinto "/usr/libexec"
1191 newexe $(cargo_target_dir)/zed zed-editor
1193 newicon -s 512 crates/zed/resources/app-icon.png zed.png
1194 newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
1195 domenu "${S}/${APP_ID}.desktop"