mirror of
https://github.com/gromgit/homebrew-fuse.git
synced 2025-12-31 15:02:17 +00:00
add require/macfuse
This commit is contained in:
parent
879d68ff4d
commit
5755adc7af
1 changed files with 25 additions and 0 deletions
25
require/macfuse.rb
Normal file
25
require/macfuse.rb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MacfuseRequirement < Requirement
|
||||
fatal true
|
||||
|
||||
satisfy(build_env: false) { self.class.binary_osxfuse_installed? }
|
||||
|
||||
def self.binary_osxfuse_installed?
|
||||
File.exist?("/usr/local/include/fuse.h") &&
|
||||
!File.symlink?("/usr/local/include")
|
||||
end
|
||||
|
||||
env do
|
||||
ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse"
|
||||
|
||||
unless HOMEBREW_PREFIX.to_s == "/usr/local"
|
||||
ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib"
|
||||
ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include"
|
||||
end
|
||||
end
|
||||
|
||||
def message
|
||||
"This formula requires MacFUSE. Please run `brew install --cask gromgit/fuse/macfuse` first."
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue