2013-12-01 03:18:14 +01:00
|
|
|
# $NetBSD: buildlink3.mk,v 1.43 2013/12/01 02:18:14 obache Exp $
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
BUILDLINK_TREE+= ncurses
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
.if !defined(NCURSES_BUILDLINK3_MK)
|
|
|
|
NCURSES_BUILDLINK3_MK:=
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2006-04-06 08:21:32 +02:00
|
|
|
BUILDLINK_API_DEPENDS.ncurses+= ncurses>=5.3nb1
|
|
|
|
BUILDLINK_ABI_DEPENDS.ncurses+= ncurses>=5.4nb1
|
2004-03-10 18:57:14 +01:00
|
|
|
BUILDLINK_PKGSRCDIR.ncurses?= ../../devel/ncurses
|
2008-02-27 22:32:45 +01:00
|
|
|
|
+ The termlib.buildlink3.mk file is meant to be included by packages
that need basic termlib functionality, i.e. tgetent(), tgoto(),
tputs(), etc. Together with the termlib.builtin.mk file, they will
use either a built-in termcap library, a built-in X/Open "enhanced"
curses library, or ncurses to provide these functions.
+ Add BUILDLINK_LIBNAME.* definitions to the various curses buildlink3.mk
and builtin.mk files that give the "base" library name of the curses
library, e.g. curses, ncurses, etc. These are used by the termlib
files to set BUILDLINK_LIBNAME.termlib.
2008-02-27 05:47:02 +01:00
|
|
|
BUILDLINK_LIBNAME.ncurses= ncurses
|
2008-02-27 22:32:45 +01:00
|
|
|
BUILDLINK_LDADD.ncurses?= ${BUILDLINK_LIBNAME.ncurses:S/^/-l/:S/^-l$//}
|
2008-02-25 05:19:34 +01:00
|
|
|
|
2008-02-26 18:21:13 +01:00
|
|
|
# Many packages expect the ncurses headers and libraries to be usable as
|
2009-07-12 19:23:13 +02:00
|
|
|
# <curses.h> and -lcurses and they often only look in include/ rather than
|
2009-07-12 19:41:25 +02:00
|
|
|
# some properly written autoconf macros which also try to pick up
|
2009-07-12 19:23:13 +02:00
|
|
|
# ncurses/ncurses.h.
|
2008-02-25 05:19:34 +01:00
|
|
|
#
|
2013-12-01 03:18:14 +01:00
|
|
|
BUILDLINK_TARGETS+= buildlink-ncurses-curses-h
|
|
|
|
BUILDLINK_TARGETS+= buildlink-ncurses-ncurses-h
|
|
|
|
BUILDLINK_TARGETS+= buildlink-ncurses-term-h
|
+ The termlib.buildlink3.mk file is meant to be included by packages
that need basic termlib functionality, i.e. tgetent(), tgoto(),
tputs(), etc. Together with the termlib.builtin.mk file, they will
use either a built-in termcap library, a built-in X/Open "enhanced"
curses library, or ncurses to provide these functions.
+ Add BUILDLINK_LIBNAME.* definitions to the various curses buildlink3.mk
and builtin.mk files that give the "base" library name of the curses
library, e.g. curses, ncurses, etc. These are used by the termlib
files to set BUILDLINK_LIBNAME.termlib.
2008-02-27 05:47:02 +01:00
|
|
|
BUILDLINK_TRANSFORM+= l:curses:${BUILDLINK_LIBNAME.ncurses}
|
2009-07-13 22:36:42 +02:00
|
|
|
BUILDLINK_INCDIRS.ncurses+= include/ncurses
|
2008-02-25 05:19:34 +01:00
|
|
|
|
2011-12-15 08:37:38 +01:00
|
|
|
# Many packages will prefer ncursesw over ncurses if its available (say as
|
|
|
|
# a native library), so unless this file is being included by ncursesw
|
|
|
|
# don't allow ncursesw to be used by causing linkage failure.
|
|
|
|
#
|
2011-12-19 12:42:47 +01:00
|
|
|
. include "../../mk/bsd.fast.prefs.mk"
|
2011-12-18 21:51:41 +01:00
|
|
|
. if empty(BUILDLINK_TREE:Mncursesw) && empty(PKGPATH:Mdevel/ncursesw)
|
2011-12-15 08:37:38 +01:00
|
|
|
BUILDLINK_TRANSFORM+= l:ncursesw:__nonexistent__
|
|
|
|
. endif
|
|
|
|
|
2009-07-12 19:23:13 +02:00
|
|
|
.PHONY: buildlink-ncurses-curses-h buildlink-ncurses-ncurses-h
|
2013-12-01 03:18:14 +01:00
|
|
|
.PHONY: buildlink-ncurses-term-h
|
2008-02-25 05:19:34 +01:00
|
|
|
buildlink-ncurses-curses-h:
|
2009-07-12 19:23:13 +02:00
|
|
|
${RUN} \
|
2011-02-28 12:02:46 +01:00
|
|
|
src=${BUILDLINK_PREFIX.ncurses}"/include/ncurses/curses.h"; \
|
|
|
|
dest=${BUILDLINK_DIR}"/include/curses.h"; \
|
2009-07-12 19:23:13 +02:00
|
|
|
if ${TEST} ! -f "$$dest" -a -f "$$src"; then \
|
|
|
|
${ECHO_BUILDLINK_MSG} "Linking ncurses/curses.h -> curses.h."; \
|
|
|
|
${MKDIR} `${DIRNAME} "$$dest"`; \
|
|
|
|
${LN} -s "$$src" "$$dest"; \
|
2008-02-25 05:19:34 +01:00
|
|
|
fi
|
2009-07-12 19:23:13 +02:00
|
|
|
|
|
|
|
buildlink-ncurses-ncurses-h:
|
|
|
|
${RUN} \
|
2011-02-28 12:02:46 +01:00
|
|
|
src=${BUILDLINK_PREFIX.ncurses}"/include/ncurses/ncurses.h"; \
|
|
|
|
dest=${BUILDLINK_DIR}"/include/ncurses.h"; \
|
2009-07-12 19:23:13 +02:00
|
|
|
if ${TEST} ! -f "$$dest" -a -f "$$src"; then \
|
|
|
|
${ECHO_BUILDLINK_MSG} "Linking ncurses/ncurses.h -> ncurses.h.";\
|
|
|
|
${MKDIR} `${DIRNAME} "$$dest"`; \
|
|
|
|
${LN} -s "$$src" "$$dest"; \
|
|
|
|
fi
|
|
|
|
|
2013-12-01 03:18:14 +01:00
|
|
|
buildlink-ncurses-term-h:
|
|
|
|
${RUN} \
|
|
|
|
src=${BUILDLINK_PREFIX.ncurses}"/include/ncurses/term.h"; \
|
|
|
|
dest=${BUILDLINK_DIR}"/include/term.h"; \
|
|
|
|
if ${TEST} ! -f "$$dest" -a -f "$$src"; then \
|
|
|
|
${ECHO_BUILDLINK_MSG} "Linking ncurses/term.h -> term.h.";\
|
|
|
|
${MKDIR} `${DIRNAME} "$$dest"`; \
|
|
|
|
${LN} -s "$$src" "$$dest"; \
|
|
|
|
fi
|
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
.endif # NCURSES_BUILDLINK3_MK
|
2008-02-25 05:19:34 +01:00
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
BUILDLINK_TREE+= -ncurses
|