1 class Gwyddion < Formula
2 desc "Scanning Probe Microscopy visualization and analysis tool"
3 homepage "http://gwyddion.net/"
4 url "https://downloads.sourceforge.net/project/gwyddion/gwyddion/2.67/gwyddion-2.67.tar.xz"
5 sha256 "90aeaf4de00373696b0bef4a82ac45b6287ad9c7b7aca6249068d4d2a4fc8d61"
6 license "GPL-2.0-or-later"
9 url "http://gwyddion.net/download.php"
10 regex(/stable version Gwyddion v?(\d+(?:\.\d+)+):/i)
14 sha256 arm64_sonoma: "f3a7df065714d9c58d08ce3d3527fe746c16372ce5f0e040098743a9f45969f1"
15 sha256 arm64_ventura: "dd772a7ad26e9f44004dda1f022ee8ec726811405b9b2d88236271aaaae083d6"
16 sha256 sonoma: "19960f4fc6681f9fee0fdd3b97ea90c90d764002d2dd8827923e99529e7f2dc4"
17 sha256 ventura: "644304817377de3c31996e105a4281bddb17da1ec24e1752649772eed70e2265"
18 sha256 x86_64_linux: "763473cb225de5e11dd37aa9af6669daab6deafb30c4cafdc6d27e8fa0a18f0c"
21 depends_on "pkgconf" => [:build, :test]
24 depends_on "gdk-pixbuf"
33 uses_from_macos "bzip2"
34 uses_from_macos "zlib"
37 # Regenerate autoconf files to avoid flat namespace in library
38 # (autoreconf runs gtkdocize, provided by gtk-doc)
39 depends_on "autoconf" => :build
40 depends_on "automake" => :build
41 depends_on "gtk-doc" => :build
42 depends_on "libtool" => :build
43 # TODO: depends_on "gtk-mac-integration"
44 depends_on "at-spi2-core"
50 system "autoreconf", "--force", "--install", "--verbose" if OS.mac?
51 system "./configure", "--disable-desktop-file-update",
53 "--disable-silent-rules",
54 "--with-html-dir=#{doc}",
55 "--without-gtksourceview",
57 system "make", "install"
61 system bin/"gwyddion", "--version"
62 (testpath/"test.c").write <<~C
63 #include <libgwyddion/gwyddion.h>
65 int main(int argc, char *argv[]) {
66 const gchar *string = gwy_version_string();
71 flags = shell_output("pkgconf --cflags --libs gwyddion").chomp.split
72 system ENV.cc, "test.c", "-o", "test", *flags