Skip to content

Commit

Permalink
plotutils: fix erroneous use of the -flat_namespace flag
Browse files Browse the repository at this point in the history
None of our usual patches apply to their `configure` script, but,
conveniently, we don't need one if we set `MACOSX_DEPLOYMENT_TARGET`
appropriately.

Let's also pass `--without-x` on macOS to avoid opportunistic linkage
with X11 libraries.

This is needed for bottling on Monterey. See Homebrew#94212.
  • Loading branch information
carlocab committed Feb 1, 2022
1 parent 5e317a9 commit 8d4b78c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Formula/plotutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ def install
# Fix usage of libpng to be 1.5 compatible
inreplace "libplot/z_write.c", "png_ptr->jmpbuf", "png_jmpbuf (png_ptr)"

# Avoid `-flat_namespace` flag.
ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s

args = %W[
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--enable-libplotter
]
# Prevent opportunistic linkage to X11
args << "--without-x" if OS.mac?

system "./configure", *args
system "make"
Expand Down

0 comments on commit 8d4b78c

Please sign in to comment.