summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-11-09 11:28:56 +0000
committernia <nia@pkgsrc.org>2021-11-09 11:28:56 +0000
commit725af2afec821ab6a9e3d28d73b1f901f385d977 (patch)
tree2b17055cfb9c5f0e87444c5fca8e7f389db01752 /emulators
parent04ffeb92f9213dd772c5dc36842ac37492556785 (diff)
downloadpkgsrc-725af2afec821ab6a9e3d28d73b1f901f385d977.tar.gz
p11: Avoid checking for the existence of files in /dev to detect system
features.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/p11/Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/emulators/p11/Makefile b/emulators/p11/Makefile
index aefd1c123b9..21da1751033 100644
--- a/emulators/p11/Makefile
+++ b/emulators/p11/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2014/01/03 04:30:26 dholland Exp $
+# $NetBSD: Makefile,v 1.21 2021/11/09 11:28:56 nia Exp $
#
DISTNAME= p11-2.10i
@@ -19,21 +19,26 @@ USE_TOOLS+= gmake
PLIST_VARS+= bpf tap tun
# bfp, tap, and tun tests taken from p11 configure script
-.if exists(/dev/bpf0)
+.if exists(/usr/include/net/bpf.h)
PLIST.bpf= yes
+CONFIGURE_ENV+= ac_cv_epp_bpf=yes
+.else
+CONFIGURE_ENV+= ac_cv_epp_bpf=no
.endif
-.if exists(/dev/tap0) || exists(/dev/net/tun)
+
+.if exists(/usr/include/net/if_tap.h)
PLIST.tap= yes
-.endif
-.if exists(/dev/tun) || exists(/dev/tun0) || exists(/dev/net/tun)
-PLIST.tun= yes
+CONFIGURE_ENV+= ac_cv_epp_tap=yes
+.else
+CONFIGURE_ENV+= ac_cv_epp_tap=no
.endif
-# Force the bpf, tun, and tap epp backends to be built on DragonFly and fbsd.
-.if ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD"
-PLIST.tap= yes
+.if exists(/usr/include/net/if_tun.h) || \
+ exists(/usr/include/linux/if_tun.h)
PLIST.tun= yes
-CONFIGURE_ENV+= ac_cv_epp_bpf=yes ac_cv_epp_tun=yes ac_cv_epp_tap=yes
+CONFIGURE_ENV+= ac_cv_epp_tun=yes
+.else
+CONFIGURE_ENV+= ac_cv_epp_tun=no
.endif
# override MAKEFLAGS in the build and install stages