File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,17 +340,22 @@ def compute_default_path
340340 if brew
341341 homebrew_repository = run_command ( "brew" , "--repository" )
342342 if homebrew_repository
343- homebrew_repository_candidates <<
344- Pathname ( homebrew_repository . to_s )
343+ homebrew_repository_candidates <<
344+ Pathname ( homebrew_repository . strip )
345345 end
346346 end
347347 homebrew_repository_candidates . uniq . each do |candidate |
348- pkgconfig_base_path = candidate + "Library/Homebrew/os/mac/pkgconfig"
349- path = pkgconfig_base_path + mac_os_version
350- unless path . exist?
351- path = pkgconfig_base_path + mac_os_version . gsub ( /\. \d +\z / , "" )
348+ mac_pkgconfig_base_path =
349+ candidate + "Library/Homebrew/os/mac/pkgconfig"
350+ mac_pkgconfig_path = mac_pkgconfig_base_path + mac_os_version
351+ unless mac_pkgconfig_path . exist?
352+ mac_pkgconfig_path =
353+ mac_pkgconfig_base_path + mac_os_version . gsub ( /\. \d +\z / , "" )
352354 end
353- paths << path . to_s if path . exist?
355+ paths << mac_pkgconfig_path . to_s if mac_pkgconfig_path . exist?
356+
357+ pkgconfig_path = candidate + "lib/pkgconfig"
358+ paths << pkgconfig_path . to_s if pkgconfig_path . exist?
354359 end
355360 end
356361 paths . concat ( default_paths )
You can’t perform that action at this time.
0 commit comments