+ 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
|
|
|
# $NetBSD: curses.builtin.mk,v 1.3 2008/02/27 04:47:02 jlam Exp $
|
2008-02-25 05:19:34 +01:00
|
|
|
|
|
|
|
BUILTIN_PKG:= curses
|
|
|
|
|
|
|
|
BUILTIN_FIND_LIBS:= curses
|
|
|
|
BUILTIN_FIND_FILES_VAR:= H_CURSES
|
|
|
|
BUILTIN_FIND_FILES.H_CURSES= /usr/include/curses.h
|
|
|
|
|
|
|
|
.include "buildlink3/bsd.builtin.mk"
|
|
|
|
|
|
|
|
###
|
|
|
|
### Determine if there is a built-in implementation of the package and
|
|
|
|
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
|
|
|
###
|
|
|
|
.if !defined(IS_BUILTIN.curses)
|
|
|
|
IS_BUILTIN.curses= no
|
|
|
|
. if empty(H_CURSES:M${LOCALBASE}/*) && exists(${H_CURSES})
|
|
|
|
IS_BUILTIN.curses= yes
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
MAKEVARS+= IS_BUILTIN.curses
|
|
|
|
|
|
|
|
###
|
|
|
|
### Determine whether we should use the built-in implementation if it
|
|
|
|
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
|
|
|
###
|
|
|
|
.if !defined(USE_BUILTIN.curses)
|
|
|
|
. if ${PREFER.curses} == "pkgsrc"
|
|
|
|
USE_BUILTIN.curses= no
|
|
|
|
. else
|
|
|
|
USE_BUILTIN.curses= ${IS_BUILTIN.curses}
|
|
|
|
. if defined(BUILTIN_PKG.curses) && !empty(IS_BUILTIN.curses:M[yY][eE][sS])
|
|
|
|
USE_BUILTIN.curses= yes
|
|
|
|
. for _dep_ in ${BUILDLINK_API_DEPENDS.curses}
|
|
|
|
. if !empty(USE_BUILTIN.curses:M[yY][eE][sS])
|
|
|
|
USE_BUILTIN.curses!= \
|
|
|
|
if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.curses:Q}; then \
|
|
|
|
${ECHO} yes; \
|
|
|
|
else \
|
|
|
|
${ECHO} no; \
|
|
|
|
fi
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endif
|
|
|
|
. endif # PREFER.curses
|
|
|
|
.endif
|
|
|
|
MAKEVARS+= USE_BUILTIN.curses
|
|
|
|
|
|
|
|
###
|
|
|
|
### The section below only applies if we are not including this file
|
|
|
|
### solely to determine whether a built-in implementation exists.
|
|
|
|
###
|
|
|
|
CHECK_BUILTIN.curses?= no
|
|
|
|
.if !empty(CHECK_BUILTIN.curses:M[nN][oO])
|
|
|
|
|
|
|
|
. if !empty(USE_BUILTIN.curses:M[yY][eE][sS])
|
|
|
|
. if exists(${H_CURSES})
|
|
|
|
BUILDLINK_INCDIRS.curses?= ${H_CURSES:H:S/^${BUILDLINK_PREFIX.curses}\///}
|
|
|
|
. endif
|
|
|
|
. if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
|
+ 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.curses= curses
|
|
|
|
BUILDLINK_LDADD.curses?= -l${BUILDLINK_LIBNAME.curses}
|
2008-02-25 05:19:34 +01:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
|
|
|
|
.endif # CHECK_BUILTIN.curses
|