mirror of
https://github.com/gromgit/homebrew-fuse.git
synced 2025-12-06 16:15:54 +00:00
25 lines
707 B
Ruby
25 lines
707 B
Ruby
# 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
|