From 3462ae2ac5b7d4a6adfdbf62e7b7e1ecd3361ea7 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:17:59 +0000 Subject: [PATCH] libvirt-glib: switch build to meson Closes #72269. Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> --- Formula/libvirt-glib.rb | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Formula/libvirt-glib.rb b/Formula/libvirt-glib.rb index ececa141913..1f1b355b21c 100644 --- a/Formula/libvirt-glib.rb +++ b/Formula/libvirt-glib.rb @@ -19,6 +19,8 @@ class LibvirtGlib < Formula depends_on "gobject-introspection" => :build depends_on "intltool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build depends_on "pkg-config" => :build depends_on "gettext" @@ -26,20 +28,11 @@ class LibvirtGlib < Formula depends_on "libvirt" def install - # macOS ld does not support linker option: --version-script - # https://bugzilla.redhat.com/show_bug.cgi?id=1304981 - inreplace "libvirt-gconfig/Makefile.in", /^.*-Wl,--version-script=.*$\n/, "" - inreplace "libvirt-glib/Makefile.in", /^.*-Wl,--version-script=.*$\n/, "" - inreplace "libvirt-gobject/Makefile.in", /^.*-Wl,--version-script=.*$\n/, "" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --enable-introspection - --prefix=#{prefix} - ] - system "./configure", *args - system "make", "install" + system "meson", "setup", "builddir", *std_meson_args, "-Dintrospection=enabled" + cd "builddir" do + system "meson", "compile" + system "meson", "install" + end end test do