Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: wezterm-20220408_1
@ 2022-04-28 19:30 jbenden
  2022-04-28 20:03 ` [PR PATCH] [Updated] " jbenden
                   ` (112 more replies)
  0 siblings, 113 replies; 114+ messages in thread
From: jbenden @ 2022-04-28 19:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

There is a new pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 4310 bytes --]

From bb29bf595a827feb9c0c9fbe5594280399917e30 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220408_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm |  1 +
 srcpkgs/wezterm/INSTALL  |  6 ++++
 srcpkgs/wezterm/REMOVE   |  7 +++++
 srcpkgs/wezterm/template | 68 ++++++++++++++++++++++++++++++++++++++++
 srcpkgs/wezterm/update   |  2 ++
 5 files changed, 84 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 100644 srcpkgs/wezterm/INSTALL
 create mode 100644 srcpkgs/wezterm/REMOVE
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/INSTALL b/srcpkgs/wezterm/INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/REMOVE b/srcpkgs/wezterm/REMOVE
new file mode 100644
index 000000000000..74660871fc7e
--- /dev/null
+++ b/srcpkgs/wezterm/REMOVE
@@ -0,0 +1,7 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm.terminfo
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..efd7f727f950
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220408
+revision=1
+_pkgver=20220408-101518-b908e2dd
+wrksrc="${pkgname}-${_pkgver}"
+build_style=cargo
+build_helper="rust"
+make_check_args="--workspace --locked --exclude wezterm-ssh"
+hostmakedepends="cargo git pkg-config"
+makedepends="nautilus-python
+ fontconfig-devel
+ freetype-devel
+ harfbuzz-devel
+ libX11-devel
+ libxkbcommon-devel
+ libxkbcommon-x11
+ openssl-devel
+ python3-devel
+ rust-std
+ wayland-devel
+ xcb-util-devel
+ xcb-util-image-devel
+ xcb-util-keysyms-devel
+ xcb-util-wm-devel"
+depends="appdata-tools desktop-file-utils"
+checkdepends="openssh"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_pkgver}/${pkgname}-${_pkgver}-src.tar.gz"
+checksum="1febb7c0453307813854295b3f933fbbd0f3a0d0f4e3a31cabb1cc245154285b"
+python_version=3
+
+do_install() {
+	vmkdir usr/bin
+	vmkdir etc/profile.d
+	vmkdir usr/share/icons/hicolor/128x128/apps
+	vmkdir usr/share/pixmaps/
+	vmkdir usr/share/applications
+	vmkdir usr/share/metainfo
+	vmkdir usr/share/terminfo/w
+
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vcopy assets/shell-integration/wezterm.sh etc/profile.d
+	vcopy assets/icon/terminal.png usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
+	vcopy assets/icon/wezterm-icon.svg usr/share/pixmaps/wezterm.svg
+	vcopy assets/wezterm.desktop usr/share/applications/org.wezfurlong.wezterm.desktop
+	vcopy assets/wezterm.appdata.xml usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
+	vcopy termwiz/data/wezterm.terminfo usr/share/terminfo/w/wezterm.terminfo
+
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vmkdir usr/share/nautilus-python/extensions
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
@ 2022-04-28 20:03 ` jbenden
  2022-04-28 22:01 ` jbenden
                   ` (111 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-04-28 20:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 4318 bytes --]

From 88f40f509fe1e6e00012cd33915581aeeb1b84d7 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220408_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm |  1 +
 srcpkgs/wezterm/INSTALL  |  6 ++++
 srcpkgs/wezterm/REMOVE   |  7 +++++
 srcpkgs/wezterm/template | 68 ++++++++++++++++++++++++++++++++++++++++
 srcpkgs/wezterm/update   |  2 ++
 5 files changed, 84 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 100644 srcpkgs/wezterm/INSTALL
 create mode 100644 srcpkgs/wezterm/REMOVE
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/INSTALL b/srcpkgs/wezterm/INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/REMOVE b/srcpkgs/wezterm/REMOVE
new file mode 100644
index 000000000000..74660871fc7e
--- /dev/null
+++ b/srcpkgs/wezterm/REMOVE
@@ -0,0 +1,7 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm.terminfo
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..36cd675e9d64
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220408
+revision=1
+_srcver=20220408-101518-b908e2dd
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+build_helper="rust"
+make_check_args="--workspace --locked --exclude wezterm-ssh"
+hostmakedepends="cargo git pkg-config python3"
+makedepends="nautilus-python
+ fontconfig-devel
+ freetype-devel
+ harfbuzz-devel
+ libX11-devel
+ libxkbcommon-devel
+ libxkbcommon-x11
+ openssl-devel
+ python3-devel
+ rust-std
+ wayland-devel
+ xcb-util-devel
+ xcb-util-image-devel
+ xcb-util-keysyms-devel
+ xcb-util-wm-devel"
+depends="appdata-tools desktop-file-utils"
+checkdepends="openssh"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="1febb7c0453307813854295b3f933fbbd0f3a0d0f4e3a31cabb1cc245154285b"
+python_version=3
+
+do_install() {
+	vmkdir usr/bin
+	vmkdir etc/profile.d
+	vmkdir usr/share/icons/hicolor/128x128/apps
+	vmkdir usr/share/pixmaps/
+	vmkdir usr/share/applications
+	vmkdir usr/share/metainfo
+	vmkdir usr/share/terminfo/w
+
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vcopy assets/shell-integration/wezterm.sh etc/profile.d
+	vcopy assets/icon/terminal.png usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
+	vcopy assets/icon/wezterm-icon.svg usr/share/pixmaps/wezterm.svg
+	vcopy assets/wezterm.desktop usr/share/applications/org.wezfurlong.wezterm.desktop
+	vcopy assets/wezterm.appdata.xml usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
+	vcopy termwiz/data/wezterm.terminfo usr/share/terminfo/w/wezterm.terminfo
+
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vmkdir usr/share/nautilus-python/extensions
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
  2022-04-28 20:03 ` [PR PATCH] [Updated] " jbenden
@ 2022-04-28 22:01 ` jbenden
  2022-04-28 23:46 ` classabbyamp
                   ` (110 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-04-28 22:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

New comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1112693812

Comment:
I've also locally built aarch64 (cross) and i686 (cross).

I do not know what to do about the i686 check errors. These seem like bugs within some Rust crate(s), and may not impact use of the program on i686.

Thoughts, comments, and suggestions are welcomed,
-Joe

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
  2022-04-28 20:03 ` [PR PATCH] [Updated] " jbenden
  2022-04-28 22:01 ` jbenden
@ 2022-04-28 23:46 ` classabbyamp
  2022-04-28 23:46 ` classabbyamp
                   ` (109 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-04-28 23:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1112753567

Comment:
you could do something like

```sh
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
    # comment explaining why
    make_check=no
```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (2 preceding siblings ...)
  2022-04-28 23:46 ` classabbyamp
@ 2022-04-28 23:46 ` classabbyamp
  2022-04-29  7:06 ` [PR PATCH] [Updated] " jbenden
                   ` (108 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-04-28 23:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1112753567

Comment:
you could do something like

```sh
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
    # comment explaining why
    make_check=no
fi
```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (3 preceding siblings ...)
  2022-04-28 23:46 ` classabbyamp
@ 2022-04-29  7:06 ` jbenden
  2022-04-29 10:30 ` [PR REVIEW] " paper42
                   ` (107 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-04-29  7:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 4772 bytes --]

From 1286444e093a556de11cc0a39a7699df9217da9d Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220408_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm |  1 +
 srcpkgs/wezterm/INSTALL  |  6 +++
 srcpkgs/wezterm/REMOVE   |  7 ++++
 srcpkgs/wezterm/template | 87 ++++++++++++++++++++++++++++++++++++++++
 srcpkgs/wezterm/update   |  2 +
 5 files changed, 103 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 100644 srcpkgs/wezterm/INSTALL
 create mode 100644 srcpkgs/wezterm/REMOVE
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/INSTALL b/srcpkgs/wezterm/INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/REMOVE b/srcpkgs/wezterm/REMOVE
new file mode 100644
index 000000000000..74660871fc7e
--- /dev/null
+++ b/srcpkgs/wezterm/REMOVE
@@ -0,0 +1,7 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm.terminfo
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..26f8ecac37cb
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,87 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220408
+revision=1
+_srcver=20220408-101518-b908e2dd
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+build_helper="rust"
+make_check_args="--workspace --locked --exclude wezterm-ssh"
+hostmakedepends="cargo git pkg-config python3"
+makedepends="nautilus-python
+ fontconfig-devel
+ freetype-devel
+ harfbuzz-devel
+ libX11-devel
+ libxkbcommon-devel
+ libxkbcommon-x11
+ openssl-devel
+ python3-devel
+ rust-std
+ wayland-devel
+ xcb-util-devel
+ xcb-util-image-devel
+ xcb-util-keysyms-devel
+ xcb-util-wm-devel"
+depends="appdata-tools desktop-file-utils"
+checkdepends="openssh"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="1febb7c0453307813854295b3f933fbbd0f3a0d0f4e3a31cabb1cc245154285b"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	#
+	# failures:
+	#   cell::test::teeny_string
+	#   cell::test::test_width
+	#   surface::line::test::hyperlinks
+	#   surface::test::double_width
+	#
+	make_check=no # i686 platform bugs
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vmkdir usr/bin
+	vmkdir etc/profile.d
+	vmkdir usr/share/icons/hicolor/128x128/apps
+	vmkdir usr/share/pixmaps/
+	vmkdir usr/share/applications
+	vmkdir usr/share/metainfo
+	vmkdir usr/share/terminfo/w
+
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vcopy assets/shell-integration/wezterm.sh etc/profile.d
+	vcopy assets/icon/terminal.png usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
+	vcopy assets/icon/wezterm-icon.svg usr/share/pixmaps/wezterm.svg
+	vcopy assets/wezterm.desktop usr/share/applications/org.wezfurlong.wezterm.desktop
+	vcopy assets/wezterm.appdata.xml usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
+	vcopy termwiz/data/wezterm.terminfo usr/share/terminfo/w/wezterm.terminfo
+
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vmkdir usr/share/nautilus-python/extensions
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (4 preceding siblings ...)
  2022-04-29  7:06 ` [PR PATCH] [Updated] " jbenden
@ 2022-04-29 10:30 ` paper42
  2022-04-29 10:30 ` paper42
                   ` (106 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-04-29 10:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r861682395

Comment:
why is git required?

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (5 preceding siblings ...)
  2022-04-29 10:30 ` [PR REVIEW] " paper42
@ 2022-04-29 10:30 ` paper42
  2022-04-29 19:21 ` [PR PATCH] [Updated] " jbenden
                   ` (105 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-04-29 10:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r861682668

Comment:
don't put dependencies each on a separate line and wrap at 80 columns

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (6 preceding siblings ...)
  2022-04-29 10:30 ` paper42
@ 2022-04-29 19:21 ` jbenden
  2022-04-29 20:58 ` [PR REVIEW] " jbenden
                   ` (104 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-04-29 19:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 4747 bytes --]

From ab5532df2ef2c80b7a9acc0d7d00b20a79ed2586 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220408_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm |  1 +
 srcpkgs/wezterm/INSTALL  |  6 ++++
 srcpkgs/wezterm/REMOVE   |  7 ++++
 srcpkgs/wezterm/template | 76 ++++++++++++++++++++++++++++++++++++++++
 srcpkgs/wezterm/update   |  2 ++
 5 files changed, 92 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 100644 srcpkgs/wezterm/INSTALL
 create mode 100644 srcpkgs/wezterm/REMOVE
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/INSTALL b/srcpkgs/wezterm/INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/REMOVE b/srcpkgs/wezterm/REMOVE
new file mode 100644
index 000000000000..74660871fc7e
--- /dev/null
+++ b/srcpkgs/wezterm/REMOVE
@@ -0,0 +1,7 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm.terminfo
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..4554e08ea6ec
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,76 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220408
+revision=1
+_srcver=20220408-101518-b908e2dd
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+build_helper="rust"
+make_check_args="--workspace --locked --exclude wezterm-ssh"
+hostmakedepends="cargo pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 openssl-devel python3-devel
+ rust-std wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel"
+depends="appdata-tools desktop-file-utils"
+checkdepends="openssh"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="1febb7c0453307813854295b3f933fbbd0f3a0d0f4e3a31cabb1cc245154285b"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	#
+	# failures:
+	#   cell::test::teeny_string
+	#   cell::test::test_width
+	#   surface::line::test::hyperlinks
+	#   surface::test::double_width
+	#
+	make_check=no # i686 platform bugs
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vmkdir usr/bin
+	vmkdir etc/profile.d
+	vmkdir usr/share/icons/hicolor/128x128/apps
+	vmkdir usr/share/pixmaps/
+	vmkdir usr/share/applications
+	vmkdir usr/share/metainfo
+	vmkdir usr/share/terminfo/w
+
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vcopy assets/shell-integration/wezterm.sh etc/profile.d
+	vcopy assets/icon/terminal.png usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
+	vcopy assets/icon/wezterm-icon.svg usr/share/pixmaps/wezterm.svg
+	vcopy assets/wezterm.desktop usr/share/applications/org.wezfurlong.wezterm.desktop
+	vcopy assets/wezterm.appdata.xml usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
+	vcopy termwiz/data/wezterm.terminfo usr/share/terminfo/w/wezterm.terminfo
+
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vmkdir usr/share/nautilus-python/extensions
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (7 preceding siblings ...)
  2022-04-29 19:21 ` [PR PATCH] [Updated] " jbenden
@ 2022-04-29 20:58 ` jbenden
  2022-04-29 21:06 ` classabbyamp
                   ` (103 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-04-29 20:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r862147779

Comment:
It seems it may not be. 🤷

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (8 preceding siblings ...)
  2022-04-29 20:58 ` [PR REVIEW] " jbenden
@ 2022-04-29 21:06 ` classabbyamp
  2022-04-29 21:28 ` jbenden
                   ` (102 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-04-29 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r862153503

Comment:
I believe it's because some things in the build system like to fallback to git info, for example [here](https://github.com/wez/wezterm/blob/main/config/build.rs#L58)

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (9 preceding siblings ...)
  2022-04-29 21:06 ` classabbyamp
@ 2022-04-29 21:28 ` jbenden
  2022-06-25 19:14 ` [PR PATCH] [Updated] " jbenden
                   ` (101 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-04-29 21:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r862169304

Comment:
The tarball I selected is based on a tagged release (and includes all Git submodules); so it _should_ have a `.tag` file and thus not lean on answers from Git tools.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (10 preceding siblings ...)
  2022-04-29 21:28 ` jbenden
@ 2022-06-25 19:14 ` jbenden
  2022-06-25 20:24 ` [PR REVIEW] " classabbyamp
                   ` (100 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-06-25 19:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 4747 bytes --]

From a14dd810a550d4f795deda867e5ae105ec74d590 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220624_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm |  1 +
 srcpkgs/wezterm/INSTALL  |  6 ++++
 srcpkgs/wezterm/REMOVE   |  7 ++++
 srcpkgs/wezterm/template | 76 ++++++++++++++++++++++++++++++++++++++++
 srcpkgs/wezterm/update   |  2 ++
 5 files changed, 92 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 100644 srcpkgs/wezterm/INSTALL
 create mode 100644 srcpkgs/wezterm/REMOVE
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/INSTALL b/srcpkgs/wezterm/INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/REMOVE b/srcpkgs/wezterm/REMOVE
new file mode 100644
index 000000000000..74660871fc7e
--- /dev/null
+++ b/srcpkgs/wezterm/REMOVE
@@ -0,0 +1,7 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm.terminfo
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..0d683af1b850
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,76 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220624
+revision=1
+_srcver=20220624-141144-bd1b7c5d
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+build_helper="rust"
+make_check_args="--workspace --locked --exclude wezterm-ssh"
+hostmakedepends="cargo pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 openssl-devel python3-devel
+ rust-std wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel"
+depends="appdata-tools desktop-file-utils"
+checkdepends="openssh"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="898bfc12794f2e6b3bcd3d066963394ca537ef84a66278ec72e79e2937d99cbf"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	#
+	# failures:
+	#   cell::test::teeny_string
+	#   cell::test::test_width
+	#   surface::line::test::hyperlinks
+	#   surface::test::double_width
+	#
+	make_check=no # i686 platform bugs
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vmkdir usr/bin
+	vmkdir etc/profile.d
+	vmkdir usr/share/icons/hicolor/128x128/apps
+	vmkdir usr/share/pixmaps/
+	vmkdir usr/share/applications
+	vmkdir usr/share/metainfo
+	vmkdir usr/share/terminfo/w
+
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vcopy assets/shell-integration/wezterm.sh etc/profile.d
+	vcopy assets/icon/terminal.png usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
+	vcopy assets/icon/wezterm-icon.svg usr/share/pixmaps/wezterm.svg
+	vcopy assets/wezterm.desktop usr/share/applications/org.wezfurlong.wezterm.desktop
+	vcopy assets/wezterm.appdata.xml usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
+	vcopy termwiz/data/wezterm.terminfo usr/share/terminfo/w/wezterm.terminfo
+
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vmkdir usr/share/nautilus-python/extensions
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (12 preceding siblings ...)
  2022-06-25 20:24 ` [PR REVIEW] " classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (98 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906717400

Comment:
```suggestion
hostmakedepends="pkg-config python3"
```
implied by the build style

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (18 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (92 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906720843

Comment:
maybe using `make_check_args+=" -- --skip ..."` could be used instead?

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (19 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (91 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906717332

Comment:
why override the default from the build style?

https://github.com/void-linux/void-packages/blob/e7a98b27f99a9097ae9585e791fda22962db3359/common/build-style/cargo.sh#L11-L16

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (14 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (96 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906720647

Comment:
this should not be needed because it is owned by the package, and causes an error on uninstall:
```
ERROR: wezterm-20220624_1: failed to remove `./usr/share/terminfo/w/wezterm.terminfo': No such file or directory
```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (17 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (93 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906717249

Comment:
unneeded, it's implied by `build_style=cargo` (see https://github.com/void-linux/void-packages/blob/master/common/environment/build-style/cargo.sh)

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (11 preceding siblings ...)
  2022-06-25 19:14 ` [PR PATCH] [Updated] " jbenden
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (99 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906718601

Comment:
other terminals (like [alacritty](https://github.com/void-linux/void-packages/blob/e7a98b27f99a9097ae9585e791fda22962db3359/srcpkgs/alacritty/)), have a subpackage for terminfo files. might be good here

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (20 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:25 ` classabbyamp
                   ` (90 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906717455

Comment:
```suggestion
 wayland-devel xcb-util-devel xcb-util-image-devel
```
implied by build style

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (15 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (95 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906720667

Comment:
not needed, it's added automatically if needed
```suggestion

```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (13 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (97 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906720878

Comment:
```suggestion
	vbin target/${RUST_TARGET}/release/wezterm
	vbin target/${RUST_TARGET}/release/wezterm-gui
	vbin target/${RUST_TARGET}/release/wezterm-mux-server
	vbin target/${RUST_TARGET}/release/strip-ansi-escapes

	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
	vinstall assets/wezterm.desktop 644 usr/share/applications
	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
	vinstall termwiz/data/wezterm.terminfo 644 usr/share/terminfo/w
```
a bit more concise, and uses the proper directory for the svg icon

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (16 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:24 ` classabbyamp
  2022-06-25 20:24 ` classabbyamp
                   ` (94 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r906718259

Comment:
doesn't seem to be needed because of the `--exclude wezterm-ssh` above

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (21 preceding siblings ...)
  2022-06-25 20:24 ` classabbyamp
@ 2022-06-25 20:25 ` classabbyamp
  2022-06-25 20:26 ` classabbyamp
                   ` (89 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1166356214

Comment:
arch's package also installs some zsh and bash completions, it would be good to include those too

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (22 preceding siblings ...)
  2022-06-25 20:25 ` classabbyamp
@ 2022-06-25 20:26 ` classabbyamp
  2022-07-09 20:40 ` [PR PATCH] [Updated] " jbenden
                   ` (88 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-06-25 20:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1166356214

Comment:
arch's package also installs some shell completions, it would be good to include those too

https://github.com/archlinux/svntogit-community/blob/b903da54ec78dc74fff1e6fb692c358d3898c2fb/trunk/PKGBUILD#L78-L80

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (23 preceding siblings ...)
  2022-06-25 20:26 ` classabbyamp
@ 2022-07-09 20:40 ` jbenden
  2022-07-09 20:43 ` [PR REVIEW] " jbenden
                   ` (87 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-07-09 20:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 5414 bytes --]

From 9decd68fb350d87ad304064b8d0e126674b4b53b Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220624_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                 |  1 +
 srcpkgs/wezterm-terminfo                 |  1 +
 srcpkgs/wezterm/template                 | 72 ++++++++++++++++++++++++
 srcpkgs/wezterm/update                   |  2 +
 srcpkgs/wezterm/wezterm-terminfo.INSTALL |  6 ++
 srcpkgs/wezterm/wezterm-terminfo.REMOVE  |  6 ++
 6 files changed, 88 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.INSTALL
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.REMOVE

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..d21ffe404473
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,72 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220624
+revision=1
+_srcver=20220624-141144-bd1b7c5d
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+make_check_args="--workspace --locked -- --skip e2e::sftp"
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="898bfc12794f2e6b3bcd3d066963394ca537ef84a66278ec72e79e2937d99cbf"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	make_check_args+=" --skip cell::test::teeny_string"
+	make_check_args+=" --skip cell::test::test_width"
+	make_check_args+=" --skip surface::line::test::hyperlinks"
+	make_check_args+=" --skip surface::test::double_width"
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	# cannot use build_style cargo do_check because of --release flag.
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	depends="ncurses"
+	pkg_install() {
+		vinstall termwiz/data/wezterm.terminfo 644 usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'
diff --git a/srcpkgs/wezterm/wezterm-terminfo.INSTALL b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/wezterm-terminfo.REMOVE b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
new file mode 100644
index 000000000000..4fb55ac8de97
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
@@ -0,0 +1,6 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (24 preceding siblings ...)
  2022-07-09 20:40 ` [PR PATCH] [Updated] " jbenden
@ 2022-07-09 20:43 ` jbenden
  2022-07-09 20:43 ` jbenden
                   ` (86 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-07-09 20:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r917306830

Comment:
It's because of the flag `--release`; which cannot be present here...

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (25 preceding siblings ...)
  2022-07-09 20:43 ` [PR REVIEW] " jbenden
@ 2022-07-09 20:43 ` jbenden
  2022-07-09 21:52 ` jbenden
                   ` (85 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-07-09 20:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r917306861

Comment:
Yeah!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (26 preceding siblings ...)
  2022-07-09 20:43 ` jbenden
@ 2022-07-09 21:52 ` jbenden
  2022-09-25 12:08 ` auronandace
                   ` (84 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-07-09 21:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

New comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1179611914

Comment:
I added `zlib-devel` in hopes of resolving the various build errors; but it did not help. Additionally, I have no idea on why i686 is segmentation faulting.

Thoughts, suggestions, and/or ideas are always welcomed,
-Joe

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (27 preceding siblings ...)
  2022-07-09 21:52 ` jbenden
@ 2022-09-25 12:08 ` auronandace
  2022-09-25 17:01 ` [PR PATCH] [Updated] " jbenden
                   ` (83 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: auronandace @ 2022-09-25 12:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

New comment by auronandace on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1257180667

Comment:
Does the latest version have the same issues?

Also, I came across this page: https://github.com/wez/wezterm/blob/main/README-DISTRO-MAINTAINER.md

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (28 preceding siblings ...)
  2022-09-25 12:08 ` auronandace
@ 2022-09-25 17:01 ` jbenden
  2022-09-25 17:05 ` jbenden
                   ` (82 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-09-25 17:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 5414 bytes --]

From 4d22b0e8c756434d9a5a71d2ce8fb09672ed6d4f Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                 |  1 +
 srcpkgs/wezterm-terminfo                 |  1 +
 srcpkgs/wezterm/template                 | 72 ++++++++++++++++++++++++
 srcpkgs/wezterm/update                   |  2 +
 srcpkgs/wezterm/wezterm-terminfo.INSTALL |  6 ++
 srcpkgs/wezterm/wezterm-terminfo.REMOVE  |  6 ++
 6 files changed, 88 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.INSTALL
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.REMOVE

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..acb44ba5ec34
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,72 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+make_check_args="--workspace --locked -- --skip e2e::sftp"
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	make_check_args+=" --skip cell::test::teeny_string"
+	make_check_args+=" --skip cell::test::test_width"
+	make_check_args+=" --skip surface::line::test::hyperlinks"
+	make_check_args+=" --skip surface::test::double_width"
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	# cannot use build_style cargo do_check because of --release flag.
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	depends="ncurses"
+	pkg_install() {
+		vinstall termwiz/data/wezterm.terminfo 644 usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'
diff --git a/srcpkgs/wezterm/wezterm-terminfo.INSTALL b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/wezterm-terminfo.REMOVE b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
new file mode 100644
index 000000000000..4fb55ac8de97
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
@@ -0,0 +1,6 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (29 preceding siblings ...)
  2022-09-25 17:01 ` [PR PATCH] [Updated] " jbenden
@ 2022-09-25 17:05 ` jbenden
  2022-09-25 18:09 ` jbenden
                   ` (81 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-09-25 17:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 5442 bytes --]

From 899b8946253f5e4a7b165b127d6c4ed4fd24229b Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                 |  1 +
 srcpkgs/wezterm-terminfo                 |  1 +
 srcpkgs/wezterm/template                 | 73 ++++++++++++++++++++++++
 srcpkgs/wezterm/update                   |  2 +
 srcpkgs/wezterm/wezterm-terminfo.INSTALL |  6 ++
 srcpkgs/wezterm/wezterm-terminfo.REMOVE  |  6 ++
 6 files changed, 89 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.INSTALL
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.REMOVE

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..dd3285a0c4fe
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,73 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+make_check_args="--workspace --locked -- --skip e2e::sftp"
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	make_check_args+=" --skip cell::test::teeny_string"
+	make_check_args+=" --skip cell::test::test_width"
+	make_check_args+=" --skip surface::line::test::hyperlinks"
+	make_check_args+=" --skip surface::test::double_width"
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	# cannot use build_style cargo do_check because of --release flag.
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	depends="ncurses"
+	pkg_install() {
+		vinstall termwiz/data/wezterm.terminfo 644 usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'
diff --git a/srcpkgs/wezterm/wezterm-terminfo.INSTALL b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/wezterm-terminfo.REMOVE b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
new file mode 100644
index 000000000000..4fb55ac8de97
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
@@ -0,0 +1,6 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (30 preceding siblings ...)
  2022-09-25 17:05 ` jbenden
@ 2022-09-25 18:09 ` jbenden
  2022-10-15 21:54 ` [PR PATCH] [Updated] " jbenden
                   ` (80 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-09-25 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1257247425

Comment:
Yup. :(

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (31 preceding siblings ...)
  2022-09-25 18:09 ` jbenden
@ 2022-10-15 21:54 ` jbenden
  2022-10-15 22:11 ` [PR REVIEW] " paper42
                   ` (79 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-15 21:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 5442 bytes --]

From b9255a8fb43bf2140dc4b24c9a87a8fbca1a7864 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                 |  1 +
 srcpkgs/wezterm-terminfo                 |  1 +
 srcpkgs/wezterm/template                 | 73 ++++++++++++++++++++++++
 srcpkgs/wezterm/update                   |  2 +
 srcpkgs/wezterm/wezterm-terminfo.INSTALL |  6 ++
 srcpkgs/wezterm/wezterm-terminfo.REMOVE  |  6 ++
 6 files changed, 89 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.INSTALL
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.REMOVE

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..dd3285a0c4fe
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,73 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+make_check_args="--workspace --locked -- --skip e2e::sftp"
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+python_version=3
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# The platform has 4 bugs in processing emotes; this shouldn't effect everybody?!
+	make_check_args+=" --skip cell::test::teeny_string"
+	make_check_args+=" --skip cell::test::test_width"
+	make_check_args+=" --skip surface::line::test::hyperlinks"
+	make_check_args+=" --skip surface::test::double_width"
+fi
+
+do_check() {
+	: ${make_cmd:=cargo}
+
+	# cannot use build_style cargo do_check because of --release flag.
+	${make_cmd} test --target ${RUST_TARGET} ${configure_args} \
+		${make_check_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	depends="ncurses"
+	pkg_install() {
+		vinstall termwiz/data/wezterm.terminfo 644 usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'
diff --git a/srcpkgs/wezterm/wezterm-terminfo.INSTALL b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/wezterm-terminfo.REMOVE b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
new file mode 100644
index 000000000000..4fb55ac8de97
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
@@ -0,0 +1,6 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (32 preceding siblings ...)
  2022-10-15 21:54 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-15 22:11 ` paper42
  2022-10-15 23:49 ` wez
                   ` (78 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-10-15 22:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r996360098

Comment:
```suggestion
	# cannot use build_style cargo do_check because of --release flag.
	cargo test --target ${RUST_TARGET} ${make_check_args}
```

I would also remove make_check_args and include the condition here in do_check

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (33 preceding siblings ...)
  2022-10-15 22:11 ` [PR REVIEW] " paper42
@ 2022-10-15 23:49 ` wez
  2022-10-16 22:21 ` [PR PATCH] [Updated] " jbenden
                   ` (77 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: wez @ 2022-10-15 23:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

New comment by wez on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1279853575

Comment:
> I do not know what to do about the i686 check errors. These seem like bugs within some Rust crate(s), and may not impact use of the program on i686.

Those were serious bugs that would break the program on i686 and should be resolved by https://github.com/wez/wezterm/commit/7b904f05eb4de9ed44d2068355a571b117eba0e1

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (34 preceding siblings ...)
  2022-10-15 23:49 ` wez
@ 2022-10-16 22:21 ` jbenden
  2022-10-16 22:27 ` [PR REVIEW] " classabbyamp
                   ` (76 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-16 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 13734 bytes --]

From a90aab1230fdfe7f148bdfca6ad00287a1ae5883 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                      |   1 +
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  63 +++++
 srcpkgs/wezterm/update                        |   2 +
 srcpkgs/wezterm/wezterm-terminfo.INSTALL      |   6 +
 srcpkgs/wezterm/wezterm-terminfo.REMOVE       |   6 +
 7 files changed, 311 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.INSTALL
 create mode 100644 srcpkgs/wezterm/wezterm-terminfo.REMOVE

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..c7e71a356161
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,63 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+python_version=3
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	depends="ncurses"
+	pkg_install() {
+		vinstall termwiz/data/wezterm.terminfo 644 usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'
diff --git a/srcpkgs/wezterm/wezterm-terminfo.INSTALL b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
new file mode 100644
index 000000000000..74c2dcfdc3b9
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.INSTALL
@@ -0,0 +1,6 @@
+case "$ACTION" in
+post)
+	# Compile the terminfo description.
+	tic -xs usr/share/terminfo/w/wezterm.terminfo
+	;;
+esac
diff --git a/srcpkgs/wezterm/wezterm-terminfo.REMOVE b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
new file mode 100644
index 000000000000..4fb55ac8de97
--- /dev/null
+++ b/srcpkgs/wezterm/wezterm-terminfo.REMOVE
@@ -0,0 +1,6 @@
+case "$ACTION" in
+pre)
+	# Remove compiled terminfo files.
+	rm -f usr/share/terminfo/w/wezterm
+	;;
+esac

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (35 preceding siblings ...)
  2022-10-16 22:21 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-16 22:27 ` classabbyamp
  2022-10-17 22:57 ` jbenden
                   ` (75 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-16 22:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r996504263

Comment:
this should be done in post_install instead of at install-time (was changed in #38179)

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (36 preceding siblings ...)
  2022-10-16 22:27 ` [PR REVIEW] " classabbyamp
@ 2022-10-17 22:57 ` jbenden
  2022-10-17 23:11 ` [PR PATCH] [Updated] " jbenden
                   ` (74 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-17 22:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997574908

Comment:
I am not sure, how?

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (37 preceding siblings ...)
  2022-10-17 22:57 ` jbenden
@ 2022-10-17 23:11 ` jbenden
  2022-10-17 23:12 ` [PR REVIEW] " jbenden
                   ` (73 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-17 23:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 13047 bytes --]

From 01c7b63d7a473efc26bf2ed142b78655113daea1 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                      |   1 +
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  67 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 303 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..ecf24dff3f79
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,67 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+python_version=3
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		export TERMINFO=${DESTDIR}/usr/share/terminfo
+		mkdir -p ${DESTDIR}/usr/share/terminfo/w
+		cp -p termwiz/data/wezterm.terminfo ${DESTDIR}/usr/share/terminfo/w
+		chmod 644 ${DESTDIR}/usr/share/terminfo/w/wezterm.terminfo
+		tic -xs ${DESTDIR}/usr/share/terminfo/w/wezterm.terminfo
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (38 preceding siblings ...)
  2022-10-17 23:11 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-17 23:12 ` jbenden
  2022-10-17 23:13 ` [PR PATCH] [Updated] " jbenden
                   ` (72 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-17 23:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997581675

Comment:
I gave a go at this; in an updated commit....

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (39 preceding siblings ...)
  2022-10-17 23:12 ` [PR REVIEW] " jbenden
@ 2022-10-17 23:13 ` jbenden
  2022-10-17 23:20 ` [PR REVIEW] " classabbyamp
                   ` (71 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-17 23:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 13047 bytes --]

From 491114041c72061d06426993815af5ad0609fd5b Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                      |   1 +
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  67 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 303 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..ecf24dff3f79
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,67 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config python3"
+makedepends="nautilus-python fontconfig-devel freetype-devel harfbuzz-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11
+ python3-devel wayland-devel xcb-util-devel xcb-util-image-devel
+ xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+python_version=3
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+nautilus-wezterm_package() {
+	short_desc+=" - Nautilus plugin"
+	pycompile_dirs="usr/share/nautilus-python/extensions"
+	depends="wezterm>=${version}_${revision} nautilus-python"
+	pkg_install() {
+		vinstall assets/wezterm-nautilus.py 644 usr/share/nautilus-python/extensions
+	}
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		export TERMINFO=${DESTDIR}/usr/share/terminfo
+		mkdir -p ${DESTDIR}/usr/share/terminfo/w
+		cp -p termwiz/data/wezterm.terminfo ${DESTDIR}/usr/share/terminfo/w
+		chmod 644 ${DESTDIR}/usr/share/terminfo/w/wezterm.terminfo
+		tic -xs ${DESTDIR}/usr/share/terminfo/w/wezterm.terminfo
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (40 preceding siblings ...)
  2022-10-17 23:13 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-17 23:20 ` classabbyamp
  2022-10-17 23:37 ` paper42
                   ` (70 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-17 23:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997585058

Comment:
you should only need

```bash
do_install() {
	# existing stuff ...
	vmkdir usr/share/terminfo
	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
}

wezterm-terminfo_package() {
	# ...
	pkg_install() {
		vmove usr/share/terminfo
	}
}

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (41 preceding siblings ...)
  2022-10-17 23:20 ` [PR REVIEW] " classabbyamp
@ 2022-10-17 23:37 ` paper42
  2022-10-17 23:47 ` jbenden
                   ` (69 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-10-17 23:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997592555

Comment:
Many nautilus plugins seem to break with nautilus 43 and will have to be disabled. Could you check the status on this one? If it doesn't work and there isn't a plan to support it in a few weeks, I think we could not add the plugin for now because if we did, we would have to disable it in a few weeks when we merge nautilus 43.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (42 preceding siblings ...)
  2022-10-17 23:37 ` paper42
@ 2022-10-17 23:47 ` jbenden
  2022-10-18  1:02 ` [PR PATCH] [Updated] " jbenden
                   ` (68 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-17 23:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997596303

Comment:
The plugin has had recent commits, so it might... I'm thinking it should maybe be removed, no?

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (43 preceding siblings ...)
  2022-10-17 23:47 ` jbenden
@ 2022-10-18  1:02 ` jbenden
  2022-10-18  1:02 ` [PR REVIEW] " jbenden
                   ` (67 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-18  1:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 12520 bytes --]

From 6c7943c1588f3fd3a7fb7997003917133ba88c1e Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/nautilus-wezterm                      |   1 +
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  55 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 291 insertions(+)
 create mode 120000 srcpkgs/nautilus-wezterm
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/nautilus-wezterm b/srcpkgs/nautilus-wezterm
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/nautilus-wezterm
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..490d9bb93473
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,55 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libssh2-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel
+ xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel
+ xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (44 preceding siblings ...)
  2022-10-18  1:02 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-18  1:02 ` jbenden
  2022-10-18  1:03 ` jbenden
                   ` (66 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-18  1:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997625857

Comment:
Removed.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (45 preceding siblings ...)
  2022-10-18  1:02 ` [PR REVIEW] " jbenden
@ 2022-10-18  1:03 ` jbenden
  2022-10-18  1:04 ` [PR PATCH] [Updated] " jbenden
                   ` (65 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-18  1:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r997625930

Comment:
Thanks!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (46 preceding siblings ...)
  2022-10-18  1:03 ` jbenden
@ 2022-10-18  1:04 ` jbenden
  2022-10-20 15:43 ` jbenden
                   ` (64 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-18  1:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 12205 bytes --]

From 74cd1715e933a8ae83f3990d28df2d57cc2a956e Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  55 +++++
 srcpkgs/wezterm/update                        |   2 +
 4 files changed, 290 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..490d9bb93473
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,55 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libssh2-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel
+ xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel
+ xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (47 preceding siblings ...)
  2022-10-18  1:04 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-20 15:43 ` jbenden
  2022-10-20 17:33 ` jbenden
                   ` (63 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-20 15:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 12219 bytes --]

From 69b412893df9082d650923b715fb5a778de73634 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  55 +++++
 srcpkgs/wezterm/update                        |   2 +
 4 files changed, 290 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..3e73c20328dd
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,55 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libgit2-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel
+ xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel
+ xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (48 preceding siblings ...)
  2022-10-20 15:43 ` jbenden
@ 2022-10-20 17:33 ` jbenden
  2022-10-21  3:03 ` jbenden
                   ` (62 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-20 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 12258 bytes --]

From e663a2a1543c4d13e3f631c643f6f19943fe89e7 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  57 +++++
 srcpkgs/wezterm/update                        |   2 +
 4 files changed, 292 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..3c2a40d4ac72
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,57 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libgit2-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel
+ xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel
+ xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+
+export LIBSSH2_SYS_USE_PKG_CONFIG=1
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (49 preceding siblings ...)
  2022-10-20 17:33 ` jbenden
@ 2022-10-21  3:03 ` jbenden
  2022-10-24  1:14 ` [PR REVIEW] " classabbyamp
                   ` (61 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-21  3:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 12257 bytes --]

From 3c00647c7053f251690f646218d6d2ca3099ff10 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 srcpkgs/wezterm/template                      |  56 +++++
 srcpkgs/wezterm/update                        |   2 +
 4 files changed, 291 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..f953d5c060b7
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,56 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libgit2-devel
+ libssh2-devel libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel
+ xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel
+ xcb-util-wm-devel zlib-devel"
+depends="fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/${pkgname}-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	local _args="--skip e2e::sftp"
+
+	# cannot use build_style cargo do_check because of --release flag.
+	cargo test --target ${RUST_TARGET} --workspace --locked -- ${_args}
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+	vinstall assets/shell-completion/bash 644 usr/share/bash-completion/completions $pkgname
+	vinstall assets/shell-completion/fish 644 usr/share/fish/vendor_completions.d $pkgname.fish
+	vinstall assets/shell-completion/zsh 644 usr/share/zsh/site-functions _$pkgname
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo/w
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (50 preceding siblings ...)
  2022-10-21  3:03 ` jbenden
@ 2022-10-24  1:14 ` classabbyamp
  2022-10-24  1:14 ` classabbyamp
                   ` (60 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002811328

Comment:
use `vcompletion` for these

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (52 preceding siblings ...)
  2022-10-24  1:14 ` classabbyamp
@ 2022-10-24  1:14 ` classabbyamp
  2022-10-24  1:16 ` classabbyamp
                   ` (58 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002811633

Comment:
is this needed as a variable or can it just go in the line below directly?

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (51 preceding siblings ...)
  2022-10-24  1:14 ` [PR REVIEW] " classabbyamp
@ 2022-10-24  1:14 ` classabbyamp
  2022-10-24  1:14 ` classabbyamp
                   ` (59 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002811391

Comment:
```suggestion
		vmove usr/share/terminfo
```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (53 preceding siblings ...)
  2022-10-24  1:14 ` classabbyamp
@ 2022-10-24  1:16 ` classabbyamp
  2022-10-24  1:17 ` classabbyamp
                   ` (57 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002812149

Comment:
```suggestion
build_style=cargo
configure_args="--features distro-defaults"
```
https://github.com/wez/wezterm/blob/main/README-DISTRO-MAINTAINER.md#building-wezterm

would also be good to not use the bundled fonts

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (54 preceding siblings ...)
  2022-10-24  1:16 ` classabbyamp
@ 2022-10-24  1:17 ` classabbyamp
  2022-10-24  1:20 ` classabbyamp
                   ` (56 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002812149

Comment:
```suggestion
build_style=cargo
configure_args="--features distro-defaults"
```
https://github.com/wez/wezterm/blob/main/README-DISTRO-MAINTAINER.md#building-wezterm

would also be good to not use the bundled fonts for ones we already have

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (55 preceding siblings ...)
  2022-10-24  1:17 ` classabbyamp
@ 2022-10-24  1:20 ` classabbyamp
  2022-10-24  1:21 ` classabbyamp
                   ` (55 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002812149

Comment:
```suggestion
build_style=cargo
configure_args="--features distro-defaults"
```
https://github.com/wez/wezterm/blob/main/README-DISTRO-MAINTAINER.md#building-wezterm

would also be good to not use the bundled fonts for ones we already have (I think we might have all of them: `nerd-fonts-ttf`, `fonts-roboto-ttf`, `noto-fonts-emoji` (nerd-fonts includes jetbrains mono))

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (56 preceding siblings ...)
  2022-10-24  1:20 ` classabbyamp
@ 2022-10-24  1:21 ` classabbyamp
  2022-10-24  1:27 ` classabbyamp
                   ` (54 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002813423

Comment:
```suggestion
distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (57 preceding siblings ...)
  2022-10-24  1:21 ` classabbyamp
@ 2022-10-24  1:27 ` classabbyamp
  2022-10-24 17:54 ` [PR PATCH] [Updated] " jbenden
                   ` (53 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24  1:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1002812149

Comment:
```suggestion
build_style=cargo
configure_args="--features distro-defaults"
```
https://github.com/wez/wezterm/blob/main/README-DISTRO-MAINTAINER.md#building-wezterm

would also be good to not use the bundled fonts for ones we already have (I think we might have all of them: `nerd-fonts-ttf`, `fonts-roboto-ttf`, `noto-fonts-emoji` (nerd-fonts includes jetbrains mono, but it's the nerd fonts patched version))

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (58 preceding siblings ...)
  2022-10-24  1:27 ` classabbyamp
@ 2022-10-24 17:54 ` jbenden
  2022-10-24 18:09 ` jbenden
                   ` (52 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-24 17:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14264 bytes --]

From c099bf2b521017db42bcee7912510b5723da782f Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  68 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 325 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..5ba054f0886d
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libX11-devel
+ libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh  zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (59 preceding siblings ...)
  2022-10-24 17:54 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-24 18:09 ` jbenden
  2022-10-24 18:27 ` [PR REVIEW] " classabbyamp
                   ` (51 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-24 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14264 bytes --]

From 86b9acaff18c35536bf56879da0547d76ad4d154 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  68 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 325 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..5ba054f0886d
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel libX11-devel
+ libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh  zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (60 preceding siblings ...)
  2022-10-24 18:09 ` jbenden
@ 2022-10-24 18:27 ` classabbyamp
  2022-10-24 21:07 ` [PR PATCH] [Updated] " jbenden
                   ` (50 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-24 18:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1003625017

Comment:
i don't think you need to patch the fonts out, there are features flags for it

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (61 preceding siblings ...)
  2022-10-24 18:27 ` [PR REVIEW] " classabbyamp
@ 2022-10-24 21:07 ` jbenden
  2022-10-24 23:14 ` [PR REVIEW] " jbenden
                   ` (49 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-24 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14278 bytes --]

From 59ab3e1684f3c487935024b78d0b09d5f0979731 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  68 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 325 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..02ee8a2e90a9
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh  zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (62 preceding siblings ...)
  2022-10-24 21:07 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-24 23:14 ` jbenden
  2022-10-24 23:19 ` jbenden
                   ` (48 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-24 23:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1003852662

Comment:
done

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (63 preceding siblings ...)
  2022-10-24 23:14 ` [PR REVIEW] " jbenden
@ 2022-10-24 23:19 ` jbenden
  2022-10-25  0:35 ` classabbyamp
                   ` (47 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-24 23:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1003855042

Comment:
I've applied the items mentioned in the document.

A [recent commit](https://github.com/wez/wezterm/commit/ad35b9dc217c9223aa93d963707e70233690d573) (22/9/9) discusses these feature flags, they do not exist as shipped on 22/9/5. In lieu of that, I added the two font packages we have and disabled binary inclusion.

-Joe

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (64 preceding siblings ...)
  2022-10-24 23:19 ` jbenden
@ 2022-10-25  0:35 ` classabbyamp
  2022-10-25 19:39 ` [PR PATCH] [Updated] " jbenden
                   ` (46 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-25  0:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1003888032

Comment:
ah i see

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (65 preceding siblings ...)
  2022-10-25  0:35 ` classabbyamp
@ 2022-10-25 19:39 ` jbenden
  2022-10-25 19:43 ` [PR REVIEW] " classabbyamp
                   ` (45 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-25 19:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 15631 bytes --]

From e3744e086b7bd3f2a727314852e1fca35512e132 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 common/environment/setup/install.sh           |  27 +-
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  67 +++++
 srcpkgs/wezterm/update                        |   2 +
 6 files changed, 350 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh
index 5f0571de14ae..da8bd2b1f7a3 100644
--- a/common/environment/setup/install.sh
+++ b/common/environment/setup/install.sh
@@ -13,7 +13,7 @@ _noglob_helper() {
 }
 
 # Apply _noglob to v* commands
-for cmd in vinstall vcopy vcompletion vmove vmkdir vbin vman vdoc vconf vsconf vlicense vsv; do
+for cmd in vinstall vcopy vcompletion vmove vmkdir vbin vman vdoc vconf vsconf vlicense vsv vterminfo; do
        alias ${cmd}="set -f; _noglob_helper _${cmd}"
 done
 
@@ -265,3 +265,28 @@ _vcompletion() {
 			;;
 	esac
 }
+
+_vterminfo() {
+	local file="$1"
+	local _terminfo_dir=usr/share/terminfo
+
+	if [ $# -ne 1 ]; then
+		msg_red "$pkgver: vterminfo: 1 argument expected: <file>\n"
+		return 1
+	elif ! [ -f "$file" ]; then
+		msg_red "$pkgver: vterminfo: file '$file' does not exist.\n"
+		return 1
+	elif ! [ -r "$file" ]; then
+		msg_red "$pkgver: vterminfo: file '$file' is not readable.\n"
+		return 1
+	elif  [ -z "$PKGDESTDIR" ]; then
+		msg_red "$pkgver: vterminfo: PKGDESTDIR unset, can't continue...\n"
+		return 1
+	elif ! [ -x /usr/bin/tic ]; then
+		msg_red "$pkgver: vterminfo: 'tic' binary is missing, can't continue...\n"
+		return 1
+	fi
+
+	vmkdir "${_terminfo_dir}"
+	/usr/bin/tic -sx -o "${PKGDESTDIR}/${_terminfo_dir}" "$file"
+}
diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..18662737bae3
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,67 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh  zsh
+
+	vterminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (66 preceding siblings ...)
  2022-10-25 19:39 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-25 19:43 ` classabbyamp
  2022-10-25 19:43 ` jbenden
                   ` (44 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-25 19:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1004897330

Comment:
hm I think i like the idea of this but it should be in its own pr, which adds the function and changes all the other packages that compile terminfos manually as well as adding docs in manual.md

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (67 preceding siblings ...)
  2022-10-25 19:43 ` [PR REVIEW] " classabbyamp
@ 2022-10-25 19:43 ` jbenden
  2022-10-25 19:45 ` [PR PATCH] [Updated] " jbenden
                   ` (43 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-25 19:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1004897701

Comment:
Ok!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220408_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (68 preceding siblings ...)
  2022-10-25 19:43 ` jbenden
@ 2022-10-25 19:45 ` jbenden
  2022-10-27 22:48 ` [PR REVIEW] New package: wezterm-20220905_1 classabbyamp
                   ` (42 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-25 19:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220408_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14278 bytes --]

From 59ab3e1684f3c487935024b78d0b09d5f0979731 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  68 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 325 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..02ee8a2e90a9
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh  zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (69 preceding siblings ...)
  2022-10-25 19:45 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-27 22:48 ` classabbyamp
  2022-10-27 22:48 ` classabbyamp
                   ` (41 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-27 22:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1007439257

Comment:
```suggestion
homepage="https://wezfurlong.org/wezterm/"
changelog="https://wezfurlong.org/wezterm/changelog.html"
```

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (70 preceding siblings ...)
  2022-10-27 22:48 ` [PR REVIEW] New package: wezterm-20220905_1 classabbyamp
@ 2022-10-27 22:48 ` classabbyamp
  2022-10-27 22:50 ` classabbyamp
                   ` (40 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-27 22:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1007438692

Comment:
```suggestion
	vcompletion assets/shell-completion/zsh zsh
```
nitpick

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (71 preceding siblings ...)
  2022-10-27 22:48 ` classabbyamp
@ 2022-10-27 22:50 ` classabbyamp
  2022-10-28  1:06 ` [PR PATCH] [Updated] " jbenden
                   ` (39 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-27 22:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1294207413

Comment:
I might be able to investigate the cross issue soon, but I think that can be solved later if I don't have time

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (72 preceding siblings ...)
  2022-10-27 22:50 ` classabbyamp
@ 2022-10-28  1:06 ` jbenden
  2022-10-28  1:25 ` classabbyamp
                   ` (38 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-28  1:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14337 bytes --]

From bef7a67a37016d3dbc25e16eb00053b23bd1df98 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  69 ++++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 326 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..ab6fb201e20a
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,69 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (73 preceding siblings ...)
  2022-10-28  1:06 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-28  1:25 ` classabbyamp
  2022-10-28  2:02 ` [PR PATCH] [Updated] " jbenden
                   ` (37 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-10-28  1:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1294298658

Comment:
actually one more thing: swap the location the do_check and do_build functions, so the order matches the order of the steps in xbps-src

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (74 preceding siblings ...)
  2022-10-28  1:25 ` classabbyamp
@ 2022-10-28  2:02 ` jbenden
  2022-10-28  9:21 ` [PR REVIEW] " paper42
                   ` (36 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-28  2:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14337 bytes --]

From 3e510eddc12d152b2a8bc735b603e3b98a05da89 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 ...4f05eb4de9ed44d2068355a571b117eba0e1.patch | 232 ++++++++++++++++++
 .../wezterm/patches/remove-distro-fonts.patch |  22 ++
 srcpkgs/wezterm/template                      |  69 ++++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 326 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/7b904f05eb4de9ed44d2068355a571b117eba0e1.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/remove-distro-fonts.patch b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..1cd9c38ebc62
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,69 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=20220905-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (75 preceding siblings ...)
  2022-10-28  2:02 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-28  9:21 ` paper42
  2022-10-28  9:21 ` paper42
                   ` (35 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-10-28  9:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1007813373

Comment:
```suggestion
_srcver=${version}-102802-7d4b8249
```


^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (76 preceding siblings ...)
  2022-10-28  9:21 ` [PR REVIEW] " paper42
@ 2022-10-28  9:21 ` paper42
  2022-10-28 15:11 ` [PR PATCH] [Updated] " jbenden
                   ` (34 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-10-28  9:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1007848298

Comment:
I would call this patch something like 32bit.patch, the commit has doesn't tell us anything useful.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (77 preceding siblings ...)
  2022-10-28  9:21 ` paper42
@ 2022-10-28 15:11 ` jbenden
  2022-10-28 15:11 ` [PR REVIEW] " jbenden
                   ` (33 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-28 15:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14239 bytes --]

From 698b5748a94ef80e1379810818d27b0b4f9bee87 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ++++++++++++++++++
 .../patches/0002-remove-distro-fonts.patch    |  22 ++
 srcpkgs/wezterm/template                      |  69 ++++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 326 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 create mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0001-32bit.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..aacb21d029a1
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,69 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=${version}-102802-7d4b8249
+wrksrc="${pkgname}-${_srcver}"
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (78 preceding siblings ...)
  2022-10-28 15:11 ` [PR PATCH] [Updated] " jbenden
@ 2022-10-28 15:11 ` jbenden
  2022-10-28 15:12 ` jbenden
                   ` (32 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-28 15:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1008174353

Comment:
Thanks!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (79 preceding siblings ...)
  2022-10-28 15:11 ` [PR REVIEW] " jbenden
@ 2022-10-28 15:12 ` jbenden
  2022-11-08  3:39 ` vikigenius
                   ` (31 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-10-28 15:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1008175017

Comment:
Ok, I've renamed both to be more similar to git exports; as well as ensure a reproduced ordering of patches.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (80 preceding siblings ...)
  2022-10-28 15:12 ` jbenden
@ 2022-11-08  3:39 ` vikigenius
  2022-11-09 19:41 ` [PR REVIEW] " classabbyamp
                   ` (30 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: vikigenius @ 2022-11-08  3:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

New comment by vikigenius on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1306584633

Comment:
Is there anything else blocking this from merging? I would love to use Wezterm in void

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (81 preceding siblings ...)
  2022-11-08  3:39 ` vikigenius
@ 2022-11-09 19:41 ` classabbyamp
  2022-11-10 15:37 ` [PR PATCH] [Updated] " jbenden
                   ` (29 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-09 19:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1018345286

Comment:
this should no longer need to be specified if you rebase

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (82 preceding siblings ...)
  2022-11-09 19:41 ` [PR REVIEW] " classabbyamp
@ 2022-11-10 15:37 ` jbenden
  2022-11-14 22:34 ` classabbyamp
                   ` (28 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-10 15:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14206 bytes --]

From 857cf02a18f041b645b057b3d8b8387a58c59318 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ++++++++++++++++++
 .../patches/0002-remove-distro-fonts.patch    |  22 ++
 srcpkgs/wezterm/template                      |  68 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 325 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 create mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0001-32bit.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..2c03ea294cf4
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,68 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=${version}-102802-7d4b8249
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel libxkbcommon-x11 wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel zlib-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (83 preceding siblings ...)
  2022-11-10 15:37 ` [PR PATCH] [Updated] " jbenden
@ 2022-11-14 22:34 ` classabbyamp
  2022-11-14 22:59 ` paper42
                   ` (27 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-14 22:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1314498261

Comment:
was going to look at this tonight and see if I can fix cross -- if not, I'll merge it as-is

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (84 preceding siblings ...)
  2022-11-14 22:34 ` classabbyamp
@ 2022-11-14 22:59 ` paper42
  2022-11-14 23:26 ` [PR REVIEW] " classabbyamp
                   ` (26 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: paper42 @ 2022-11-14 22:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1314516761

Comment:
> was going to look at this tonight and see if I can fix cross -- if not, I'll merge it as-is

Great, I also think this might fail to build for ppc*, but I don't have a way to test that and it's just a guess, so I think we can just restrict it when it fails.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (85 preceding siblings ...)
  2022-11-14 22:59 ` paper42
@ 2022-11-14 23:26 ` classabbyamp
  2022-11-14 23:29 ` classabbyamp
                   ` (25 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-14 23:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022163556

Comment:
```suggestion
_srcver=${version}-102802-7d4b8249
archs="x86_64* i686* aarch64* arm*" # ring
```
`ring` is in the dependency tree for this and has issues on ppc so we can restrict it preemtively

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (86 preceding siblings ...)
  2022-11-14 23:26 ` [PR REVIEW] " classabbyamp
@ 2022-11-14 23:29 ` classabbyamp
  2022-11-15  1:22 ` classabbyamp
                   ` (24 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-14 23:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022163556

Comment:
```suggestion
_srcver=${version}-102802-7d4b8249
archs="x86_64* i686* aarch64* arm*" # ring
```
`ring` is in the dependency tree for this and has issues on ppc so we can restrict it preemtively

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (87 preceding siblings ...)
  2022-11-14 23:29 ` classabbyamp
@ 2022-11-15  1:22 ` classabbyamp
  2022-11-15  1:22 ` classabbyamp
                   ` (23 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  1:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022175137

Comment:
```suggestion
build_style=cargo
configure_args="--no-default-features --features distro-defaults,wayland"
```
and delete `do_build()`, this produces the same output as what you had overridiong do_build

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (88 preceding siblings ...)
  2022-11-15  1:22 ` classabbyamp
@ 2022-11-15  1:22 ` classabbyamp
  2022-11-15  1:22 ` classabbyamp
                   ` (22 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  1:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022222532

Comment:
```suggestion
```
see above

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (91 preceding siblings ...)
  2022-11-15  1:22 ` classabbyamp
@ 2022-11-15  1:22 ` classabbyamp
  2022-11-15  1:25 ` classabbyamp
                   ` (19 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  1:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022221601

Comment:
why was `zlib-devel` added here? it seems to be unnecessary from my testing

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (90 preceding siblings ...)
  2022-11-15  1:22 ` classabbyamp
@ 2022-11-15  1:22 ` classabbyamp
  2022-11-15  1:22 ` classabbyamp
                   ` (20 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  1:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022165684

Comment:
```suggestion
_srcver=${version}-102802-7d4b8249
archs="x86_64* i686* aarch64* arm*" # ring
```
the crate `ring` is in the dependency tree and has issues on ppc so we can restrict it pre-emptively

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (89 preceding siblings ...)
  2022-11-15  1:22 ` classabbyamp
@ 2022-11-15  1:22 ` classabbyamp
  2022-11-15  1:22 ` classabbyamp
                   ` (21 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  1:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022221928

Comment:
```suggestion
```
libgit2 is only used as a build dependency of wezterm-config, in the build.rs file (which always runs on host), so we have 2 options:

1. simple: add `libgit2-devel` to `hostmakedepends` so the build can work as-is (downside: it creates an unnecessary dependency for our build process)
2. a little more complex: patch out the relevant parts ([here](https://github.com/wez/wezterm/blob/20220905-102802-7d4b8249/config/build.rs#L17-L53) and [here](https://github.com/wez/wezterm/blob/20220905-102802-7d4b8249/config/Cargo.toml#L13-L14))

I think option 2 is the better one.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (92 preceding siblings ...)
  2022-11-15  1:22 ` classabbyamp
@ 2022-11-15  1:25 ` classabbyamp
  2022-11-15  3:25 ` classabbyamp
                   ` (18 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  1:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022221601

Comment:
why was `zlib-devel` added here? it seems to be unnecessary from my testing

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (93 preceding siblings ...)
  2022-11-15  1:25 ` classabbyamp
@ 2022-11-15  3:25 ` classabbyamp
  2022-11-16 16:55 ` jbenden
                   ` (17 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-15  3:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1022256692

Comment:
```suggestion
 libX11-devel libxkbcommon-devel wayland-devel xcb-util-devel
 xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel"
```
I was able to build without these in makedepends (one is not a devel package, the other just seems to not be necessary)

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (94 preceding siblings ...)
  2022-11-15  3:25 ` classabbyamp
@ 2022-11-16 16:55 ` jbenden
  2022-11-16 16:55 ` jbenden
                   ` (16 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024264606

Comment:
Ok.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (95 preceding siblings ...)
  2022-11-16 16:55 ` jbenden
@ 2022-11-16 16:55 ` jbenden
  2022-11-16 16:57 ` jbenden
                   ` (15 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024265433

Comment:
As stated before, this cannot occur until a new release is cut. The changes do NOT exist for this yet.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (96 preceding siblings ...)
  2022-11-16 16:55 ` jbenden
@ 2022-11-16 16:57 ` jbenden
  2022-11-16 16:58 ` jbenden
                   ` (14 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 16:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024266784

Comment:
No, notes buried inside Rust code discuss how mix-match of deps+system-deps causes no end of problems. In fact, I experienced them early on with wezterm packaging.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (97 preceding siblings ...)
  2022-11-16 16:57 ` jbenden
@ 2022-11-16 16:58 ` jbenden
  2022-11-16 17:07 ` [PR PATCH] [Updated] " jbenden
                   ` (13 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 16:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024268379

Comment:
No, Rust cannot pass different flags through different crates... It fails to work, which is why it was expanded out to this function.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (98 preceding siblings ...)
  2022-11-16 16:58 ` jbenden
@ 2022-11-16 17:07 ` jbenden
  2022-11-16 17:08 ` [PR REVIEW] " jbenden
                   ` (12 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 17:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 14223 bytes --]

From 641a0504173f133664e278b41e0efd86ba9ab223 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ++++++++++++++++++
 .../patches/0002-remove-distro-fonts.patch    |  22 ++
 srcpkgs/wezterm/template                      |  69 ++++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 326 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 create mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0001-32bit.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..02b2ca01aace
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,69 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=${version}-102802-7d4b8249
+archs="x86_64* i686* aarch64* arm*" # ring
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_build() {
+	for _target in wezterm wezterm-mux-server strip-ansi-escapes; do
+		cargo build --target ${RUST_TARGET} --release -p ${_target} \
+			--no-default-features
+	done
+	cargo build --target ${RUST_TARGET} --release -p wezterm-gui \
+		--no-default-features \
+		--features distro-defaults,wayland
+}
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (99 preceding siblings ...)
  2022-11-16 17:07 ` [PR PATCH] [Updated] " jbenden
@ 2022-11-16 17:08 ` jbenden
  2022-11-16 17:43 ` classabbyamp
                   ` (11 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 17:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024279831

Comment:
Oops - not true here. Real reason is discussed below about crates and flags and how the source has many crates.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (100 preceding siblings ...)
  2022-11-16 17:08 ` [PR REVIEW] " jbenden
@ 2022-11-16 17:43 ` classabbyamp
  2022-11-16 17:48 ` jbenden
                   ` (10 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-16 17:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024316264

Comment:
use the `crate/feature` syntax then

https://doc.rust-lang.org/cargo/reference/features.html#command-line-feature-options

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (101 preceding siblings ...)
  2022-11-16 17:43 ` classabbyamp
@ 2022-11-16 17:48 ` jbenden
  2022-11-16 18:16 ` [PR PATCH] [Updated] " jbenden
                   ` (9 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 17:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024321062

Comment:
I'll be! Thanks for this!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (102 preceding siblings ...)
  2022-11-16 17:48 ` jbenden
@ 2022-11-16 18:16 ` jbenden
  2022-11-16 18:17 ` [PR REVIEW] " classabbyamp
                   ` (8 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 18:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 13995 bytes --]

From 8771c5fb78965a451e229e87831d6a9e2dca9762 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ++++++++++++++++++
 .../patches/0002-remove-distro-fonts.patch    |  22 ++
 srcpkgs/wezterm/template                      |  60 +++++
 srcpkgs/wezterm/update                        |   2 +
 5 files changed, 317 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 create mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0001-32bit.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..487b920f160c
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,60 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=${version}-102802-7d4b8249
+archs="x86_64* i686* aarch64* arm*" # ring
+build_style=cargo
+configure_args="--no-default-features --features wezterm-gui/distro-defaults,wayland"
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (103 preceding siblings ...)
  2022-11-16 18:16 ` [PR PATCH] [Updated] " jbenden
@ 2022-11-16 18:17 ` classabbyamp
  2022-11-16 18:17 ` classabbyamp
                   ` (7 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-16 18:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024352191

Comment:
the only place libgit and libssh are used anywhere in wezterm is:

```
$ cargo tree
├── config v0.1.0 (/masterdir/builddir/wezterm-20220905/config)
...
│   [build-dependencies]
│   └── git2 v0.14.4
│       ├── bitflags v1.3.2
│       ├── libc v0.2.132
│       ├── libgit2-sys v0.13.4+1.4.2
│       │   ├── libc v0.2.132
│       │   └── libz-sys v1.1.8
│       │       └── libc v0.2.132
...
```
as a build dep only. it's also only used to get the current tag/commit during the build to set the version, and all codepaths that contain this code are never run because the release tars contain a `.tag` file. it's perfectly possible to patch out.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (104 preceding siblings ...)
  2022-11-16 18:17 ` [PR REVIEW] " classabbyamp
@ 2022-11-16 18:17 ` classabbyamp
  2022-11-16 18:22 ` jbenden
                   ` (6 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-16 18:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024352191

Comment:
the only place libgit is used anywhere in wezterm is:

```
$ cargo tree
├── config v0.1.0 (/masterdir/builddir/wezterm-20220905/config)
...
│   [build-dependencies]
│   └── git2 v0.14.4
│       ├── bitflags v1.3.2
│       ├── libc v0.2.132
│       ├── libgit2-sys v0.13.4+1.4.2
│       │   ├── libc v0.2.132
│       │   └── libz-sys v1.1.8
│       │       └── libc v0.2.132
...
```
as a build dep only. it's also only used to get the current tag/commit during the build to set the version, and all codepaths that contain this code are never run because the release tars contain a `.tag` file. it's perfectly possible to patch out.

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (105 preceding siblings ...)
  2022-11-16 18:17 ` classabbyamp
@ 2022-11-16 18:22 ` jbenden
  2022-11-16 18:29 ` [PR PATCH] [Updated] " jbenden
                   ` (5 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 18:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

New review comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024358049

Comment:
Ok, the second option is best!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (106 preceding siblings ...)
  2022-11-16 18:22 ` jbenden
@ 2022-11-16 18:29 ` jbenden
  2022-11-16 21:15 ` [PR REVIEW] " classabbyamp
                   ` (4 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-16 18:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 16451 bytes --]

From c175df4577eba3a27289dd6dac3b9aa8852a8e57 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ++++++++++++++++++
 .../patches/0002-remove-distro-fonts.patch    |  22 ++
 srcpkgs/wezterm/patches/remove-libgit.patch   |  59 +++++
 srcpkgs/wezterm/template                      |  60 +++++
 srcpkgs/wezterm/update                        |   2 +
 6 files changed, 376 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 create mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-libgit.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0001-32bit.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/patches/remove-libgit.patch b/srcpkgs/wezterm/patches/remove-libgit.patch
new file mode 100644
index 000000000000..e95f51785196
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-libgit.patch
@@ -0,0 +1,59 @@
+--- a/config/build.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/config/build.rs	2022-11-16 11:25:28.938783238 -0700
+@@ -13,44 +13,6 @@
+         }
+     } else {
+         // Otherwise we'll derive it from the git information
+-
+-        if let Ok(repo) = git2::Repository::discover(".") {
+-            if let Ok(ref_head) = repo.find_reference("HEAD") {
+-                let repo_path = repo.path().to_path_buf();
+-
+-                if let Ok(resolved) = ref_head.resolve() {
+-                    if let Some(name) = resolved.name() {
+-                        let path = repo_path.join(name);
+-                        if path.exists() {
+-                            println!(
+-                                "cargo:rerun-if-changed={}",
+-                                path.canonicalize().unwrap().display()
+-                            );
+-                        }
+-                    }
+-                }
+-            }
+-        }
+-
+-        let head = Path::new("../.git/HEAD");
+-        if head.exists() {
+-            let head = head.canonicalize().unwrap();
+-            println!("cargo:rerun-if-changed={}", head.display());
+-            if let Ok(output) = std::process::Command::new("git")
+-                .args(&[
+-                    "-c",
+-                    "core.abbrev=8",
+-                    "show",
+-                    "-s",
+-                    "--format=%cd-%h",
+-                    "--date=format:%Y%m%d-%H%M%S",
+-                ])
+-                .output()
+-            {
+-                let info = String::from_utf8_lossy(&output.stdout);
+-                ci_tag = info.trim().to_string();
+-            }
+-        }
+     }
+ 
+     let target = std::env::var("TARGET").unwrap_or_else(|_| "unknown".to_string());
+--- a/config/Cargo.toml	2022-09-05 10:28:02.000000000 -0700
++++ b/config/Cargo.toml	2022-11-16 11:26:47.258458105 -0700
+@@ -10,9 +10,6 @@
+ [dev-dependencies]
+ env_logger = "0.9"
+ 
+-[build-dependencies]
+-git2 = { version = "0.14", default-features = false }
+-
+ [features]
+ distro-defaults = []
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..487b920f160c
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,60 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=${version}-102802-7d4b8249
+archs="x86_64* i686* aarch64* arm*" # ring
+build_style=cargo
+configure_args="--no-default-features --features wezterm-gui/distro-defaults,wayland"
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libX11-devel libxkbcommon-devel wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+nocross=yes # ftbfs in libgit+libssh
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (108 preceding siblings ...)
  2022-11-16 21:15 ` [PR REVIEW] " classabbyamp
@ 2022-11-16 21:15 ` classabbyamp
  2022-11-17 15:41 ` [PR PATCH] [Updated] " jbenden
                   ` (2 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-16 21:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024513227

Comment:
```suggestion
configure_args="--no-default-features --features wezterm-gui/distro-defaults,wezterm-gui/wayland"
```
i think it needs to be like that

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR REVIEW] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (107 preceding siblings ...)
  2022-11-16 18:29 ` [PR PATCH] [Updated] " jbenden
@ 2022-11-16 21:15 ` classabbyamp
  2022-11-16 21:15 ` classabbyamp
                   ` (3 subsequent siblings)
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-16 21:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#discussion_r1024514205

Comment:
```suggestion
```
add `libssh2-devel` to `makedepends` and that should be all that's needed. Worked in my testing for cross and non-cross

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Updated] New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (109 preceding siblings ...)
  2022-11-16 21:15 ` classabbyamp
@ 2022-11-17 15:41 ` jbenden
  2022-11-17 16:37 ` jbenden
  2022-11-17 18:32 ` [PR PATCH] [Merged]: " classabbyamp
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-17 15:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm
https://github.com/void-linux/void-packages/pull/36903

New package: wezterm-20220905_1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/36903.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-36903.patch --]
[-- Type: text/x-diff, Size: 16439 bytes --]

From 610fb961eb29e769073b5cbfb47a7057d9a6b55f Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 24 Apr 2022 10:16:12 -0700
Subject: [PATCH] New package: wezterm-20220905_1

Fixes: #35721
Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm-terminfo                      |   1 +
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ++++++++++++++++++
 .../patches/0002-remove-distro-fonts.patch    |  22 ++
 srcpkgs/wezterm/patches/remove-libgit.patch   |  59 +++++
 srcpkgs/wezterm/template                      |  59 +++++
 srcpkgs/wezterm/update                        |   2 +
 6 files changed, 375 insertions(+)
 create mode 120000 srcpkgs/wezterm-terminfo
 create mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 create mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
 create mode 100644 srcpkgs/wezterm/patches/remove-libgit.patch
 create mode 100644 srcpkgs/wezterm/template
 create mode 100644 srcpkgs/wezterm/update

diff --git a/srcpkgs/wezterm-terminfo b/srcpkgs/wezterm-terminfo
new file mode 120000
index 000000000000..37d60f7b3b71
--- /dev/null
+++ b/srcpkgs/wezterm-terminfo
@@ -0,0 +1 @@
+wezterm
\ No newline at end of file
diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
new file mode 100644
index 000000000000..d374a275d235
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0001-32bit.patch
@@ -0,0 +1,232 @@
+From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
+From: Wez Furlong <wez@wezfurlong.org>
+Date: Sat, 15 Oct 2022 16:45:02 -0700
+Subject: [PATCH] termwiz: fixup for 32-bit systems
+
+I noticed from https://github.com/void-linux/void-packages/pull/36903
+that 32-bit systems were failing to pass the test suite.
+
+Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
+teeny_string` showed that we were faulting in the teenystring code
+and digging a bit deeper showed that it was because our assumptions
+about the high bits were wrong for 32-bit systems.
+
+Fix this by making TeenyString based around a u64 rather than usize
+so that we guarantee its size on all current systems.
+---
+ Cargo.lock          |  1 -
+ termwiz/Cargo.toml  |  1 -
+ termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
+ 3 files changed, 26 insertions(+), 63 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4f976535be..243e3a2b24 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4739,7 +4739,6 @@ dependencies = [
+  "base64",
+  "bitflags",
+  "cassowary",
+- "cfg-if 1.0.0",
+  "criterion",
+  "env_logger",
+  "filedescriptor",
+diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
+index d8d7ab543c..e843bac261 100644
+--- a/termwiz/Cargo.toml
++++ b/termwiz/Cargo.toml
+@@ -15,7 +15,6 @@ readme = "README.md"
+ base64 = "0.13"
+ bitflags = "1.3"
+ cassowary = {version="0.3", optional=true}
+-cfg-if = "1.0"
+ anyhow = "1.0"
+ filedescriptor = { version="0.8", path = "../filedescriptor" }
+ finl_unicode = "1.1"
+diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
+index ddf38a93bb..70d6099dd0 100644
+--- a/termwiz/src/cell.rs
++++ b/termwiz/src/cell.rs
+@@ -590,7 +590,7 @@ where
+     s.serialize(serializer)
+ }
+ 
+-/// TeenyString encodes string storage in a single machine word.
++/// TeenyString encodes string storage in a single u64.
+ /// The scheme is simple but effective: strings that encode into a
+ /// byte slice that is 1 less byte than the machine word size can
+ /// be encoded directly into the usize bits stored in the struct.
+@@ -603,60 +603,40 @@ where
+ /// calling grapheme_column_width; if it is set, then the TeenyString
+ /// has length 2, otherwise, it has length 1 (we don't allow zero-length
+ /// strings).
+-struct TeenyString(usize);
++struct TeenyString(u64);
+ struct TeenyStringHeap {
+     bytes: Vec<u8>,
+     width: usize,
+ }
+ 
+ impl TeenyString {
+-    const fn marker_mask() -> usize {
++    const fn marker_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000000
+         } else {
+             0x1
+         }
+     }
+ 
+-    const fn double_wide_mask() -> usize {
++    const fn double_wide_mask() -> u64 {
+         if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0xc0000000_00000000
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0xc0000000
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0xc000
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0xc0000000_00000000
+         } else {
+             0x3
+         }
+     }
+ 
+-    const fn is_marker_bit_set(word: usize) -> bool {
++    const fn is_marker_bit_set(word: u64) -> bool {
+         let mask = Self::marker_mask();
+         word & mask == mask
+     }
+ 
+-    const fn is_double_width(word: usize) -> bool {
++    const fn is_double_width(word: u64) -> bool {
+         let mask = Self::double_wide_mask();
+         word & mask == mask
+     }
+ 
+-    const fn set_marker_bit(word: usize, width: usize) -> usize {
++    const fn set_marker_bit(word: u64, width: usize) -> u64 {
+         if width > 1 {
+             word | Self::double_wide_mask()
+         } else {
+@@ -689,18 +669,18 @@ impl TeenyString {
+         let len = bytes.len();
+         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
+ 
+-        if len < std::mem::size_of::<usize>() {
++        if len < std::mem::size_of::<u64>() {
+             debug_assert!(width < 3);
+ 
+-            let mut word = 0usize;
++            let mut word = 0u64;
+             unsafe {
+                 std::ptr::copy_nonoverlapping(
+                     bytes.as_ptr(),
+-                    &mut word as *mut usize as *mut u8,
++                    &mut word as *mut u64 as *mut u8,
+                     len,
+                 );
+             }
+-            let word = Self::set_marker_bit(word, width);
++            let word = Self::set_marker_bit(word as u64, width);
+             Self(word)
+         } else {
+             let vec = Box::new(TeenyStringHeap {
+@@ -708,35 +688,15 @@ impl TeenyString {
+                 width,
+             });
+             let ptr = Box::into_raw(vec);
+-            Self(ptr as usize)
++            Self(ptr as u64)
+         }
+     }
+ 
+     pub const fn space() -> Self {
+         Self(if cfg!(target_endian = "little") {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x80000000_00000020
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x80000020
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x8020
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x80000000_00000020
+         } else {
+-            cfg_if::cfg_if! {
+-                if #[cfg(target_pointer_width = "64")] {
+-                    0x20000000_00000001
+-                } else if #[cfg(target_pointer_width = "32")] {
+-                    0x20000001
+-                } else if #[cfg(target_pointer_width = "16")] {
+-                    0x2001
+-                } else {
+-                    panic!("unsupported target");
+-                }
+-            }
++            0x20000000_00000001
+         })
+     }
+ 
+@@ -753,7 +713,7 @@ impl TeenyString {
+                 1
+             }
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).width }
+         }
+     }
+@@ -766,17 +726,17 @@ impl TeenyString {
+ 
+     pub fn as_bytes(&self) -> &[u8] {
+         if Self::is_marker_bit_set(self.0) {
+-            let bytes = &self.0 as *const usize as *const u8;
++            let bytes = &self.0 as *const u64 as *const u8;
+             let bytes =
+-                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
++                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
+             let len = bytes
+                 .iter()
+                 .position(|&b| b == 0)
+-                .unwrap_or(std::mem::size_of::<usize>() - 1);
++                .unwrap_or(std::mem::size_of::<u64>() - 1);
+ 
+             &bytes[0..len]
+         } else {
+-            let heap = self.0 as *const usize as *const TeenyStringHeap;
++            let heap = self.0 as *const u64 as *const TeenyStringHeap;
+             unsafe { (*heap).bytes.as_slice() }
+         }
+     }
+@@ -1072,6 +1032,11 @@ mod test {
+ 
+     #[test]
+     fn teeny_string() {
++        assert!(
++            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
++            "if a pointer doesn't fit in u64 then we need to change TeenyString"
++        );
++
+         let s = TeenyString::from_char('a');
+         assert_eq!(s.as_bytes(), &[b'a']);
+ 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
new file mode 100644
index 000000000000..1d8e21384ae9
--- /dev/null
+++ b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
@@ -0,0 +1,22 @@
+--- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
+@@ -715,19 +715,6 @@
+         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
+         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-Black.ttf"),
+-        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Bold.ttf"),
+-        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Italic.ttf"),
+-        font!("../../assets/fonts/Roboto-Light.ttf"),
+-        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Medium.ttf"),
+-        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
+-        font!("../../assets/fonts/Roboto-Regular.ttf"),
+-        font!("../../assets/fonts/Roboto-Thin.ttf"),
+-        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
+-        font!("../../assets/fonts/NotoColorEmoji.ttf"),
+         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
+         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
+     ] {
diff --git a/srcpkgs/wezterm/patches/remove-libgit.patch b/srcpkgs/wezterm/patches/remove-libgit.patch
new file mode 100644
index 000000000000..e95f51785196
--- /dev/null
+++ b/srcpkgs/wezterm/patches/remove-libgit.patch
@@ -0,0 +1,59 @@
+--- a/config/build.rs	2022-09-05 10:28:02.000000000 -0700
++++ b/config/build.rs	2022-11-16 11:25:28.938783238 -0700
+@@ -13,44 +13,6 @@
+         }
+     } else {
+         // Otherwise we'll derive it from the git information
+-
+-        if let Ok(repo) = git2::Repository::discover(".") {
+-            if let Ok(ref_head) = repo.find_reference("HEAD") {
+-                let repo_path = repo.path().to_path_buf();
+-
+-                if let Ok(resolved) = ref_head.resolve() {
+-                    if let Some(name) = resolved.name() {
+-                        let path = repo_path.join(name);
+-                        if path.exists() {
+-                            println!(
+-                                "cargo:rerun-if-changed={}",
+-                                path.canonicalize().unwrap().display()
+-                            );
+-                        }
+-                    }
+-                }
+-            }
+-        }
+-
+-        let head = Path::new("../.git/HEAD");
+-        if head.exists() {
+-            let head = head.canonicalize().unwrap();
+-            println!("cargo:rerun-if-changed={}", head.display());
+-            if let Ok(output) = std::process::Command::new("git")
+-                .args(&[
+-                    "-c",
+-                    "core.abbrev=8",
+-                    "show",
+-                    "-s",
+-                    "--format=%cd-%h",
+-                    "--date=format:%Y%m%d-%H%M%S",
+-                ])
+-                .output()
+-            {
+-                let info = String::from_utf8_lossy(&output.stdout);
+-                ci_tag = info.trim().to_string();
+-            }
+-        }
+     }
+ 
+     let target = std::env::var("TARGET").unwrap_or_else(|_| "unknown".to_string());
+--- a/config/Cargo.toml	2022-09-05 10:28:02.000000000 -0700
++++ b/config/Cargo.toml	2022-11-16 11:26:47.258458105 -0700
+@@ -10,9 +10,6 @@
+ [dev-dependencies]
+ env_logger = "0.9"
+ 
+-[build-dependencies]
+-git2 = { version = "0.14", default-features = false }
+-
+ [features]
+ distro-defaults = []
+ 
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
new file mode 100644
index 000000000000..abd2a245845c
--- /dev/null
+++ b/srcpkgs/wezterm/template
@@ -0,0 +1,59 @@
+# Template file for 'wezterm'
+pkgname=wezterm
+version=20220905
+revision=1
+_srcver=${version}-102802-7d4b8249
+archs="x86_64* i686* aarch64* arm*" # ring
+build_style=cargo
+configure_args="--no-default-features --features wezterm-gui/distro-defaults,wezterm-gui/wayland"
+hostmakedepends="pkg-config"
+makedepends="fontconfig-devel freetype-devel harfbuzz-devel openssl-devel
+ libssh2-devel libX11-devel libxkbcommon-devel wayland-devel xcb-util-devel
+ xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel"
+depends="noto-fonts-emoji fonts-roboto-ttf"
+short_desc="GPU-accelerated cross-platform terminal emulator and multiplexer"
+maintainer="Joseph Benden <joe@benden.us>"
+license="MIT"
+homepage="https://wezfurlong.org/wezterm/"
+changelog="https://wezfurlong.org/wezterm/changelog.html"
+distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
+checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+
+do_check() {
+	# NOTE: cannot use build_style cargo do_check because of --release flag.
+	# NOTE: e2e::sftp is skipped due to missing ssh
+	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	cargo test --target ${RUST_TARGET} --workspace --locked -- \
+		--skip e2e::sftp \
+		--skip shapecache::test::ligatures_jetbrains
+}
+
+do_install() {
+	vbin target/${RUST_TARGET}/release/wezterm
+	vbin target/${RUST_TARGET}/release/wezterm-gui
+	vbin target/${RUST_TARGET}/release/wezterm-mux-server
+	vbin target/${RUST_TARGET}/release/strip-ansi-escapes
+
+	vinstall assets/shell-integration/wezterm.sh 644 etc/profile.d org_wezfurlong_wezterm.sh
+	vinstall assets/icon/terminal.png 644 usr/share/icons/hicolor/128x128/apps org.wezfurlong.wezterm.png
+	vinstall assets/icon/wezterm-icon.svg 644 usr/share/icons/hicolor/scalable/apps org.wezfurlong.wezterm.svg
+	vinstall assets/wezterm.desktop 644 usr/share/applications org.wezfurlong.wezterm.desktop
+	vinstall assets/wezterm.appdata.xml 644 usr/share/metainfo org.wezfurlong.wezterm.appdata.xml
+
+	vcompletion assets/shell-completion/bash bash
+	vcompletion assets/shell-completion/fish fish
+	vcompletion assets/shell-completion/zsh zsh
+
+	vmkdir usr/share/terminfo
+	tic -sx -o ${DESTDIR}/usr/share/terminfo termwiz/data/wezterm.terminfo
+
+	vdoc README.md
+	vlicense LICENSE.md
+}
+
+wezterm-terminfo_package() {
+	short_desc+=" - terminfo data"
+	pkg_install() {
+		vmove usr/share/terminfo
+	}
+}
diff --git a/srcpkgs/wezterm/update b/srcpkgs/wezterm/update
new file mode 100644
index 000000000000..4d2ef98f356b
--- /dev/null
+++ b/srcpkgs/wezterm/update
@@ -0,0 +1,2 @@
+site="https://github.com/wez/wezterm/releases"
+pattern='/tags/\K[\d.]+(?=-\d+-[a-f0-9]+.tar.gz)'

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (110 preceding siblings ...)
  2022-11-17 15:41 ` [PR PATCH] [Updated] " jbenden
@ 2022-11-17 16:37 ` jbenden
  2022-11-17 18:32 ` [PR PATCH] [Merged]: " classabbyamp
  112 siblings, 0 replies; 114+ messages in thread
From: jbenden @ 2022-11-17 16:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

New comment by jbenden on void-packages repository

https://github.com/void-linux/void-packages/pull/36903#issuecomment-1318904009

Comment:
@classabbyamp Has anyone told you how awesome you are! Thank you for helping so much with this PR; it has certainly produced a better package!

^ permalink raw reply	[flat|nested] 114+ messages in thread

* Re: [PR PATCH] [Merged]: New package: wezterm-20220905_1
  2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
                   ` (111 preceding siblings ...)
  2022-11-17 16:37 ` jbenden
@ 2022-11-17 18:32 ` classabbyamp
  112 siblings, 0 replies; 114+ messages in thread
From: classabbyamp @ 2022-11-17 18:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

There's a merged pull request on the void-packages repository

New package: wezterm-20220905_1
https://github.com/void-linux/void-packages/pull/36903

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


^ permalink raw reply	[flat|nested] 114+ messages in thread

end of thread, other threads:[~2022-11-17 18:32 UTC | newest]

Thread overview: 114+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 19:30 [PR PATCH] New package: wezterm-20220408_1 jbenden
2022-04-28 20:03 ` [PR PATCH] [Updated] " jbenden
2022-04-28 22:01 ` jbenden
2022-04-28 23:46 ` classabbyamp
2022-04-28 23:46 ` classabbyamp
2022-04-29  7:06 ` [PR PATCH] [Updated] " jbenden
2022-04-29 10:30 ` [PR REVIEW] " paper42
2022-04-29 10:30 ` paper42
2022-04-29 19:21 ` [PR PATCH] [Updated] " jbenden
2022-04-29 20:58 ` [PR REVIEW] " jbenden
2022-04-29 21:06 ` classabbyamp
2022-04-29 21:28 ` jbenden
2022-06-25 19:14 ` [PR PATCH] [Updated] " jbenden
2022-06-25 20:24 ` [PR REVIEW] " classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:24 ` classabbyamp
2022-06-25 20:25 ` classabbyamp
2022-06-25 20:26 ` classabbyamp
2022-07-09 20:40 ` [PR PATCH] [Updated] " jbenden
2022-07-09 20:43 ` [PR REVIEW] " jbenden
2022-07-09 20:43 ` jbenden
2022-07-09 21:52 ` jbenden
2022-09-25 12:08 ` auronandace
2022-09-25 17:01 ` [PR PATCH] [Updated] " jbenden
2022-09-25 17:05 ` jbenden
2022-09-25 18:09 ` jbenden
2022-10-15 21:54 ` [PR PATCH] [Updated] " jbenden
2022-10-15 22:11 ` [PR REVIEW] " paper42
2022-10-15 23:49 ` wez
2022-10-16 22:21 ` [PR PATCH] [Updated] " jbenden
2022-10-16 22:27 ` [PR REVIEW] " classabbyamp
2022-10-17 22:57 ` jbenden
2022-10-17 23:11 ` [PR PATCH] [Updated] " jbenden
2022-10-17 23:12 ` [PR REVIEW] " jbenden
2022-10-17 23:13 ` [PR PATCH] [Updated] " jbenden
2022-10-17 23:20 ` [PR REVIEW] " classabbyamp
2022-10-17 23:37 ` paper42
2022-10-17 23:47 ` jbenden
2022-10-18  1:02 ` [PR PATCH] [Updated] " jbenden
2022-10-18  1:02 ` [PR REVIEW] " jbenden
2022-10-18  1:03 ` jbenden
2022-10-18  1:04 ` [PR PATCH] [Updated] " jbenden
2022-10-20 15:43 ` jbenden
2022-10-20 17:33 ` jbenden
2022-10-21  3:03 ` jbenden
2022-10-24  1:14 ` [PR REVIEW] " classabbyamp
2022-10-24  1:14 ` classabbyamp
2022-10-24  1:14 ` classabbyamp
2022-10-24  1:16 ` classabbyamp
2022-10-24  1:17 ` classabbyamp
2022-10-24  1:20 ` classabbyamp
2022-10-24  1:21 ` classabbyamp
2022-10-24  1:27 ` classabbyamp
2022-10-24 17:54 ` [PR PATCH] [Updated] " jbenden
2022-10-24 18:09 ` jbenden
2022-10-24 18:27 ` [PR REVIEW] " classabbyamp
2022-10-24 21:07 ` [PR PATCH] [Updated] " jbenden
2022-10-24 23:14 ` [PR REVIEW] " jbenden
2022-10-24 23:19 ` jbenden
2022-10-25  0:35 ` classabbyamp
2022-10-25 19:39 ` [PR PATCH] [Updated] " jbenden
2022-10-25 19:43 ` [PR REVIEW] " classabbyamp
2022-10-25 19:43 ` jbenden
2022-10-25 19:45 ` [PR PATCH] [Updated] " jbenden
2022-10-27 22:48 ` [PR REVIEW] New package: wezterm-20220905_1 classabbyamp
2022-10-27 22:48 ` classabbyamp
2022-10-27 22:50 ` classabbyamp
2022-10-28  1:06 ` [PR PATCH] [Updated] " jbenden
2022-10-28  1:25 ` classabbyamp
2022-10-28  2:02 ` [PR PATCH] [Updated] " jbenden
2022-10-28  9:21 ` [PR REVIEW] " paper42
2022-10-28  9:21 ` paper42
2022-10-28 15:11 ` [PR PATCH] [Updated] " jbenden
2022-10-28 15:11 ` [PR REVIEW] " jbenden
2022-10-28 15:12 ` jbenden
2022-11-08  3:39 ` vikigenius
2022-11-09 19:41 ` [PR REVIEW] " classabbyamp
2022-11-10 15:37 ` [PR PATCH] [Updated] " jbenden
2022-11-14 22:34 ` classabbyamp
2022-11-14 22:59 ` paper42
2022-11-14 23:26 ` [PR REVIEW] " classabbyamp
2022-11-14 23:29 ` classabbyamp
2022-11-15  1:22 ` classabbyamp
2022-11-15  1:22 ` classabbyamp
2022-11-15  1:22 ` classabbyamp
2022-11-15  1:22 ` classabbyamp
2022-11-15  1:22 ` classabbyamp
2022-11-15  1:25 ` classabbyamp
2022-11-15  3:25 ` classabbyamp
2022-11-16 16:55 ` jbenden
2022-11-16 16:55 ` jbenden
2022-11-16 16:57 ` jbenden
2022-11-16 16:58 ` jbenden
2022-11-16 17:07 ` [PR PATCH] [Updated] " jbenden
2022-11-16 17:08 ` [PR REVIEW] " jbenden
2022-11-16 17:43 ` classabbyamp
2022-11-16 17:48 ` jbenden
2022-11-16 18:16 ` [PR PATCH] [Updated] " jbenden
2022-11-16 18:17 ` [PR REVIEW] " classabbyamp
2022-11-16 18:17 ` classabbyamp
2022-11-16 18:22 ` jbenden
2022-11-16 18:29 ` [PR PATCH] [Updated] " jbenden
2022-11-16 21:15 ` [PR REVIEW] " classabbyamp
2022-11-16 21:15 ` classabbyamp
2022-11-17 15:41 ` [PR PATCH] [Updated] " jbenden
2022-11-17 16:37 ` jbenden
2022-11-17 18:32 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).