[gitg] Add tools to build on OS X
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Add tools to build on OS X
- Date: Wed, 30 Dec 2015 10:22:42 +0000 (UTC)
commit 75aeb293f81332dc371e725fd51feb41a6eeb455
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Wed Dec 30 00:00:35 2015 +0100
Add tools to build on OS X
osx/Taps/gitg/atk.rb | 50 +++++++
osx/Taps/gitg/cairo.rb | 118 +++++++++++++++
osx/Taps/gitg/gdk-pixbuf.rb | 61 ++++++++
osx/Taps/gitg/gitg.rb | 45 ++++++
osx/Taps/gitg/glib-networking.rb | 64 ++++++++
osx/Taps/gitg/gnome-icon-theme.rb | 29 ++++
osx/Taps/gitg/gobject-introspection.rb | 44 ++++++
osx/Taps/gitg/gsettings-desktop-schemas.rb | 39 +++++
osx/Taps/gitg/gtk+3.rb | 221 ++++++++++++++++++++++++++++
osx/Taps/gitg/gtksourceview3.rb | 169 +++++++++++++++++++++
osx/Taps/gitg/gtkspell3.rb | 86 +++++++++++
osx/Taps/gitg/harfbuzz.rb | 55 +++++++
osx/Taps/gitg/libgee.rb | 53 +++++++
osx/Taps/gitg/libgit2-glib.rb | 48 ++++++
osx/Taps/gitg/libpeas.rb | 85 +++++++++++
osx/Taps/gitg/librsvg.rb | 91 ++++++++++++
osx/Taps/gitg/libsecret.rb | 73 +++++++++
osx/Taps/gitg/libsoup.rb | 65 ++++++++
osx/Taps/gitg/pango.rb | 101 +++++++++++++
osx/data/Gitg.icns | Bin 0 -> 405670 bytes
osx/data/Gitg.iconset/icon_128x128.png | Bin 0 -> 8171 bytes
osx/data/Gitg.iconset/icon_128x128 2x png | Bin 0 -> 20169 bytes
osx/data/Gitg.iconset/icon_16x16.png | Bin 0 -> 943 bytes
osx/data/Gitg.iconset/icon_16x16 2x png | Bin 0 -> 2061 bytes
osx/data/Gitg.iconset/icon_256x256.png | Bin 0 -> 20169 bytes
osx/data/Gitg.iconset/icon_256x256 2x png | Bin 0 -> 41218 bytes
osx/data/Gitg.iconset/icon_32x32.png | Bin 0 -> 2061 bytes
osx/data/Gitg.iconset/icon_32x32 2x png | Bin 0 -> 3763 bytes
osx/data/Gitg.iconset/icon_512x512.png | Bin 0 -> 41218 bytes
osx/data/Gitg.iconset/icon_512x512 2x png | Bin 0 -> 104827 bytes
osx/data/Gitg.iconset/icon_64x64.png | Bin 0 -> 3763 bytes
osx/data/Gitg.iconset/icon_64x64 2x png | Bin 0 -> 8171 bytes
osx/scripts/brew.rb | 58 +++++++
osx/scripts/build | 37 +++++
osx/scripts/env | 12 ++
osx/scripts/lbrew | 9 +
36 files changed, 1613 insertions(+), 0 deletions(-)
---
diff --git a/osx/Taps/gitg/atk.rb b/osx/Taps/gitg/atk.rb
new file mode 100644
index 0000000..6fde5d1
--- /dev/null
+++ b/osx/Taps/gitg/atk.rb
@@ -0,0 +1,50 @@
+class Atk < Formula
+ desc "GNOME accessibility toolkit"
+ homepage "https://library.gnome.org/devel/atk/"
+ url "https://download.gnome.org/sources/atk/2.16/atk-2.16.0.tar.xz"
+ sha256 "095f986060a6a0b22eb15eef84ae9f14a1cf8082488faa6886d94c37438ae562"
+
+ depends_on "pkg-config" => :build
+ depends_on "glib"
+ depends_on "gnome/gitg/gobject-introspection"
+
+ option :universal
+
+ def install
+ ENV.universal_binary if build.universal?
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--enable-introspection=yes"
+ system "make"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <atk/atk.h>
+
+ int main(int argc, char *argv[]) {
+ const gchar *version = atk_get_version();
+ return 0;
+ }
+ EOS
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{gettext.opt_include}
+ -I#{glib.opt_include}/glib-2.0
+ -I#{glib.opt_lib}/glib-2.0/include
+ -I#{include}/atk-1.0
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{lib}
+ -latk-1.0
+ -lglib-2.0
+ -lgobject-2.0
+ -lintl
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/Taps/gitg/cairo.rb b/osx/Taps/gitg/cairo.rb
new file mode 100644
index 0000000..90f9a98
--- /dev/null
+++ b/osx/Taps/gitg/cairo.rb
@@ -0,0 +1,118 @@
+class Cairo < Formula
+ desc "Vector graphics library with cross-device output support"
+ homepage "http://cairographics.org/"
+ url "http://cairographics.org/releases/cairo-1.14.4.tar.xz"
+ mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/cairo-1.14.4.tar.xz"
+ sha256 "f6ec9c7c844db9ec011f0d66b57ef590c45adf55393d1fc249003512522ee716"
+ revision 1
+ head "git://anongit.freedesktop.org/cairo"
+
+ keg_only :provided_pre_mountain_lion
+
+ option :universal
+
+ depends_on "pkg-config" => :build
+ depends_on :x11 => :optional if MacOS.version > :leopard
+ depends_on "freetype"
+ depends_on "fontconfig"
+ depends_on "libpng"
+ depends_on "pixman"
+ depends_on "glib"
+
+ patch :DATA
+
+ def install
+ ENV.universal_binary if build.universal?
+
+ args = %W[
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ --enable-gobject=yes
+ --enable-svg=yes
+ --enable-tee=yes
+ --enable-quartz-image
+ ]
+
+ if build.with? "x11"
+ args << "--enable-xcb=yes" << "--enable-xlib=yes" << "--enable-xlib-xrender=yes"
+ else
+ args << "--enable-xcb=no" << "--enable-xlib=no" << "--enable-xlib-xrender=no"
+ end
+
+ system "./configure", *args
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <cairo.h>
+
+ int main(int argc, char *argv[]) {
+
+ cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 600, 400);
+ cairo_t *context = cairo_create(surface);
+
+ return 0;
+ }
+ EOS
+ fontconfig = Formula["fontconfig"]
+ freetype = Formula["freetype"]
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ libpng = Formula["libpng"]
+ pixman = Formula["pixman"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{fontconfig.opt_include}
+ -I#{freetype.opt_include}/freetype2
+ -I#{gettext.opt_include}
+ -I#{glib.opt_include}/glib-2.0
+ -I#{glib.opt_lib}/glib-2.0/include
+ -I#{include}/cairo
+ -I#{libpng.opt_include}/libpng16
+ -I#{pixman.opt_include}/pixman-1
+ -L#{lib}
+ -lcairo
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
+__END__
+From 8c8b2b518d1a6067b7f203309bd4158de7cb78b9 Mon Sep 17 00:00:00 2001
+From: Brion Vibber <brion pobox com>
+Date: Sun, 16 Nov 2014 16:53:13 -0800
+Subject: [PATCH] Provisional fix for cairo scaling on Quartz backend
+
+CGContexts by default apply a device scaling factor, which ends up
+interfering with the device_scale that is set on cairo at higher levels
+of the stack (eg in GDK).
+
+Undoing it here makes behavior more consistent with X11, as long as the
+caller sets the device scale appropriately in cairo.
+
+See:
+* https://www.libreoffice.org/bugzilla/show_bug.cgi?id=69796
+* https://bugzilla.gnome.org/show_bug.cgi?id=740199
+---
+ src/cairo-quartz-surface.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
+index 1116ff9..f763668 100644
+--- a/src/cairo-quartz-surface.c
++++ b/src/cairo-quartz-surface.c
+@@ -2266,6 +2266,10 @@ _cairo_quartz_surface_create_internal (CGContextRef cgContext,
+ return surface;
+ }
+
++ /* Undo the default scaling transform, since we apply our own */
++ CGSize scale = CGContextConvertSizeToDeviceSpace (cgContext, CGSizeMake (1.0, 1.0));
++ CGContextScaleCTM(cgContext, 1.0 / scale.width, 1.0 / scale.height);
++
+ /* Save so we can always get back to a known-good CGContext -- this is
+ * required for proper behaviour of intersect_clip_path(NULL)
+ */
+--
+1.9.3 (Apple Git-50)
+
diff --git a/osx/Taps/gitg/gdk-pixbuf.rb b/osx/Taps/gitg/gdk-pixbuf.rb
new file mode 100644
index 0000000..e2bf586
--- /dev/null
+++ b/osx/Taps/gitg/gdk-pixbuf.rb
@@ -0,0 +1,61 @@
+class GdkPixbuf < Formula
+ desc "Toolkit for image loading and pixel buffer manipulation"
+ homepage "http://gtk.org"
+ url "https://download.gnome.org/sources/gdk-pixbuf/2.30/gdk-pixbuf-2.30.8.tar.xz"
+ sha256 "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be"
+
+ option :universal
+
+ depends_on "pkg-config" => :build
+ depends_on "glib"
+ depends_on "jpeg"
+ depends_on "libtiff"
+ depends_on "libpng"
+ depends_on "gnome/gitg/gobject-introspection"
+
+ # 'loaders.cache' must be writable by other packages
+ skip_clean "lib/gdk-pixbuf-2.0"
+
+ def install
+ ENV.universal_binary if build.universal?
+ ENV.append_to_cflags "-DGDK_PIXBUF_LIBDIR=\\\"#{HOMEBREW_PREFIX}/lib\\\""
+ system "./configure", "--disable-dependency-tracking",
+ "--disable-maintainer-mode",
+ "--enable-debug=no",
+ "--prefix=#{prefix}",
+ "--enable-introspection=yes",
+ "--disable-Bsymbolic",
+ "--without-gdiplus"
+ system "make"
+ system "make", "install"
+
+ # Other packages should use the top-level modules directory
+ # rather than dumping their files into the gdk-pixbuf keg.
+ inreplace lib/"pkgconfig/gdk-pixbuf-2.0.pc" do |s|
+ libv = s.get_make_var "gdk_pixbuf_binary_version"
+ s.change_make_var! "gdk_pixbuf_binarydir",
+ HOMEBREW_PREFIX/"lib/gdk-pixbuf-2.0"/libv
+ end
+
+ # Remove the cache. We will regenerate it in post_install
+ (lib/"gdk-pixbuf-2.0/2.10.0/loaders.cache").unlink
+ end
+
+ def post_install
+ # Change the version directory below with any future update
+ ENV["GDK_PIXBUF_MODULEDIR"]="#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders"
+ system "#{bin}/gdk-pixbuf-query-loaders", "--update-cache"
+ end
+
+ def caveats; <<-EOS.undent
+ Programs that require this module need to set the environment variable
+ export GDK_PIXBUF_MODULEDIR="#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders"
+ If you need to manually update the query loader cache, set GDK_PIXBUF_MODULEDIR then run
+ #{bin}/gdk-pixbuf-query-loaders --update-cache
+ EOS
+ end
+
+ test do
+ system bin/"gdk-pixbuf-csource", test_fixtures("test.png")
+ end
+end
diff --git a/osx/Taps/gitg/gitg.rb b/osx/Taps/gitg/gitg.rb
new file mode 100644
index 0000000..86acc3f
--- /dev/null
+++ b/osx/Taps/gitg/gitg.rb
@@ -0,0 +1,45 @@
+class Gitg < Formula
+ desc "git viewer"
+ homepage "https://projects.gnome.org/gitg/"
+ head "https://git.gnome.org/browse/gitg.git"
+
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "libtool" => :build
+ depends_on "gettext"
+ depends_on "glib"
+ depends_on "shared-mime-info"
+ depends_on "gnome/gitg/gtk+3" => "with-quartz-relocation"
+ depends_on "gnome/gitg/gtksourceview3"
+ depends_on "gnome/gitg/libsoup"
+ depends_on "gnome/gitg/libsecret"
+ depends_on "gnome/gitg/libpeas"
+ depends_on "gnome/gitg/gtkspell3"
+ depends_on "gnome/gitg/libgee"
+ depends_on "gnome/gitg/gsettings-desktop-schemas"
+ depends_on "gnome/gitg/libgit2-glib"
+ depends_on "gnome/gitg/gnome-icon-theme"
+
+ def install
+ raise "hell"
+
+ system "./autogen.sh", "--disable-dependency-tracking",
+ "--disable-maintainer-mode",
+ "--disable-schemas-compile",
+ "--prefix=#{prefix}"
+
+ ENV.prepend_path "XDG_DATA_DIRS", "#{HOMEBREW_PREFIX}/share"
+
+ ENV.prepend_path "GIRDIR", "#{HOMEBREW_PREFIX}/share/gir-1.0"
+ ENV.prepend_path "VAPIDIR", "#{HOMEBREW_PREFIX}/share/vala/vapi"
+ ENV.prepend_path "VAPIDIR", "#{HOMEBREW_PREFIX}/share/vala-0.30/vapi"
+
+ system "make", "install"
+ end
+
+ def post_install
+ system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
+ end
+end
diff --git a/osx/Taps/gitg/glib-networking.rb b/osx/Taps/gitg/glib-networking.rb
new file mode 100644
index 0000000..a6b34a8
--- /dev/null
+++ b/osx/Taps/gitg/glib-networking.rb
@@ -0,0 +1,64 @@
+class GlibNetworking < Formula
+ desc "Network related modules for glib"
+ homepage "https://launchpad.net/glib-networking"
+ url "https://download.gnome.org/sources/glib-networking/2.44/glib-networking-2.44.0.tar.xz"
+ mirror "https://mirrors.kernel.org/debian/pool/main/g/glib-networking/glib-networking_2.44.0.orig.tar.xz"
+ sha256 "8f8a340d3ba99bfdef38b653da929652ea6640e27969d29f7ac51fbbe11a4346"
+
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "gettext"
+ depends_on "glib"
+ depends_on "gnutls"
+ depends_on "gnome/gitg/gsettings-desktop-schemas"
+
+ link_overwrite "lib/gio/modules"
+
+ def install
+ # Install files to `lib` instead of `HOMEBREW_PREFIX/lib`.
+ inreplace "configure", "$($PKG_CONFIG --variable giomoduledir gio-2.0)", lib/"gio/modules"
+ system "./configure", "--disable-dependency-tracking",
+ "--disable-silent-rules",
+ "--prefix=#{prefix}",
+ "--with-ca-certificates=#{etc}/openssl/cert.pem",
+ # Remove when p11-kit >= 0.20.7 builds on OSX
+ # see https://github.com/Homebrew/homebrew/issues/36323
+ # and https://bugs.freedesktop.org/show_bug.cgi?id=91602
+ "--without-pkcs11"
+ system "make", "install"
+
+ # Delete the cache, will regenerate it in post_install
+ rm lib/"gio/modules/giomodule.cache"
+ end
+
+ def post_install
+ system Formula["glib"].opt_bin/"gio-querymodules", HOMEBREW_PREFIX/"lib/gio/modules"
+ end
+
+ test do
+ (testpath/"gtls-test.c").write <<-EOS.undent
+ #include <gio/gio.h>
+ int main (int argc, char *argv[])
+ {
+ if (g_tls_backend_supports_tls (g_tls_backend_get_default()))
+ return 0;
+ else
+ return 1;
+ }
+ EOS
+
+ # From `pkg-config --cflags --libs gio-2.0`
+ flags = [
+ "-D_REENTRANT",
+ "-I#{HOMEBREW_PREFIX}/include/glib-2.0",
+ "-I#{HOMEBREW_PREFIX}/lib/glib-2.0/include",
+ "-I#{HOMEBREW_PREFIX}/opt/gettext/include",
+ "-L#{HOMEBREW_PREFIX}/lib",
+ "-L#{HOMEBREW_PREFIX}/opt/gettext/lib",
+ "-lgio-2.0", "-lgobject-2.0", "-lglib-2.0", "-lintl"
+ ]
+
+ system ENV.cc, "gtls-test.c", "-o", "gtls-test", *flags
+ system "./gtls-test"
+ end
+end
diff --git a/osx/Taps/gitg/gnome-icon-theme.rb b/osx/Taps/gitg/gnome-icon-theme.rb
new file mode 100644
index 0000000..883506f
--- /dev/null
+++ b/osx/Taps/gitg/gnome-icon-theme.rb
@@ -0,0 +1,29 @@
+class GnomeIconTheme < Formula
+ desc "Icons for the GNOME project"
+ homepage "https://developer.gnome.org"
+ url "https://download.gnome.org/sources/adwaita-icon-theme/3.18/adwaita-icon-theme-3.18.0.tar.xz"
+ sha256 "5e9ce726001fdd8ee93c394fdc3cdb9e1603bbed5b7c62df453ccf521ec50e58"
+
+ depends_on "pkg-config" => :build
+ depends_on "gettext" => :build
+ depends_on "gnome/gitg/gtk+3" => :build # for gtk3-update-icon-cache
+ depends_on "icon-naming-utils" => :build
+ depends_on "intltool" => :build
+ depends_on "gnome/gitg/librsvg" => :build
+
+ def install
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "GTK_UPDATE_ICON_CACHE=#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache"
+ system "make", "install"
+ end
+
+ test do
+ # This checks that a -symbolic png file generated from svg exists
+ # and that a file created late in the install process exists.
+ # Someone who understands GTK+3 could probably write better tests that
+ # check if GTK+3 can find the icons.
+ assert (share/"icons/Adwaita/96x96/status/weather-storm-symbolic.symbolic.png").exist?
+ assert (share/"icons/Adwaita/index.theme").exist?
+ end
+end
diff --git a/osx/Taps/gitg/gobject-introspection.rb b/osx/Taps/gitg/gobject-introspection.rb
new file mode 100644
index 0000000..5de2d72
--- /dev/null
+++ b/osx/Taps/gitg/gobject-introspection.rb
@@ -0,0 +1,44 @@
+class GobjectIntrospection < Formula
+ desc "Generate interface introspection data for GObject libraries"
+ homepage "https://live.gnome.org/GObjectIntrospection"
+ url "https://download.gnome.org/sources/gobject-introspection/1.46/gobject-introspection-1.46.0.tar.xz"
+ sha256 "6658bd3c2b8813eb3e2511ee153238d09ace9d309e4574af27443d87423e4233"
+
+ option :universal
+
+ depends_on "pkg-config" => :run
+ depends_on "glib"
+ depends_on "libffi"
+
+ resource "tutorial" do
+ url "https://gist.github.com/7a0023656ccfe309337a.git",
+ :revision => "499ac89f8a9ad17d250e907f74912159ea216416"
+ end
+
+ def install
+ ENV["GI_SCANNER_DISABLE_CACHE"] = "true"
+ ENV.universal_binary if build.universal?
+
+ inreplace "giscanner/transformer.py", "/usr/share", "#{HOMEBREW_PREFIX}/share"
+
+ inreplace "configure" do |s|
+ s.change_make_var! "GOBJECT_INTROSPECTION_LIBDIR", "#{HOMEBREW_PREFIX}/lib"
+ end
+
+ system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
+
+ inreplace "config.h",
+ "#define GIR_DIR \"#{share}/gir-1.0\"",
+ "#define GIR_DIR \"#{HOMEBREW_PREFIX}/share/gir-1.0\""
+
+ system "make"
+ system "make", "install"
+ end
+
+ test do
+ ENV.prepend_path "PKG_CONFIG_PATH", Formula["libffi"].opt_lib/"pkgconfig"
+ resource("tutorial").stage testpath
+ system "make"
+ assert (testpath/"Tut-0.1.typelib").exist?
+ end
+end
diff --git a/osx/Taps/gitg/gsettings-desktop-schemas.rb b/osx/Taps/gitg/gsettings-desktop-schemas.rb
new file mode 100644
index 0000000..3842aa3
--- /dev/null
+++ b/osx/Taps/gitg/gsettings-desktop-schemas.rb
@@ -0,0 +1,39 @@
+class GsettingsDesktopSchemas < Formula
+ desc "GSettings schemas for desktop components"
+ homepage "https://download.gnome.org/sources/gsettings-desktop-schemas/"
+ url
"https://download.gnome.org/sources/gsettings-desktop-schemas/3.16/gsettings-desktop-schemas-3.16.1.tar.xz"
+ sha256 "74fe9fdad510c8a6666febeceb7ebafc581ef990b3afcc8c1e8b5d90b24b3461"
+
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "glib"
+ depends_on "gnome/gitg/gobject-introspection" => :build
+ depends_on "gettext"
+ depends_on "libffi"
+
+ def install
+ system "./configure", "--disable-dependency-tracking",
+ "--disable-silent-rules",
+ "--prefix=#{prefix}",
+ "--disable-schemas-compile",
+ "--enable-introspection=yes"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gdesktop-enums.h>
+
+ int main(int argc, char *argv[]) {
+ return 0;
+ }
+ EOS
+ system ENV.cc, "-I#{HOMEBREW_PREFIX}/include/gsettings-desktop-schemas", "test.c", "-o", "test"
+ system "./test"
+ end
+
+ def post_install
+ # manual schema compile step
+ system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
+ end
+end
diff --git a/osx/Taps/gitg/gtk+3.rb b/osx/Taps/gitg/gtk+3.rb
new file mode 100644
index 0000000..969f0bf
--- /dev/null
+++ b/osx/Taps/gitg/gtk+3.rb
@@ -0,0 +1,221 @@
+class Gtkx3 < Formula
+ desc "Toolkit for creating graphical user interfaces"
+ homepage "http://gtk.org/"
+ url "https://download.gnome.org/sources/gtk+/3.18/gtk+-3.18.2.tar.xz"
+ sha256 "5dbec561c4a00070073bf9cf4cfdd61fab4a14c8ff5b15d700bd378f8185e152"
+
+ option :universal
+ option "with-quartz-relocation", "Build with quartz relocation support"
+
+ depends_on "pkg-config" => :build
+ depends_on "gnome/gitg/gdk-pixbuf"
+ depends_on "jasper" => :optional
+ depends_on "gnome/gitg/atk"
+ depends_on "gnome/gitg/gobject-introspection"
+ depends_on "libepoxy"
+ depends_on "gnome/gitg/gsettings-desktop-schemas" => :recommended
+ depends_on "gnome/gitg/pango"
+ depends_on "glib"
+ depends_on "hicolor-icon-theme"
+
+ patch :DATA
+
+ def install
+ ENV.universal_binary if build.universal?
+
+ args = %W[
+ --enable-debug
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ --disable-glibtest
+ --enable-introspection=yes
+ --disable-schemas-compile
+ --enable-quartz-backend
+ --disable-x11-backend
+ ]
+
+ args << "--enable-quartz-relocation" if build.with?("quartz-relocation")
+
+ system "./configure", *args
+ # necessary to avoid gtk-update-icon-cache not being found during make install
+ bin.mkpath
+ ENV.prepend_path "PATH", "#{bin}"
+
+ system "make", "install"
+ # Prevent a conflict between this and Gtk+2
+ mv bin/"gtk-update-icon-cache", bin/"gtk3-update-icon-cache"
+ end
+
+ def post_install
+ system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gtk/gtk.h>
+
+ int main(int argc, char *argv[]) {
+ gtk_disable_setlocale();
+ 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"]
+ libepoxy = Formula["libepoxy"]
+ libpng = Formula["libpng"]
+ pango = Formula["pango"]
+ pixman = Formula["pixman"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ 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#{include}
+ -I#{include}/gtk-3.0
+ -I#{libepoxy.opt_include}
+ -I#{libpng.opt_include}/libpng16
+ -I#{pango.opt_include}/pango-1.0
+ -I#{pixman.opt_include}/pixman-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#{lib}
+ -L#{pango.opt_lib}
+ -latk-1.0
+ -lcairo
+ -lcairo-gobject
+ -lgdk-3
+ -lgdk_pixbuf-2.0
+ -lgio-2.0
+ -lglib-2.0
+ -lgobject-2.0
+ -lgtk-3
+ -lintl
+ -lpango-1.0
+ -lpangocairo-1.0
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
+__END__
+From 2544b9256318b5f921e6eebb5925bdc8b3419125 Mon Sep 17 00:00:00 2001
+From: Brion Vibber <brion pobox com>
+Date: Sun, 16 Nov 2014 15:10:30 -0800
+Subject: [PATCH 3/3] Work in progress fix for low-res GL views on Quartz
+ HiDPI/Retina
+
+gdk_quartz_ref_cairo_surface () wasn't respecting the window's scale
+when creating a surface, whereas the equivalent on other backends was.
+
+This patch fixes GL views, but breaks non-GL ones on Retina display
+by making them double-sized. Not sure where the doubling on that code
+path is yet...
+---
+ gdk/quartz/gdkwindow-quartz.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
+index 1d39e8f..04539d3 100644
+--- a/gdk/quartz/gdkwindow-quartz.c
++++ b/gdk/quartz/gdkwindow-quartz.c
+@@ -320,10 +320,15 @@ gdk_quartz_ref_cairo_surface (GdkWindow *window)
+
+ if (!impl->cairo_surface)
+ {
++ int scale = gdk_window_get_scale_factor (impl->wrapper);
++ if (scale == 0)
++ scale = 1;
++
+ impl->cairo_surface =
+ gdk_quartz_create_cairo_surface (impl,
+- gdk_window_get_width (impl->wrapper),
+- gdk_window_get_height (impl->wrapper));
++ gdk_window_get_width (impl->wrapper) * scale,
++ gdk_window_get_height (impl->wrapper) * scale);
++ cairo_surface_set_device_scale (impl->cairo_surface, scale, scale);
+ }
+ else
+ cairo_surface_reference (impl->cairo_surface);
+--
+1.9.3 (Apple Git-50)
+From 571704824f78de9d8b262793397a4e4ea6cedf7d Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls ceridwen us>
+Date: Fri, 18 Sep 2015 15:12:24 -0700
+Subject: [PATCH] Bug 753992 - im-quartz discard_preedit segmentation fault
+
+Replace checking if the NSView is really a GdkWindow, which will crash
+in the likely event it's not a GObject, with ensuring that the parent
+GdkWindow is really a GdkWindowQuartz.
+---
+ modules/input/imquartz.c | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+diff --git a/modules/input/imquartz.c b/modules/input/imquartz.c
+index 5db6481..508ecf8 100644
+--- a/modules/input/imquartz.c
++++ b/modules/input/imquartz.c
+@@ -186,15 +186,11 @@ quartz_filter_keypress (GtkIMContext *context,
+
+ GTK_NOTE (MISC, g_print ("quartz_filter_keypress\n"));
+
+- if (!qc->client_window)
++ if (!GDK_IS_QUARTZ_WINDOW (qc->client_window))
+ return FALSE;
+
+ nsview = gdk_quartz_window_get_nsview (qc->client_window);
+- if (GDK_IS_WINDOW (nsview))
+- /* it gets GDK_WINDOW in some cases */
+- return gtk_im_context_filter_keypress (qc->slave, event);
+- else
+- win = (GdkWindow *)[ (GdkQuartzView *)nsview gdkWindow];
++ win = (GdkWindow *)[ (GdkQuartzView *)nsview gdkWindow];
+ GTK_NOTE (MISC, g_print ("client_window: %p, win: %p, nsview: %p\n",
+ qc->client_window, win, nsview));
+
+@@ -242,11 +238,11 @@ discard_preedit (GtkIMContext *context)
+ if (!qc->client_window)
+ return;
+
+- NSView *nsview = gdk_quartz_window_get_nsview (qc->client_window);
+- if (!nsview)
++ if (!GDK_IS_QUARTZ_WINDOW (qc->client_window))
+ return;
+
+- if (GDK_IS_WINDOW (nsview))
++ NSView *nsview = gdk_quartz_window_get_nsview (qc->client_window);
++ if (!nsview)
+ return;
+
+ /* reset any partial input for this NSView */
+@@ -328,11 +324,10 @@ quartz_set_cursor_location (GtkIMContext *context, GdkRectangle *area)
+ qc->cursor_rect->x = area->x + x;
+ qc->cursor_rect->y = area->y + y;
+
+- nsview = gdk_quartz_window_get_nsview (qc->client_window);
+- if (GDK_IS_WINDOW (nsview))
+- /* it returns GDK_WINDOW in some cases */
++ if (!GDK_IS_QUARTZ_WINDOW (qc->client_window))
+ return;
+
++ nsview = gdk_quartz_window_get_nsview (qc->client_window);
+ win = (GdkWindow *)[ (GdkQuartzView*)nsview gdkWindow];
+ g_object_set_data (G_OBJECT (win), GIC_CURSOR_RECT, qc->cursor_rect);
+ }
+--
+2.4.9 (Apple Git-60)
+
diff --git a/osx/Taps/gitg/gtksourceview3.rb b/osx/Taps/gitg/gtksourceview3.rb
new file mode 100644
index 0000000..93233ec
--- /dev/null
+++ b/osx/Taps/gitg/gtksourceview3.rb
@@ -0,0 +1,169 @@
+class Gtksourceview3 < Formula
+ desc "Text view with syntax, undo/redo, and text marks"
+ homepage "https://projects.gnome.org/gtksourceview/"
+ url "https://download.gnome.org/sources/gtksourceview/3.18/gtksourceview-3.18.0.tar.xz"
+ sha256 "54b111264e6985e26a878dec88ff94fd0a9ae0dc4cfcdf08f4a6b5f655d4b693"
+
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "gettext"
+ depends_on "gnome/gitg/gtk+3"
+
+ # reported upstream as https://bugzilla.gnome.org/show_bug.cgi?id=755308
+ patch :DATA
+
+ def install
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gtksourceview/gtksourceview.h>
+
+ int main(int argc, char *argv[]) {
+ gchar *text = gtk_source_utils_unescape_search_text("hello world");
+ return 0;
+ }
+ EOS
+ ENV.libxml2
+ atk = Formula["atk"]
+ cairo = Formula["cairo"]
+ fontconfig = Formula["fontconfig"]
+ freetype = Formula["freetype"]
+ gdk_pixbuf = Formula["gdk-pixbuf"]
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ gtkx3 = Formula["gtk+3"]
+ libepoxy = Formula["libepoxy"]
+ libpng = Formula["libpng"]
+ pango = Formula["pango"]
+ pixman = Formula["pixman"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ 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#{gtkx3.opt_include}/gtk-3.0
+ -I#{include}/gtksourceview-3.0
+ -I#{libepoxy.opt_include}
+ -I#{libpng.opt_include}/libpng16
+ -I#{pango.opt_include}/pango-1.0
+ -I#{pixman.opt_include}/pixman-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#{gtkx3.opt_lib}
+ -L#{lib}
+ -L#{pango.opt_lib}
+ -latk-1.0
+ -lcairo
+ -lcairo-gobject
+ -lgdk-3
+ -lgdk_pixbuf-2.0
+ -lgio-2.0
+ -lglib-2.0
+ -lgobject-2.0
+ -lgtk-3
+ -lgtksourceview-3.0
+ -lintl
+ -lpango-1.0
+ -lpangocairo-1.0
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
+
+__END__
+diff --git a/configure b/configure
+index ad97334..9faade8 100755
+--- a/configure
++++ b/configure
+@@ -12636,76 +12636,6 @@ fi
+
+
+
+-for flag in -Wl,--no-as-needed ; do
+- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
+-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
+-if eval \${$as_CACHEVAR+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+-
+- ax_check_save_flags=$CFLAGS
+- CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_compile "$LINENO"; then :
+- eval "$as_CACHEVAR=yes"
+-else
+- eval "$as_CACHEVAR=no"
+-fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+- CFLAGS=$ax_check_save_flags
+-fi
+-eval ac_res=\$$as_CACHEVAR
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+-
+-if ${WARN_LDFLAGS+:} false; then :
+-
+- case " $WARN_LDFLAGS " in #(
+- *" $flag "*) :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS already contains \$flag"; } >&5
+- (: WARN_LDFLAGS already contains $flag) 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; } ;; #(
+- *) :
+-
+- as_fn_append WARN_LDFLAGS " $flag"
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5
+- (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }
+- ;;
+-esac
+-
+-else
+-
+- WARN_LDFLAGS=$flag
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5
+- (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }
+-
+-fi
+-
+-else
+- :
+-fi
+-
+-done
+
+
+ if test "$ax_enable_compile_warnings" != "no"; then :
diff --git a/osx/Taps/gitg/gtkspell3.rb b/osx/Taps/gitg/gtkspell3.rb
new file mode 100644
index 0000000..9935228
--- /dev/null
+++ b/osx/Taps/gitg/gtkspell3.rb
@@ -0,0 +1,86 @@
+class Gtkspell3 < Formula
+ desc "Gtk widget for highlighting and replacing misspelled words"
+ homepage "http://gtkspell.sourceforge.net/"
+ url "http://gtkspell.sourceforge.net/download/gtkspell3-3.0.7.tar.gz"
+ sha256 "13f2e6d3e2554cc24253ef592074b28c117db33b7a4465c98c69a3e0a4fa3cc2"
+
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "gnome/gitg/gtk+3"
+ depends_on "enchant"
+
+ def install
+ system "./configure", "--disable-debug", "--prefix=#{prefix}"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gtkspell/gtkspell.h>
+
+ int main(int argc, char *argv[]) {
+ GList *list = gtk_spell_checker_get_language_list();
+ return 0;
+ }
+ EOS
+ atk = Formula["atk"]
+ cairo = Formula["cairo"]
+ enchant = Formula["enchant"]
+ fontconfig = Formula["fontconfig"]
+ freetype = Formula["freetype"]
+ gdk_pixbuf = Formula["gdk-pixbuf"]
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ gtkx3 = Formula["gtk+3"]
+ libepoxy = Formula["libepoxy"]
+ libpng = Formula["libpng"]
+ pango = Formula["pango"]
+ pixman = Formula["pixman"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{atk.opt_include}/atk-1.0
+ -I#{cairo.opt_include}/cairo
+ -I#{enchant.opt_include}/enchant
+ -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#{gtkx3.opt_include}/gtk-3.0
+ -I#{include}/gtkspell-3.0
+ -I#{libepoxy.opt_include}
+ -I#{libpng.opt_include}/libpng16
+ -I#{pango.opt_include}/pango-1.0
+ -I#{pixman.opt_include}/pixman-1
+ -D_REENTRANT
+ -L#{atk.opt_lib}
+ -L#{cairo.opt_lib}
+ -L#{enchant.opt_lib}
+ -L#{gdk_pixbuf.opt_lib}
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{gtkx3.opt_lib}
+ -L#{lib}
+ -L#{pango.opt_lib}
+ -latk-1.0
+ -lcairo
+ -lcairo-gobject
+ -lenchant
+ -lgdk-3
+ -lgdk_pixbuf-2.0
+ -lgio-2.0
+ -lglib-2.0
+ -lgmodule-2.0
+ -lgobject-2.0
+ -lgtk-3
+ -lgtkspell3-3
+ -lintl
+ -lpango-1.0
+ -lpangocairo-1.0
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/Taps/gitg/harfbuzz.rb b/osx/Taps/gitg/harfbuzz.rb
new file mode 100644
index 0000000..5715073
--- /dev/null
+++ b/osx/Taps/gitg/harfbuzz.rb
@@ -0,0 +1,55 @@
+class Harfbuzz < Formula
+ desc "OpenType text shaping engine"
+ homepage "https://wiki.freedesktop.org/www/Software/HarfBuzz/"
+ url "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.0.3.tar.bz2"
+ sha256 "ebdc875ea06d010722dec13d92bc40002ab6a77071d62e71aad564ff76a63df7"
+
+ head do
+ url "https://github.com/behdad/harfbuzz.git"
+
+ depends_on "ragel" => :build
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
+ depends_on "libtool" => :build
+ end
+
+ option "with-cairo", "Build command-line utilities that depend on Cairo"
+
+ depends_on "pkg-config" => :build
+ depends_on "glib"
+ depends_on "freetype"
+ depends_on "gnome/gitg/gobject-introspection"
+ depends_on "icu4c" => :recommended
+ depends_on "cairo" => :optional
+ depends_on "graphite2" => :optional
+
+ resource "ttf" do
+ url
"https://github.com/behdad/harfbuzz/raw/fc0daafab0336b847ac14682e581a8838f36a0bf/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf"
+ sha256 "9535d35dab9e002963eef56757c46881f6b3d3b27db24eefcc80929781856c77"
+ end
+
+ def install
+ args = %W[
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ --enable-introspection=yes
+ --with-gobject=yes
+ --with-coretext=yes
+ ]
+
+ args << "--with-icu" if build.with? "icu4c"
+ args << "--with-graphite2" if build.with? "graphite2"
+ args << "--with-cairo" if build.with? "cairo"
+
+ system "./autogen.sh" if build.head?
+ system "./configure", *args
+ system "make", "install"
+ end
+
+ test do
+ resource("ttf").stage do
+ shape = `echo 'സ്റ്റ്' | #{bin}/hb-shape 270b89df543a7e48e206a2d830c0e10e5265c630.ttf`.chomp
+ assert_equal "[glyph201=0+1183|U0D4D=0+0]", shape
+ end
+ end
+end
diff --git a/osx/Taps/gitg/libgee.rb b/osx/Taps/gitg/libgee.rb
new file mode 100644
index 0000000..a649b5b
--- /dev/null
+++ b/osx/Taps/gitg/libgee.rb
@@ -0,0 +1,53 @@
+class Libgee < Formula
+ desc "Collection library providing GObject-based interfaces"
+ homepage "https://wiki.gnome.org/Projects/Libgee"
+ url "https://download.gnome.org/sources/libgee/0.18/libgee-0.18.0.tar.xz"
+ sha256 "4ad99ef937d071b4883c061df40bfe233f7649d50c354cf81235f180b4244399"
+
+ depends_on "pkg-config" => :build
+ depends_on "vala" => :build
+ depends_on "gnome/gitg/gobject-introspection"
+
+ def install
+ # ensures that the gobject-introspection files remain within the keg
+ inreplace "gee/Makefile.in" do |s|
+ s.gsub! "@HAVE_INTROSPECTION_TRUE girdir = @INTROSPECTION_GIRDIR@",
+ "@HAVE_INTROSPECTION_TRUE girdir = $(datadir)/gir-1.0"
+ s.gsub! "@HAVE_INTROSPECTION_TRUE typelibdir = @INTROSPECTION_TYPELIBDIR@",
+ "@HAVE_INTROSPECTION_TRUE typelibdir = $(libdir)/girepository-1.0"
+ end
+
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-dependency-tracking"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gee.h>
+
+ int main(int argc, char *argv[]) {
+ GType type = gee_traversable_stream_get_type();
+ return 0;
+ }
+ EOS
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{gettext.opt_include}
+ -I#{glib.opt_include}/glib-2.0
+ -I#{glib.opt_lib}/glib-2.0/include
+ -I#{include}/gee-0.8
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{lib}
+ -lgee-0.8
+ -lglib-2.0
+ -lgobject-2.0
+ -lintl
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/Taps/gitg/libgit2-glib.rb b/osx/Taps/gitg/libgit2-glib.rb
new file mode 100644
index 0000000..6d6cc4d
--- /dev/null
+++ b/osx/Taps/gitg/libgit2-glib.rb
@@ -0,0 +1,48 @@
+class Libgit2Glib < Formula
+ desc "Glib wrapper library around libgit2 git access library"
+ homepage "https://github.com/GNOME/libgit2-glib"
+ url "https://download.gnome.org/sources/libgit2-glib/0.23/libgit2-glib-0.23.6.tar.xz"
+ sha256 "5c8d6b5cb81ab64b96cb0c52ef37463b6d8998a40ce77a08eda9db66fb781144"
+
+ head do
+ url "https://github.com/GNOME/libgit2-glib.git"
+
+ depends_on "libtool" => :build
+ depends_on "automake" => :build
+ depends_on "autoconf" => :build
+ depends_on "gnome-common" => :build
+ depends_on "gtk-doc" => :build
+ end
+
+ depends_on "pkg-config" => :build
+ depends_on "gettext"
+ depends_on "libgit2" => "with-libssh2"
+ depends_on "gnome/gitg/gobject-introspection"
+ depends_on "glib"
+ depends_on "vala" => :optional
+ depends_on :python => :optional
+
+ def install
+ args = %W[
+ --prefix=#{prefix}
+ --disable-silent-rules
+ --disable-dependency-tracking
+ ]
+
+ args << "--enable-python=no" if build.without? "python"
+ args << "--enable-vala=no" if build.without? "vala"
+
+ system "./autogen.sh", *args if build.head?
+ system "./configure", *args if build.stable?
+ system "make", "install"
+
+ libexec.install "examples/.libs", "examples/clone", "examples/general", "examples/walk"
+ end
+
+ test do
+ mkdir "horatio" do
+ system "git", "init"
+ end
+ system "#{libexec}/general", testpath/"horatio"
+ end
+end
diff --git a/osx/Taps/gitg/libpeas.rb b/osx/Taps/gitg/libpeas.rb
new file mode 100644
index 0000000..913b61b
--- /dev/null
+++ b/osx/Taps/gitg/libpeas.rb
@@ -0,0 +1,85 @@
+class Libpeas < Formula
+ desc "GObject plugin library"
+ homepage "https://developer.gnome.org/libpeas/stable/"
+ url "https://download.gnome.org/sources/libpeas/1.16/libpeas-1.16.0.tar.xz"
+ sha256 "b093008ecd65f7d55c80517589509698ff15ad41f664b11a3eb88ff461b1454e"
+
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "gettext" => :build
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
+ depends_on "libtool" => :build
+ depends_on "gnome-common" => :build
+ depends_on "glib"
+ depends_on "gnome/gitg/gobject-introspection"
+ depends_on "gnome/gitg/gtk+3"
+
+ # fixes a linking issue in the tests
+ # submitted upsteam as a PR: https://github.com/gregier/libpeas/pull/3
+ patch :DATA
+
+ def install
+ system "autoreconf", "-i"
+ system "./configure", "--disable-debug",
+ "--disable-dependency-tracking",
+ "--disable-silent-rules",
+ "--prefix=#{prefix}",
+ "--enable-gtk"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <libpeas/peas.h>
+
+ int main(int argc, char *argv[]) {
+ PeasObjectModule *mod = peas_object_module_new("test", "test", FALSE);
+ return 0;
+ }
+ EOS
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ gobject_introspection = Formula["gobject-introspection"]
+ libffi = Formula["libffi"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{gettext.opt_include}
+ -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#{include}/libpeas-1.0
+ -I#{libffi.opt_lib}/libffi-3.0.13/include
+ -D_REENTRANT
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{gobject_introspection.opt_lib}
+ -L#{lib}
+ -lgio-2.0
+ -lgirepository-1.0
+ -lglib-2.0
+ -lgmodule-2.0
+ -lgobject-2.0
+ -lintl
+ -lpeas-1.0
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
+
+__END__
+diff --git a/tests/libpeas/plugins/extension-c/Makefile.am b/tests/libpeas/plugins/extension-c/Makefile.am
+index 9f18008..ed51b06 100644
+--- a/tests/libpeas/plugins/extension-c/Makefile.am
++++ b/tests/libpeas/plugins/extension-c/Makefile.am
+@@ -18,7 +18,8 @@ libextension_c_la_SOURCES = \
+ libextension_c_la_LDFLAGS = $(TEST_PLUGIN_LIBTOOL_FLAGS)
+ libextension_c_la_LIBADD = \
+ $(PEAS_LIBS) \
+- $(builddir)/../../introspection/libintrospection-1.0.la
++ $(builddir)/../../introspection/libintrospection-1.0.la \
++ $(top_builddir)/libpeas/libpeas-1.0.la
+
+ libextension_c_missing_symbol_la_SOURCES = \
+ extension-c-missing-symbol-plugin.c
diff --git a/osx/Taps/gitg/librsvg.rb b/osx/Taps/gitg/librsvg.rb
new file mode 100644
index 0000000..87aa742
--- /dev/null
+++ b/osx/Taps/gitg/librsvg.rb
@@ -0,0 +1,91 @@
+class Librsvg < Formula
+ desc "Library to render SVG files using Cairo"
+ homepage "https://live.gnome.org/LibRsvg"
+ url "https://download.gnome.org/sources/librsvg/2.40/librsvg-2.40.10.tar.xz"
+ sha256 "965c807438ce90b204e930ff80c92eba1606a2f6fd5ccfd09335c99896dd3479"
+
+ depends_on "pkg-config" => :build
+ depends_on "gnome/gitg/cairo"
+ depends_on "gnome/gitg/gdk-pixbuf"
+ depends_on "glib"
+ depends_on "gnome/gitg/gtk+3" => :optional
+ depends_on "libcroco"
+ depends_on "libgsf" => :optional
+ depends_on "gnome/gitg/pango"
+
+ def install
+ args = ["--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--disable-Bsymbolic",
+ "--enable-tools=yes",
+ "--enable-pixbuf-loader=yes",
+ "--enable-introspection=yes"]
+
+ args << "--enable-svgz" if build.with? "libgsf"
+
+ system "./configure", *args
+
+ # disable updating gdk-pixbuf cache, we will do this manually in post_install
+ # https://github.com/Homebrew/homebrew/issues/40833
+ inreplace "gdk-pixbuf-loader/Makefile", "$(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file)
;", ""
+
+ system "make", "install",
+ "gdk_pixbuf_binarydir=#{lib}/gdk-pixbuf-2.0/2.10.0/loaders",
+ "gdk_pixbuf_moduledir=#{lib}/gdk-pixbuf-2.0/2.10.0/loaders"
+ end
+
+ def post_install
+ # librsvg is not aware GDK_PIXBUF_MODULEDIR must be set
+ # set GDK_PIXBUF_MODULEDIR and update loader cache
+ ENV["GDK_PIXBUF_MODULEDIR"] = "#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders"
+ system "#{Formula["gdk-pixbuf"].opt_bin}/gdk-pixbuf-query-loaders", "--update-cache"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <librsvg/rsvg.h>
+
+ int main(int argc, char *argv[]) {
+ RsvgHandle *handle = rsvg_handle_new();
+ return 0;
+ }
+ EOS
+ cairo = Formula["cairo"]
+ fontconfig = Formula["fontconfig"]
+ freetype = Formula["freetype"]
+ gdk_pixbuf = Formula["gdk-pixbuf"]
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ libpng = Formula["libpng"]
+ pixman = Formula["pixman"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -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}/glib-2.0
+ -I#{glib.opt_lib}/glib-2.0/include
+ -I#{include}/librsvg-2.0
+ -I#{libpng.opt_include}/libpng16
+ -I#{pixman.opt_include}/pixman-1
+ -D_REENTRANT
+ -L#{cairo.opt_lib}
+ -L#{gdk_pixbuf.opt_lib}
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{lib}
+ -lcairo
+ -lgdk_pixbuf-2.0
+ -lgio-2.0
+ -lglib-2.0
+ -lgobject-2.0
+ -lintl
+ -lm
+ -lrsvg-2
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/Taps/gitg/libsecret.rb b/osx/Taps/gitg/libsecret.rb
new file mode 100644
index 0000000..2c5338f
--- /dev/null
+++ b/osx/Taps/gitg/libsecret.rb
@@ -0,0 +1,73 @@
+class Libsecret < Formula
+ desc "Library for storing/retrieving passwords and other secrets"
+ homepage "https://wiki.gnome.org/Projects/Libsecret"
+ url "https://download.gnome.org/sources/libsecret/0.18/libsecret-0.18.3.tar.xz"
+ sha256 "f2bf1d0c5ab4640664f3e3c7ef6b086c180e50ff415720b5e22f96750dbf84c9"
+
+ depends_on "pkg-config" => :build
+ depends_on "gnu-sed" => :build
+ depends_on "intltool" => :build
+ depends_on "gettext" => :build
+ depends_on "vala" => :build
+ depends_on "gnome/gitg/gobject-introspection"
+ depends_on "glib"
+ depends_on "libgcrypt"
+
+ def install
+ args = %W[
+ --disable-debug
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --prefix=#{prefix}
+ ]
+
+ args << "--enable-gobject-introspection"
+ args << "--enable-vala"
+
+ system "./configure", *args
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=734630
+ inreplace "Makefile", "sed", "gsed"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=734631
+ inreplace "Makefile", "--nonet", ""
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <libsecret/secret.h>
+
+ const SecretSchema * example_get_schema (void) G_GNUC_CONST;
+
+ const SecretSchema *
+ example_get_schema (void)
+ {
+ static const SecretSchema the_schema = {
+ "org.example.Password", SECRET_SCHEMA_NONE,
+ {
+ { "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
+ { "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
+ { "NULL", 0 },
+ }
+ };
+ return &the_schema;
+ }
+
+ int main()
+ {
+ example_get_schema();
+ }
+ EOS
+
+ flags = [
+ "-I#{include}/libsecret-1",
+ "-I#{HOMEBREW_PREFIX}/include/glib-2.0",
+ "-I#{HOMEBREW_PREFIX}/lib/glib-2.0/include"
+ ]
+
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/Taps/gitg/libsoup.rb b/osx/Taps/gitg/libsoup.rb
new file mode 100644
index 0000000..794dc5d
--- /dev/null
+++ b/osx/Taps/gitg/libsoup.rb
@@ -0,0 +1,65 @@
+class Libsoup < Formula
+ desc "HTTP client/server library for GNOME"
+ homepage "https://live.gnome.org/LibSoup"
+ url "https://download.gnome.org/sources/libsoup/2.50/libsoup-2.50.0.tar.xz"
+ sha256 "1e01365ac4af3817187ea847f9d3588c27eee01fc519a5a7cb212bb78b0f667b"
+
+ depends_on "pkg-config" => :build
+ depends_on "intltool" => :build
+ depends_on "gnome/gitg/glib-networking"
+ depends_on "gnutls"
+ depends_on "sqlite"
+ depends_on "gnome/gitg/gobject-introspection" => :recommended
+
+ def install
+ args = [
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--disable-silent-rules",
+ "--prefix=#{prefix}",
+ "--without-gnome",
+ "--disable-tls-check"
+ ]
+
+ if build.with? "gobject-introspection"
+ args << "--enable-introspection"
+ else
+ args << "--disable-introspection"
+ end
+
+ system "./configure", *args
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <libsoup/soup.h>
+
+ int main(int argc, char *argv[]) {
+ guint version = soup_get_major_version();
+ return 0;
+ }
+ EOS
+ ENV.libxml2
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{gettext.opt_include}
+ -I#{glib.opt_include}/glib-2.0
+ -I#{glib.opt_lib}/glib-2.0/include
+ -I#{include}/libsoup-2.4
+ -D_REENTRANT
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{lib}
+ -lgio-2.0
+ -lglib-2.0
+ -lgobject-2.0
+ -lintl
+ -lsoup-2.4
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/Taps/gitg/pango.rb b/osx/Taps/gitg/pango.rb
new file mode 100644
index 0000000..3874dd4
--- /dev/null
+++ b/osx/Taps/gitg/pango.rb
@@ -0,0 +1,101 @@
+class Pango < Formula
+ desc "Framework for layout and rendering of i18n text"
+ homepage "http://www.pango.org/"
+ revision 2
+
+ stable do
+ url "https://download.gnome.org/sources/pango/1.38/pango-1.38.0.tar.xz"
+ sha256 "1d4e75974bad853ee9ac5fc5caee5e7ab235abbd945d51d01f3806e04e7c226c"
+ end
+
+ head do
+ url "https://git.gnome.org/browse/pango.git"
+
+ depends_on "automake" => :build
+ depends_on "autoconf" => :build
+ depends_on "libtool" => :build
+ depends_on "gtk-doc" => :build
+ end
+
+ option :universal
+
+ depends_on "pkg-config" => :build
+ depends_on "glib"
+ depends_on "gnome/gitg/cairo"
+ depends_on "gnome/gitg/harfbuzz"
+ depends_on "fontconfig"
+ depends_on "gnome/gitg/gobject-introspection"
+
+ fails_with :llvm do
+ build 2326
+ cause "Undefined symbols when linking"
+ end
+
+ def install
+ ENV.universal_binary if build.universal?
+
+ args = %W[
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --prefix=#{prefix}
+ --enable-man
+ --with-html-dir=#{share}/doc
+ --enable-introspection=yes
+ --without-xft
+ ]
+
+ system "./autogen.sh" if build.head?
+ system "./configure", *args
+ system "make"
+ system "make", "install"
+ end
+
+ test do
+ system "#{bin}/pango-querymodules", "--version"
+ (testpath/"test.c").write <<-EOS.undent
+ #include <pango/pangocairo.h>
+
+ int main(int argc, char *argv[]) {
+ PangoFontMap *fontmap;
+ int n_families;
+ PangoFontFamily **families;
+ fontmap = pango_cairo_font_map_get_default();
+ pango_font_map_list_families (fontmap, &families, &n_families);
+ g_free(families);
+ return 0;
+ }
+ EOS
+ cairo = Formula["cairo"]
+ fontconfig = Formula["fontconfig"]
+ freetype = Formula["freetype"]
+ gettext = Formula["gettext"]
+ glib = Formula["glib"]
+ libpng = Formula["libpng"]
+ pixman = Formula["pixman"]
+ flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
+ flags += %W[
+ -I#{cairo.opt_include}/cairo
+ -I#{fontconfig.opt_include}
+ -I#{freetype.opt_include}/freetype2
+ -I#{gettext.opt_include}
+ -I#{glib.opt_include}/glib-2.0
+ -I#{glib.opt_lib}/glib-2.0/include
+ -I#{include}/pango-1.0
+ -I#{libpng.opt_include}/libpng16
+ -I#{pixman.opt_include}/pixman-1
+ -D_REENTRANT
+ -L#{cairo.opt_lib}
+ -L#{gettext.opt_lib}
+ -L#{glib.opt_lib}
+ -L#{lib}
+ -lcairo
+ -lglib-2.0
+ -lgobject-2.0
+ -lintl
+ -lpango-1.0
+ -lpangocairo-1.0
+ ]
+ system ENV.cc, "test.c", "-o", "test", *flags
+ system "./test"
+ end
+end
diff --git a/osx/data/Gitg.icns b/osx/data/Gitg.icns
new file mode 100644
index 0000000..b3d5283
Binary files /dev/null and b/osx/data/Gitg.icns differ
diff --git a/osx/data/Gitg.iconset/icon_128x128.png b/osx/data/Gitg.iconset/icon_128x128.png
new file mode 100644
index 0000000..a07a0e2
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_128x128.png differ
diff --git a/osx/data/Gitg.iconset/icon_128x128 2x png b/osx/data/Gitg.iconset/icon_128x128 2x png
new file mode 100644
index 0000000..4acbc30
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_128x128 2x png differ
diff --git a/osx/data/Gitg.iconset/icon_16x16.png b/osx/data/Gitg.iconset/icon_16x16.png
new file mode 100644
index 0000000..1c5e957
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_16x16.png differ
diff --git a/osx/data/Gitg.iconset/icon_16x16 2x png b/osx/data/Gitg.iconset/icon_16x16 2x png
new file mode 100644
index 0000000..49af626
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_16x16 2x png differ
diff --git a/osx/data/Gitg.iconset/icon_256x256.png b/osx/data/Gitg.iconset/icon_256x256.png
new file mode 100644
index 0000000..4acbc30
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_256x256.png differ
diff --git a/osx/data/Gitg.iconset/icon_256x256 2x png b/osx/data/Gitg.iconset/icon_256x256 2x png
new file mode 100644
index 0000000..34f6c27
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_256x256 2x png differ
diff --git a/osx/data/Gitg.iconset/icon_32x32.png b/osx/data/Gitg.iconset/icon_32x32.png
new file mode 100644
index 0000000..49af626
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_32x32.png differ
diff --git a/osx/data/Gitg.iconset/icon_32x32 2x png b/osx/data/Gitg.iconset/icon_32x32 2x png
new file mode 100644
index 0000000..cc067b5
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_32x32 2x png differ
diff --git a/osx/data/Gitg.iconset/icon_512x512.png b/osx/data/Gitg.iconset/icon_512x512.png
new file mode 100644
index 0000000..34f6c27
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_512x512.png differ
diff --git a/osx/data/Gitg.iconset/icon_512x512 2x png b/osx/data/Gitg.iconset/icon_512x512 2x png
new file mode 100644
index 0000000..9a2fb28
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_512x512 2x png differ
diff --git a/osx/data/Gitg.iconset/icon_64x64.png b/osx/data/Gitg.iconset/icon_64x64.png
new file mode 100644
index 0000000..cc067b5
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_64x64.png differ
diff --git a/osx/data/Gitg.iconset/icon_64x64 2x png b/osx/data/Gitg.iconset/icon_64x64 2x png
new file mode 100644
index 0000000..a07a0e2
Binary files /dev/null and b/osx/data/Gitg.iconset/icon_64x64 2x png differ
diff --git a/osx/scripts/brew.rb b/osx/scripts/brew.rb
new file mode 100755
index 0000000..e86267e
--- /dev/null
+++ b/osx/scripts/brew.rb
@@ -0,0 +1,58 @@
+#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
+
+$VERBOSE = nil
+
+psep = ARGV.index("--") || 0
+
+ARGV = ARGV[psep + 1..-1]
+G_ORIG_BREW_RB = ARGV[0]
+
+ARGV.shift
+
+require "pathname"
+
+G_HOMEBREW_BREW_FILE = ENV["HOMEBREW_BREW_FILE"]
+G_HOMEBREW_LIBRARY_PATH = Pathname.new(G_HOMEBREW_BREW_FILE).realpath.parent.parent.join("Library",
"Homebrew")
+
+$:.unshift(G_HOMEBREW_LIBRARY_PATH.to_s)
+
+require "global"
+
+RUBY_PATH = Pathname.new(__FILE__)
+RUBY_BIN = RUBY_PATH.dirname
+
+module OS
+ module Mac
+ extend self
+
+ alias_method :orig_sdk_path, :sdk_path
+
+ def sdk_path
+ orig_sdk_path("10.8")
+ end
+
+ def full_version
+ Version.new("10.8.5")
+ end
+
+ def version
+ Version.new("10.8")
+ end
+ end
+end
+
+require "extend/ENV/super"
+
+module Superenv
+ def effective_sysroot
+ MacOS.sdk_path.to_s
+ end
+
+ def determine_optflags
+ cpu = Hardware::CPU.optimization_flags.fetch(Hardware.oldest_cpu)
+
+ "#{cpu} -mmacosx-version-min=#{OS::Mac::version}"
+ end
+end
+
+load(G_ORIG_BREW_RB)
diff --git a/osx/scripts/build b/osx/scripts/build
new file mode 100755
index 0000000..c19534e
--- /dev/null
+++ b/osx/scripts/build
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. $(dirname "$0")/env
+
+# Install brew if necessary
+if [ ! -f "$d/install/bin/brew" ]; then
+ mkdir -p "$d/install"
+ bsha1=4b498186bd0c1d2759d6ebfb19eaa52dab84b743
+
+ (
+ cd "$d/install"
+ curl -L -o $bsha1.zip https://github.com/Homebrew/homebrew/archive/$bsha1.zip
+ unzip $bsha1.zip
+ rm -f $bsha1.zip
+
+ shopt -s dotglob nullglob
+ mv "homebrew-$bsha1"/* .
+ shopt -u dotglob
+
+ rmdir "homebrew-$bsha1"
+ )
+fi
+
+# Link tap if necessary
+tap="$d/install/Library/Taps/gnome/homebrew-gitg"
+
+if [ ! -d "$tap" ]; then
+ mkdir -p "$d/install/Library/Taps/gnome"
+ ln -s "$root/osx/Taps/gitg" "$tap"
+fi
+
+export HOMEBREW_DEVELOPER=1
+export HOMEBREW_RUBY_PATH="$scripts/brew.rb"
+export PATH="$d/install/bin:$PATH"
+export DYLD_FALLBACK_LIBRARY_PATH="/usr/lib"
+
+exec "$scripts/lbrew" install --HEAD --only-dependencies gnome/gitg/gitg
diff --git a/osx/scripts/env b/osx/scripts/env
new file mode 100644
index 0000000..867339d
--- /dev/null
+++ b/osx/scripts/env
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+scripts=$(dirname "$0")
+
+pushd "$scripts/../../" > /dev/null
+root=$(pwd -P)
+popd > /dev/null
+
+suffix=$(GIT_DIR="$root/.git" git rev-parse --short HEAD)
+
+d="/opt/build/gitg-$suffix"
+b="$d/install/bin/brew"
diff --git a/osx/scripts/lbrew b/osx/scripts/lbrew
new file mode 100755
index 0000000..8451eb5
--- /dev/null
+++ b/osx/scripts/lbrew
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+. $(dirname "$0")/env
+
+export HOMEBREW_DEVELOPER=1
+export HOMEBREW_RUBY_PATH="$scripts/brew.rb"
+export PATH="$d/install/bin:$PATH"
+
+exec "$b" "$@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]