138 lines
4.3 KiB
Ruby
138 lines
4.3 KiB
Ruby
class Gitg < Formula
|
|
desc "GNOME GUI client to view git repositories"
|
|
homepage "https://wiki.gnome.org/Apps/Gitg"
|
|
url "https://download.gnome.org/sources/gitg/3.26/gitg-3.26.0.tar.xz"
|
|
sha256 "26730d437d6a30d6e341b9e8da99d2134dce4b96022c195609f45062f82b54d5"
|
|
revision 4
|
|
|
|
bottle do
|
|
sha256 "94de505b46ca1a128743f177f48ab79da74fe5ffe6c7024c29a35b6242dcad28" => :mojave
|
|
sha256 "cba645da392eb236781a1d0cd27016ff9bf3b8f14af4bbc517367d430435e1a9" => :high_sierra
|
|
sha256 "c1a1d0b07991fbccda16bbef128d6113be858bdcd2942c3c0bde0e6b70510e5e" => :sierra
|
|
sha256 "8f5741a6c698eea4b46b9996a4a8f69072dc2e66e9a1a37eb6a7eeac4268b501" => :el_capitan
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "vala" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "gtksourceview3"
|
|
depends_on "gobject-introspection"
|
|
depends_on "libgit2"
|
|
depends_on "libgit2-glib"
|
|
depends_on "gsettings-desktop-schemas"
|
|
depends_on "libgee"
|
|
depends_on "json-glib"
|
|
depends_on "libsecret"
|
|
depends_on "libpeas"
|
|
depends_on "libsoup"
|
|
depends_on "gtkspell3"
|
|
depends_on "hicolor-icon-theme"
|
|
depends_on "adwaita-icon-theme"
|
|
|
|
def install
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}",
|
|
"--disable-schemas-compile",
|
|
"--disable-python"
|
|
system "make", "install"
|
|
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
|
|
# test executable
|
|
assert_match version.to_s, shell_output("#{bin}/gitg --version")
|
|
# test API
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <libgitg/libgitg.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
GType gtype = gitg_stage_status_file_get_type();
|
|
return 0;
|
|
}
|
|
EOS
|
|
atk = Formula["atk"]
|
|
cairo = Formula["cairo"]
|
|
fontconfig = Formula["fontconfig"]
|
|
freetype = Formula["freetype"]
|
|
gdk_pixbuf = Formula["gdk-pixbuf"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
gobject_introspection = Formula["gobject-introspection"]
|
|
gtkx3 = Formula["gtk+3"]
|
|
harfbuzz = Formula["harfbuzz"]
|
|
libepoxy = Formula["libepoxy"]
|
|
libffi = Formula["libffi"]
|
|
libgee = Formula["libgee"]
|
|
libgit2 = Formula["libgit2-glib"].opt_libexec/"libgit2"
|
|
libgit2_glib = Formula["libgit2-glib"]
|
|
libpng = Formula["libpng"]
|
|
libsoup = Formula["libsoup"]
|
|
pango = Formula["pango"]
|
|
pixman = Formula["pixman"]
|
|
flags = %W[
|
|
-I#{atk.opt_include}/atk-1.0
|
|
-I#{cairo.opt_include}/cairo
|
|
-I#{fontconfig.opt_include}
|
|
-I#{freetype.opt_include}/freetype2
|
|
-I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/gio-unix-2.0/
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{gobject_introspection.opt_include}/gobject-introspection-1.0
|
|
-I#{gtkx3.opt_include}/gtk-3.0
|
|
-I#{harfbuzz.opt_include}/harfbuzz
|
|
-I#{include}/libgitg-1.0
|
|
-I#{libepoxy.opt_include}
|
|
-I#{libgee.opt_include}/gee-0.8
|
|
-I#{libffi.opt_lib}/libffi-3.0.13/include
|
|
-I#{libgit2}/include
|
|
-I#{libgit2_glib.opt_include}/libgit2-glib-1.0
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{libsoup.opt_include}/libsoup-2.4
|
|
-I#{pango.opt_include}/pango-1.0
|
|
-I#{pixman.opt_include}/pixman-1
|
|
-DGIT_SSH=1
|
|
-D_REENTRANT
|
|
-L#{atk.opt_lib}
|
|
-L#{cairo.opt_lib}
|
|
-L#{gdk_pixbuf.opt_lib}
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{gobject_introspection.opt_lib}
|
|
-L#{gtkx3.opt_lib}
|
|
-L#{libgee.opt_lib}
|
|
-L#{libgit2}/lib
|
|
-L#{libgit2_glib.opt_lib}
|
|
-L#{libsoup.opt_lib}
|
|
-L#{lib}
|
|
-L#{pango.opt_lib}
|
|
-latk-1.0
|
|
-lcairo
|
|
-lcairo-gobject
|
|
-lgdk-3
|
|
-lgdk_pixbuf-2.0
|
|
-lgio-2.0
|
|
-lgirepository-1.0
|
|
-lgit2
|
|
-lgit2-glib-1.0
|
|
-lgitg-1.0
|
|
-lglib-2.0
|
|
-lgmodule-2.0
|
|
-lgobject-2.0
|
|
-lgthread-2.0
|
|
-lgtk-3
|
|
-lintl
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|