Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / tcp_wrappers / builtin.mk
blob21020c8d507a3601ff0708b29691ba281b09a5b5
1 # $NetBSD: builtin.mk,v 1.7 2006/03/30 18:06:18 jlam Exp $
3 BUILTIN_PKG:= tcp_wrappers
5 BUILTIN_FIND_LIBS:= wrap
6 BUILTIN_FIND_FILES_VAR:= H_TCP_WRAPPERS
7 BUILTIN_FIND_FILES.H_TCP_WRAPPERS= /usr/include/tcpd.h
9 .include "../../mk/buildlink3/bsd.builtin.mk"
11 ###
12 ### Determine if there is a built-in implementation of the package and
13 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
14 ###
15 .if !defined(IS_BUILTIN.tcp_wrappers)
16 IS_BUILTIN.tcp_wrappers= no
17 . if empty(H_TCP_WRAPPERS:M__nonexistent__) && \
18 empty(H_TCP_WRAPPERS:M${LOCALBASE}/*) && \
19 !empty(BUILTIN_LIB_FOUND.wrap:M[yY][eE][sS])
20 IS_BUILTIN.tcp_wrappers= yes
21 . endif
22 .endif
23 MAKEVARS+= IS_BUILTIN.tcp_wrappers
25 ###
26 ### Determine whether we should use the built-in implementation if it
27 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
28 ###
29 .if !defined(USE_BUILTIN.tcp_wrappers)
30 . if ${PREFER.tcp_wrappers} == "pkgsrc"
31 USE_BUILTIN.tcp_wrappers= no
32 . else
33 USE_BUILTIN.tcp_wrappers= ${IS_BUILTIN.tcp_wrappers}
34 . if defined(BUILTIN_PKG.tcp_wrappers) && \
35 !empty(IS_BUILTIN.tcp_wrappers:M[yY][eE][sS])
36 USE_BUILTIN.tcp_wrappers= yes
37 . for _dep_ in ${BUILDLINK_API_DEPENDS.tcp_wrappers}
38 . if !empty(USE_BUILTIN.tcp_wrappers:M[yY][eE][sS])
39 USE_BUILTIN.tcp_wrappers!= \
40 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.tcp_wrappers:Q}; then \
41 ${ECHO} yes; \
42 else \
43 ${ECHO} no; \
45 . endif
46 . endfor
47 . endif
48 . endif # PREFER.tcp_wrappers
49 .endif
50 MAKEVARS+= USE_BUILTIN.tcp_wrappers