Merge pull request #7364 from iMichka/meson

formula: add standard meson args
This commit is contained in:
Mike McQuaid 2020-04-15 16:17:45 +01:00 committed by GitHub
commit 25dacf7d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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}"]
end
# Standard parameters for meson builds.
def std_meson_args
["--prefix=#{prefix}", "--libdir=#{lib}"]
end
# an array of all core {Formula} names
# @private
def self.core_names

View File

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