summaryrefslogtreecommitdiff
path: root/devel/ncurses/Makefile
blob: c320a1aa9373a624011b9734c8572e620d9b3f6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# $NetBSD: Makefile,v 1.86 2011/04/01 20:27:03 tez Exp $

.include "Makefile.common"

COMMENT=	CRT screen handling and optimization package

INSTALLATION_DIRS+=	share/examples

.if ${OPSYS} == "SunOS"
# misc/screen installs screen, screen-bce and screen-s, so we need to remove
# these here to avoid a conflict; this means we also remove the entries which
# have a use=screen in them
SUBST_CLASSES+=		ti
SUBST_STAGE.ti=		post-configure
SUBST_MESSAGE.ti=	Removing screen entries from the terminfo database.
SUBST_FILES.ti=		${TERMINFO_SRC}
# see misc/screen/PLIST for these:
SUBST_SED.ti=		-e '/^screen|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.xterm-new|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.rxvt|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.Eterm|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.mrxvt|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.gnome|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.konsole|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.linux|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-bce.mlterm|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-s|/,/^$$/d'
# see ${TERMINFO_SRC} and look for use=screen for these
SUBST_SED.ti+=		-e '/^screen.teraterm|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen.linux|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-w|/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-16color/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen-256color/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen.mlterm/,/^$$/d'
SUBST_SED.ti+=		-e '/^screen.rxvt/,/^$$/d'
.endif

PLIST_SRC=	${PKGDIR}/PLIST ${WRKDIR}/PLIST.terminfo

post-configure:
	cd ${WRKSRC}/man;					\
	for f in *.1m; do					\
		mv -f $${f} `${BASENAME} $${f} .1m`.1; 	\
	done;							\
	for f in *.3x; do					\
		mv -f $${f} `${BASENAME} $${f} .3x`.3; 	\
	done

post-install:
	${INSTALL_DATA} ${WRKSRC}/c++/demo.cc \
		${DESTDIR}${PREFIX}/share/examples/ncurses++demo.cc
	${FIND} ${DESTDIR}${PREFIX}/${TERMINFODIR} -type f -print | ${SORT} | \
	${SED} -e "s,^${DESTDIR}${PREFIX}/,," >${WRKDIR}/PLIST.terminfo

.include "../../mk/bsd.pkg.mk"