From f8536d0b5bffaafa0f317c1e3526cb01d6112b10 Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Wed, 15 Apr 2020 12:19:02 +0200 Subject: [PATCH] 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. --- Library/Homebrew/formula.rb | 5 +++++ Library/Homebrew/formula_creator.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 68aa4138a6..c95b9a3bdb 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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 diff --git a/Library/Homebrew/formula_creator.rb b/Library/Homebrew/formula_creator.rb index 11d3249b2a..caa1d81891 100644 --- a/Library/Homebrew/formula_creator.rb +++ b/Library/Homebrew/formula_creator.rb @@ -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