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"
11 ### Determine if there is a built-in implementation of the package and
12 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
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
22 MAKEVARS
+= IS_BUILTIN.xineramaproto
25 ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
26 ### a package name to represent the built-in package.
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
}
34 MAKEVARS
+= BUILTIN_PKG.xineramaproto
37 ### Determine whether we should use the built-in implementation if it
38 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
40 .if
!defined
(USE_BUILTIN.xineramaproto
)
41 . if
${PREFER.xineramaproto
} == "pkgsrc"
42 USE_BUILTIN.xineramaproto
= no
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 \
59 .
endif # PREFER.xineramaproto
61 MAKEVARS
+= USE_BUILTIN.xineramaproto
63 .
include "../../mk/x11.builtin.mk"