Skip to content

Commit

Permalink
macos: add support for 11.2
Browse files Browse the repository at this point in the history
GitHub: rcairo/rcairo#69

Homebrew uses Library/Homebrew/os/mac/pkgconfig/11 instead of
.../11.2.

Reported by Ludovic Moutury. Thanks!!!
  • Loading branch information
kou committed Feb 4, 2021
1 parent 950b845 commit 92e2fb3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/pkg-config.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2008-2020 Sutou Kouhei <kou@cozmixng.org>
# Copyright 2008-2021 Sutou Kouhei <kou@cozmixng.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -485,7 +485,11 @@ def guess_default_path
homebrew_repository_candidates << Pathname(homebrew_repository)
end
homebrew_repository_candidates.uniq.each do |candidate|
path = candidate + "Library/Homebrew/os/mac/pkgconfig/#{mac_os_version}"
pkgconfig_base_path = candidate + "Library/Homebrew/os/mac/pkgconfig"
path = pkgconfig_base_path + mac_os_version
unless path.exist?
path = pkgconfig_base_path + mac_os_version.gsub(/\.\d+\z/, "")
end
paths << path.to_s if path.exist?
end
end
Expand Down

0 comments on commit 92e2fb3

Please sign in to comment.