Skip to content

Commit

Permalink
Merge pull request Homebrew#159284 from chenrui333/gtksourceview5-meson
Browse files Browse the repository at this point in the history
gtksourceview5: use modern meson build syntax and update test
  • Loading branch information
BrewTestBot authored Jan 8, 2024
2 parents 8e44c64 + c528f31 commit 3d89cd7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Formula/g/gtksourceview5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ class Gtksourceview5 < Formula
depends_on "pcre2"

def install
args = std_meson_args + %w[
args = %w[
-Dintrospection=enabled
-Dvapi=true
]

mkdir "build" do
system "meson", *args, ".."
system "ninja", "-v"
system "ninja", "install", "-v"
end
system "meson", "setup", "build", *args, *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end

test do
Expand All @@ -52,8 +50,9 @@ def install
return 0;
}
EOS
flags = shell_output("#{Formula["pkg-config"].opt_bin}/pkg-config --cflags --libs gtksourceview-5").strip.split
system ENV.cc, "test.c", "-o", "test", *flags

pkg_config_cflags = shell_output("pkg-config --cflags --libs gtksourceview-5").chomp.split
system ENV.cc, "test.c", *pkg_config_cflags, "-o", "test"
system "./test"
end
end

0 comments on commit 3d89cd7

Please sign in to comment.