forked from chimera-linux/cports
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.py
More file actions
74 lines (72 loc) · 2 KB
/
template.py
File metadata and controls
74 lines (72 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
pkgname = "zed"
pkgver = "0.179.0"
pkgrel = 0
_commit = "7ed9321efefbaf94f66da9eca1817167319d202d"
# wasmtime
archs = ["aarch64", "x86_64"]
build_style = "cargo"
prepare_after_patch = True
make_build_args = ["--package", "zed", "--package", "cli"]
make_build_env = {
"RELEASE_VERSION": pkgver,
"ZED_UPDATE_EXPLANATION": "Managed by system package manager",
"ZED_RELEASE_CHANNEL": "stable",
}
hostmakedepends = [
"cargo-auditable",
"cmake",
"pkgconf",
"protobuf-protoc",
]
makedepends = [
"fontconfig-devel",
"freetype-devel",
"curl-devel",
"libgit2-devel",
"libxkbcommon-devel",
"rust-bindgen",
"rust-std",
"sqlite-devel",
"zlib-ng-compat-devel",
"zstd-devel",
]
# otherwise downloads a non-working one
depends = ["nodejs"]
pkgdesc = "Graphical text editor"
license = "GPL-3.0-or-later AND AGPL-3.0-or-later AND Apache-2.0"
url = "https://zed.dev"
source = (
f"https://github.com/panekj/zed/archive/{_commit}.tar.gz"
)
sha256 = "9263aee8850ce46b435803316e09994fcd6d24ef671f99d89fc671041884fa02"
# workaround code that fails with default gc-sections with lld
# https://github.com/zed-industries/zed/issues/15902
tool_flags = {"RUSTFLAGS": ["-Clink-arg=-Wl,-z,nostart-stop-gc"]}
# no
options = ["!check", "!cross"]
def install(self):
self.install_file(
f"target/{self.profile().triplet}/release/zed",
"usr/lib/zed",
name="zed-editor",
)
self.install_bin(
f"target/{self.profile().triplet}/release/cli",
name="z",
)
self.install_file(
"crates/zed/resources/app-icon.png",
"usr/share/icons/hicolor/512x512/apps",
name="dev.zed.Zed.png",
)
self.install_file(
"crates/zed/resources/app-icon@2x.png",
"usr/share/icons/hicolor/1024x1024/apps",
name="dev.zed.Zed.png",
)
self.install_file(
"crates/zed/resources/zed.desktop.in",
"usr/share/applications",
name="dev.zed.Zed.desktop",
)
self.install_license("LICENSE-AGPL")