68 lines
2.2 KiB
Ruby
68 lines
2.2 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.50.tar.xz"
|
|
sha256 "758819ba1bd6983829f9e7c6d71a7fa20cd75a3652a271e5bb003d5d8bcc14b8"
|
|
license any_of: ["GPL-3.0-only", "GPL-2.0-only"]
|
|
|
|
bottle do
|
|
sha256 arm64_big_sur: "e35e87954fd36d10ba7d5eb67eb55cda22480501b0244d11d73227efac32eb84"
|
|
sha256 big_sur: "308986adac6fc8ee0439f78fc88b3800dec488f3c19059e188d7b89703976517"
|
|
sha256 catalina: "c6629015a88979e534383df04b19b371e4f579670538abd057159371d769d9f6"
|
|
sha256 mojave: "783045a4b518267f8dad893ba2768701065af8d3f170d37cb2ae1658d96d5474"
|
|
sha256 x86_64_linux: "8028a3a6bdad2a160df06aad38c2476a61a448879764cc8311e896d888c7e20f"
|
|
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
|
|
|
|
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
|