Subject: kqueue/kevent support glue for pkgsrc
To: None <tech-pkg@netbsd.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-pkg
Date: 11/09/2002 18:40:06
--ELM73533015-1040-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Hi,
I'd like to add some 'generic' support for checking whether
system supports kqueue/kevent to pkgsrc. This would be used by
packages which have optional kqueue support and lack autoconf.
One of examples would be future py-kqueue module. A 'generic'
mechanism would IMHO be better than each kqueue-using pkg doing
their own support check.
I was thinking about introducing a new PKG_ variable, which could
be set by defs.OS.mk if the interface is supported by the current
OS version.
I realize that it might be eventual goal to just use libevent,
which uses kqueue automatically if it's available. But I still
would like to have an easy way to check if specifically kqueue
is available.
The (short) patch to add proposed variable is appended to this e-mail.
Thoughts?
Jaromir
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow. Do not let this distract you.'' -=-
--ELM73533015-1040-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-8859-2
Content-Disposition: attachment; filename=pkgkq.diff
Index: defs.NetBSD.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defs.NetBSD.mk,v
retrieving revision 1.31
diff -u -p -r1.31 defs.NetBSD.mk
--- defs.NetBSD.mk 2002/10/23 12:21:30 1.31
+++ defs.NetBSD.mk 2002/11/09 17:39:04
@@ -135,3 +135,8 @@ CFLAGS+= -mieee
FFLAGS+= -mieee
. endif # MACHINE_PLATFORM
.endfor # __tmp__
+
+# check for kqueue(2) support, added in NetBSD-1.6J
+.if exists(/usr/include/sys/event.h)
+PKG_HAVE_KQUEUE= # defined
+.endif
--ELM73533015-1040-0_--