ncurses uses compiled database of terminfo entries at share/misc/terminfo.db.
Ports which install terminfo entries (currently, onlt rxvt-unicodea and jfbterm) update this database via @exec's, but implementation of this has several drawbacks.
- No clean deinstallation for rxvt-unicode (http://poudriere.amdmi3.ru/data/10-amd64-default/failures_all_2015_09_28/logs/errors/rxvt-unicode-9.21.log)
- Unneeded dependency on ncurses for rxvt-unicode
I propose improved infrastructure support for this, which works as follows:
- ncurses install terminfo.db.default instead of terminfo.db
- ncurses and every port which installs terminfo file uses @terminfo keyword
- terminfo keyword recreates terminfo database from terminfo.db.default and all terminfo files found in share/misc/terminfo on both install and deinstall
This provedes the following benefits:
- terminfo.db is always up to date
- clean deinstallation: terminfo.db after deinstallation on e.g. rxvt-unicode would be equal to terminfo.db before its installation
- absence of ncurses port is properly handled (e.g. no terminfo.db is generated as it's not needed without ncurses port)
- no extra dependency on ncurses is needed for any port which installs .terminfo files
- installation of ncurses AFTER ports which install .terminfo files works as intended, all .terminfo files are accounted
- reinstallation of either ncurses or any port installing .terminfo file also works fine
This is preliminary version, not yet fully tested. Topics for discussion/improvement:
- share/misc is hardcoded as .terminfo files and terminfo.db location. There don't seem to be usecases where other locations would be used, or am I wrong?
- %D/bin/tic is used, while %D is PREFIX and not a LOCALBASE, whild the former should be used. I don't know how to reference LOCALBASE from Keywords yet.