Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / x11 / xineramaproto / builtin.mk
blob8730e0b2b2992b09b891a288b280caab67dfd7ee
1 # $NetBSD: builtin.mk,v 1.3 2008/10/05 21:36:34 cube Exp $
3 BUILTIN_PKG:= xineramaproto
5 BUILTIN_FIND_FILES_VAR:= PC_XINERAMAPROTO
6 BUILTIN_FIND_FILES.PC_XINERAMAPROTO= ${X11BASE}/lib/pkgconfig/xineramaproto.pc
8 .include "../../mk/buildlink3/bsd.builtin.mk"
10 ###
11 ### Determine if there is a built-in implementation of the package and
12 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
13 ###
14 .if ${X11BASE} == ${LOCALBASE}
15 IS_BUILTIN.xineramaproto= no
16 .elif !defined(IS_BUILTIN.xineramaproto)
17 IS_BUILTIN.xineramaproto= no
18 . if empty(PC_XINERAMAPROTO:M__nonexistent__)
19 IS_BUILTIN.xineramaproto= yes
20 . endif
21 .endif
22 MAKEVARS+= IS_BUILTIN.xineramaproto
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.xineramaproto) && \
29 !empty(IS_BUILTIN.xineramaproto:M[yY][eE][sS]) && \
30 empty(PC_XINERAMAPROTO:M__nonexistent__)
31 BUILTIN_VERSION.xineramaproto!= ${SED} -n -e 's/Version: //p' ${PC_XINERAMAPROTO}
32 BUILTIN_PKG.xineramaproto= xineramaproto-${BUILTIN_VERSION.xineramaproto}
33 .endif
34 MAKEVARS+= BUILTIN_PKG.xineramaproto
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 ###
40 .if !defined(USE_BUILTIN.xineramaproto)
41 . if ${PREFER.xineramaproto} == "pkgsrc"
42 USE_BUILTIN.xineramaproto= no
43 . else
44 USE_BUILTIN.xineramaproto= ${IS_BUILTIN.xineramaproto}
45 . if defined(BUILTIN_PKG.xineramaproto) && \
46 !empty(IS_BUILTIN.xineramaproto:M[yY][eE][sS])
47 USE_BUILTIN.xineramaproto= yes
48 . for _dep_ in ${BUILDLINK_API_DEPENDS.xineramaproto}
49 . if !empty(USE_BUILTIN.xineramaproto:M[yY][eE][sS])
50 USE_BUILTIN.xineramaproto!= \
51 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.xineramaproto:Q}; then \
52 ${ECHO} yes; \
53 else \
54 ${ECHO} no; \
56 . endif
57 . endfor
58 . endif
59 . endif # PREFER.xineramaproto
60 .endif
61 MAKEVARS+= USE_BUILTIN.xineramaproto
63 .include "../../mk/x11.builtin.mk"