pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/p11 p11: Avoid checking for the existence of...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9c30c09e2e13
branches:  trunk
changeset: 769180:9c30c09e2e13
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Nov 09 11:28:56 2021 +0000

description:
p11: Avoid checking for the existence of files in /dev to detect system
features.

diffstat:

 emulators/p11/Makefile |  27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diffs (46 lines):

diff -r 146b465f77db -r 9c30c09e2e13 emulators/p11/Makefile
--- a/emulators/p11/Makefile    Tue Nov 09 11:12:35 2021 +0000
+++ b/emulators/p11/Makefile    Tue Nov 09 11:28:56 2021 +0000
@@ -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 @@
 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
-.endif
-.if exists(/dev/tap0) || exists(/dev/net/tun)
-PLIST.tap=             yes
-.endif
-.if exists(/dev/tun) || exists(/dev/tun0) || exists(/dev/net/tun)
-PLIST.tun=             yes
+CONFIGURE_ENV+=                ac_cv_epp_bpf=yes
+.else
+CONFIGURE_ENV+=                ac_cv_epp_bpf=no
 .endif
 
-# Force the bpf, tun, and tap epp backends to be built on DragonFly and fbsd.
-.if ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD"
+.if exists(/usr/include/net/if_tap.h)
 PLIST.tap=             yes
+CONFIGURE_ENV+=                ac_cv_epp_tap=yes
+.else
+CONFIGURE_ENV+=                ac_cv_epp_tap=no
+.endif
+
+.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



Home | Main Index | Thread Index | Old Index