75 lines
2.4 KiB
Ruby
75 lines
2.4 KiB
Ruby
class Goffice < Formula
|
|
desc "Gnumeric spreadsheet program"
|
|
homepage "https://developer.gnome.org/goffice/"
|
|
url "https://download.gnome.org/sources/goffice/0.10/goffice-0.10.48.tar.xz"
|
|
sha256 "a439162fa26a0e58117e07b82b37000a7f421088ad379eb1f6a1cdee101ecefc"
|
|
license any_of: ["GPL-3.0-only", "GPL-2.0-only"]
|
|
|
|
bottle do
|
|
sha256 arm64_big_sur: "b29f128d789d1399cb06fc284981d690a039ddeaa709bb15ac5f93483e3609f4"
|
|
sha256 big_sur: "314d34ff359e1d6eb5d5935ac6e2778b47e360e6e13a6c3b98f99b7071e4c961"
|
|
sha256 catalina: "3e05167a37c42bfa01acf4be7055a52e3c2a03c990536ae5562b2c0aa4812e42"
|
|
sha256 mojave: "9edf36fd2ffb0a116e4e5f69cd00a04dd29eda04c1a3069b0e4da8950573c0a4"
|
|
sha256 high_sierra: "7043808e39862444e7aaae796137b30fadefb142dea291f9d8ce23228d635264"
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/GNOME/goffice.git"
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "gtk-doc" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "intltool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "atk"
|
|
depends_on "cairo"
|
|
depends_on "gdk-pixbuf"
|
|
depends_on "gettext"
|
|
depends_on "gtk+3"
|
|
depends_on "libgsf"
|
|
depends_on "librsvg"
|
|
depends_on "pango"
|
|
depends_on "pcre"
|
|
|
|
uses_from_macos "libxslt"
|
|
|
|
def install
|
|
args = %W[--disable-dependency-tracking --prefix=#{prefix}]
|
|
if build.head?
|
|
system "./autogen.sh", *args
|
|
else
|
|
system "./configure", *args
|
|
end
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <goffice/goffice.h>
|
|
int main()
|
|
{
|
|
void
|
|
libgoffice_init (void);
|
|
void
|
|
libgoffice_shutdown (void);
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cc, "-I#{include}/libgoffice-0.10",
|
|
"-I#{Formula["glib"].opt_include}/glib-2.0",
|
|
"-I#{Formula["glib"].opt_lib}/glib-2.0/include",
|
|
"-I#{Formula["harfbuzz"].opt_include}/harfbuzz",
|
|
"-I#{Formula["libgsf"].opt_include}/libgsf-1",
|
|
"-I#{MacOS.sdk_path}/usr/include/libxml2",
|
|
"-I#{Formula["gtk+3"].opt_include}/gtk-3.0",
|
|
"-I#{Formula["pango"].opt_include}/pango-1.0",
|
|
"-I#{Formula["cairo"].opt_include}/cairo",
|
|
"-I#{Formula["gdk-pixbuf"].opt_include}/gdk-pixbuf-2.0",
|
|
"-I#{Formula["atk"].opt_include}/atk-1.0",
|
|
testpath/"test.c", "-o", testpath/"test"
|
|
system "./test"
|
|
end
|
|
end
|