[BACK]Return to termcap.buildlink3.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mk

Annotation of pkgsrc/mk/termcap.buildlink3.mk, Revision 1.10

1.10    ! roy         1: # $NetBSD: termcap.buildlink3.mk,v 1.9 2013/10/16 16:51:28 roy Exp $
1.1       jlam        2: #
                      3: # This Makefile fragment is meant to be included by packages that require
                      4: # a termcap implementation that supports the basic termcap functions:
                      5: #
                      6: #      tgetent, tgetstr, tgetflag, tgetnum, tgoto, tputs
                      7: #
                      8: # === Variables set by this file ===
                      9: #
                     10: # TERMCAP_TYPE
1.5       jlam       11: #      The name of the selected termcap implementation.
1.1       jlam       12:
                     13: TERMCAP_BUILDLINK3_MK:=        ${TERMCAP_BUILDLINK3_MK}+
                     14:
                     15: .include "bsd.fast.prefs.mk"
                     16:
                     17: .if !empty(TERMCAP_BUILDLINK3_MK:M+)
                     18:
1.5       jlam       19: # _TERMCAP_TYPES is an exhaustive list of all of the termcap
                     20: #      implementations that may be found.
                     21: #
1.8       roy        22: _TERMCAP_TYPES?=       terminfo curses termcap termlib tinfo
1.5       jlam       23:
1.1       jlam       24: CHECK_BUILTIN.termcap:=        yes
                     25: .  include "termcap.builtin.mk"
                     26: CHECK_BUILTIN.termcap:=        no
                     27:
1.5       jlam       28: .if !empty(USE_BUILTIN.termcap:M[yY][eE][sS])
                     29: .  if defined(BUILTIN_LIBNAME.termcap)
                     30: TERMCAP_TYPE=  ${BUILTIN_LIBNAME.termcap}
                     31: .  else
                     32: TERMCAP_TYPE=  none
                     33: .  endif
                     34: .else
                     35: TERMCAP_TYPE=  curses          # pkgsrc termcap is curses
                     36: .endif
1.6       jlam       37: BUILD_DEFS_EFFECTS+=   TERMCAP_TYPE
1.5       jlam       38:
                     39: # Most GNU configure scripts will try finding every termcap implementation,
                     40: # so prevent them from finding any except for the one we decide upon.
                     41: #
                     42: # There is special handling for packages that can be provided by pkgsrc,
                     43: # e.g. curses -- see termcap.builtin.mk for details.
                     44: #
                     45: .  for _tcap_ in ${_TERMCAP_TYPES:Ntermcap:Ncurses}
1.9       roy        46: .    if empty(TERMCAP_TYPE:M${_tcap_}) \
1.10    ! roy        47:        && (!defined(TERMINFO_TYPE) || empty(TERMINFO_TYPE:M${_tcap_})) \
        !            48:        && (!defined(CURSES_TYPE) || empty(CURSES_TYPE:M${_tcap_}))
1.5       jlam       49: BUILDLINK_TRANSFORM+=          rm:-l${_tcap_}
                     50: .    endif
                     51: .  endfor
                     52: BUILDLINK_TRANSFORM+=          l:termcap:${BUILDLINK_LIBNAME.termcap}
                     53:
1.1       jlam       54: .endif # TERMCAP_BUILDLINK3_MK
                     55:
                     56: .if ${TERMCAP_TYPE} == "none"
                     57: PKG_FAIL_REASON=       "No usable termcap library found on the system."
1.8       roy        58: .elif (${TERMCAP_TYPE} == "terminfo") || \
                     59:       (${TERMCAP_TYPE} == "termlib") || \
1.2       jlam       60:       (${TERMCAP_TYPE} == "termcap") || \
1.1       jlam       61:       (${TERMCAP_TYPE} == "tinfo")
1.7       joerg      62: BUILDLINK_TREE+=               termcap -termcap
1.1       jlam       63: BUILDLINK_LIBNAME.termcap?=    ${BUILTIN_LIBNAME.termcap}
                     64: BUILDLINK_LDADD.termcap?=      ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//}
                     65: BUILDLINK_BUILTIN_MK.termcap=  ../../mk/termcap.builtin.mk
                     66: .elif ${TERMCAP_TYPE} == "curses"
                     67: .  include "../../mk/curses.buildlink3.mk"
                     68: BUILDLINK_PREFIX.termcap?=     ${BUILDLINK_PREFIX.curses}
                     69: BUILDLINK_LIBNAME.termcap?=    ${BUILDLINK_LIBNAME.curses}
                     70: BUILDLINK_LDADD.termcap?=      ${BUILDLINK_LDADD.curses}
                     71: .endif

CVSweb <webmaster@jp.NetBSD.org>