From: meator <meator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Compile terminfo description when building
Date: Fri, 22 Jul 2022 00:11:47 +0200 [thread overview]
Message-ID: <20220721221147.8rkeUmtc6Zvh5xzkwWnHAxJteDUw5sZwaPOIhbU7x7I@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38179@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]
There is an updated pull request by meator against master on the void-packages repository
https://github.com/meator/void-packages terminfo
https://github.com/void-linux/void-packages/pull/38179
Compile terminfo description when building
Some `*-terminfo` packages do not actually provide compiled terminal descriptions, but only the source file. They then have to compile it with `tic` in `INSTALL` and then remove in in `REMOVE`. This approach is more complicated, adds `ncurses` (the provider of `tic`) as a runtime dependency of these packages and it has to explicitly specify completions to remove from `/usr/share/terminfo` (I've already had to add missing ones to `st-terminfo` in #33116 because some were missing).
As far as I know this approach doesn't have any advantages over just compiling the terminfo files and then shipping them in the package. If compiling these files "locally" has some purpose than please comment here and explain.
The presence of terminfo files that haven't been compiled in `/usr/share/terminfo` can also confuse some programs. For example when I install all packages which this PR modifies and then run `toe > /dev/null`, it shows:
```
toe: couldn't open terminfo file xst.terminfo.
toe: couldn't open terminfo file st.terminfo.
toe: couldn't open terminfo file rxvt-unicode.terminfo.
toe: couldn't open terminfo file mtm.ti.
toe: couldn't open terminfo file dvtm.info.
toe: couldn't open terminfo file alacritty.info.
```
I've also tried to simplify the templates I've been working with and I've adopted `st` because I'm an active user of it. And does `st` really depend on `ncurses`? I didn't want to mess with this but it could be possible that this dependency was added because of terminfo generation before `st` and `st-terminfo` were separate packages.
Ping @thypon (maintainer of `alacritty`)
Ping @travankor (maintainer of `mtm`)
Ping @leahneukirchen (maintainer of `rxvt-unicode`)
Ping @ndowens (maintainer of `xst`)
Ping @erwin
#### Testing the changes
- I tested the changes in this PR: **briefly**
closes #34392
A patch file from https://github.com/void-linux/void-packages/pull/38179.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-terminfo-38179.patch --]
[-- Type: text/x-diff, Size: 12245 bytes --]
From e223d6ef8b40e5f64ad690d4ecfda60685e09e69 Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Thu, 21 Jul 2022 19:58:31 +0200
Subject: [PATCH 1/6] alacritty: generate terminfo when building
---
srcpkgs/alacritty/alacritty-terminfo.INSTALL | 6 ------
srcpkgs/alacritty/alacritty-terminfo.REMOVE | 7 -------
srcpkgs/alacritty/template | 5 ++---
3 files changed, 2 insertions(+), 16 deletions(-)
delete mode 100644 srcpkgs/alacritty/alacritty-terminfo.INSTALL
delete mode 100644 srcpkgs/alacritty/alacritty-terminfo.REMOVE
diff --git a/srcpkgs/alacritty/alacritty-terminfo.INSTALL b/srcpkgs/alacritty/alacritty-terminfo.INSTALL
deleted file mode 100644
index 71e122147942..000000000000
--- a/srcpkgs/alacritty/alacritty-terminfo.INSTALL
+++ /dev/null
@@ -1,6 +0,0 @@
-case "$ACTION" in
-post)
- # Compile the terminfo description.
- tic -xe alacritty,alacritty-direct usr/share/terminfo/a/alacritty.info
- ;;
-esac
diff --git a/srcpkgs/alacritty/alacritty-terminfo.REMOVE b/srcpkgs/alacritty/alacritty-terminfo.REMOVE
deleted file mode 100644
index 572df4e79ba9..000000000000
--- a/srcpkgs/alacritty/alacritty-terminfo.REMOVE
+++ /dev/null
@@ -1,7 +0,0 @@
-case "$ACTION" in
-pre)
- # Remove compiled terminfo files.
- rm -f usr/share/terminfo/a/alacritty
- rm -f usr/share/terminfo/a/alacritty-direct
- ;;
-esac
diff --git a/srcpkgs/alacritty/template b/srcpkgs/alacritty/template
index 94bf361be18d..d318599651ef 100644
--- a/srcpkgs/alacritty/template
+++ b/srcpkgs/alacritty/template
@@ -1,7 +1,7 @@
# Template file for 'alacritty'
pkgname=alacritty
version=0.10.1
-revision=1
+revision=2
build_wrksrc="${pkgname}"
build_style=cargo
hostmakedepends="pkg-config python3"
@@ -31,14 +31,13 @@ post_install() {
vinstall ../extra/completions/alacritty.bash 644 usr/share/bash-completion/completions alacritty
vinstall ../extra/completions/_alacritty 644 usr/share/zsh/site-functions
vinstall ../extra/completions/alacritty.fish 644 usr/share/fish/vendor_completions.d
- vinstall ../extra/alacritty.info 644 usr/share/terminfo/a
+ tic -xe alacritty,alacritty-direct ../extra/alacritty.info -o ${DESTDIR}/usr/share/terminfo
vman ../extra/alacritty.man alacritty.1
vsconf ../alacritty.yml
}
alacritty-terminfo_package() {
short_desc+=" - terminfo data"
- depends="ncurses"
pkg_install() {
vmove usr/share/terminfo
}
From 786688b9a75ec129f31d496cfdbdc5416665fa6a Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Thu, 21 Jul 2022 10:56:03 +0200
Subject: [PATCH 2/6] dvtm: generate terminfo when building & simplify
Generating terminfo in INSTALL is unnecessary and leaves .info file in
/usr/share/terminfo which can confuse some programs.
Dvtm now also uses proper build_style=gnu_makefile instead of calling
make explicitly.
---
srcpkgs/dvtm/INSTALL | 6 ------
srcpkgs/dvtm/REMOVE | 7 -------
srcpkgs/dvtm/template | 15 +++++----------
3 files changed, 5 insertions(+), 23 deletions(-)
delete mode 100644 srcpkgs/dvtm/INSTALL
delete mode 100644 srcpkgs/dvtm/REMOVE
diff --git a/srcpkgs/dvtm/INSTALL b/srcpkgs/dvtm/INSTALL
deleted file mode 100644
index 61fb79d9537d..000000000000
--- a/srcpkgs/dvtm/INSTALL
+++ /dev/null
@@ -1,6 +0,0 @@
-case "$ACTION" in
-post)
- # Compile the terminfo description.
- tic -s usr/share/terminfo/d/dvtm.info
- ;;
-esac
diff --git a/srcpkgs/dvtm/REMOVE b/srcpkgs/dvtm/REMOVE
deleted file mode 100644
index 7ea17f65f6c1..000000000000
--- a/srcpkgs/dvtm/REMOVE
+++ /dev/null
@@ -1,7 +0,0 @@
-case "$ACTION" in
-pre)
- # Remove compiled terminfo files.
- rm -f usr/share/terminfo/d/dvtm-256color
- rm -f usr/share/terminfo/d/dvtm
- ;;
-esac
diff --git a/srcpkgs/dvtm/template b/srcpkgs/dvtm/template
index a65c17c2d9c2..e16b36bd8677 100644
--- a/srcpkgs/dvtm/template
+++ b/srcpkgs/dvtm/template
@@ -1,9 +1,11 @@
# Template file for 'dvtm'
pkgname=dvtm
version=0.15
-revision=2
+revision=3
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="ncurses"
makedepends="ncurses-devel"
-depends="ncurses" # needs tic at post-install
short_desc="Tiling window manager for the console"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
@@ -11,13 +13,6 @@ homepage="http://www.brain-dump.org/projects/dvtm/"
distfiles="http://www.brain-dump.org/projects/dvtm/$pkgname-$version.tar.gz"
checksum=8f2015c05e2ad82f12ae4cf12b363d34f527a4bbc8c369667f239e4542e1e510
-do_build() {
- # Do not run tic, useless in build environment.
- sed -i 's,tic,/bin/true,g' Makefile
- make CC=$CC V=1
-}
-do_install() {
- make PREFIX=/usr DESTDIR=${DESTDIR} install
+post_install() {
vlicense LICENSE
- vinstall dvtm.info 644 usr/share/terminfo/d
}
From 0417ead463ee861ed2baa8afa307c6ef1240e8f4 Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Thu, 21 Jul 2022 21:33:12 +0200
Subject: [PATCH 3/6] mtm: generate terminfo when building
This commit also removes build_style=gnu-makefile because do_build() and
do_install() are defined anyway.
---
srcpkgs/mtm/mtm-terminfo.INSTALL | 5 -----
srcpkgs/mtm/mtm-terminfo.REMOVE | 7 -------
srcpkgs/mtm/template | 9 ++++-----
3 files changed, 4 insertions(+), 17 deletions(-)
delete mode 100644 srcpkgs/mtm/mtm-terminfo.INSTALL
delete mode 100644 srcpkgs/mtm/mtm-terminfo.REMOVE
diff --git a/srcpkgs/mtm/mtm-terminfo.INSTALL b/srcpkgs/mtm/mtm-terminfo.INSTALL
deleted file mode 100644
index 4c2d03b145ca..000000000000
--- a/srcpkgs/mtm/mtm-terminfo.INSTALL
+++ /dev/null
@@ -1,5 +0,0 @@
-case "${ACTION}" in
-post)
- tic -sx usr/share/terminfo/m/mtm.ti
- ;;
-esac
diff --git a/srcpkgs/mtm/mtm-terminfo.REMOVE b/srcpkgs/mtm/mtm-terminfo.REMOVE
deleted file mode 100644
index 767b67b2bee4..000000000000
--- a/srcpkgs/mtm/mtm-terminfo.REMOVE
+++ /dev/null
@@ -1,7 +0,0 @@
-case "${ACTION}" in
-pre)
- rm usr/share/terminfo/m/mtm
- rm usr/share/terminfo/m/mtm-256color
- rm usr/share/terminfo/m/mtm-noutf
- ;;
-esac
diff --git a/srcpkgs/mtm/template b/srcpkgs/mtm/template
index a6cfd2c104ce..a300e6f77a91 100644
--- a/srcpkgs/mtm/template
+++ b/srcpkgs/mtm/template
@@ -1,10 +1,9 @@
# Template file for 'mtm'
pkgname=mtm
version=1.2.0
-revision=3
-build_style=gnu-makefile
+revision=4
+hostmakedepends="ncurses"
makedepends="ncurses-devel ncurses-libs"
-depends="ncurses"
short_desc="Micro Terminal Multiplexer"
maintainer="travankor <travankor@tuta.io>"
license="GPL-3.0-or-later"
@@ -18,13 +17,13 @@ do_build() {
do_install() {
vbin mtm
- vinstall mtm.ti 644 usr/share/terminfo/m
+ mkdir -p ${DESTDIR}/usr/share/terminfo
+ tic -sx mtm.ti -o ${DESTDIR}/usr/share/terminfo
vman mtm.1
}
mtm-terminfo_package() {
short_desc+=" - terminfo data"
- depends="ncurses"
pkg_install() {
vmove usr/share/terminfo
}
From 9fe55c7dde8f7d51072fc2edf493ea1ba055b468 Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Thu, 21 Jul 2022 21:38:59 +0200
Subject: [PATCH 4/6] rxvt-unicode: do not include .terminfo file
xrvt-unicode already compiles the terminfo descriptions so having the
raw version in /usr/share/terminfo is unnecessary.
---
srcpkgs/rxvt-unicode/template | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/srcpkgs/rxvt-unicode/template b/srcpkgs/rxvt-unicode/template
index 1ad3c47e2448..6593340186ef 100644
--- a/srcpkgs/rxvt-unicode/template
+++ b/srcpkgs/rxvt-unicode/template
@@ -1,7 +1,7 @@
# Template file for 'rxvt-unicode'
pkgname=rxvt-unicode
version=9.30
-revision=2
+revision=3
build_style=gnu-configure
configure_args="
--with-terminfo=/usr/share/terminfo --enable-256-color
@@ -69,7 +69,6 @@ pre_install() {
}
post_install() {
- vinstall doc/etc/rxvt-unicode.terminfo 644 usr/share/terminfo/r
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
vinstall ${FILESDIR}/${pkgname}.png 644 usr/share/pixmaps
}
From 1f494b122004b93c82b70fe26a5e132448ad6d26 Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Thu, 21 Jul 2022 21:50:12 +0200
Subject: [PATCH 5/6] st: generate terminfo when building & adopt
---
srcpkgs/st/st-terminfo.INSTALL | 5 -----
srcpkgs/st/st-terminfo.REMOVE | 11 -----------
srcpkgs/st/template | 13 +++++++------
3 files changed, 7 insertions(+), 22 deletions(-)
delete mode 100644 srcpkgs/st/st-terminfo.INSTALL
delete mode 100644 srcpkgs/st/st-terminfo.REMOVE
diff --git a/srcpkgs/st/st-terminfo.INSTALL b/srcpkgs/st/st-terminfo.INSTALL
deleted file mode 100644
index 53bfb42d10f8..000000000000
--- a/srcpkgs/st/st-terminfo.INSTALL
+++ /dev/null
@@ -1,5 +0,0 @@
-case "${ACTION}" in
-post)
- tic -sx usr/share/terminfo/s/st.terminfo
- ;;
-esac
diff --git a/srcpkgs/st/st-terminfo.REMOVE b/srcpkgs/st/st-terminfo.REMOVE
deleted file mode 100644
index ad3893f3269a..000000000000
--- a/srcpkgs/st/st-terminfo.REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-case "${ACTION}" in
-pre)
- rm usr/share/terminfo/s/st
- rm usr/share/terminfo/s/st-bs
- rm usr/share/terminfo/s/st-bs-256color
- rm usr/share/terminfo/s/st-mono
- rm usr/share/terminfo/s/st-meta
- rm usr/share/terminfo/s/st-meta-256color
- rm usr/share/terminfo/s/st-256color
- ;;
-esac
diff --git a/srcpkgs/st/template b/srcpkgs/st/template
index 9376a0c0c983..e6d7e3beb977 100644
--- a/srcpkgs/st/template
+++ b/srcpkgs/st/template
@@ -1,14 +1,14 @@
# Template file for 'st'
pkgname=st
version=0.8.5
-revision=1
+revision=2
build_style=gnu-makefile
make_use_env=compliant
hostmakedepends="pkg-config"
makedepends="fontconfig-devel libX11-devel libXft-devel"
depends="ncurses st-terminfo-${version}_${revision}"
short_desc="Simple terminal implementation for X"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="meator <meator.dev@gmail.com>"
license="MIT"
homepage="https://st.suckless.org"
distfiles="https://dl.suckless.org/${pkgname}/${pkgname}-${version}.tar.gz"
@@ -17,19 +17,20 @@ checksum=ea6832203ed02ff74182bcb8adaa9ec454c8f989e79232cb859665e2f544ab37
pre_build() {
sed -i 's|Liberation Mono|Monospace|g' config.def.h
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h
- # We will use tic after install. See INSTALL.
- vsed -i Makefile -e '/tic/d'
+ mkdir -p ${DESTDIR}/usr/share/terminfo
+}
+
+pre_install() {
+ export TERMINFO=${DESTDIR}/usr/share/terminfo
}
post_install() {
- vinstall st.info 644 usr/share/terminfo/s st.terminfo
vdoc README
vlicense LICENSE
}
st-terminfo_package() {
short_desc+=" - terminfo data"
- depends="ncurses"
pkg_install() {
vmove usr/share/terminfo
}
From 9bbb88c8f221da8dc7d7d5ca63baf58246bcba8f Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Thu, 21 Jul 2022 21:56:28 +0200
Subject: [PATCH 6/6] xst: generate terminfo when building & simplify
---
srcpkgs/xst/INSTALL | 5 -----
srcpkgs/xst/REMOVE | 8 --------
srcpkgs/xst/template | 8 ++------
3 files changed, 2 insertions(+), 19 deletions(-)
delete mode 100644 srcpkgs/xst/INSTALL
delete mode 100644 srcpkgs/xst/REMOVE
diff --git a/srcpkgs/xst/INSTALL b/srcpkgs/xst/INSTALL
deleted file mode 100644
index fcad0563b681..000000000000
--- a/srcpkgs/xst/INSTALL
+++ /dev/null
@@ -1,5 +0,0 @@
-case "${ACTION}" in
-post)
- tic -sx usr/share/terminfo/x/xst.terminfo
- ;;
-esac
diff --git a/srcpkgs/xst/REMOVE b/srcpkgs/xst/REMOVE
deleted file mode 100644
index b46f677d7fdf..000000000000
--- a/srcpkgs/xst/REMOVE
+++ /dev/null
@@ -1,8 +0,0 @@
-case "${ACTION}" in
-pre)
- rm usr/share/terminfo/x/xst
- rm usr/share/terminfo/x/xst-meta
- rm usr/share/terminfo/x/xst-meta-256color
- rm usr/share/terminfo/x/xst-256color
- ;;
-esac
diff --git a/srcpkgs/xst/template b/srcpkgs/xst/template
index 8600c680ae36..f06dbed9b3d5 100644
--- a/srcpkgs/xst/template
+++ b/srcpkgs/xst/template
@@ -1,7 +1,7 @@
# Template file for 'xst'
pkgname=xst
version=0.8.4.1
-revision=2
+revision=3
build_style=gnu-makefile
make_use_env=compliant
hostmakedepends="pkg-config"
@@ -14,11 +14,7 @@ homepage="https://github.com/gnotclub/xst"
distfiles="https://github.com/gnotclub/xst/archive/v${version}.tar.gz"
checksum=cbeb2da6c289415d1168559c6f58b4ce47fd266edefbabc38fd59e8b7c87226d
-do_install() {
- vbin xst
- vman st.1 xst.1
-
- vinstall st.info 644 usr/share/terminfo/x xst.terminfo
+post_install() {
vdoc README
vdoc FAQ
vdoc .Xresources Xresources
next prev parent reply other threads:[~2022-07-21 22:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 22:04 [PR PATCH] " meator
2022-07-21 22:11 ` meator [this message]
2022-07-22 5:27 ` [PR PATCH] [Updated] " meator
2022-07-22 5:47 ` meator
2022-07-22 5:51 ` classabbyamp
2022-07-22 7:25 ` meator
2022-07-22 13:53 ` paper42
2022-07-22 13:54 ` paper42
2022-07-22 17:39 ` [PR PATCH] [Updated] " meator
2022-07-22 17:41 ` meator
2022-07-22 17:41 ` meator
2022-07-22 17:48 ` meator
2022-07-22 17:57 ` [PR PATCH] [Updated] " meator
2022-07-22 17:59 ` meator
2022-07-23 15:08 ` sgn
2022-07-23 21:02 ` [PR PATCH] [Updated] " meator
2022-09-30 0:28 ` classabbyamp
2022-09-30 17:20 ` meator
2022-09-30 17:21 ` [PR PATCH] [Updated] " meator
2022-09-30 20:12 ` classabbyamp
2022-09-30 20:14 ` classabbyamp
2022-10-01 13:08 ` [PR PATCH] [Updated] " meator
2022-10-01 16:21 ` classabbyamp
2022-10-01 16:45 ` [PR PATCH] [Updated] " meator
2022-10-01 16:48 ` meator
2022-10-01 21:51 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220721221147.8rkeUmtc6Zvh5xzkwWnHAxJteDUw5sZwaPOIhbU7x7I@z \
--to=meator@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).