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
36 arg_enum_proc_macro@0.3.4
39 as-raw-xcb-connection@1.0.1
44 async-attributes@1.1.2
49 async-compression@0.4.6
50 async-dispatcher@0.1.2
54 async-global-executor@2.3.1
59 async-native-tls@0.5.0
68 async-stream-impl@0.3.5
74 async-tungstenite@0.23.0
77 asynchronous-codec@0.7.0
85 aws-credential-types@1.1.5
89 aws-sdk-ssooidc@1.13.0
92 aws-smithy-async@1.1.5
93 aws-smithy-checksums@0.60.5
94 aws-smithy-eventstream@0.60.4
95 aws-smithy-http@0.60.5
96 aws-smithy-json@0.60.5
97 aws-smithy-query@0.60.5
98 aws-smithy-runtime-api@1.1.5
99 aws-smithy-runtime@1.1.5
100 aws-smithy-types@1.1.5
101 aws-smithy-xml@0.60.5
137 bytecheck_derive@0.6.11
139 bytemuck_derive@1.5.0
145 calloop-wayland-source@0.3.0
155 cargo_metadata@0.18.1
169 chunked_transfer@1.4.1
179 clickhouse-derive@0.1.1
180 clickhouse-rs-cityhash-sys@0.1.2
183 cocoa-foundation@0.1.2
185 codespan-reporting@0.11.1
189 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.108.1
209 cranelift-codegen-meta@0.108.1
210 cranelift-codegen-shared@0.108.1
211 cranelift-codegen@0.108.1
212 cranelift-control@0.108.1
213 cranelift-entity@0.108.1
214 cranelift-frontend@0.108.1
215 cranelift-isle@0.108.1
216 cranelift-native@0.108.1
217 cranelift-wasm@0.108.1
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
235 curl-sys@0.4.67+curl-8.3.0
264 elliptic-curve@0.12.3
272 enumflags2_derive@0.7.9
278 errno-dragonfly@0.1.2
284 event-listener-strategy@0.4.0
285 event-listener-strategy@0.5.0
291 fallible-iterator@0.3.0
309 fontconfig-parser@0.5.6
311 foreign-types-macros@0.2.3
312 foreign-types-shared@0.1.1
313 foreign-types-shared@0.3.1
317 form_urlencoded@1.2.1
325 futures-channel@0.3.30
327 futures-executor@0.3.28
328 futures-intrusive@0.5.0
353 gpu-alloc-types@0.3.0
380 html_to_markdown@0.1.0
382 http-range-header@0.3.1
393 iana-time-zone-haiku@0.1.2
394 iana-time-zone@0.1.57
411 interpolate_name@0.2.4
421 is_terminal_polyfill@1.70.1
445 libgit2-sys@0.17.0+1.8.1
449 libmimalloc-sys@0.1.37
450 libsqlite3-sys@0.26.0
457 lmdb-master-sys@0.2.2
467 markup5ever_rcdom@0.3.0
480 minimal-lexical@0.2.1
491 ndk-sys@0.4.1+23.1.7779620
493 new_debug_unreachable@1.0.4
498 noop_proc_macro@0.3.0
516 num_enum_derive@0.5.11
529 openssl-src@300.3.0+3.3.0
537 ouroboros_macro@0.17.2
544 parity-tokio-ipc@0.9.0
547 parking_lot_core@0.9.8
551 pathfinder_geometry@0.5.1
552 pathfinder_simd@0.5.4
554 peeking_take_while@0.1.2
557 percent-encoding@2.3.1
567 pin-project-internal@1.1.3
568 pin-project-lite@0.2.13
577 plotters-backend@0.3.5
588 precomputed-hash@0.1.1
589 pretty_assertions@1.4.0
591 proc-macro-crate@1.3.1
592 proc-macro-crate@3.1.0
593 proc-macro-error-attr@1.0.4
594 proc-macro-error@1.0.4
596 profiling-procmacros@1.0.15
604 protols-tree-sitter-proto@0.2.0
607 ptr_meta_derive@0.1.4
608 pulldown-cmark@0.10.0
625 raw-window-handle@0.5.2
626 raw-window-handle@0.6.0
627 raw-window-metal@0.4.0
636 regex-automata@0.1.10
657 rust-embed-impl@8.4.0
658 rust-embed-utils@8.4.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.15
684 sea-orm-macros@0.12.15
686 sea-query-binder@0.5.0
691 security-framework-sys@2.9.1
692 security-framework@2.9.2
697 serde_derive_internals@0.26.0
700 serde_json_lenient@0.1.7
701 serde_path_to_error@0.1.15
706 serde_urlencoded@0.7.1
715 signal-hook-registry@1.4.1
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
783 system-interface@0.27.1
787 target-lexicon@0.12.13
791 thiserror-impl@1.0.62
800 tiny-skia-path@0.11.4
808 tokio-native-tls@0.3.1
811 tokio-tungstenite@0.20.1
826 tracing-attributes@0.1.27
828 tracing-futures@0.2.5
831 tracing-subscriber@0.3.18
833 tree-sitter-bash@0.21.0
835 tree-sitter-cpp@0.22.3
836 tree-sitter-css@0.21.0
837 tree-sitter-elixir@0.2.0
838 tree-sitter-embedded-template@0.20.0
839 tree-sitter-go@0.21.0
840 tree-sitter-html@0.20.3
841 tree-sitter-jsdoc@0.21.0
842 tree-sitter-json@0.21.0
843 tree-sitter-python@0.21.0
844 tree-sitter-regex@0.21.0
845 tree-sitter-ruby@0.21.0
846 tree-sitter-rust@0.21.2
847 tree-sitter-typescript@0.21.2
848 tree-sitter-yaml@0.6.1
856 unicode-bidi-mirroring@0.2.0
860 unicode-linebreak@0.1.5
861 unicode-normalization@0.1.23
862 unicode-properties@0.1.1
864 unicode-segmentation@1.10.1
867 unicode_categories@0.1.1
878 value-bag-serde1@1.9.0
879 value-bag-sval2@1.9.0
882 version-compare@0.2.0
889 vte_generate_state_changes@0.1.1
893 wasi@0.11.0+wasi-snapshot-preview1
894 wasi@0.9.0+wasi-snapshot-preview1
896 wasm-bindgen-backend@0.2.92
897 wasm-bindgen-futures@0.4.37
898 wasm-bindgen-macro-support@0.2.92
899 wasm-bindgen-macro@0.2.92
900 wasm-bindgen-shared@0.2.92
904 wasm-metadata@0.201.0
908 wasmtime-asm-macros@21.0.1
909 wasmtime-c-api-impl@21.0.1
910 wasmtime-c-api-macros@21.0.1
911 wasmtime-component-macro@21.0.1
912 wasmtime-component-util@21.0.1
913 wasmtime-cranelift@21.0.1
914 wasmtime-environ@21.0.1
915 wasmtime-fiber@21.0.1
916 wasmtime-jit-icache-coherence@21.0.1
918 wasmtime-types@21.0.1
919 wasmtime-versioned-export-macros@21.0.1
921 wasmtime-winch@21.0.1
922 wasmtime-wit-bindgen@21.0.1
925 wayland-backend@0.3.3
926 wayland-client@0.31.2
927 wayland-cursor@0.31.1
928 wayland-protocols-plasma@0.2.0
929 wayland-protocols@0.31.2
930 wayland-scanner@0.31.1
938 wiggle-generate@21.0.1
941 winapi-i686-pc-windows-gnu@0.4.0
943 winapi-x86_64-pc-windows-gnu@0.4.0
948 windows-implement@0.58.0
949 windows-interface@0.58.0
951 windows-strings@0.1.0
955 windows-targets@0.42.2
956 windows-targets@0.48.5
957 windows-targets@0.52.6
962 windows_aarch64_gnullvm@0.42.2
963 windows_aarch64_gnullvm@0.48.5
964 windows_aarch64_gnullvm@0.52.6
965 windows_aarch64_msvc@0.42.2
966 windows_aarch64_msvc@0.48.5
967 windows_aarch64_msvc@0.52.6
968 windows_i686_gnu@0.42.2
969 windows_i686_gnu@0.48.5
970 windows_i686_gnu@0.52.6
971 windows_i686_gnullvm@0.52.6
972 windows_i686_msvc@0.42.2
973 windows_i686_msvc@0.48.5
974 windows_i686_msvc@0.52.6
975 windows_x86_64_gnu@0.42.2
976 windows_x86_64_gnu@0.48.5
977 windows_x86_64_gnu@0.52.6
978 windows_x86_64_gnullvm@0.42.2
979 windows_x86_64_gnullvm@0.48.5
980 windows_x86_64_gnullvm@0.52.6
981 windows_x86_64_msvc@0.42.2
982 windows_x86_64_msvc@0.48.5
983 windows_x86_64_msvc@0.52.6
991 wit-bindgen-core@0.22.0
992 wit-bindgen-rt@0.22.0
993 wit-bindgen-rust-macro@0.22.0
994 wit-bindgen-rust@0.22.0
996 wit-component@0.201.0
1002 x11rb-protocol@0.13.0
1013 yeslogic-fontconfig-sys@6.0.0
1017 zed_extension_api@0.0.6
1019 zerocopy-derive@0.7.32
1022 zeroize_derive@1.4.2
1024 zstd-safe@5.0.2+zstd.1.5.2
1025 zstd-sys@2.0.8+zstd.1.5.5
1026 zstd@0.11.2+zstd.1.5.2
1031 zvariant_derive@4.0.2
1032 zvariant_utils@1.1.0
1035 declare -A GIT_CRATES=(
1036 [alacritty_terminal]='https://github.com/alacritty/alacritty;cacdb5bb3b72bad2c729227537979d95af75978f;alacritty-%commit%/alacritty_terminal'
1037 [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
1038 [blade-graphics]='https://github.com/zed-industries/blade;7e497c534d5d4a30c18d9eb182cf39eaf0aaa25e;blade-%commit%/blade-graphics'
1039 [blade-macros]='https://github.com/zed-industries/blade;7e497c534d5d4a30c18d9eb182cf39eaf0aaa25e;blade-%commit%/blade-macros'
1040 [blade-util]='https://github.com/zed-industries/blade;7e497c534d5d4a30c18d9eb182cf39eaf0aaa25e;blade-%commit%/blade-util'
1041 [cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
1042 [font-kit]='https://github.com/zed-industries/font-kit;40391b7c0041d8a8572af2afa3de32ae088f0120;font-kit-%commit%'
1043 [lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
1044 [nvim-rs]='https://github.com/KillTheMule/nvim-rs;0d2b1c884f3c39a76b5b7aac0b429f4624843954;nvim-rs-%commit%'
1045 [tree-sitter-gomod]='https://github.com/camdencheek/tree-sitter-go-mod;1f55029bacd0a6a11f6eb894c4312d429dcf735c;tree-sitter-go-mod-%commit%'
1046 [tree-sitter-gowork]='https://github.com/d1y/tree-sitter-go-work;dcbabff454703c3a4bc98a23cf8778d4be46fd22;tree-sitter-go-work-%commit%'
1047 [tree-sitter-heex]='https://github.com/phoenixframework/tree-sitter-heex;6dd0303acf7138dd2b9b432a229e16539581c701;tree-sitter-heex-%commit%'
1048 [tree-sitter-language]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib/language'
1049 [tree-sitter-md]='https://github.com/zed-industries/tree-sitter-markdown;e3855e37f8f2c71aa7513c18a9c95fb7461b1b10;tree-sitter-markdown-%commit%'
1050 [tree-sitter]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib'
1051 [xim-ctext]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-ctext'
1052 [xim-parser]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-parser'
1053 [xim]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%'
1054 [xkbcommon]='https://github.com/ConradIrwin/xkbcommon-rs;fcbb4612185cc129ceeff51d22f7fb51810a03b2;xkbcommon-rs-%commit%'
1057 inherit cargo desktop edo toolchain-funcs xdg
1059 DESCRIPTION="high-performance, multiplayer code editor"
1062 https://github.com/zed-industries/zed/
1065 https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
1069 # OFL-1.1 for IBM Plex
1071 LICENSE="GPL-3+ AGPL-3+ Apache-2.0 OFL-1.1"
1072 # Dependent crate licenses
1074 Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 ISC
1075 LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 ZLIB
1080 REQUIRED_USE="lto? ( !debug )"
1083 >=dev-db/sqlite-3.38.0:3
1085 dev-libs/openssl:0/3
1087 dev-libs/wayland-protocols
1088 dev-util/wayland-scanner
1089 dev-util/vulkan-tools
1091 media-libs/fontconfig
1093 media-libs/vulkan-loader
1098 x11-libs/libxkbcommon
1102 >=dev-util/cargo-about-0.6.1
1103 dev-util/vulkan-headers
1104 >=sys-devel/clang-17:*
1107 >=virtual/rust-1.80.1
1111 if use !debug && use lto; then
1112 # NOTE: upstream sets to thinlto by default
1114 einfo "Enforcing lto for CC is Gcc"
1115 export CARGO_PROFILE_RELEASE_LTO="true"
1116 elif tc-is-clang; then
1117 einfo "Enforcing thinlto for CC is Clang"
1118 export CARGO_PROFILE_RELEASE_LTO="thin"
1121 export CARGO_PROFILE_RELEASE_LTO="false"
1123 # flags from upstream
1124 export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
1126 # Upstream explicitly use sys-devel/mold as linker
1127 # Any other linker might just fail
1128 einfo "Enforcing mold linker"
1129 export RUSTFLAGS="${RUSTFLAGS} -C linker=clang -C link-arg=-fuse-ld=mold"
1131 # A possible (no warranty!) workaround for other linkers
1132 #export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
1137 "${FILESDIR}/${PN}-0.142.6-remove-cargo-install-in-generate-licenses.patch"
1138 # From https://github.com/getsolus/packages/tree/main/packages/z/zed
1139 "${FILESDIR}/${PN}-0.143.7-use-system-libs.patch"
1140 "${FILESDIR}/${PN}-0.147.2-fix-cargo-eclass-rustflags-merge.patch"
1145 # Cargo offline fetch workaround
1146 local TS_COMMIT="7f4a57817d58a2f134fe863674acad6bbf007228"
1147 local TS_GIT="git = \"https://github.com/tree-sitter/tree-sitter\", rev = \"${TS_COMMIT}\""
1148 local TS_PATH="path = \"${WORKDIR}/tree-sitter-${TS_COMMIT}/lib\""
1150 sed -e "s#${TS_GIT}#${TS_PATH}#" \
1151 -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed"
1153 export DO_STARTUP_NOTIFY="true"
1154 export APP_ICON="zed"
1155 export APP_NAME="Zed"
1156 export APP_CLI="zeditor"
1157 export APP_ID="dev.zed.Zed"
1158 export APP_ARGS="%U"
1160 envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die
1162 # For "View Denpendency licenses" Button in menu
1163 # This requires package *cargo-about*
1164 # Without this the button leads to crash
1165 edo ${BASH} ./script/generate-licenses
1169 # Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
1170 export RELEASE_VERSION="${PV}"
1171 export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
1172 cargo_src_compile --package zed --package cli
1176 cargo_src_test --all-features
1180 newbin $(cargo_target_dir)/cli zeditor
1181 # hard-coded in crates/cli/src/main.rs
1182 # ["../libexec/zed-editor", "../lib/zed/zed-editor", "./zed"]
1183 exeinto "/usr/libexec"
1184 newexe $(cargo_target_dir)/zed zed-editor
1186 newicon -s 512 crates/zed/resources/app-icon.png zed.png
1187 newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
1188 domenu "${S}/${APP_ID}.desktop"