formula: add standard meson args

libdir is especially important on Fedora based distributions,
where it might default to "lib64", but everything else expects "lib",
so forcing the libdir is necessary there.
This commit is contained in:
Michka Popoff 2020-04-15 12:19:02 +02:00
parent b11d2b56f7
commit f8536d0b5b
2 changed files with 6 additions and 1 deletions

View File

@ -1373,6 +1373,11 @@ class Formula
["--jobs=#{ENV.make_jobs}", "--max-backjumps=100000", "--install-method=copy", "--installdir=#{bin}"] ["--jobs=#{ENV.make_jobs}", "--max-backjumps=100000", "--install-method=copy", "--installdir=#{bin}"]
end end
# Standard parameters for meson builds.
def std_meson_args
["--prefix=#{prefix}", "--libdir=#{lib}"]
end
# an array of all core {Formula} names # an array of all core {Formula} names
# @private # @private
def self.core_names def self.core_names

View File

@ -142,7 +142,7 @@ module Homebrew
system "go", "build", *std_go_args system "go", "build", *std_go_args
<% elsif mode == :meson %> <% elsif mode == :meson %>
mkdir "build" do mkdir "build" do
system "meson", "--prefix=\#{prefix}", ".." system "meson", *std_meson_args, ".."
system "ninja", "-v" system "ninja", "-v"
system "ninja", "install", "-v" system "ninja", "install", "-v"
end end