Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / g / gtkmm4.rb
bloba3e3f196d7588060ca22513ca75fad5eb6d4a51d
1 class Gtkmm4 < Formula
2   desc "C++ interfaces for GTK+ and GNOME"
3   homepage "https://www.gtkmm.org/"
4   url "https://download.gnome.org/sources/gtkmm/4.16/gtkmm-4.16.0.tar.xz"
5   sha256 "3b23fd3abf8fb223b00e9983b6010af2db80e38c89ab6994b8b6230aa85d60f9"
6   license "LGPL-2.1-or-later"
8   livecheck do
9     url :stable
10     regex(/gtkmm[._-]v?(4\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i)
11   end
13   bottle do
14     sha256 cellar: :any, arm64_sequoia:  "bd3991a723f1108bbe0cf033506a3918f15f1b7da5e7791470da2f45eeb572fc"
15     sha256 cellar: :any, arm64_sonoma:   "d92d243a596afaa4fab46c97b1fa9a89c086dbcdfadf39e14fc5898aece8a98f"
16     sha256 cellar: :any, arm64_ventura:  "e3a57fe48dbfd939d9e44878544fb3c83a1572ab75e4d6601f8b4e9568134bb6"
17     sha256 cellar: :any, arm64_monterey: "ec886eb0fdc1180aa44208b97cd9ebb82e6d695636769405b856202bd9a5b6dd"
18     sha256 cellar: :any, sonoma:         "39e1872ac9508ec896fbe3ea8b218fe1da4c267b4e59854c97712052bb64a4d1"
19     sha256 cellar: :any, ventura:        "b97aecb02be2d10378973c2fadf863c5fb317fe6ec00a1eda6b724c696330c78"
20     sha256 cellar: :any, monterey:       "3dbe629e2111f32747c953a323c2370037176c8f2da3f5a1814bdce7bcf4f41a"
21     sha256               x86_64_linux:   "25be1257147ef191213595efd59df59a5cd72d4dd5645e5305d2a82901e7a6d2"
22   end
24   depends_on "meson" => :build
25   depends_on "ninja" => :build
26   depends_on "pkgconf" => [:build, :test]
28   depends_on "cairo"
29   depends_on "cairomm"
30   depends_on "gdk-pixbuf"
31   depends_on "glib"
32   depends_on "glibmm"
33   depends_on "graphene"
34   depends_on "gtk4"
35   depends_on "libsigc++"
36   depends_on "pangomm"
38   def install
39     system "meson", "setup", "build", *std_meson_args
40     system "meson", "compile", "-C", "build", "--verbose"
41     system "meson", "install", "-C", "build"
42   end
44   test do
45     (testpath/"test.cpp").write <<~CPP
46       #include <gtkmm.h>
48       class MyLabel : public Gtk::Label {
49         MyLabel(Glib::ustring text) : Gtk::Label(text) {}
50       };
51       int main(int argc, char *argv[]) {
52         return 0;
53       }
54     CPP
56     flags = shell_output("pkgconf --cflags --libs gtkmm-4.0").chomp.split
57     system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags
58     system "./test"
59   end
60 end