libepoll-shim: Use PKG_HAVE_* to detect system call availability.
This commit is contained in:
parent
d51d7bdeb3
commit
7af2f02af6
1 changed files with 9 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.4 2021/09/22 17:45:13 nia Exp $
|
||||
# $NetBSD: Makefile,v 1.5 2021/11/09 11:09:04 nia Exp $
|
||||
|
||||
GITHUB_PROJECT= epoll-shim
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
@ -12,19 +12,23 @@ HOMEPAGE= https://github.com/jiixyj/epoll-shim
|
|||
COMMENT= Small epoll implemented using kevent
|
||||
LICENSE= mit
|
||||
|
||||
ONLY_FOR_PLATFORM= NetBSD-*-* FreeBSD-*-* OpenBSD-*-* DragonFly-*-*
|
||||
|
||||
USE_CMAKE= yes
|
||||
USE_TOOLS+= pkg-config
|
||||
USE_LANGUAGES= c c++
|
||||
|
||||
CMAKE_ARGS+= -DBUILD_TESTING=OFF
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
.if !defined(PKG_HAVE_KQUEUE)
|
||||
PKG_SKIP_REASON+= "Requires a kqueue implementation"
|
||||
.endif
|
||||
|
||||
PLIST_VARS+= eventfd timerfd
|
||||
.if !exists(/usr/include/sys/eventfd.h)
|
||||
.if !defined(PKG_HAVE_EVENTFD)
|
||||
PLIST.eventfd= YES
|
||||
.endif
|
||||
.if !exists(/usr/include/sys/timerfd.h)
|
||||
.if !defined(PKG_HAVE_TIMERFD)
|
||||
PLIST.timerfd= YES
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue