aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-04 04:01:10 +0000
committerMike McQuaid2014-11-07 09:12:29 +0000
commit97eac8853efdce75f9007ee8b0af77bca0973947 (patch)
tree2f40e0c9e726803b7299dc1bc75f41809bfcc5d2 /Library/Homebrew/requirements
parentc5f549e33c417bd60c44f203b7bb3356d4f30271 (diff)
downloadbrew-97eac8853efdce75f9007ee8b0af77bca0973947.tar.bz2
tuntap: recommend upstream signed binary.
We have an upstream signed binary available! Big big love to Mattias for this. This PR converts all the existing tuntap dependencies into binary-friendly tuntap dependencies, and adds a tuntap dependency to requirements to look for the kexts. Closes Homebrew/homebrew#33894. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/requirements')
-rw-r--r--Library/Homebrew/requirements/tuntap_dependency.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/requirements/tuntap_dependency.rb b/Library/Homebrew/requirements/tuntap_dependency.rb
new file mode 100644
index 000000000..cf306b5cd
--- /dev/null
+++ b/Library/Homebrew/requirements/tuntap_dependency.rb
@@ -0,0 +1,13 @@
+require "requirement"
+
+class TuntapDependency < Requirement
+ fatal true
+ default_formula "tuntap"
+ satisfy { self.class.binary_tuntap_installed? || Formula["tuntap"].installed? }
+
+ def self.binary_tuntap_installed?
+ File.exist?("/Library/Extensions/tun.kext") && File.exist?("/Library/Extensions/tap.kext")
+ File.exist?("/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist")
+ File.exist?("/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist")
+ end
+end