Subject: skill package changes for NetBSD >= 1.5
To: None <tech-pkg@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-pkg
Date: 06/23/2000 12:20:46
Folks,

I'd like to change the skill package to use the new sysctls so that
it doesn't need to be installed setgid kmem.  I need to know in the
Makefile if ${OS_VERSION} is 1.5 or later - is there an easy way I can
do what I want (see the XXXXX bits below)?  I couldn't find an example
with a quick glance at other pkgsrc Makefiles.

Techincally this change will also work on NetBSD >1.4Z.  A
different way of checking would be to check if "KVM_NO_FILES" is
in /usr/include/kvm.h.  Would this be better?  Something like:

	KPROC2!=	grep -c KVM_NO_FILES /usr/include/kvm.h || true

	.if ${KPROC2} > 0
	MAKE_ENV+=	COPTS=-DKPROC2
	.else
	BINMODE=	02555
	MAKE_ENV+=	BINGRP=kmem COPTS=-DUVM
	.endif

seems to work, but looks pretty ugly...

Simon.
--
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/skill/Makefile,v
retrieving revision 1.8
diff -p -u -r1.8 Makefile
--- Makefile	2000/02/20 02:02:51	1.8
+++ Makefile	2000/06/23 01:45:48
@@ -12,13 +12,18 @@ EXTRACT_SUFX=	_tar.Z
 
 MAINTAINER=	kim@tac.nyc.ny.us
 
-BINMODE=	02555
-
 .include "../../mk/bsd.prefs.mk"
 
 .if ${OPSYS} == "NetBSD"
-MAKE_ENV+=	OSTYPE=bsd-44 BINGRP=kmem COPTS=-DUVM
+MAKE_ENV+=	OSTYPE=bsd-44
+XXXXX .if ${OS_VERSION} >= 1.5
+MAKE_ENV+=	COPTS=-DKPROC2
+XXXXX .else
+BINMODE=	02555
+MAKE_ENV+=	BINGRP=kmem COPTS=-DUVM
+XXXXX .endif
 .elif ${OPSYS} == "SunOS"
+BINMODE=	02555
 MAKE_ENV+=	OSTYPE=sys-5r4 BINGRP=sys CPPFLAGS=
 .endif