homebrew-core/Formula/goffice.rb
2019-10-06 11:13:27 +02:00

71 lines
2.2 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.45.tar.xz"
sha256 "702ba567e9ec0bbdd9b1a8161cd24648b4868d57a6cb89128f13c125f6f31947"
revision 2
bottle do
sha256 "73f03c21d7a54de03036261ed6da4b362bc0be1ef26f7f66898b8708e67b238c" => :catalina
sha256 "ecedd906f35ea37bcc54a5832d9ef7c11b2f833cd2999b809426b90d82053f59" => :mojave
sha256 "c692381c13217c7033954e075a643dec876f7d9d754802573f6fe88826adc7ff" => :high_sierra
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