pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libepoll-shim libepoll-shim: Use PKG_HAVE_* to d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/688ac38caabe
branches:  trunk
changeset: 769176:688ac38caabe
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Nov 09 11:09:04 2021 +0000

description:
libepoll-shim: Use PKG_HAVE_* to detect system call availability.

diffstat:

 devel/libepoll-shim/Makefile |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r a4b0dfbb41c4 -r 688ac38caabe devel/libepoll-shim/Makefile
--- a/devel/libepoll-shim/Makefile      Tue Nov 09 11:06:08 2021 +0000
+++ b/devel/libepoll-shim/Makefile      Tue Nov 09 11:09:04 2021 +0000
@@ -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 @@
 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
 



Home | Main Index | Thread Index | Old Index