diff options
Diffstat (limited to 'devel/libnet')
-rw-r--r-- | devel/libnet/Makefile | 9 | ||||
-rw-r--r-- | devel/libnet/buildlink.mk | 47 |
2 files changed, 53 insertions, 3 deletions
diff --git a/devel/libnet/Makefile b/devel/libnet/Makefile index e6417a9875d..40b0d59bb26 100644 --- a/devel/libnet/Makefile +++ b/devel/libnet/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/04/17 11:09:09 zuntum Exp $ +# $NetBSD: Makefile,v 1.8 2001/07/14 16:41:38 sakamoto Exp $ # DISTNAME= libnet-1.0.1b @@ -9,8 +9,11 @@ MAINTAINER= sakamoto@netbsd.org HOMEPAGE= http://www.packetfactory.net/libnet/ COMMENT= C library for portable packet creation and injection -USE_LIBTOOL= yes -GNU_CONFIGURE= yes +USE_BUILDLINK_ONLY= # defined +REPLACE_BUILDLINK= libnet-config + +USE_LIBTOOL= #defined +GNU_CONFIGURE= #defined CONFIGURE_ENV+= LIBNET_CONFIG_CFLAGS="-I${PREFIX}/include" \ LIBNET_CONFIG_LIBS="${LDFLAGS}" diff --git a/devel/libnet/buildlink.mk b/devel/libnet/buildlink.mk new file mode 100644 index 00000000000..0401337bbab --- /dev/null +++ b/devel/libnet/buildlink.mk @@ -0,0 +1,47 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/07/14 16:41:38 sakamoto Exp $ +# +# This Makefile fragment is included by packages that use libnet. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define BUILDLINK_DEPENDS.libnet to the dependency pattern +# for the version of libnet 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(LIBNET_BUILDLINK_MK) +LIBNET_BUILDLINK_MK= # defined + +.include "../../mk/bsd.buildlink.mk" + +BUILDLINK_DEPENDS.libnet?= libnet-* +DEPENDS+= ${BUILDLINK_DEPENDS.libnet}:../../devel/libnet + +BUILDLINK_PREFIX.libnet= ${LOCALBASE} +BUILDLINK_FILES.libnet= include/libnet.h +BUILDLINK_FILES.libnet+= include/libnet/* +BUILDLINK_FILES.libnet+= lib/libnet.* + +REPLACE_BUILDLINK_SED+= \ + -e "s|${BUILDLINK_CONFIG_WRAPPER.libnet}|${BUILDLINK_CONFIG.libnet}|g" + +BUILDLINK_TARGETS.libnet= libnet-buildlink +BUILDLINK_TARGETS.libnet+= libnet-buildlink-config-wrapper +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.libnet} + +BUILDLINK_CONFIG.libnet= ${BUILDLINK_PREFIX.libnet}/bin/libnet-config +BUILDLINK_CONFIG_WRAPPER.libnet=${BUILDLINK_DIR}/bin/libnet-config + +.if defined(USE_CONFIG_WRAPPER) && defined(GNU_CONFIGURE) +LIBNET_CONFIG?= ${BUILDLINK_CONFIG_WRAPPER.libnet} +CONFIGURE_ENV+= LIBNET_CONFIG="${LIBNET_CONFIG}" +.endif + +pre-configure: ${BUILDLINK_TARGETS.libnet} +libnet-buildlink: _BUILDLINK_USE +libnet-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE + +.endif # LIBNET_BUILDLINK_MK |