pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/netbsd-tap o Add a way to pass special definitions...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a27b7443ccb9
branches:  trunk
changeset: 489409:a27b7443ccb9
user:      cube <cube%pkgsrc.org@localhost>
date:      Sun Feb 20 21:50:57 2005 +0000

description:
o Add a way to pass special definitions to the compilation, to match kernel
  environment, and document it in DESCR by lack of a better place.
o Fix a reference to local in (yet unused) bl3.mk file.

Both issues reported by Hubert Feyrer.

diffstat:

 net/netbsd-tap/DESCR          |  8 ++++++++
 net/netbsd-tap/Makefile       |  4 ++--
 net/netbsd-tap/buildlink3.mk  |  4 ++--
 net/netbsd-tap/files/Makefile |  5 ++++-
 net/netbsd-tap/options.mk     |  6 +++++-
 5 files changed, 21 insertions(+), 6 deletions(-)

diffs (81 lines):

diff -r 83b1b4825165 -r a27b7443ccb9 net/netbsd-tap/DESCR
--- a/net/netbsd-tap/DESCR      Sun Feb 20 20:42:45 2005 +0000
+++ b/net/netbsd-tap/DESCR      Sun Feb 20 21:50:57 2005 +0000
@@ -8,3 +8,11 @@
 stack.  tap(4) devices can be created and used individually for system-wide
 configurations, but an application can also use a special clonable device
 node to create interfaces on demand.
+
+As a LKM must be compiled with the same environment as the kernel with respect
+to a handful of definition (DEBUG, DIAGNOSTIC, MULTIPROCESSOR, LOCKDEBUG and
+MALLOCLOG), the package provides a variable, TAP_KERNEL_ENV, to hold the
+correct addition to the compilation command line.  For example, you might want
+to define it the following way in mk.conf:
+
+  TAP_KERNEL_ENV=    -DDIAGNOSTIC -DMULTIPROCESSOR
diff -r 83b1b4825165 -r a27b7443ccb9 net/netbsd-tap/Makefile
--- a/net/netbsd-tap/Makefile   Sun Feb 20 20:42:45 2005 +0000
+++ b/net/netbsd-tap/Makefile   Sun Feb 20 21:50:57 2005 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2005/02/15 21:23:07 cube Exp $
+# $NetBSD: Makefile,v 1.3 2005/02/20 21:50:57 cube Exp $
 
-DISTNAME=      netbsd-tap-20050215
+DISTNAME=      netbsd-tap-20050220
 CATEGORIES=    net
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 83b1b4825165 -r a27b7443ccb9 net/netbsd-tap/buildlink3.mk
--- a/net/netbsd-tap/buildlink3.mk      Sun Feb 20 20:42:45 2005 +0000
+++ b/net/netbsd-tap/buildlink3.mk      Sun Feb 20 21:50:57 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.1.1.1 2005/01/20 18:02:39 cube Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2005/02/20 21:50:57 cube Exp $
 
 BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH}+
 NETBSD_TAP_BUILDLINK3_MK:=     ${NETBSD_TAP_BUILDLINK3_MK}+
@@ -12,7 +12,7 @@
 
 .if !empty(NETBSD_TAP_BUILDLINK3_MK:M+)
 BUILDLINK_DEPENDS.netbsd-tap+= netbsd-tap>=20050120
-BUILDLINK_PKGSRCDIR.netbsd-tap?=       ../../local/netbsd-tap
+BUILDLINK_PKGSRCDIR.netbsd-tap?=       ../../net/netbsd-tap
 .endif # NETBSD_TAP_BUILDLINK3_MK
 
 BUILDLINK_DEPTH:=     ${BUILDLINK_DEPTH:S/+$//}
diff -r 83b1b4825165 -r a27b7443ccb9 net/netbsd-tap/files/Makefile
--- a/net/netbsd-tap/files/Makefile     Sun Feb 20 20:42:45 2005 +0000
+++ b/net/netbsd-tap/files/Makefile     Sun Feb 20 21:50:57 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2005/01/20 18:02:40 cube Exp $
+# $NetBSD: Makefile,v 1.2 2005/02/20 21:50:57 cube Exp $
 
 SRCS=  if_tap_lkm.c if_tap.c if_tap_stub.c
 KMOD=  tap
@@ -13,6 +13,9 @@
 .if defined(USE_BPF) && !empty(USE_BPF:M[Yy][Ee][Ss])
 CPPFLAGS+=     -DNBPFILTER=1
 .endif
+.if defined(TAP_KERNEL_ENV) && !empty(TAP_KERNEL_ENV)
+CPPFLAGS+=     ${TAP_KERNEL_ENV}
+.endif
 
 install: install-postinstall
 
diff -r 83b1b4825165 -r a27b7443ccb9 net/netbsd-tap/options.mk
--- a/net/netbsd-tap/options.mk Sun Feb 20 20:42:45 2005 +0000
+++ b/net/netbsd-tap/options.mk Sun Feb 20 21:50:57 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1.1.1 2005/01/20 18:02:39 cube Exp $
+# $NetBSD: options.mk,v 1.2 2005/02/20 21:50:57 cube Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.netbsd-tap
 PKG_SUPPORTED_OPTIONS= bpf
@@ -9,3 +9,7 @@
 .if !empty(PKG_OPTIONS:Mbpf)
 BUILD_ENV+=    USE_BPF=YES
 .endif
+
+TAP_KERNEL_ENV?=       # empty
+BUILD_DEFS+=   TAP_KERNEL_ENV
+MAKE_ENV+=     TAP_KERNEL_ENV=${TAP_KERNEL_ENV:Q}



Home | Main Index | Thread Index | Old Index