homebrew-core/Formula/gnome-recipes.rb
2017-06-24 00:32:23 -07:00

48 lines
1.6 KiB
Ruby

class GnomeRecipes < Formula
desc "Formula for GNOME recipes"
homepage "https://wiki.gnome.org/Apps/Recipes"
url "https://download.gnome.org/sources/gnome-recipes/1.4/gnome-recipes-1.4.6.tar.xz"
sha256 "792585df5cb77ee670ca9eb8e6b0fceb823fe092805c026466f01d153f3e9833"
bottle do
sha256 "5010150333537fad3d944ea98abe521a9da2e8221f925ce483ef0f5dd348d398" => :sierra
sha256 "0701055fc5b1a04f542802f473b1ecc9bf1b273da8c92f16424ecff3e03ece8f" => :el_capitan
sha256 "b1950505198a444cbe2b3f1a54c2115922d174e645962f8f4d766888884e4a8e" => :yosemite
end
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "itstool" => :build
depends_on :python3 => :build
depends_on "gtk+3"
depends_on "gnome-icon-theme"
depends_on "libcanberra"
depends_on "gnome-autoar"
depends_on "gspell"
depends_on "libsoup"
depends_on "gnu-tar"
def install
# BSD tar does not support the required options
inreplace "src/gr-recipe-store.c", "argv[0] = \"tar\";", "argv[0] = \"gtar\";"
# stop meson_post_install.py from doing what needs to be done in the post_install step
ENV["DESTDIR"] = ""
ENV.delete "PYTHONPATH"
mkdir "build" do
system "meson", "--prefix=#{prefix}", ".."
system "ninja"
system "ninja", "test"
system "ninja", "install"
end
end
def post_install
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor"
end
test do
system "#{bin}/gnome-recipes", "--help"
end
end