From 9650eff58dc1055eb73aa8e7fbb5c6f7c43f09f4 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Fri, 17 Nov 2023 10:22:52 -0500 Subject: [PATCH] at-spi2-core 2.50.0 * Enable building on macOS * Remove specific Python and let `meson` use current interpreter * Merge `atk` and `atk-spi2-atk` into `at-spi2-core` --- Formula/a/at-spi2-atk.rb | 91 --------------------------------------- Formula/a/at-spi2-core.rb | 8 ++-- Formula/a/atk.rb | 47 -------------------- formula_renames.json | 4 +- 4 files changed, 7 insertions(+), 143 deletions(-) delete mode 100644 Formula/a/at-spi2-atk.rb delete mode 100644 Formula/a/atk.rb diff --git a/Formula/a/at-spi2-atk.rb b/Formula/a/at-spi2-atk.rb deleted file mode 100644 index c743ef2b8ef70..0000000000000 --- a/Formula/a/at-spi2-atk.rb +++ /dev/null @@ -1,91 +0,0 @@ -class AtSpi2Atk < Formula - desc "Accessibility Toolkit GTK+ module" - homepage "https://www.freedesktop.org/wiki/Accessibility/AT-SPI2" - url "https://download.gnome.org/sources/at-spi2-atk/2.38/at-spi2-atk-2.38.0.tar.xz" - sha256 "cfa008a5af822b36ae6287f18182c40c91dd699c55faa38605881ed175ca464f" - license "LGPL-2.1-or-later" - - bottle do - sha256 x86_64_linux: "f68be9dbb59804bc1f6de1615def3c73bf3b7d994e94844e521806cd5331686d" - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => [:build, :test] - depends_on "python@3.11" => :build - depends_on "at-spi2-core" - depends_on "atk" - depends_on "libxml2" - depends_on :linux - - def install - ENV.refurbish_args - - mkdir "build" do - system "meson", "--prefix=#{prefix}", "--libdir=#{lib}", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - #include - #include - - static AtkObject *root_accessible; - static GMainLoop *mainloop; - static gchar *tdata_path = NULL; - - AtkObject * test_get_root (void) { - return root_accessible; - } - - static AtkObject * get_root (void) { - return test_get_root (); - } - - const gchar * get_toolkit_name (void) { - return strdup ("atspitesting-toolkit"); - } - - static void setup_atk_util (void) { - AtkUtilClass *klass; - - klass = g_type_class_ref (ATK_TYPE_UTIL); - klass->get_root = get_root; - klass->get_toolkit_name = get_toolkit_name; - g_type_class_unref (klass); - } - - static GOptionEntry optentries[] = { - {"test-data-file", 0, 0, G_OPTION_ARG_STRING, &tdata_path, "Path to file of test data", NULL}, - {NULL} - }; - - int main (int argc, char *argv[]) { - GOptionContext *opt; - GError *err = NULL; - opt = g_option_context_new (NULL); - g_option_context_add_main_entries (opt, optentries, NULL); - g_option_context_set_ignore_unknown_options (opt, TRUE); - - if (!g_option_context_parse (opt, &argc, &argv, &err)) - g_error("Option parsing failed: %s", err->message); - - setup_atk_util (); - atk_bridge_adaptor_init (NULL, NULL); - - return 0; - } - EOS - - pkg_config_cflags = shell_output("pkg-config --cflags --libs atk-bridge-2.0 glib-2.0 atk").chomp.split - system ENV.cc, "test.c", *pkg_config_cflags, "-o", "test" - assert_match "atk_bridge_adaptor_init", shell_output("#{testpath}/test 2>&1") - end -end diff --git a/Formula/a/at-spi2-core.rb b/Formula/a/at-spi2-core.rb index 1bc7aaa2ac7ad..ccf4d6df40a88 100644 --- a/Formula/a/at-spi2-core.rb +++ b/Formula/a/at-spi2-core.rb @@ -1,8 +1,8 @@ class AtSpi2Core < Formula desc "Protocol definitions and daemon for D-Bus at-spi" homepage "https://www.freedesktop.org/wiki/Accessibility/AT-SPI2" - url "https://download.gnome.org/sources/at-spi2-core/2.44/at-spi2-core-2.44.1.tar.xz" - sha256 "4beb23270ba6cf7caf20b597354d75194d89afb69d2efcf15f4271688ba6f746" + url "https://download.gnome.org/sources/at-spi2-core/2.50/at-spi2-core-2.50.0.tar.xz" + sha256 "e9f5a8c8235c9dd963b2171de9120301129c677dde933955e1df618b949c4adc" license "LGPL-2.1-or-later" bottle do @@ -15,14 +15,14 @@ class AtSpi2Core < Formula depends_on "meson" => :build depends_on "ninja" => :build depends_on "pkg-config" => [:build, :test] - depends_on "python@3.11" => :build depends_on "dbus" depends_on "glib" depends_on "libx11" depends_on "libxtst" - depends_on :linux depends_on "xorgproto" + uses_from_macos "libxml2" + def install system "meson", "setup", "build", *std_meson_args system "meson", "compile", "-C", "build", "--verbose" diff --git a/Formula/a/atk.rb b/Formula/a/atk.rb deleted file mode 100644 index 1ef06c454bcd0..0000000000000 --- a/Formula/a/atk.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Atk < Formula - desc "GNOME accessibility toolkit" - homepage "https://library.gnome.org/devel/atk/" - url "https://download.gnome.org/sources/atk/2.38/atk-2.38.0.tar.xz" - sha256 "ac4de2a4ef4bd5665052952fe169657e65e895c5057dffb3c2a810f6191a0c36" - license "GPL-2.0-or-later" - - bottle do - sha256 cellar: :any, arm64_sonoma: "d6f1e98a0e62df404790a1e52f1729f54c949e74223658cde7a206c4a17a3e6c" - sha256 cellar: :any, arm64_ventura: "8da3539576393ec7998816f209eeb3fc0b681264ffe722613de22258562b2d44" - sha256 cellar: :any, arm64_monterey: "078fba0fd9c27175313b3232fdf2fe36e72a19e1efdef97a3c622d23869313c4" - sha256 cellar: :any, arm64_big_sur: "97a4d14824805cdd1c6b9bdee415e3420bfd54beab814d343648395fcc684f69" - sha256 cellar: :any, sonoma: "40db70252e2688ce862b4520aa7e87884e8604aa3554b3ffc0728f2dc207ce85" - sha256 cellar: :any, ventura: "cf252eac8fce14498f6ded793c6f650329872992e090fe6b45861388854ab452" - sha256 cellar: :any, monterey: "faca1ff938b34b23e284321d8037673f270030aae0c7ea8b44f8a4088c8e9ab5" - sha256 cellar: :any, big_sur: "254605e7c9a5f95f7e1aaec2d58e60c8cdaf4fde910e92a0a032938cb98efc57" - sha256 cellar: :any, catalina: "048076e890b1b184892bd58f1059f701a1665ac378f5e1431ae681210ae28b0c" - sha256 x86_64_linux: "4ffb42482b22fe9150193395fc3fc0a41d1f92e3a8c0aa7e9dd17aaef8ff6f7c" - end - - depends_on "gettext" => :build - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => [:build, :test] - depends_on "glib" - - def install - system "meson", "setup", "build", *std_meson_args - system "meson", "compile", "-C", "build", "--verbose" - system "meson", "install", "-C", "build" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - const gchar *version = atk_get_version(); - return 0; - } - EOS - flags = shell_output("pkg-config --cflags --libs atk").chomp.split - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/formula_renames.json b/formula_renames.json index d1e29280026af..32c82e2bd8734 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -6,6 +6,8 @@ "app-engine-java-sdk": "app-engine-java", "ark": "velero", "arm": "nyx", + "at-spi2-atk": "at-spi2-core", + "atk": "at-spi2-core", "azion-cli": "azion", "aztfy": "aztfexport", "artifactory-cli-go": "jfrog-cli-go", @@ -182,4 +184,4 @@ "wxmac": "wxwidgets", "wxmac@3.0": "wxwidgets@3.0", "xu4": "scummvm" -} \ No newline at end of file +}