1 # $NetBSD: builtin.mk,v 1.7 2008/10/05 21:36:33 cube Exp $
3 BUILTIN_PKG
:= fixesproto
5 BUILTIN_FIND_FILES_VAR
:= H_XFIXESPROTO H_XFIXESWIRE
6 BUILTIN_FIND_FILES.H_XFIXESPROTO
= \
7 ${X11BASE}/include/X11
/extensions
/xfixesproto.h
8 BUILTIN_FIND_FILES.H_XFIXESWIRE
= \
9 ${X11BASE}/include/X11
/extensions
/xfixeswire.h
11 .
include "../../mk/buildlink3/bsd.builtin.mk"
14 ### Determine if there is a built-in implementation of the package and
15 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
17 .if
${X11BASE} == ${LOCALBASE}
18 IS_BUILTIN.fixesproto
= no
19 .elif
!defined
(IS_BUILTIN.fixesproto
)
20 IS_BUILTIN.fixesproto
= no
22 # Here, we skip checking whether the files are under ${LOCALBASE} since
23 # we'll consider this X11 package to be built-in even if it's a part
24 # of one of the pkgsrc-installed X11 distributions.
26 . if empty
(H_XFIXESPROTO
:M__nonexistent__
) && \
27 empty
(H_XFIXESWIRE
:M__nonexistent__
)
28 IS_BUILTIN.fixesproto
= yes
31 MAKEVARS
+= IS_BUILTIN.fixesproto
34 ### Determine whether we should use the built-in implementation if it
35 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
37 .if
!defined
(USE_BUILTIN.fixesproto
)
38 . if
${PREFER.fixesproto
} == "pkgsrc"
39 USE_BUILTIN.fixesproto
= no
41 USE_BUILTIN.fixesproto
= ${IS_BUILTIN.fixesproto
}
42 . if defined
(BUILTIN_PKG.fixesproto
) && \
43 !empty
(IS_BUILTIN.fixesproto
:M
[yY
][eE
][sS
])
44 USE_BUILTIN.fixesproto
= yes
45 . for _dep_ in
${BUILDLINK_API_DEPENDS.fixesproto
}
46 . if
!empty
(USE_BUILTIN.fixesproto
:M
[yY
][eE
][sS
])
47 USE_BUILTIN.fixesproto
!= \
48 if
${PKG_ADMIN} pmatch
${_dep_
:Q
} ${BUILTIN_PKG.fixesproto
:Q
}; then \
56 .
endif # PREFER.fixesproto
58 MAKEVARS
+= USE_BUILTIN.fixesproto
60 .
include "../../mk/x11.builtin.mk"
62 CHECK_BUILTIN.fixesproto?
= no
63 .if
!empty
(CHECK_BUILTIN.fixesproto
:M
[nN
][oO
])
65 # following so old pkg-config name fixesext.pc will be available
66 # this is temporary and can be removed once not used
67 BUILDLINK_TARGETS
+= fixesext-symlink-pc
70 src
=${BUILDLINK_PREFIX.fixesproto
}/lib
/pkgconfig
/fixesproto.
pc \
71 dst
=${BUILDLINK_DIR}/lib
/pkgconfig
/fixesext.
pc; \
72 ${MKDIR} ${BUILDLINK_DIR}/lib
/pkgconfig
; \
73 if
${TEST} -f
$${src}; then \
74 ${LN} -sf
$${src} $${dst}; \
77 .
endif # CHECK_BUILTIN.fixesproto