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
137 bytecheck_derive@0.6.12
139 bytemuck_derive@1.7.1
145 calloop-wayland-source@0.3.0
155 cargo_metadata@0.18.1
169 chunked_transfer@1.5.0
180 clickhouse-derive@0.1.1
181 clickhouse-rs-cityhash-sys@0.1.2
184 cocoa-foundation@0.1.2
186 codespan-reporting@0.11.1
190 concurrent-queue@2.5.0
193 const-random-macro@0.1.16
197 core-foundation-sys@0.8.7
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.13
225 crossbeam-deque@0.8.5
226 crossbeam-epoch@0.9.18
227 crossbeam-queue@0.3.11
228 crossbeam-utils@0.8.20
235 curl-sys@0.4.74+curl-8.9.0
266 elliptic-curve@0.12.3
275 enumflags2_derive@0.7.10
281 errno-dragonfly@0.1.2
287 event-listener-strategy@0.5.2
293 fallible-iterator@0.3.0
310 fontconfig-parser@0.5.7
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
326 futures-channel@0.3.30
328 futures-executor@0.3.30
329 futures-intrusive@0.5.0
354 gpu-alloc-types@0.3.0
384 html_to_markdown@0.1.0
388 http-range-header@0.3.1
399 iana-time-zone-haiku@0.1.2
400 iana-time-zone@0.1.60
417 interpolate_name@0.2.4
427 is_terminal_polyfill@1.70.1
451 libgit2-sys@0.17.0+1.8.1
454 libmimalloc-sys@0.1.39
456 libsqlite3-sys@0.26.0
463 lmdb-master-sys@0.2.4
475 markup5ever_rcdom@0.3.0
490 minimal-lexical@0.2.1
503 ndk-sys@0.5.0+25.2.9519653
505 new_debug_unreachable@1.0.6
509 noop_proc_macro@0.3.0
511 notify-debouncer-mini@0.4.1
528 num_enum_derive@0.7.3
542 openssl-src@300.3.1+3.3.1
550 ouroboros_macro@0.17.2
557 parity-tokio-ipc@0.9.0
560 parking_lot_core@0.9.10
564 pathfinder_geometry@0.5.1
565 pathfinder_simd@0.5.4
567 peeking_take_while@0.1.2
570 percent-encoding@2.3.1
573 pest_generator@2.7.11
584 pin-project-internal@1.1.5
585 pin-project-lite@0.2.14
594 plotters-backend@0.3.6
605 precomputed-hash@0.1.1
606 pretty_assertions@1.4.0
608 proc-macro-crate@3.2.0
609 proc-macro-error-attr@1.0.4
610 proc-macro-error@1.0.4
612 profiling-procmacros@1.0.15
620 protols-tree-sitter-proto@0.2.0
623 ptr_meta_derive@0.1.4
624 pulldown-cmark-escape@0.10.1
625 pulldown-cmark@0.10.3
642 raw-window-handle@0.6.2
643 raw-window-metal@0.4.0
652 regex-automata@0.1.10
673 rust-embed-impl@8.5.0
674 rust-embed-utils@8.5.0
677 rustc-demangle@0.1.24
683 rustls-native-certs@0.6.3
685 rustls-webpki@0.101.7
694 schemars_derive@0.8.21
700 sea-orm-macros@0.12.15
702 sea-query-binder@0.5.0
707 security-framework-sys@2.11.1
708 security-framework@2.11.1
713 serde_derive_internals@0.26.0
714 serde_derive_internals@0.29.1
717 serde_json_lenient@0.1.8
718 serde_path_to_error@0.1.16
723 serde_urlencoded@0.7.1
732 signal-hook-registry@1.4.2
758 spirv@0.3.0+sdk-1.3.268.0
764 sqlx-macros-core@0.7.2
770 stable_deref_trait@1.2.0
771 static_assertions@1.1.0
774 string_cache_codegen@0.5.2
798 system-configuration-sys@0.5.0
799 system-configuration@0.5.1
801 system-interface@0.27.2
805 target-lexicon@0.12.16
810 thiserror-impl@1.0.63
819 tiny-skia-path@0.11.4
827 tokio-native-tls@0.3.1
831 tokio-tungstenite@0.20.1
832 tokio-tungstenite@0.21.0
841 topological-sort@0.2.2
847 tracing-attributes@0.1.27
849 tracing-futures@0.2.5
852 tracing-subscriber@0.3.18
854 tree-sitter-bash@0.21.0
856 tree-sitter-cpp@0.22.3
857 tree-sitter-css@0.21.1
858 tree-sitter-elixir@0.2.0
859 tree-sitter-embedded-template@0.20.0
860 tree-sitter-go@0.21.2
861 tree-sitter-html@0.20.4
862 tree-sitter-jsdoc@0.21.0
863 tree-sitter-json@0.21.0
864 tree-sitter-python@0.21.0
865 tree-sitter-regex@0.21.0
866 tree-sitter-ruby@0.21.0
867 tree-sitter-rust@0.21.2
868 tree-sitter-typescript@0.21.2
869 tree-sitter-yaml@0.6.1
879 unicode-bidi-mirroring@0.2.0
883 unicode-linebreak@0.1.5
884 unicode-normalization@0.1.23
885 unicode-properties@0.1.2
887 unicode-segmentation@1.11.0
890 unicode_categories@0.1.1
901 value-bag-serde1@1.9.0
902 value-bag-sval2@1.9.0
905 version-compare@0.2.0
912 vte_generate_state_changes@0.1.2
917 wasi@0.11.0+wasi-snapshot-preview1
918 wasi@0.9.0+wasi-snapshot-preview1
920 wasm-bindgen-backend@0.2.93
921 wasm-bindgen-futures@0.4.43
922 wasm-bindgen-macro-support@0.2.93
923 wasm-bindgen-macro@0.2.93
924 wasm-bindgen-shared@0.2.93
928 wasm-metadata@0.201.0
932 wasmtime-asm-macros@21.0.1
933 wasmtime-c-api-impl@21.0.1
934 wasmtime-c-api-macros@21.0.1
935 wasmtime-component-macro@21.0.1
936 wasmtime-component-util@21.0.1
937 wasmtime-cranelift@21.0.1
938 wasmtime-environ@21.0.1
939 wasmtime-fiber@21.0.1
940 wasmtime-jit-icache-coherence@21.0.1
942 wasmtime-types@21.0.1
943 wasmtime-versioned-export-macros@21.0.1
945 wasmtime-winch@21.0.1
946 wasmtime-wit-bindgen@21.0.1
949 wayland-backend@0.3.6
950 wayland-client@0.31.5
951 wayland-cursor@0.31.5
952 wayland-protocols-plasma@0.2.0
953 wayland-protocols@0.31.2
954 wayland-scanner@0.31.4
962 wiggle-generate@21.0.1
965 winapi-i686-pc-windows-gnu@0.4.0
967 winapi-x86_64-pc-windows-gnu@0.4.0
973 windows-implement@0.58.0
974 windows-interface@0.58.0
977 windows-strings@0.1.0
982 windows-targets@0.42.2
983 windows-targets@0.48.5
984 windows-targets@0.52.6
989 windows_aarch64_gnullvm@0.42.2
990 windows_aarch64_gnullvm@0.48.5
991 windows_aarch64_gnullvm@0.52.6
992 windows_aarch64_msvc@0.42.2
993 windows_aarch64_msvc@0.48.5
994 windows_aarch64_msvc@0.52.6
995 windows_i686_gnu@0.42.2
996 windows_i686_gnu@0.48.5
997 windows_i686_gnu@0.52.6
998 windows_i686_gnullvm@0.52.6
999 windows_i686_msvc@0.42.2
1000 windows_i686_msvc@0.48.5
1001 windows_i686_msvc@0.52.6
1002 windows_x86_64_gnu@0.42.2
1003 windows_x86_64_gnu@0.48.5
1004 windows_x86_64_gnu@0.52.6
1005 windows_x86_64_gnullvm@0.42.2
1006 windows_x86_64_gnullvm@0.48.5
1007 windows_x86_64_gnullvm@0.52.6
1008 windows_x86_64_msvc@0.42.2
1009 windows_x86_64_msvc@0.48.5
1010 windows_x86_64_msvc@0.52.6
1019 wit-bindgen-core@0.22.0
1020 wit-bindgen-rt@0.22.0
1021 wit-bindgen-rust-macro@0.22.0
1022 wit-bindgen-rust@0.22.0
1024 wit-component@0.201.0
1030 x11rb-protocol@0.13.1
1041 yeslogic-fontconfig-sys@6.0.0
1045 zed_extension_api@0.1.0
1047 zerocopy-derive@0.7.35
1050 zeroize_derive@1.4.2
1052 zstd-safe@5.0.2+zstd.1.5.2
1053 zstd-sys@2.0.13+zstd.1.5.6
1054 zstd@0.11.2+zstd.1.5.2
1059 zvariant_derive@4.2.0
1060 zvariant_utils@2.1.0
1063 declare -A GIT_CRATES=(
1064 [alacritty_terminal]='https://github.com/alacritty/alacritty;91d034ff8b53867143c005acfaa14609147c9a2c;alacritty-%commit%/alacritty_terminal'
1065 [async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
1066 [blade-graphics]='https://github.com/kvark/blade;bf40d4f91fb56031e8676376dba2fc021b3e8eaf;blade-%commit%/blade-graphics'
1067 [blade-macros]='https://github.com/kvark/blade;bf40d4f91fb56031e8676376dba2fc021b3e8eaf;blade-%commit%/blade-macros'
1068 [blade-util]='https://github.com/kvark/blade;bf40d4f91fb56031e8676376dba2fc021b3e8eaf;blade-%commit%/blade-util'
1069 [cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
1070 [font-kit]='https://github.com/zed-industries/font-kit;40391b7c0041d8a8572af2afa3de32ae088f0120;font-kit-%commit%'
1071 [lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
1072 [nvim-rs]='https://github.com/KillTheMule/nvim-rs;69500bae73b8b3f02a05b7bee621a0d0e633da6c;nvim-rs-%commit%'
1073 [tree-sitter-gomod]='https://github.com/camdencheek/tree-sitter-go-mod;1f55029bacd0a6a11f6eb894c4312d429dcf735c;tree-sitter-go-mod-%commit%'
1074 [tree-sitter-gowork]='https://github.com/d1y/tree-sitter-go-work;dcbabff454703c3a4bc98a23cf8778d4be46fd22;tree-sitter-go-work-%commit%'
1075 [tree-sitter-heex]='https://github.com/phoenixframework/tree-sitter-heex;6dd0303acf7138dd2b9b432a229e16539581c701;tree-sitter-heex-%commit%'
1076 [tree-sitter-language]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib/language'
1077 [tree-sitter-md]='https://github.com/zed-industries/tree-sitter-markdown;e3855e37f8f2c71aa7513c18a9c95fb7461b1b10;tree-sitter-markdown-%commit%'
1078 [tree-sitter]='https://github.com/tree-sitter/tree-sitter;7f4a57817d58a2f134fe863674acad6bbf007228;tree-sitter-%commit%/lib'
1079 [xim-ctext]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-ctext'
1080 [xim-parser]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%/xim-parser'
1081 [xim]='https://github.com/npmania/xim-rs;27132caffc5b9bc9c432ca4afad184ab6e7c16af;xim-rs-%commit%'
1082 [xkbcommon]='https://github.com/ConradIrwin/xkbcommon-rs;fcbb4612185cc129ceeff51d22f7fb51810a03b2;xkbcommon-rs-%commit%'
1085 inherit cargo desktop edo toolchain-funcs xdg
1087 DESCRIPTION="high-performance, multiplayer code editor"
1090 https://github.com/zed-industries/zed/
1093 https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
1097 # OFL-1.1 for IBM Plex
1099 LICENSE="GPL-3+ AGPL-3+ Apache-2.0 OFL-1.1"
1100 # Dependent crate licenses
1102 Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 ISC
1103 LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 ZLIB
1108 REQUIRED_USE="lto? ( !debug )"
1111 >=dev-db/sqlite-3.38.0:3
1113 dev-libs/openssl:0/3
1115 dev-libs/wayland-protocols
1116 dev-util/wayland-scanner
1117 dev-util/vulkan-tools
1119 media-libs/fontconfig
1121 media-libs/vulkan-loader
1126 x11-libs/libxkbcommon
1130 >=dev-util/cargo-about-0.6.1
1131 dev-util/vulkan-headers
1132 >=sys-devel/clang-17:*
1135 >=virtual/rust-1.80.1
1139 if use !debug && use lto; then
1140 # NOTE: upstream sets to thinlto by default
1142 einfo "Enforcing lto for CC is Gcc"
1143 export CARGO_PROFILE_RELEASE_LTO="true"
1144 elif tc-is-clang; then
1145 einfo "Enforcing thinlto for CC is Clang"
1146 export CARGO_PROFILE_RELEASE_LTO="thin"
1149 export CARGO_PROFILE_RELEASE_LTO="false"
1151 # flags from upstream
1152 export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
1154 # Upstream explicitly use sys-devel/mold as linker
1155 # Any other linker might just fail
1156 einfo "Enforcing mold linker"
1157 export RUSTFLAGS="${RUSTFLAGS} -C linker=clang -C link-arg=-fuse-ld=mold"
1159 # A possible (no warranty!) workaround for other linkers
1160 #export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
1165 "${FILESDIR}/${PN}-0.142.6-remove-cargo-install-in-generate-licenses.patch"
1166 # From https://github.com/getsolus/packages/tree/main/packages/z/zed
1167 "${FILESDIR}/${PN}-0.143.7-use-system-libs.patch"
1168 "${FILESDIR}/${PN}-0.147.2-fix-cargo-eclass-rustflags-merge.patch"
1173 # Cargo offline fetch workaround
1174 local TS_COMMIT="7f4a57817d58a2f134fe863674acad6bbf007228"
1175 local TS_GIT="git = \"https://github.com/tree-sitter/tree-sitter\", rev = \"${TS_COMMIT}\""
1176 local TS_PATH="path = \"${WORKDIR}/tree-sitter-${TS_COMMIT}/lib\""
1178 sed -e "s#${TS_GIT}#${TS_PATH}#" -i "${S}/Cargo.toml" || die "Cargo fetch workaround failed"
1180 export DO_STARTUP_NOTIFY="true"
1181 export APP_ICON="zed"
1182 export APP_NAME="Zed"
1183 export APP_CLI="zeditor"
1184 export APP_ID="dev.zed.Zed"
1185 export APP_ARGS="%U"
1187 envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die
1189 # For "View Denpendency licenses" Button in menu
1190 # This requires package *cargo-about*
1191 # Without this the button leads to crash
1192 edo ${BASH} ./script/generate-licenses
1196 # Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
1197 export RELEASE_VERSION="${PV}"
1198 export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
1199 cargo_src_compile --package zed --package cli
1203 cargo_src_test --all-features
1207 newbin $(cargo_target_dir)/cli zeditor
1208 # hard-coded in crates/cli/src/main.rs
1209 # ["../libexec/zed-editor", "../lib/zed/zed-editor", "./zed"]
1210 exeinto "/usr/libexec"
1211 newexe $(cargo_target_dir)/zed zed-editor
1213 newicon -s 512 crates/zed/resources/app-icon.png zed.png
1214 newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
1215 domenu "${S}/${APP_ID}.desktop"