Subject: pkg/13739: pkgsrc/net/libpcap/buildlink.mk proposal
To: None <gnats-bugs@gnats.netbsd.org>
From: Stoned Elipot <seb@pbox.org>
List: netbsd-bugs
Date: 08/17/2001 14:55:03
>Number: 13739
>Category: pkg
>Synopsis: pkgsrc/net/libpcap/buildlink.mk proposal
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Aug 17 05:53:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Stoned Elipot
>Release: pkgsrc-current
>Organization:
Pandore's Box <pbox.org>
>Environment:
System: NetBSD nakano 1.5.1 NetBSD 1.5.1 (NAKANO) #0: Mon Aug 6 18:26:03 CEST 2001 seb@nakano:/site/a/src/kernels/compile/NAKANO i386
>Description:
While making up a couple of new little pkgs using libpcap I found myself
wondering if a buidlink.mk would be useful for libpcap's pkg... I guess so.
So here is what I made for it.
>How-To-Repeat:
>Fix:
# $NetBSD$
#
# 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
>Release-Note:
>Audit-Trail:
>Unformatted: