diff options
author | wiz <wiz@pkgsrc.org> | 2001-08-17 13:19:01 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2001-08-17 13:19:01 +0000 |
commit | c4525e6dc6ec2abf2e79abeee560fe277bfdac22 (patch) | |
tree | bb8bf18e3423b74867ce146439756bec327e5e84 | |
parent | 1340d2a2ce6650276f4f45f0c7a861461f0be6c6 (diff) | |
download | pkgsrc-c4525e6dc6ec2abf2e79abeee560fe277bfdac22.tar.gz |
Add buildlink.mk provided by Stoned Elipot in pkg/13739.
-rw-r--r-- | net/libpcap/buildlink.mk | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/net/libpcap/buildlink.mk b/net/libpcap/buildlink.mk new file mode 100644 index 00000000000..fc2a5e9a20d --- /dev/null +++ b/net/libpcap/buildlink.mk @@ -0,0 +1,46 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/08/17 13:19:01 wiz Exp $ +# +# This Makefile fragment is included by packages that use libpcap. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define BUILDLINK_DEPENDS.libpcap to the dependency pattern +# for the version of libpcap desired. +# (2) Include this Makefile fragment in the package Makefile, +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(LIBPCAP_BUILDLINK_MK) +LIBPCAP_BUILDLINK_MK= # defined + +.include "../../mk/bsd.buildlink.mk" + +BUILDLINK_DEPENDS.libpcap?= libpcap>=0.6.1 + +.if exists(/usr/include/pcap.h) +_NEED_LIBPCAP= NO +.else +_NEED_LIBPCAP= YES +.endif + +.if ${_NEED_LIBPCAP} == "YES" +DEPENDS+= ${BUILDLINK_DEPENDS.libpcap}:../../net/libpcap +EVAL_PREFIX+= BUILDLINK_PREFIX.libpcap=libpcap +BUILDLINK_PREFIX.libpcap_DEFAULT= ${LOCALBASE} +.else +BUILDLINK_PREFIX.libpcap= /usr +.endif + +BUILDLINK_FILES.libpcap= include/pcap.h +BUILDLINK_FILES.libpcap+= include/pcap-namedb.h +BUILDLINK_FILES.libpcap+= lib/libpcap.* + +BUILDLINK_TARGETS.libpcap= libpcap-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.libpcap} + +pre-configure: ${BUILDLINK_TARGETS.libpcap} +libpcap-buildlink: _BUILDLINK_USE + +.endif # LIBPCAP_BUILDLINK_MK |