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

Annotation of pkgsrc/graphics/MesaLib/builtin.mk, Revision 1.9

1.9     ! jlam        1: # $NetBSD: builtin.mk,v 1.8 2005/06/03 17:02:36 jlam Exp $
1.1       jlam        2:
1.5       jlam        3: BUILTIN_PKG:=  MesaLib
1.1       jlam        4:
1.5       jlam        5: BUILTIN_FIND_FILES_VAR:=       H_MESALIB
                      6: BUILTIN_FIND_FILES.H_MESALIB=  ${X11BASE}/include/GL/glx.h
1.1       jlam        7:
1.5       jlam        8: .include "../../mk/buildlink3/bsd.builtin.mk"
                      9:
                     10: ###
                     11: ### Determine if there is a built-in implementation of the package and
                     12: ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
                     13: ###
1.1       jlam       14: .if !defined(IS_BUILTIN.MesaLib)
                     15: IS_BUILTIN.MesaLib=    no
1.5       jlam       16: .  if exists(${H_MESALIB})
1.9     ! jlam       17: BUILTIN_IMAKE_CHECK:=  MesaLib:BuildGLXLibrary
        !            18: .    include "../../mk/buildlink3/imake-check.mk"
        !            19: IS_BUILTIN.MesaLib=    ${BUILTIN_IMAKE_CHECK.MesaLib}
1.1       jlam       20: .  endif
1.5       jlam       21: .endif
                     22: MAKEVARS+=     IS_BUILTIN.MesaLib
1.1       jlam       23:
1.5       jlam       24: ###
                     25: ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
                     26: ### a package name to represent the built-in package.
                     27: ###
                     28: .if !defined(BUILTIN_PKG.MesaLib) && \
                     29:     !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS]) && \
                     30:     exists(${H_MESALIB})
                     31: .  include "../../graphics/Mesa/version.mk"
                     32: BUILTIN_PKG.MesaLib=   MesaLib-${BUILTIN_VERSION.Mesa}
                     33: .endif
                     34: MAKEVARS+=     BUILTIN_PKG.MesaLib
                     35:
                     36: ###
                     37: ### Determine whether we should use the built-in implementation if it
                     38: ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
                     39: ###
1.1       jlam       40: .if !defined(USE_BUILTIN.MesaLib)
1.5       jlam       41: .  if ${PREFER.MesaLib} == "pkgsrc"
                     42: USE_BUILTIN.MesaLib=   no
                     43: .  else
                     44: USE_BUILTIN.MesaLib=   ${IS_BUILTIN.MesaLib}
                     45: .    if defined(BUILTIN_PKG.MesaLib) && \
                     46:         !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS])
                     47: USE_BUILTIN.MesaLib=   yes
                     48: .      for _dep_ in ${BUILDLINK_DEPENDS.MesaLib}
                     49: .        if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
                     50: USE_BUILTIN.MesaLib!=                                                  \
                     51:        if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.MesaLib:Q}; then \
                     52:                ${ECHO} yes;                                            \
1.1       jlam       53:        else                                                            \
1.5       jlam       54:                ${ECHO} no;                                             \
1.1       jlam       55:        fi
1.5       jlam       56: .        endif
                     57: .      endfor
                     58: .    endif
                     59: .  endif  # PREFER.MesaLib
                     60: .endif
                     61: MAKEVARS+=     USE_BUILTIN.MesaLib
1.1       jlam       62:
1.5       jlam       63: ###
                     64: ### The section below only applies if we are not including this file
                     65: ### solely to determine whether a built-in implementation exists.
                     66: ###
1.4       jlam       67: CHECK_BUILTIN.MesaLib?=        no
                     68: .if !empty(CHECK_BUILTIN.MesaLib:M[nN][oO])
                     69:
1.5       jlam       70: .  if !empty(USE_BUILTIN.MesaLib:M[nN][oO])
1.1       jlam       71: BUILDLINK_DEPENDS.MesaLib+=    MesaLib>=6.0
1.5       jlam       72: .  endif
1.1       jlam       73:
1.5       jlam       74: .  if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
1.1       jlam       75: BUILDLINK_PREFIX.MesaLib=      ${X11BASE}
1.5       jlam       76: BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH}+
                     77: .    include "../../mk/x11.buildlink3.mk"
                     78: .    include "../../mk/x11.builtin.mk"
                     79: BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH:S/+$//}
                     80: .  endif
1.4       jlam       81:
                     82: .endif # CHECK_BUILTIN.MesaLib

CVSweb <webmaster@jp.NetBSD.org>