Skip to content

Commit

Permalink
argyll-cms: fix MacOS references.
Browse files Browse the repository at this point in the history
Needed after Homebrew/brew#16306.
  • Loading branch information
MikeMcQuaid committed Dec 13, 2023
1 parent ad9eeb5 commit c7af952
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Formula/a/argyll-cms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,21 @@ def install
inreplace "Jamtop" do |s|
openssl = Formula["openssl@3"]
libname = shared_library("lib$(lcase)")
usr = if OS.mac?
"#{MacOS.sdk_path_if_needed}/usr"
else
"/usr"
end

# These two inreplaces make sure all Homebrew and SDK libraries can be found by the Jamfile
s.gsub! "[ GLOB /usr/include$(subd) : $(lcase).h $(lcase)lib.h ]",
"[ GLOB #{openssl.opt_include}$(subd) : $(lcase).h $(lcase)lib.h ] || " \
"[ GLOB #{HOMEBREW_PREFIX}/include$(subd) : $(lcase).h $(lcase)lib.h ] || " \
"[ GLOB #{MacOS.sdk_path_if_needed}/usr/include$(subd) : $(lcase).h $(lcase)lib.h ]"
"[ GLOB #{usr}/include$(subd) : $(lcase).h $(lcase)lib.h ]"
s.gsub! "[ GLOB /usr/lib : lib$(lcase).so ]",
"[ GLOB #{openssl.opt_lib} : #{libname} ] || " \
"[ GLOB #{HOMEBREW_PREFIX}/lib : #{libname} ] || " \
"[ GLOB #{MacOS.sdk_path_if_needed}/usr/lib : #{libname} lib$(lcase).tbd ]"
"[ GLOB #{usr}/lib : #{libname} lib$(lcase).tbd ]"

# These two inreplaces make sure the X11 headers can be found on Linux.
s.gsub! "/usr/X11R6/include", HOMEBREW_PREFIX/"include"
Expand Down

0 comments on commit c7af952

Please sign in to comment.