From c889afd939133389eee857044b9d96c36a1ce274 Mon Sep 17 00:00:00 2001 From: Yoshitaka Moriwaki Date: Tue, 17 Dec 2024 17:12:52 +0900 Subject: [PATCH] Coot 1.1.11 rev. 1 (#1962) --- Formula/coot.rb | 16 +++--- Formula/gtk4@4.14.rb | 119 ------------------------------------------- 2 files changed, 6 insertions(+), 129 deletions(-) delete mode 100644 Formula/gtk4@4.14.rb diff --git a/Formula/coot.rb b/Formula/coot.rb index 0f80af494..c4ce7c37f 100644 --- a/Formula/coot.rb +++ b/Formula/coot.rb @@ -4,6 +4,7 @@ class Coot < Formula url "https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/releases/coot-1.1.11.tar.gz" sha256 "6fd2b5a2d1bad5bdeebdb030b552b800df28c0c03608334fe69725379da8eec0" license any_of: ["GPL-3.0-only", "LGPL-3.0-only", "GPL-2.0-or-later"] + revision 1 bottle do root_url "https://ghcr.io/v2/brewsci/bio" @@ -28,7 +29,6 @@ class Coot < Formula depends_on "boost-python3" depends_on "brewsci/bio/clipper4coot" depends_on "brewsci/bio/gemmi" - depends_on "brewsci/bio/gtk4@4.14" depends_on "brewsci/bio/libccp4" depends_on "brewsci/bio/mmdb2" depends_on "brewsci/bio/raster3d" @@ -43,6 +43,7 @@ class Coot < Formula depends_on "gmp" depends_on "graphene" depends_on "gsl" + depends_on "gtk4" depends_on "harfbuzz" depends_on "libepoxy" depends_on "libpng" @@ -51,7 +52,7 @@ class Coot < Formula depends_on "pango" depends_on "py3cairo" depends_on "pygobject3" - depends_on "python@3.13" + depends_on "python@3.12" depends_on "rdkit" depends_on "sqlite" @@ -74,7 +75,7 @@ class Coot < Formula end def python3 - "python3.13" + "python3.12" end def install @@ -98,7 +99,7 @@ def install # Set Boost, RDKit, and FFTW2 root boost_prefix = Formula["boost"].opt_prefix - boost_python_lib = "boost_python312-mt" + boost_python_lib = "boost_python312" rdkit_prefix = Formula["rdkit"].opt_prefix fftw2_prefix = Formula["clipper4coot"].opt_prefix/"fftw2" @@ -114,15 +115,10 @@ def install --with-backward --with-libdw BOOST_PYTHON_LIB=#{boost_python_lib} + PYTHON=#{python3} ] ENV.append_to_cflags "-fPIC" if OS.linux? - # Use libcoordgen instead of RDKitcoordgen - inreplace "configure", "RDKitcoordgen", "coordgen" - # patch - inreplace "src/key-bindings.cc", - "PyObject *result_py = PyEval_CallObject(function_py, arg_list);", - "PyObject *result_py = PyObject_Call(function_py, arg_list, nullptr);" system "./configure", *args system "make" ENV.deparallelize { system "make", "install" } diff --git a/Formula/gtk4@4.14.rb b/Formula/gtk4@4.14.rb deleted file mode 100644 index 45d1133c7..000000000 --- a/Formula/gtk4@4.14.rb +++ /dev/null @@ -1,119 +0,0 @@ -class Gtk4AT414 < Formula - desc "Toolkit for creating graphical user interfaces" - homepage "https://gtk.org/" - url "https://download.gnome.org/sources/gtk/4.14/gtk-4.14.5.tar.xz" - sha256 "5547f2b9f006b133993e070b87c17804e051efda3913feaca1108fa2be41e24d" - license "LGPL-2.1-or-later" - - livecheck do - url :stable - regex(/gtk[._-](4\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) - end - - bottle do - root_url "https://ghcr.io/v2/brewsci/bio" - sha256 arm64_sequoia: "0f7ad6845e7f25b6d69bd185b5dd586a344a743029324a8a695ebb05fc809b74" - sha256 arm64_sonoma: "8b5db42d59a9296b73b11b8d98803f4432f9ee2c17805ccc3de839c340338296" - sha256 ventura: "59178fac56566748b4e0ea8c1aaba45eca62638b91bef29f93affcbcdc8535d3" - sha256 x86_64_linux: "ac87b20522507f8b766a1c0854116ef96e376977713112683cdf816e5e808643" - end - - keg_only "provided by Homebrew core" - - depends_on "docbook" => :build - depends_on "docbook-xsl" => :build - depends_on "docutils" => :build - 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 "sassc" => :build - depends_on "cairo" - depends_on "fontconfig" - depends_on "fribidi" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "graphene" - depends_on "harfbuzz" - depends_on "hicolor-icon-theme" - depends_on "jpeg-turbo" - depends_on "libepoxy" - depends_on "libpng" - depends_on "libtiff" - depends_on "pango" - - uses_from_macos "libxslt" => :build # for xsltproc - uses_from_macos "cups" - - on_macos do - depends_on "gettext" - end - - on_linux do - depends_on "libx11" - depends_on "libxcursor" - depends_on "libxdamage" - depends_on "libxext" - depends_on "libxfixes" - depends_on "libxi" - depends_on "libxinerama" - depends_on "libxkbcommon" - depends_on "libxrandr" - depends_on "wayland" - end - - def install - args = %w[ - -Dgtk_doc=false - -Dman-pages=true - -Dintrospection=enabled - -Dbuild-examples=false - -Dbuild-tests=false - -Dmedia-gstreamer=disabled - -Dvulkan=disabled - ] - - if OS.mac? - args << "-Dx11-backend=false" - args << "-Dmacos-backend=true" - args << "-Dprint-cups=disabled" if MacOS.version <= :mojave - end - - # ensure that we don't run the meson post install script - ENV["DESTDIR"] = "/" - - # Find our docbook catalog - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - # Disable asserts and cast checks explicitly - ENV.append "CPPFLAGS", "-DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS" - - system "meson", "setup", "build", *args, *std_meson_args - system "meson", "compile", "-C", "build", "--verbose" - system "meson", "install", "-C", "build" - end - - def post_install - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - system bin/"gtk4-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - system "#{Formula["glib"].opt_bin}/gio-querymodules", "#{HOMEBREW_PREFIX}/lib/gtk-4.0/4.0.0/printbackends" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gtk_disable_setlocale(); - return 0; - } - EOS - - flags = shell_output("#{Formula["pkg-config"].opt_bin}/pkg-config --cflags --libs gtk4").strip.split - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - # include a version check for the pkg-config files - assert_match version.to_s, shell_output("cat #{lib}/pkgconfig/gtk4.pc").strip - end -end