5abef9be14
RECOMMENDED is removed. It becomes ABI_DEPENDS. BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo. BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo. BUILDLINK_DEPENDS does not change. IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS which defaults to "yes". Added to obsolete.mk checking for IGNORE_RECOMMENDED. I did not manually go through and fix any aesthetic tab/spacing issues. I have tested the above patch on DragonFly building and packaging subversion and pkglint and their many dependencies. I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I have used IGNORE_RECOMMENDED for a long time). I have been an active user of IGNORE_RECOMMENDED since it was available. As suggested, I removed the documentation sentences suggesting bumping for "security" issues. As discussed on tech-pkg. I will commit to revbump, pkglint, pkg_install, createbuildlink separately. Note that if you use wip, it will fail! I will commit to pkgsrc-wip later (within day).
98 lines
3 KiB
Makefile
98 lines
3 KiB
Makefile
# $NetBSD: builtin.mk,v 1.14 2006/04/06 06:22:33 reed Exp $
|
|
|
|
BUILTIN_PKG:= libpcap
|
|
|
|
BUILTIN_FIND_FILES_VAR:= H_LIBPCAP
|
|
BUILTIN_FIND_FILES.H_LIBPCAP= /usr/include/pcap.h
|
|
|
|
.include "../../mk/buildlink3/bsd.builtin.mk"
|
|
|
|
###
|
|
### Determine if there is a built-in implementation of the package and
|
|
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
|
###
|
|
.if !defined(IS_BUILTIN.libpcap)
|
|
IS_BUILTIN.libpcap= no
|
|
. if empty(H_LIBPCAP:M__nonexistent__) && empty(H_LIBPCAP:M${LOCALBASE}/*)
|
|
IS_BUILTIN.libpcap= yes
|
|
. endif
|
|
.endif
|
|
MAKEVARS+= IS_BUILTIN.libpcap
|
|
|
|
###
|
|
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
|
|
### a package name to represent the built-in package.
|
|
###
|
|
.if !defined(BUILTIN_PKG.libpcap) && \
|
|
!empty(IS_BUILTIN.libpcap:M[yY][eE][sS]) && \
|
|
empty(H_LIBPCAP:M__nonexistent__)
|
|
# libpcap>=0.9.3: pcap_setdirection added (don't use pcap_inject, this
|
|
# was hacked into the NetBSD version of 0.8.3)
|
|
_BLTN_PCAP_093!= \
|
|
${GREP} -c pcap_setdirection ${H_LIBPCAP} || ${TRUE}
|
|
# libpcap>=0.8.3: MODE_MON added
|
|
_BLTN_PCAP_083!= \
|
|
${GREP} -c MODE_MON ${H_LIBPCAP} || ${TRUE}
|
|
# libpcap>=0.8.1: pcap_get_selectable_fd added
|
|
_BLTN_PCAP_081!= \
|
|
${GREP} -c pcap_get_selectable_fd ${H_LIBPCAP} || ${TRUE}
|
|
# libpcap>=0.8.0: pcap_datalink_val_to_description added
|
|
_BLTN_PCAP_080!= \
|
|
${GREP} -c pcap_datalink_val_to_description ${H_LIBPCAP} || ${TRUE}
|
|
# libpcap>=0.7.0: pcap_setnonblock added
|
|
_BLTN_PCAP_070!= \
|
|
${GREP} -c pcap_setnonblock ${H_LIBPCAP} || ${TRUE}
|
|
# libpcap>=0.6.0: prototype change for pcap_freecode
|
|
_BLTN_PCAP_060!= \
|
|
${GREP} -c pcap_freecode.struct.bpf_program ${H_LIBPCAP} || ${TRUE}
|
|
# libpcap>=0.5.0: pcap_compile_nopcap added
|
|
_BLTN_PCAP_050!= \
|
|
${GREP} -c pcap_compile_nopcap ${H_LIBPCAP} || ${TRUE}
|
|
|
|
. if ${_BLTN_PCAP_093} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.9.3nb1
|
|
. elif ${_BLTN_PCAP_083} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.8.3
|
|
. elif ${_BLTN_PCAP_081} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.8.1
|
|
. elif ${_BLTN_PCAP_080} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.8.0
|
|
. elif ${_BLTN_PCAP_070} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.7.0
|
|
. elif ${_BLTN_PCAP_060} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.6.0
|
|
. elif ${_BLTN_PCAP_050} == "1"
|
|
BUILTIN_VERSION.libpcap= 0.5.0
|
|
. else
|
|
BUILTIN_VERSION.libpcap= 0.4.0
|
|
. endif
|
|
BUILTIN_PKG.libpcap= libpcap-${BUILTIN_VERSION.libpcap}
|
|
.endif
|
|
MAKEVARS+= BUILTIN_PKG.libpcap
|
|
|
|
###
|
|
### Determine whether we should use the built-in implementation if it
|
|
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
|
###
|
|
.if !defined(USE_BUILTIN.libpcap)
|
|
. if ${PREFER.libpcap} == "pkgsrc"
|
|
USE_BUILTIN.libpcap= no
|
|
. else
|
|
USE_BUILTIN.libpcap= ${IS_BUILTIN.libpcap}
|
|
. if defined(BUILTIN_PKG.libpcap) && \
|
|
!empty(IS_BUILTIN.libpcap:M[yY][eE][sS])
|
|
USE_BUILTIN.libpcap= yes
|
|
. for _dep_ in ${BUILDLINK_API_DEPENDS.libpcap}
|
|
. if !empty(USE_BUILTIN.libpcap:M[yY][eE][sS])
|
|
USE_BUILTIN.libpcap!= \
|
|
if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libpcap:Q}; then \
|
|
${ECHO} yes; \
|
|
else \
|
|
${ECHO} no; \
|
|
fi
|
|
. endif
|
|
. endfor
|
|
. endif
|
|
. endif # PREFER.libpcap
|
|
.endif
|
|
MAKEVARS+= USE_BUILTIN.libpcap
|