Skip to content

Commit 9574767

Browse files
committed
blueprint-compiler 0.16.0 (new formula)
1 parent 3d677de commit 9574767

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Formula/b/blueprint-compiler.rb

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
class BlueprintCompiler < Formula
2+
desc "Markup language and compiler for GTK 4 user interfaces"
3+
homepage "https://gnome.pages.gitlab.gnome.org/blueprint-compiler/"
4+
url "https://gitlab.gnome.org/GNOME/blueprint-compiler.git",
5+
tag: "v0.16.0",
6+
revision: "04ef0944db56ab01307a29aaa7303df6067cb3c0"
7+
license "LGPL-3.0-or-later"
8+
head "https://gitlab.gnome.org/GNOME/blueprint-compiler.git", branch: "main"
9+
10+
depends_on "meson" => :build
11+
depends_on "ninja" => :build
12+
13+
depends_on "gtk4"
14+
depends_on "pygobject3"
15+
16+
def install
17+
system "meson", "setup", "build", *std_meson_args
18+
system "meson", "compile", "-C", "build", "--verbose"
19+
system "meson", "install", "-C", "build"
20+
end
21+
22+
test do
23+
(testpath/"test.blp").write <<~BLUEPRINT
24+
using Gtk 4.0;
25+
26+
template $MyAppWindow: ApplicationWindow {
27+
default-width: 600;
28+
default-height: 300;
29+
title: _("Hello, Blueprint!");
30+
31+
[titlebar]
32+
HeaderBar {}
33+
34+
Label {
35+
label: bind template.main_text;
36+
}
37+
}
38+
BLUEPRINT
39+
output = shell_output("#{bin}/blueprint-compiler compile #{testpath}/test.blp")
40+
assert_match "Hello, Blueprint!", output
41+
end
42+
end

0 commit comments

Comments
 (0)