1 # $NetBSD: builtin.mk,v 1.4 2006/12/16 01:04:43 joerg Exp $
3 BUILTIN_PKG
:= compositeproto
5 BUILTIN_FIND_FILES_VAR
:= H_COMPOSITE H_COMPOSITEPROTO
6 BUILTIN_FIND_FILES.H_COMPOSITE
= \
7 ${X11BASE}/include/X11
/extensions
/composite.h
8 BUILTIN_FIND_FILES.H_COMPOSITEPROTO
= \
9 ${X11BASE}/include/X11
/extensions
/compositeproto.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.compositeproto
= no
19 .elif
!defined
(IS_BUILTIN.compositeproto
)
20 IS_BUILTIN.compositeproto
= 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_COMPOSITE
:M__nonexistent__
) && \
27 empty
(H_COMPOSITEPROTO
:M__nonexistent__
)
28 IS_BUILTIN.compositeproto
= yes
31 MAKEVARS
+= IS_BUILTIN.compositeproto
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.compositeproto
)
38 . if
${PREFER.compositeproto
} == "pkgsrc"
39 USE_BUILTIN.compositeproto
= no
41 USE_BUILTIN.compositeproto
= ${IS_BUILTIN.compositeproto
}
42 . if defined
(BUILTIN_PKG.compositeproto
) && \
43 !empty
(IS_BUILTIN.compositeproto
:M
[yY
][eE
][sS
])
44 USE_BUILTIN.compositeproto
= yes
45 . for _dep_ in
${BUILDLINK_API_DEPENDS.compositeproto
}
46 . if
!empty
(USE_BUILTIN.compositeproto
:M
[yY
][eE
][sS
])
47 USE_BUILTIN.compositeproto
!= \
48 if
${PKG_ADMIN} pmatch
${_dep_
:Q
} ${BUILTIN_PKG.compositeproto
:Q
}; then \
56 .
endif # PREFER.compositeproto
58 MAKEVARS
+= USE_BUILTIN.compositeproto
60 .
include "../../mk/x11.builtin.mk"
62 CHECK_BUILTIN.compositeproto?
= no
63 .if
!empty
(CHECK_BUILTIN.compositeproto
:M
[nN
][oO
])
65 # following so old pkg-config name compositeext.pc will be available
66 BUILDLINK_TARGETS
+= compositeext-symlink-pc
68 compositeext-symlink-pc
:
69 src
=${BUILDLINK_PREFIX.compositeproto
}/lib
/pkgconfig
/compositeproto.
pc \
70 dst
=${BUILDLINK_DIR}/lib
/pkgconfig
/compositeext.
pc; \
71 ${MKDIR} ${BUILDLINK_DIR}/lib
/pkgconfig
; \
72 if
${TEST} -f
$${src}; then \
73 ${LN} -sf
$${src} $${dst}; \
76 .
endif # CHECK_BUILTIN.compositeproto