blob: 48cd05424af5766f58b59d8f7942ad70fdabf196 (
plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop xdg shell-completion
DESCRIPTION="A GPU-accelerated cross-platform terminal emulator and multiplexer"
HOMEPAGE="https://wezterm.org/"
NIGHTLY_ARCHIVE="wezterm-nightly.Ubuntu24.04.tar.xz"
S="${WORKDIR}/wezterm"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
PROPERTIES="live"
IUSE="wayland"
RESTRICT="mirror strip network-sandbox"
BDEPEND="
net-misc/wget
"
RDEPEND="
!x11-terms/wezterm
dev-libs/openssl
wayland? ( dev-libs/wayland )
media-fonts/noto
media-fonts/noto-emoji
media-libs/fontconfig
media-libs/mesa
sys-apps/dbus
x11-libs/cairo[X]
x11-libs/libX11
x11-libs/libxkbcommon[X,wayland?]
x11-libs/xcb-util
x11-libs/xcb-util-image
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-wm
x11-themes/hicolor-icon-theme
"
# Trim dependencies from official x11-terms/wezterm
# dev-libs/openssl-compat
# media-fonts/jetbrains-mono
# media-fonts/roboto
# x11-themes/xcursor-themes
QA_PREBUILT="
usr/bin/*
"
src_unpack() {
local uri="https://github.com/wezterm/wezterm/releases/download/nightly/${NIGHTLY_ARCHIVE}"
local tarball="${T}/${NIGHTLY_ARCHIVE}"
wget \
--max-redirect=20 \
--tries=3 \
--timeout=30 \
-O "${tarball}" \
"${uri}" \
|| die "failed to download WezTerm nightly"
tar -xJf "${tarball}" -C "${WORKDIR}" \
|| die "failed to unpack WezTerm nightly"
}
src_install() {
# gaurd against upstream archive changes
[[ -d "${S}/usr/bin" ]] || die "archive layout changed: missing usr/bin/"
[[ -d "${S}/usr/share" ]] || die "archive layout changed: missing usr/share/"
[[ -d "${S}/etc" ]] || die "archive layout changed: missing etc/"
# install binaries
dobin "${S}"/usr/bin/open-wezterm-here
dobin "${S}"/usr/bin/strip-ansi-escapes
dobin "${S}"/usr/bin/wezterm
dobin "${S}"/usr/bin/wezterm-gui
dobin "${S}"/usr/bin/wezterm-mux-server
# install desktop file
domenu "${S}"/usr/share/applications/org.wezfurlong.wezterm.desktop
# install icon
doicon -s 128 "${S}"/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
# install completion file
dobashcomp "${S}"/usr/share/bash-completion/completions/wezterm
dozshcomp "${S}"/usr/share/zsh/functions/Completion/Unix/_wezterm
# install env/shell init script
insinto /etc/profile.d
doins "${S}"/etc/profile.d/wezterm.sh
# install extra files
insinto /usr/share/metainfo
doins "${S}"/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
insinto /usr/share/nautilus-python/extensions
doins "${S}"/usr/share/nautilus-python/extensions/wezterm-nautilus.py
}
pkg_postinst() {
xdg_pkg_postinst
}
pkg_postrm() {
xdg_pkg_postrm
}
|