Skip to content

Commit

Permalink
app-editors/zed: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
robert7k committed Aug 28, 2024
1 parent c2ad460 commit ce180f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app-editors/zed/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -1369,4 +1369,4 @@ DIST zvariant_derive-4.2.0.crate 11057 BLAKE2B 891c141bfa0db95a5ac62ab2c31bef121
DIST zvariant_utils-1.1.0.crate 6858 BLAKE2B ed117144cdd1b3351cddb0403b7b8fa3290e097dc527456ca7580910a0ad07b323c5c221f2c796eefd8dd5c7945e594c5bffe6b72caf26f2d416b58889b8cc34 SHA512 5ab70e347a3251c029688b0e8060f640168da3d20d1f0ceef054096209b9101fbb48ba74eb04aabd4c39f4c8090eb94a0594750b85d9955542f0bf7732a66aa7
DIST zvariant_utils-2.1.0.crate 7043 BLAKE2B b891c5fc2b5afb5eba01b9068b454a965b4f07548c1a080fd5b598165994a5177a7df5f39cf7263ea8bcc5d054c7d87012ca1588737d630d96f24f0d00dee6cf SHA512 345b70d1106b37df41426efdb1ba49bf270e00898381c2a8021b5761c59efdea55def45cb2e2598b130b6cba8733503f3997a55578bca90867ab3e8f2346f80e
EBUILD zed-0.147.2.ebuild 25257 BLAKE2B 18cae099263498c69f7a4a3671c13e70c07c362ed67be07d0e7561ef4a31892e8573046960c4e2d9c92362bc0e69283230a7fde4b44825a3c69a00081bf97932 SHA512 697d778732d293269129dd6cd727b4c409fb014e39d025e9a26437cb585a0f9a8e3f103f4cdc05287449350bd8bf0c7a6d2b8e2df901c653a2540c6823ef2492
EBUILD zed-0.150.4.ebuild 24925 BLAKE2B b00faacd4ebe98b91807027dc503fc5c81c835717edf11b86f43165d35c0b593982371822034caa05709bbbb9875cdf04f0bb2845ead93cf7d124c3c7f8c3149 SHA512 484e99b7a418b097cd9c1f345c3facb31daddc24f0aa34f27e19cafb5a6230818ce9438825d16ddb8d73b505dc1fc8885595d81366d69627d6089b410aee37f7
EBUILD zed-0.150.4.ebuild 24498 BLAKE2B 79af0e3fc33888fb21d4486d8680156dff0c95b197fb800c51f9e4f5eef4344342d657a8c7e2d3249d34ba9ee5877ebc89311d9efb1c58041a7d396b8ace0e73 SHA512 9c4b27ecc2c8e5cb542fef57319b590a5ce91a7c436860f3123064908a5e339aabdf215f4db4d8d6a339daf890ec0dd880d455274f3c152c6ec76766f70b4d71
21 changes: 4 additions & 17 deletions app-editors/zed/zed-0.150.4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,6 @@ SRC_URI="
LICENSE="0BSD AGPL-3+ Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 CC0-1.0 GPL-3+ ISC LGPL-3 MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+lto"

DEPEND="
app-arch/zstd:=
Expand Down Expand Up @@ -1100,20 +1099,11 @@ BDEPEND="
"

pkg_setup() {
if use lto; then
# NOTE: upstream sets to thinlto by default
if tc-is-gcc; then
einfo "Enforcing lto for CC is Gcc"
export CARGO_PROFILE_RELEASE_LTO="true"
elif tc-is-clang; then
einfo "Enforcing thinlto for CC is Clang"
export CARGO_PROFILE_RELEASE_LTO="thin"
fi
else
export CARGO_PROFILE_RELEASE_LTO="false"
filter-lto
if tc-is-gcc; then
export CARGO_PROFILE_RELEASE_LTO="true"
elif tc-is-clang; then
export CARGO_PROFILE_RELEASE_LTO="thin"
fi
# In case of compiler switch with unsupported flags
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"
Expand All @@ -1138,16 +1128,13 @@ src_configure() {
}

src_compile() {
# Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version
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 zed
# hard-coded in crates/cli/src/main.rs
# libexec/zed-editor
exeinto "/usr/libexec"
newexe $(cargo_target_dir)/zed zed-editor

Expand Down

0 comments on commit ce180f9

Please sign in to comment.