Skip to content

Commit

Permalink
app-editors/zed: add 0.165.4
Browse files Browse the repository at this point in the history
  • Loading branch information
robert7k committed Dec 12, 2024
1 parent 17455ca commit 263b964
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app-editors/zed/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ DIST xim-rs-d50d461764c2213655cd9cf65a0ea94c70d3c4fd.gh.tar.gz 47427 BLAKE2B e5b
DIST xkbcommon-rs-fcbb4612185cc129ceeff51d22f7fb51810a03b2.gh.tar.gz 58121 BLAKE2B f45a05820f40039f57c341d2c6cf3f375bfa4356e5f679a9f6fc6fdd764f1214375356ca3c7216e762735049f37b39d520c778732639365975a90369b38edb94 SHA512 513edf39326231f938747f3d5f195df89540cdf0e37867c2346378fb2bb7f0030bb83ea0422e4ca44a026a8eafa94ef6c4c07af3974e56a2c77b18e0ef9197fe
DIST zed-0.164.2-crates.tar.xz 101647112 BLAKE2B 0068f90ba0e6703c5f6b918f8ed1c50cf3f3b766ac5d71cd95fc9a0af9e5e36eb50edf58ee559b95f3424329e1be8e1bab1f90804872744127ef71f6d5d70064 SHA512 dd62869dcd7ed8f8bb74ab4ad6dcda7a0c893f9e08cc4a028b0b52a18c74437ef3c9934d6639eb52e296e1a1ee196de429f561273a6db598364da56fce993fd1
DIST zed-0.164.2.tar.gz 13261184 BLAKE2B f73fc1841753c681dd14b074cd726e0eb9fe2892368d23e5dd48a7f9b18eb4f6f0f09d07f33730987c5e8ad5178ebecc30ad7e058b8fa9b458fd3942c7d378f0 SHA512 4ac7142a43102599a83106aa04b47b5325456da68e8397357041aca6398775ec0945e188f45ecf0a3e24b4d7f1e5ce153f47289bce3d26a874c7e13fc85bd070
DIST zed-0.165.4-crates.tar.xz 100617284 BLAKE2B 2ae775115768befa1509f57a3c6177b3ed3e8daac594e4471e783e9e71eb8e0d230e2a46af64e5057166d0f654a7d5652339be2aed54ff42f3b1cbd38583d07b SHA512 6a100d8c15430625739a5d7b6f5b8e1e82bfac38bf9096ca55dcd9a136aea7aa61c6c8415e8e2bceeae2b702166bd3159967f1af75e680adba3e1c94c9acb364
DIST zed-0.165.4.tar.gz 13286399 BLAKE2B 971ae47f9344d8fd07dbd0237a61a04b62f848f5f5eb84542e1d5e86ddae07603387c48af1e6068a94d3dea910a0234102f63a64f59b88d482398f4ed69346b5 SHA512 ab55422f05eeac551a485be147ee0336bdd790ac51ff21c719c1f432735e695be0e25f747bf2ba92e0f06bce520aa328f867300647d9828ce282bec87f61fe07
EBUILD zed-0.164.2.ebuild 9457 BLAKE2B b2bf96e57c3704c92eb65d8b24a3a74dbb75e0774da956d4d63f827bb27d7678ac027860c2dba59c670edd8f04a397509ace236247e57a02c57a7486005298b2 SHA512 79fef1c02bde33bcd6ec5b5c1d8876b3459f7032a8e4a36b012da780da4e46fcbb345d6f44fe0b1c311e75af126b3df256fac4d0221f1aaedf362abf71e3c6b3
EBUILD zed-0.165.4.ebuild 9505 BLAKE2B 913cb247ea92dbdb4e69b9cafc562a63f07b5ce6b495946ef622c3dfce7b32e83d4aad165ec9b7dda7b7b1c0b9ce54f1bc835dffcee333b6de7a59cea49ba257 SHA512 1527549f3b4732d230ed69f797840b705805467389e379f8a0958bedb1ecf66f2f9058857eb9cfd8b8b057934a391fa15275342f5fb1d1c0d9e6b8203fc370d3
173 changes: 173 additions & 0 deletions app-editors/zed/zed-0.165.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.13.4

EAPI=8

CRATES="
"

declare -A GIT_CRATES=(
[alacritty_terminal]='https://github.com/alacritty/alacritty;91d034ff8b53867143c005acfaa14609147c9a2c;alacritty-%commit%/alacritty_terminal'
[async-pipe]='https://github.com/zed-industries/async-pipe-rs;82d00a04211cf4e1236029aa03e6b6ce2a74c553;async-pipe-rs-%commit%'
[async-stripe]='https://github.com/zed-industries/async-stripe;3672dd4efb7181aa597bf580bf5a2f5d23db6735;async-stripe-%commit%'
[blade-graphics]='https://github.com/kvark/blade;e142a3a5e678eb6a13e642ad8401b1f3aa38e969;blade-%commit%/blade-graphics'
[blade-macros]='https://github.com/kvark/blade;e142a3a5e678eb6a13e642ad8401b1f3aa38e969;blade-%commit%/blade-macros'
[blade-util]='https://github.com/kvark/blade;e142a3a5e678eb6a13e642ad8401b1f3aa38e969;blade-%commit%/blade-util'
[cosmic-text]='https://github.com/pop-os/cosmic-text;542b20ca4376a3b5de5fa629db1a4ace44e18e0c;cosmic-text-%commit%'
[font-kit]='https://github.com/zed-industries/font-kit;40391b7c0041d8a8572af2afa3de32ae088f0120;font-kit-%commit%'
[lsp-types]='https://github.com/zed-industries/lsp-types;72357d6f6d212bdffba3b5ef4b31d8ca856058e7;lsp-types-%commit%'
[nvim-rs]='https://github.com/KillTheMule/nvim-rs;69500bae73b8b3f02a05b7bee621a0d0e633da6c;nvim-rs-%commit%'
[pet-conda]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-conda'
[pet-core]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-core'
[pet-env-var-path]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-env-var-path'
[pet-fs]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-fs'
[pet-global-virtualenvs]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-global-virtualenvs'
[pet-homebrew]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-homebrew'
[pet-jsonrpc]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-jsonrpc'
[pet-linux-global-python]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-linux-global-python'
[pet-mac-commandlinetools]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-mac-commandlinetools'
[pet-mac-python-org]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-mac-python-org'
[pet-mac-xcode]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-mac-xcode'
[pet-pipenv]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-pipenv'
[pet-poetry]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-poetry'
[pet-pyenv]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-pyenv'
[pet-python-utils]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-python-utils'
[pet-reporter]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-reporter'
[pet-telemetry]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-telemetry'
[pet-venv]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-venv'
[pet-virtualenv]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-virtualenv'
[pet-virtualenvwrapper]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-virtualenvwrapper'
[pet-windows-registry]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-windows-registry'
[pet-windows-store]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet-windows-store'
[pet]='https://github.com/microsoft/python-environment-tools;ffcbf3f28c46633abd5448a52b1f396c322e0d6c;python-environment-tools-%commit%/crates/pet'
[reqwest]='https://github.com/zed-industries/reqwest;fd110f6998da16bbca97b6dddda9be7827c50e29;reqwest-%commit%'
[tree-sitter-gomod]='https://github.com/zed-industries/tree-sitter-go-mod;a9aea5e358cde4d0f8ff20b7bc4fa311e359c7ca;tree-sitter-go-mod-%commit%'
[tree-sitter-gowork]='https://github.com/zed-industries/tree-sitter-go-work;acb0617bf7f4fda02c6217676cc64acb89536dc7;tree-sitter-go-work-%commit%'
[tree-sitter-heex]='https://github.com/zed-industries/tree-sitter-heex;1dd45142fbb05562e35b2040c6129c9bca346592;tree-sitter-heex-%commit%'
[tree-sitter-md]='https://github.com/tree-sitter-grammars/tree-sitter-markdown;9a23c1a96c0513d8fc6520972beedd419a973539;tree-sitter-markdown-%commit%'
[tree-sitter-yaml]='https://github.com/zed-industries/tree-sitter-yaml;baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a;tree-sitter-yaml-%commit%'
[xim-ctext]='https://github.com/XDeme1/xim-rs;d50d461764c2213655cd9cf65a0ea94c70d3c4fd;xim-rs-%commit%/xim-ctext'
[xim-parser]='https://github.com/XDeme1/xim-rs;d50d461764c2213655cd9cf65a0ea94c70d3c4fd;xim-rs-%commit%/xim-parser'
[xim]='https://github.com/XDeme1/xim-rs;d50d461764c2213655cd9cf65a0ea94c70d3c4fd;xim-rs-%commit%'
[xkbcommon]='https://github.com/ConradIrwin/xkbcommon-rs;fcbb4612185cc129ceeff51d22f7fb51810a03b2;xkbcommon-rs-%commit%'
)

LLVM_COMPAT=( {18..19} )
RUST_MIN_VER="1.81.0"
RUST_NEEDS_LLVM=1

inherit cargo check-reqs desktop flag-o-matic llvm-r1 toolchain-funcs xdg

DESCRIPTION="The fast, collaborative code editor"
HOMEPAGE="https://zed.dev https://github.com/zed-industries/zed"
SRC_URI="
https://github.com/zed-industries/zed/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://gitlab.com/api/v4/projects/35204985/packages/generic/${PN}/${PV}/${P}-crates.tar.xz
${CARGO_CRATE_URIS}"

LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 ISC
LGPL-3 MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 ZLIB
"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="gles"
CHECKREQS_DISK_BUILD="8G"
CHECKREQS_MEMORY="16G"

DEPEND="
app-arch/zstd:=
app-misc/jq
dev-db/sqlite:3
dev-libs/libgit2:=
dev-libs/mimalloc
dev-libs/openssl:0/3
dev-libs/protobuf
dev-libs/wayland
dev-libs/wayland-protocols
dev-util/wayland-scanner
dev-util/vulkan-tools
media-fonts/noto
media-libs/alsa-lib
media-libs/fontconfig
media-libs/vulkan-loader[X]
net-analyzer/openbsd-netcat
net-misc/curl
sys-libs/zlib
x11-libs/libxcb:=
x11-libs/libxkbcommon[X]
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-build/cmake
dev-util/vulkan-headers
sys-devel/gettext
sys-devel/mold
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}=
llvm-core/llvm:${LLVM_SLOT}=
')
"

QA_FLAGS_IGNORED="usr/bin/zedit"

pkg_setup() {
if tc-is-gcc; then
export CARGO_PROFILE_RELEASE_LTO="true"
elif tc-is-clang; then
export CARGO_PROFILE_RELEASE_LTO="thin"
fi
strip-unsupported-flags
# flags from upstream
export RUSTFLAGS="${RUSTFLAGS} -C symbol-mangling-version=v0 --cfg tokio_unstable -C link-arg=-fuse-ld=mold -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
# linking error with llvm-18
export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
if use gles; then
export RUSTFLAGS="${RUSTFLAGS} --cfg gles"
fi
llvm-r1_pkg_setup
rust_pkg_setup
}

src_prepare() {
default

export APP_CLI="zedit"
export APP_ICON="zed"
export APP_ID="dev.zed.Zed"
export APP_NAME="Zed"
export APP_ARGS="%U"
export DO_STARTUP_NOTIFY="true"
envsubst < "crates/zed/resources/zed.desktop.in" > ${APP_ID}.desktop || die
}

src_configure() {
cargo_src_configure --all-features
}

src_compile() {
export RELEASE_VERSION="${PV}"
export ZED_UPDATE_EXPLANATION='Updates are handled by portage'
cargo_src_compile --package zed --package cli
}

src_install() {
newbin $(cargo_target_dir)/cli ${APP_CLI}
exeinto "/usr/libexec"
newexe $(cargo_target_dir)/zed zed-editor

newicon -s 512 crates/zed/resources/app-icon.png zed.png
newicon -s 1024 crates/zed/resources/app-icon@2x.png zed.png
domenu "${S}/${APP_ID}.desktop"
}

src_test () {
mkdir -p "${HOME}/.config/zed" || die
mkdir -p "${HOME}/.local/share/zed/logs/" || die

SHELL=/usr/bin/sh RUST_BACKTRACE=full cargo_src_test -vv
}

0 comments on commit 263b964

Please sign in to comment.