Skip to content

Commit 6843c3b

Browse files
committed
New package: zeditor-0.230.2
1 parent 32910f7 commit 6843c3b

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

srcpkgs/zeditor/template

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Template file for 'zeditor'
2+
pkgname=zeditor
3+
version=0.230.2
4+
revision=1
5+
archs="x86_64 aarch64"
6+
build_style=cargo
7+
make_build_args="--package cli --package zed" # --package remote_server # reason below
8+
make_check_args="--workspace"
9+
hostmakedepends="pkg-config cmake gettext perl libzstd-devel bzip2-devel"
10+
makedepends="gettext-devel elfutils-devel alsa-lib-devel fontconfig-devel glib-devel libva-devel libxcb-devel libxkbcommon-devel libzstd-devel openssl-devel wayland-devel vulkan-loader sqlite-devel libX11-devel libgit2-1.9-devel"
11+
short_desc="High-performance multiplayer code editor"
12+
maintainer="JudahJL <judahlegy@gmail.com>"
13+
license="GPL-3.0-or-later"
14+
homepage="https://zed.dev/"
15+
distfiles="https://github.com/zed-industries/zed/archive/refs/tags/v${version}.tar.gz"
16+
checksum=b4be9f02fa1621e8bf18a628ac0a8c7e220272ec1060ce184ff7e6b80cf1eae4
17+
make_check=ci-skip # too slow and memory-intensive for build environment
18+
19+
pre_build() {
20+
echo -n stable > crates/zed/RELEASE_CHANNEL
21+
export RELEASE_VERSION="${version}"
22+
export ZED_UPDATE_EXPLANATION="Please use 'xbps-install -S zeditor' to update."
23+
export ZED_BUNDLE=true
24+
25+
if [ "$CROSS_BUILD" ]; then
26+
export PKG_CONFIG_ALLOW_CROSS=1
27+
28+
# workaround the cc-rs mixing CFLAGS for host and target.
29+
# https://github.com/rust-lang/cc-rs/issues/1469
30+
export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}" \
31+
CXXFLAGS_${RUST_BUILD//-/_}="${CXXFLAGS_host}" \
32+
LDFLAGS_${RUST_BUILD//-/_}="${LDFLAGS_host}" \
33+
CFLAGS_${RUST_TARGET//-/_}="${CFLAGS}" \
34+
CXXFLAGS_${RUST_TARGET//-/_}="${CXXFLAGS}" \
35+
LDFLAGS_${RUST_TARGET//-/_}="${LDFLAGS}" \
36+
CFLAGS="" CXXFLAGS="" LDFLAGS=""
37+
38+
fi
39+
}
40+
41+
do_install() {
42+
local app_id="dev.zed.Zed"
43+
44+
vbin "target/${RUST_TARGET}/release/cli" zed-cli
45+
vinstall "target/${RUST_TARGET}/release/zed" 755 usr/libexec zed-editor
46+
# TODO 1: https://github.com/zed-industries/zed/blob/c372f246a0790da012dddbe3935ee2758a3a9c3b/script/bundle-linux#L87-L88 seperately build remote_server. will include it later.
47+
# TODO 2: confirm install location of remote_server
48+
# vinstall "target/${RUST_TARGET}/release/remote_server" 755 usr/libexec
49+
50+
export APP_NAME="Zed"
51+
export APP_CLI="zed"
52+
export APP_ICON="zed"
53+
export APP_ARGS="%U"
54+
export DO_STARTUP_NOTIFY="true"
55+
56+
envsubst < "crates/zed/resources/zed.desktop.in" > "${app_id}.desktop"
57+
vinstall "${app_id}.desktop" 644 usr/share/applications
58+
59+
vinstall "crates/zed/resources/app-icon.png" 644 usr/share/icons/hicolor/512x512/apps zed.png
60+
vinstall "crates/zed/resources/app-icon@2x.png" 644 usr/share/icons/hicolor/1024x1024/apps zed.png
61+
}

0 commit comments

Comments
 (0)