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

Annotation of pkgsrc/mk/terminfo.builtin.mk, Revision 1.1

1.1     ! roy         1: # $NetBSD: termcap.builtin.mk,v 1.6 2009/03/20 19:25:01 joerg Exp $
        !             2:
        !             3: BUILTIN_PKG:=  terminfo
        !             4:
        !             5: BUILTIN_FIND_LIBS:=            terminfo curses tinfo
        !             6: BUILTIN_FIND_FILES_VAR:=       H_TERM
        !             7: BUILTIN_FIND_FILES.H_TERM:=    /usr/include/term.h
        !             8: BUILTIN_FIND_GREP.H_TERM:=     tigetent
        !             9:
        !            10: .include "buildlink3/bsd.builtin.mk"
        !            11:
        !            12: ###
        !            13: ### Determine if there is a built-in implementation of the package and
        !            14: ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
        !            15: ###
        !            16: .if !defined(IS_BUILTIN.terminfo)
        !            17: IS_BUILTIN.terminfo=   no
        !            18: .  if !empty(BUILTIN_LIB_FOUND.terminfo:M[yY[eE][sS]) || \
        !            19:       !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) || \
        !            20:       !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS])
        !            21: IS_BUILTIN.terminfo=   yes
        !            22: .  endif
        !            23: .endif
        !            24: MAKEVARS+=     IS_BUILTIN.terminfo
        !            25:
        !            26: ###
        !            27: ### Determine whether we should use the built-in implementation if it
        !            28: ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
        !            29: ###
        !            30: .if !defined(USE_BUILTIN.terminfo)
        !            31: .  if ${PREFER.terminfo} == "pkgsrc"
        !            32: USE_BUILTIN.terminfo=  no
        !            33: .  else
        !            34: USE_BUILTIN.terminfo=  ${IS_BUILTIN.terminfo}
        !            35: .  endif  # PREFER.terminfo
        !            36: .endif
        !            37: MAKEVARS+=     USE_BUILTIN.terminfo
        !            38:
        !            39: # Define BUILTIN_LIBNAME.termcap to be the base name of the built-in
        !            40: # termcap library.
        !            41: #
        !            42: # The way this is determined is:
        !            43: #
        !            44: # (1) If <term.h> exists and libterminfo exists, then it's "terminfo".
        !            45: # (1) If <term.h> exists and libtinfo exists, then it's "tinfo".
        !            46: # (2) If <term.h> exists and libcurses exists, then it's "curses".
        !            47: # (3) If <term.h> exists and lib{curses,terminfo,tinfo} don't, then it's "c".
        !            48: #
        !            49: .if empty(H_TERM:M__nonexistent__) && empty(H_TERM:M${LOCALBASE}/*)
        !            50: .  if !empty(BUILTIN_LIB_FOUND.terminfo:M[yY][eE][sS])
        !            51: BUILTIN_LIBNAME.terminfo=      terminfo
        !            52: .  elif !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS])
        !            53: BUILTIN_LIBNAME.terminfo=      tinfo
        !            54: .  elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
        !            55: BUILTIN_LIBNAME.terminfo=      curses
        !            56: .  else
        !            57: BUILTIN_LIBNAME.terminfo=      c
        !            58: .  endif
        !            59: .endif
        !            60:
        !            61: ###
        !            62: ### The section below only applies if we are not including this file
        !            63: ### solely to determine whether a built-in implementation exists.
        !            64: ###
        !            65: CHECK_BUILTIN.terminfo?=       no
        !            66: .if !empty(CHECK_BUILTIN.terminfo:M[nN][oO])
        !            67:
        !            68: .  if !empty(USE_BUILTIN.terminfo:M[yY][eE][sS])
        !            69: BUILDLINK_LIBNAME.terminfo=    ${BUILTIN_LIBNAME.terminfo}
        !            70: .  endif
        !            71:
        !            72: # If the package wants both "terminfo" and "curses", then we must not
        !            73: # remove the -l options for the curses libraries; otherwise, we should
        !            74: # remove them as GNU configure scripts commonly check for one or both
        !            75: # of those library options.
        !            76: #
        !            77: .  if empty(BUILDLINK_TREE:Mcurses) && empty(BUILDLINK_TREE:Mncurses)
        !            78: BUILDLINK_TRANSFORM+=          rm:-lcurses
        !            79: BUILDLINK_TRANSFORM+=          rm:-lncurses
        !            80: .  endif
        !            81:
        !            82: .endif # CHECK_BUILTIN.terminfo

CVSweb <webmaster@jp.NetBSD.org>