freebsd-ports/Keywords/terminfo.ucl
Dmitry Marakasov 0521b2fe8e Add a way to cleanly handle terminfo.db file used by devel/ncurses
This database contains compiled terminfo entries and is merged from
a large part which comes with ncurses themselves and compiled
.terminfo files installed by other ports (currently only rxvt-unicode
and jfbterm)

- Now the database is always kept up to date, regardless of port
  installation order (both ncurses installed before .terminfo files
  and the other way around work as expected)
- All affected ports now support clean deinstallation and do not
  produce stage-qa errors
- Affected ports are simplified, as they now only need to define
  USES=terminfo
- rxvt-unicode no longer pulls in ncurses: the dependency is not
  really needed for anything beside updating it's own database
- The patch contains Q/A test to check whether a port needs, or
  needs not USES=terminfo

Approved by:	portmgr (mat, bapt)
Differential Revision:	D3747
2015-10-08 14:12:53 +00:00

23 lines
576 B
Plaintext

# $FreeBSD$
#
actions: []
post-install: <<EOD
terminfodir=%D/share/misc
terminfodb=${terminfodir}/terminfo.db
if [ -e ${terminfodb}.default ] && which -s tic; then
cp ${terminfodb}.default ${terminfodb}
find -s ${terminfodir} -name "*.terminfo" -exec tic {} \;
fi
EOD
post-deinstall: <<EOD
terminfodir=%D/share/misc
terminfodb=${terminfodir}/terminfo.db
if [ -e ${terminfodb}.default ] && which -s tic; then
cp ${terminfodb}.default ${terminfodb}
find -s ${terminfodir} -name "*.terminfo" -exec tic {} \;
else
rm -f ${terminfodb}
fi
EOD