From 00b18c3587cb445c5b1db43d43968f5cebf0d67f Mon Sep 17 00:00:00 2001 From: Kaito Udagawa Date: Tue, 22 Nov 2016 23:28:40 +0900 Subject: [PATCH] osxfuse_requirement: add library and include paths In the installation whose prefix is other than /usr/local, osxfuse library and include path must explicitly be specified during build. Although brew's pkg-config is configured to prepend appropriates paths, the prepended paths (/usr/local) supercede the original HOMEBREW_PREFIX. This behavior will cause the linker to select libraries outside brew's tree. By adding /usr/local to HOMEBREW_LIBRARY_PATHS, superenv ensures that appears only after the HOMEBREW_PREFIX, and thus fixes this problem. HOMEBREW_INCLUDE_PATHS is also configured like keg-only Formulae. --- Library/Homebrew/requirements/osxfuse_requirement.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/requirements/osxfuse_requirement.rb b/Library/Homebrew/requirements/osxfuse_requirement.rb index 63ccf934f9..d5a3415671 100644 --- a/Library/Homebrew/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/requirements/osxfuse_requirement.rb @@ -14,6 +14,11 @@ class OsxfuseRequirement < Requirement 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/osxfuse" + end end end