71 lines
2.4 KiB
Ruby
71 lines
2.4 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.43.tar.xz"
|
|
sha256 "87c9abd6260cf29401fa1e0fcce374e8c7bcd1986608e4049f6037c9d32b5fd5"
|
|
|
|
bottle do
|
|
sha256 "f4a007bcb9422d69d6217c08f9af877ed61cdf51d919fc88eb6d905c1aedaf3f" => :high_sierra
|
|
sha256 "d7db9d5d98fb58473c411d22683e8de5e73fe6e965dae5bdbd8d3fd243a59826" => :sierra
|
|
sha256 "c987c86ec64c80322d7f602234ca1e3e144889bf72d6144f9d1b5ffa76879ec8" => :el_capitan
|
|
end
|
|
|
|
option "with-python-scripting", "Enable Python scripting."
|
|
|
|
deprecated_option "python-scripting" => "with-python-scripting"
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "gettext"
|
|
depends_on "goffice"
|
|
depends_on "rarian"
|
|
depends_on "adwaita-icon-theme"
|
|
depends_on "pygobject" if build.with? "python-scripting"
|
|
|
|
# Issue from 26 Nov 2017 "itstool-2.0.4: problem with gnumeric-1.12.35"
|
|
# See https://github.com/itstool/itstool/issues/22
|
|
resource "itstool" do
|
|
url "http://files.itstool.org/itstool/itstool-2.0.2.tar.bz2"
|
|
sha256 "bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a"
|
|
end
|
|
|
|
# For itstool
|
|
resource "py_libxml2" do
|
|
url "http://xmlsoft.org/sources/libxml2-2.9.7.tar.gz"
|
|
sha256 "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c"
|
|
end
|
|
|
|
def install
|
|
resource("py_libxml2").stage do
|
|
cd "python" do
|
|
system "python", "setup.py", "install", "--prefix=#{buildpath}/vendor"
|
|
end
|
|
end
|
|
|
|
resource("itstool").stage do
|
|
ENV.append_path "PYTHONPATH", "#{buildpath}/vendor/lib/python2.7/site-packages"
|
|
system "./configure", "--prefix=#{buildpath}/vendor"
|
|
system "make", "install"
|
|
end
|
|
|
|
ENV.prepend_path "PATH", buildpath/"vendor/bin"
|
|
|
|
# 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
|