summaryrefslogtreecommitdiff
path: root/devel/ncurses/buildlink.mk
blob: 7c9a637a4bc15a9cc513e7e6563b9fddfe3b3cad (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# $NetBSD: buildlink.mk,v 1.2 2001/06/23 19:26:54 jlam Exp $
#
# This Makefile fragment is included by packages that use ncurses.
#
# To use this Makefile fragment, simply:
#
# (1) Optionally define USE_NCURSES to force use of ncurses.
# (2) Optionally define BUILDLINK_DEPENDS.ncurses to the dependency pattern
#     for the version of ncurses desired.
# (3) Add ${BUILDLINK_INCDIR} to the front of the C preprocessor's header
#     search path, and
# (4) Add ${BUILDLINK_LIBDIR} to the front of the linker's library search
#     path.

BUILDLINK_DEPENDS.ncurses?=	ncurses>=5.0

.if defined(USE_NCURSES)
_NEED_NCURSES=		YES
.else
.include "../../mk/bsd.prefs.mk"
_NEED_NCURSES=		NO
.if ${OPSYS} == "NetBSD"
_INCOMPAT_CURSES=	0.* 1.[0123]* 1.4.* 1.4[A-X]
.for PATTERN in ${_INCOMPAT_CURSES}
.if ${OS_VERSION:M${PATTERN}} != ""
_NEED_NCURSES=		YES
.endif
.endfor
.else
_NEED_NCURSES=		YES
.endif
.endif

.if ${_NEED_NCURSES} == "YES"
BUILDLINK_PREFIX.ncurses=	${LOCALBASE}
BUILDLINK_FILES.ncurses=	include/cursesapp.h
BUILDLINK_FILES.ncurses+=	include/cursesf.h
BUILDLINK_FILES.ncurses+=	include/cursesm.h
BUILDLINK_FILES.ncurses+=	include/cursesp.h
BUILDLINK_FILES.ncurses+=	include/cursesw.h
BUILDLINK_FILES.ncurses+=	include/cursslk.h
BUILDLINK_FILES.ncurses+=	include/eti.h
BUILDLINK_FILES.ncurses+=	include/etip.h
BUILDLINK_FILES.ncurses+=	include/form.h
BUILDLINK_FILES.ncurses+=	include/menu.h
BUILDLINK_FILES.ncurses+=	include/ncurses.h
BUILDLINK_FILES.ncurses+=	include/panel.h
BUILDLINK_FILES.ncurses+=	include/term.h
BUILDLINK_FILES.ncurses+=	include/termcap.h
BUILDLINK_FILES.ncurses+=	include/unctrl.h
BUILDLINK_FILES.ncurses+=	lib/libform.*
BUILDLINK_FILES.ncurses+=	lib/libmenu.*
BUILDLINK_FILES.ncurses+=	lib/libncurses++.*
BUILDLINK_FILES.ncurses+=	lib/libncurses.*
BUILDLINK_FILES.ncurses+=	lib/libpanel.*
DEPENDS+=			${BUILDLINK_DEPENDS.ncurses}:../../devel/ncurses
.else
BUILDLINK_PREFIX.ncurses=	/usr
BUILDLINK_FILES.ncurses=	include/curses.h
BUILDLINK_FILES.ncurses+=	include/eti.h
BUILDLINK_FILES.ncurses+=	include/form.h
BUILDLINK_FILES.ncurses+=	include/menu.h
BUILDLINK_FILES.ncurses+=	include/termcap.h
BUILDLINK_FILES.ncurses+=	include/unctrl.h
BUILDLINK_FILES.ncurses+=	lib/libcurses.*
BUILDLINK_FILES.ncurses+=	lib/libform.*
BUILDLINK_FILES.ncurses+=	lib/libmenu.*
.endif

BUILDLINK_TRANSFORM.ncurses=	-e "s|libcurses\.|libncurses.|g"
BUILDLINK_TRANSFORM.ncurses+=	-e "s|/curses.h|/ncurses.h|g"

BUILDLINK_TARGETS.ncurses=	ncurses-buildlink
BUILDLINK_TARGETS+=		${BUILDLINK_TARGETS.ncurses}

pre-configure: ${BUILDLINK_TARGETS.ncurses}
ncurses-buildlink: _BUILDLINK_USE

.include "../../mk/bsd.buildlink.mk"