75 lines
2.6 KiB
Ruby
75 lines
2.6 KiB
Ruby
class Gnumeric < Formula
|
|
desc "GNOME Spreadsheet Application"
|
|
homepage "https://projects.gnome.org/gnumeric/"
|
|
url "https://download.gnome.org/sources/gnumeric/1.12/gnumeric-1.12.51.tar.xz"
|
|
sha256 "a00e6c6e4ecddadabd9b0ae18013d7b05937fdcb8f9aad5a73b95923c7aeb1dd"
|
|
license any_of: ["GPL-3.0-only", "GPL-2.0-only"]
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "a7aa880fff06e3155e9c98d5e1f86af47ce0943d7473b55f6b5d3cfae913322e"
|
|
sha256 arm64_big_sur: "bc9ad2a9bff41478d87c19db3b4914e9b4726fb9c2673ef5aedb6d18b285f150"
|
|
sha256 monterey: "3b43538df7a0fa49452115d616b137dfe1a6632c5966e7884300214c4640d19d"
|
|
sha256 big_sur: "7d844f97799311e86ba0925d15284f25226daa7fe13df2492ee54cd5cfda6030"
|
|
sha256 catalina: "9b996c26bd8539c594d0bb2ce9df92d47f44200dec0e4a6ce8b922f3c59b19f9"
|
|
sha256 x86_64_linux: "ae8b64be5c288adcad39186a2795728637f5c703ff886805f441add41902c7dc"
|
|
end
|
|
|
|
depends_on "intltool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "adwaita-icon-theme"
|
|
depends_on "gettext"
|
|
depends_on "goffice"
|
|
depends_on "itstool"
|
|
depends_on "libxml2"
|
|
depends_on "rarian"
|
|
|
|
uses_from_macos "bison"
|
|
|
|
on_linux do
|
|
depends_on "perl"
|
|
|
|
resource "XML::Parser" do
|
|
url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz"
|
|
sha256 "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216"
|
|
end
|
|
end
|
|
|
|
# Fix -flat_namespace being used on Big Sur and later.
|
|
patch do
|
|
url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
|
|
sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
|
|
end
|
|
|
|
def install
|
|
if OS.linux?
|
|
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
|
|
|
|
resources.each do |res|
|
|
res.stage do
|
|
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
|
|
system "make", "PERL5LIB=#{ENV["PERL5LIB"]}"
|
|
system "make", "install"
|
|
end
|
|
end
|
|
end
|
|
|
|
# ensures that the files remain within the keg
|
|
inreplace "component/Makefile.in",
|
|
"GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@",
|
|
"GOFFICE_PLUGINS_DIR = @libdir@/goffice/@GOFFICE_API_VER@/plugins/gnumeric"
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--disable-schemas-compile"
|
|
system "make", "install"
|
|
end
|
|
|
|
def post_install
|
|
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
|
|
end
|
|
|
|
test do
|
|
system bin/"gnumeric", "--version"
|
|
end
|
|
end
|