svn commit: r398827 - in head: Keywords Mk Mk/Scripts Mk/Uses devel/ncurses sysutils/jfbterm x11/rxvt-unicode x11/rxvt-unicode/files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Thu Oct 8 14:12:56 UTC 2015
Author: amdmi3
Date: Thu Oct 8 14:12:53 2015
New Revision: 398827
URL: https://svnweb.freebsd.org/changeset/ports/398827
Log:
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
Added:
head/Keywords/terminfo.ucl (contents, props changed)
head/Mk/Uses/terminfo.mk (contents, props changed)
head/x11/rxvt-unicode/files/patch-doc_Makefile.in (contents, props changed)
Modified:
head/Mk/Scripts/qa.sh
head/Mk/bsd.port.mk
head/devel/ncurses/Makefile
head/devel/ncurses/pkg-plist
head/sysutils/jfbterm/Makefile
head/sysutils/jfbterm/pkg-plist
head/x11/rxvt-unicode/Makefile
head/x11/rxvt-unicode/pkg-plist
Added: head/Keywords/terminfo.ucl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/Keywords/terminfo.ucl Thu Oct 8 14:12:53 2015 (r398827)
@@ -0,0 +1,22 @@
+# $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
Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh Thu Oct 8 14:07:20 2015 (r398826)
+++ head/Mk/Scripts/qa.sh Thu Oct 8 14:12:53 2015 (r398827)
@@ -293,7 +293,28 @@ prefixvar() {
fi
}
-checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl prefixvar baselibs"
+terminfo() {
+ local f found
+
+ for f in ${STAGEDIR}${PREFIX}/share/misc/*.terminfo; do
+ [ "${f}" = "${STAGEDIR}${PREFIX}/share/misc/*.terminfo" ] && break #no matches
+ found=1
+ break
+ done
+ for f in ${STAGEDIR}${PREFIX}/share/misc/terminfo.db*; do
+ [ "${f}" = "${STAGEDIR}${PREFIX}/share/misc/terminfo.db*" ] && break #no matches
+ found=1
+ break
+ done
+ if [ -z "${USESTERMINFO}" -a -n "${found}" ]; then
+ warn "you need USES=terminfo"
+ elif [ -n "${USESTERMINFO}" -a -z "${found}" ]; then
+ warn "you may not need USES=terminfo"
+ fi
+ return 0
+}
+
+checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl prefixvar baselibs terminfo"
ret=0
cd ${STAGEDIR}
Added: head/Mk/Uses/terminfo.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/Mk/Uses/terminfo.mk Thu Oct 8 14:12:53 2015 (r398827)
@@ -0,0 +1,18 @@
+# $FreeBSD$
+#
+# handle terminfo.db and *.terminfo files used by ncurses
+#
+# Feature: terminfo
+# Usage: USES=terminfo
+# Valid ARGS: does not require args
+
+.if !defined(_INCLUDE_USES_TERMINFO_MK)
+_INCLUDE_USES_TERMINFO_MK= yes
+
+.if !empty(terminfo_ARGS)
+IGNORE= USES=terminfo does not require args
+.endif
+
+PLIST_FILES+= @terminfo
+
+.endif
Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk Thu Oct 8 14:07:20 2015 (r398826)
+++ head/Mk/bsd.port.mk Thu Oct 8 14:12:53 2015 (r398827)
@@ -1539,6 +1539,9 @@ QA_ENV+= USESLIBTOOL=yes
.if !empty(USES:Mshared-mime-info)
QA_ENV+= USESSHAREDMIMEINFO=yes
.endif
+.if !empty(USES:Mterminfo)
+QA_ENV+= USESTERMINFO=yes
+.endif
CO_ENV+= STAGEDIR=${STAGEDIR} \
PREFIX=${PREFIX} \
Modified: head/devel/ncurses/Makefile
==============================================================================
--- head/devel/ncurses/Makefile Thu Oct 8 14:07:20 2015 (r398826)
+++ head/devel/ncurses/Makefile Thu Oct 8 14:12:53 2015 (r398827)
@@ -3,7 +3,7 @@
PORTNAME= ncurses
DISTVERSION= ${RELEASE}-20150214
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/${PORTNAME}/current/
DIST_SUBDIR= ${PORTNAME}
@@ -41,7 +41,7 @@ TRACE_DESC= Add trace() function to all
CONFIGURE_ENV= gnat_exists="no"
USE_LDCONFIG= yes
-USES= shebangfix tar:tgz
+USES= shebangfix tar:tgz terminfo
SHEBANG_FILES= test/tracemunch
WIDEC_WRKSRC= ${WRKSRC}/build.widec
@@ -124,16 +124,20 @@ post-install:
. endfor
.endfor
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
-. for f in ${DOCS}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
-. endfor
-.if ${OPSYS} != FreeBSD || ${OSVERSION} > 900000
${RM} -f ${STAGEDIR}${PREFIX}/lib/libncurses.so \
${STAGEDIR}${PREFIX}/lib/libncursesw.so
${ECHO} "INPUT(libncurses.so.${RELEASE:R} AS_NEEDED(-ltinfo))" > ${STAGEDIR}${PREFIX}/lib/libncurses.so
${ECHO} "INPUT(libncursesw.so.${RELEASE:R} AS_NEEDED(-ltinfow))" > ${STAGEDIR}${PREFIX}/lib/libncursesw.so
-.endif
+
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.5.9
+ ${MV} ${STAGEDIR}${PREFIX}/share/misc/terminfo.db \
+ ${STAGEDIR}${PREFIX}/share/misc/terminfo.db.default
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
+.endfor
+
.include <bsd.port.mk>
Modified: head/devel/ncurses/pkg-plist
==============================================================================
--- head/devel/ncurses/pkg-plist Thu Oct 8 14:07:20 2015 (r398826)
+++ head/devel/ncurses/pkg-plist Thu Oct 8 14:12:53 2015 (r398827)
@@ -977,5 +977,4 @@ share/misc/tabset/std
share/misc/tabset/stdcrt
share/misc/tabset/vt100
share/misc/tabset/vt300
-share/misc/terminfo.db
- at exec find %D/share/misc -name "*.terminfo" -exec %D/bin/tic {} \;
+share/misc/terminfo.db.default
Modified: head/sysutils/jfbterm/Makefile
==============================================================================
--- head/sysutils/jfbterm/Makefile Thu Oct 8 14:07:20 2015 (r398826)
+++ head/sysutils/jfbterm/Makefile Thu Oct 8 14:12:53 2015 (r398827)
@@ -4,7 +4,7 @@
PORTNAME= jfbterm
PORTVERSION= 0.6.1
DISTVERSIONPREFIX=FreeBSD-
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= http://www.ac.auone-net.jp/~baba/jfbterm/
@@ -17,14 +17,13 @@ LICENSE_FILE= ${WRKSRC}/COPYING
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= requires VESA support in kernel
+USES= terminfo
MAKEFILE= ${FILESDIR}/BSDmakefile
MAKE_ENV+= VERSION=${PORTVERSION} GUNZIP=${GUNZIP_CMD:N-*}
PLIST_SUB+= TERMCAP_ADD_RECORD="@exec ${TERMCAP_ADD_RECORD:S,^${PREFIX},%D,}" \
- TERMCAP_DEL_RECORD="@unexec ${TERMCAP_DEL_RECORD}" \
- TIC="@exec ${TIC} ${TERMINFO_FILE:S,^${PREFIX},%D,} 2>/dev/null || ${TRUE}"
+ TERMCAP_DEL_RECORD="@unexec ${TERMCAP_DEL_RECORD}"
CAP_MKDB?= /usr/bin/cap_mkdb
-TIC?= ${LOCALBASE}/bin/tic
TERMINFO_FILE?= ${PREFIX}/share/misc/jfbterm.terminfo
OPTIONS_DEFINE= ICONV PNG SETUID TERMCAP UNIFONT
@@ -42,8 +41,6 @@ PLIST_SUB+= SETUID=""
PLIST_SUB+= SETUID="@comment "
.endif
-ONLY_FOR_ARCHS+=amd64
-
.if !defined(INSTALL_AS_USER)
TERMCAP_FILE?= /usr/share/misc/termcap
.else
@@ -101,13 +98,13 @@ post-extract: .SILENT
${WRKSRC}/jfbterm.conf.sample
post-patch:
- ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
+ @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
-e 's|\(share\)/jfbterm/\(fonts\)|\1/misc/\2|' \
${WRKSRC}/*.[0-9] ${WRKSRC}/*.conf.sample
-.if !${PORT_OPTIONS:MTERMCAP}
- ${REINPLACE_CMD} '/^term/s/:.*/: xterm/' \
+
+post-patch-TERMCAP-off:
+ @${REINPLACE_CMD} '/^term/s/:.*/: xterm/' \
${WRKSRC}/jfbterm.conf.sample
-.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/jfbterm ${STAGEDIR}${PREFIX}/bin
Modified: head/sysutils/jfbterm/pkg-plist
==============================================================================
--- head/sysutils/jfbterm/pkg-plist Thu Oct 8 14:07:20 2015 (r398826)
+++ head/sysutils/jfbterm/pkg-plist Thu Oct 8 14:12:53 2015 (r398827)
@@ -9,4 +9,3 @@ share/misc/jfbterm.termcap
share/misc/jfbterm.terminfo
%%TERMCAP_ADD_RECORD%%
%%TERMCAP_DEL_RECORD%%
-%%TIC%%
Modified: head/x11/rxvt-unicode/Makefile
==============================================================================
--- head/x11/rxvt-unicode/Makefile Thu Oct 8 14:07:20 2015 (r398826)
+++ head/x11/rxvt-unicode/Makefile Thu Oct 8 14:12:53 2015 (r398827)
@@ -3,6 +3,7 @@
PORTNAME= rxvt-unicode
PORTVERSION= 9.21
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://dist.schmorp.de/rxvt-unicode/%SUBDIR%/
MASTER_SITE_SUBDIR= . Attic
@@ -12,12 +13,10 @@ COMMENT= Clone of the terminal emulator
LICENSE= GPLv2
-BUILD_DEPENDS= tic:${PORTSDIR}/devel/ncurses \
- ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:${PORTSDIR}/x11-fonts/fontconfig
-RUN_DEPENDS= ${LOCALBASE}/bin/fc-cache:${PORTSDIR}/x11-fonts/fontconfig \
- ${LOCALBASE}/share/misc/terminfo.db:${PORTSDIR}/devel/ncurses
+BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:${PORTSDIR}/x11-fonts/fontconfig
+RUN_DEPENDS= ${LOCALBASE}/bin/fc-cache:${PORTSDIR}/x11-fonts/fontconfig
-USES= cpe pkgconfig shebangfix tar:bzip2
+USES= cpe pkgconfig shebangfix tar:bzip2 terminfo
USE_XORG= xpm xft xrender
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
Added: head/x11/rxvt-unicode/files/patch-doc_Makefile.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11/rxvt-unicode/files/patch-doc_Makefile.in Thu Oct 8 14:12:53 2015 (r398827)
@@ -0,0 +1,10 @@
+--- doc/Makefile.in.orig 2014-12-31 14:09:25 UTC
++++ doc/Makefile.in
+@@ -98,7 +98,6 @@ install: all
+ $(INSTALL_DATA) rxvtc.1.man $(DESTDIR)$(man1dir)/$(RXVTNAME)c.$(man1ext)
+ $(INSTALL_DATA) rxvtd.1.man $(DESTDIR)$(man1dir)/$(RXVTNAME)d.$(man1ext)
+ $(INSTALL_DATA) rxvt.7.man $(DESTDIR)$(man7dir)/$(RXVTNAME).$(man7ext)
+- @TIC@ $(srcdir)/etc/rxvt-unicode.terminfo
+
+ distdepend: alldoc
+
Modified: head/x11/rxvt-unicode/pkg-plist
==============================================================================
--- head/x11/rxvt-unicode/pkg-plist Thu Oct 8 14:07:20 2015 (r398826)
+++ head/x11/rxvt-unicode/pkg-plist Thu Oct 8 14:12:53 2015 (r398827)
@@ -58,5 +58,3 @@ man/man1/urxvtd.1.gz
%%PERL%%man/man3/urxvtperl.3.gz
man/man7/urxvt.7.gz
share/misc/rxvt-unicode.terminfo
- at comment No unexec tic available
- at postexec tic %D/share/misc/rxvt-unicode.terminfo
More information about the svn-ports-head
mailing list