1 # $NetBSD: builtin.mk,v 1.3 2010/12/10 08:45:15 obache Exp $
5 BUILTIN_FIND_FILES_VAR
:= H_XAUTH
6 BUILTIN_FIND_FILES.H_XAUTH
= ${X11BASE}/include/X11
/Xauth.h
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}
16 .elif
!defined
(IS_BUILTIN.libXau
)
18 . if empty
(H_XAUTH
:M__nonexistent__
)
19 IS_BUILTIN.libXau
= yes
22 MAKEVARS
+= IS_BUILTIN.libXau
25 ### Determine whether we should use the built-in implementation if it
26 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
28 .if
!defined
(USE_BUILTIN.libXau
)
29 . if
${PREFER.libXau
} == "pkgsrc"
30 USE_BUILTIN.libXau
= no
32 USE_BUILTIN.libXau
= ${IS_BUILTIN.libXau
}
33 . if defined
(BUILTIN_PKG.libXau
) && \
34 !empty
(IS_BUILTIN.libXau
:M
[yY
][eE
][sS
])
35 USE_BUILTIN.libXau
= yes
36 . for _dep_ in
${BUILDLINK_API_DEPENDS.libXau
}
37 . if
!empty
(USE_BUILTIN.libXau
:M
[yY
][eE
][sS
])
38 USE_BUILTIN.libXau
!= \
39 if
${PKG_ADMIN} pmatch
${_dep_
:Q
} ${BUILTIN_PKG.libXau
:Q
}; then \
47 .
endif # PREFER.libXau
49 MAKEVARS
+= USE_BUILTIN.libXau
51 .
include "../../mk/x11.builtin.mk"
53 CHECK_BUILTIN.libXau?
= no
54 .if
!empty
(CHECK_BUILTIN.libXau
:M
[nN
][oO
])
56 # If we are using the builtin version, check whether it has a xau.pc
57 # file or not. If the latter, generate a fake one.
58 . if
!empty
(USE_BUILTIN.libXau
:M
[Yy
][Ee
][Ss
])
59 BUILDLINK_TARGETS
+= xau-fake-pc
63 src
=${BUILDLINK_PREFIX.libXau
}/lib
/pkgconfig
/xau.
pc; \
64 dst
=${BUILDLINK_DIR}/lib
/pkgconfig
/xau.
pc; \
65 ${MKDIR} ${BUILDLINK_DIR}/lib
/pkgconfig
; \
66 if
${TEST} -f
$${src}; then \
67 ${LN} -sf
$${src} $${dst}; \
71 ${BUILDLINK_PREFIX.xproto
}/lib
/pkgconfig
/xproto.
pc; then \
74 { ${ECHO} "Name: Xau"; \
75 ${ECHO} "Description: X authorization file management library"; \
76 ${ECHO} "Version: 1.0.1"; \
77 ${ECHO} "Requires: $${req}"; \
78 ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.libXau}/include"; \
79 ${ECHO} "Libs: -L${BUILDLINK_PREFIX.libXau}/lib" \
80 "${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libXau}/lib" \
86 .
endif # CHECK_BUILTIN.libXau