From 980db9d3fb6671c7562f97dfa3dd4f22fd74083f Mon Sep 17 00:00:00 2001 From: Andrew Yates Date: Thu, 3 Aug 2017 10:44:56 +0100 Subject: [PATCH 1/4] Remove errant pkg-config libdir We found an issue in Linuxbrew/homebrew-core#3366 where the addition of "/usr/lib/pkg-config" causes compilation issues if system pkg-config files are in that directory on Linux. Removing the line from here and adding it into the mac superenv. --- Library/Homebrew/extend/ENV/super.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 692fd36239..b518c22a1c 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -138,7 +138,6 @@ module Superenv def determine_pkg_config_libdir PATH.new( - "/usr/lib/pkgconfig", homebrew_extra_pkg_config_paths, ).existing end From 19cfcc34ef3eb71fcbd45f01b98153fd517a6dfd Mon Sep 17 00:00:00 2001 From: Andrew Yates Date: Thu, 3 Aug 2017 10:46:12 +0100 Subject: [PATCH 2/4] Adding in "/usr/lib/pkg-config" Moving "/usr/lib/pkg-config" into the pkg-path path --- Library/Homebrew/extend/os/mac/extend/ENV/super.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb index f97a2dbbbf..b93e6d3b12 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb @@ -29,6 +29,7 @@ module Superenv def homebrew_extra_pkg_config_paths paths = \ ["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] + paths << "/usr/lib/pkg-config" paths << "#{MacOS::X11.lib}/pkgconfig" << "#{MacOS::X11.share}/pkgconfig" if x11? paths end From 365c55573b26b9363746ac39c21f8b90e8ec992f Mon Sep 17 00:00:00 2001 From: Andrew Yates Date: Thu, 3 Aug 2017 17:22:18 +0100 Subject: [PATCH 3/4] Moving /usr/lib/pkg-config to be first Ensuring old functionality still happens and /usr/lib/pkg-config is the first location found in macOS. --- Library/Homebrew/extend/os/mac/extend/ENV/super.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb index b93e6d3b12..f50aa52740 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb @@ -28,8 +28,7 @@ module Superenv # @private def homebrew_extra_pkg_config_paths paths = \ - ["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] - paths << "/usr/lib/pkg-config" + ["/usr/lib/pkg-config", "#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] paths << "#{MacOS::X11.lib}/pkgconfig" << "#{MacOS::X11.share}/pkgconfig" if x11? paths end From 9b5a3b80bf536471f34f62c7ba5d4dc9ae3aec06 Mon Sep 17 00:00:00 2001 From: Andrew Yates Date: Mon, 7 Aug 2017 11:20:56 +0100 Subject: [PATCH 4/4] Incorrect - added I added an extra un-wanted - into the pkgconfig path. Now removed --- Library/Homebrew/extend/os/mac/extend/ENV/super.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb index f50aa52740..9c20cc7c6f 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb @@ -28,7 +28,7 @@ module Superenv # @private def homebrew_extra_pkg_config_paths paths = \ - ["/usr/lib/pkg-config", "#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] + ["/usr/lib/pkgconfig", "#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] paths << "#{MacOS::X11.lib}/pkgconfig" << "#{MacOS::X11.share}/pkgconfig" if x11? paths end