homebrew-core/Formula/gnome-builder.rb
ilovezfs 101643f015 gnome-builder: fix build on case-sensitive volumes
libgit2-glib will contain both ggit-1.0 (share/vala/vapi/ggit-1.0.vapi)
and Ggit-1.0 (share/gir-1.0/Ggit-1.0.gir) when built with vala, but will
only contain Ggit-1.0 when built without vala. On a case-insensitive
volume, the build will succeed regardless of whether libgit2-glib was
built with or without vala, since it will fall back to using Ggit-1.0
when ggit-1.0 isn't available. However, on a case-sensitive volume, the
build will fail because it doesn't find Ggit-1.0 when searching for
ggit-1.0. We can work around the issue by replacing "ggit-1.0" with
"Ggit-1.0" in libide/Makefile.am, libide/Makefile.in, and
libide/libide-1.0.deps whenever libgit2-glib is detected to have been
built without vala.

Closes Homebrew/homebrew#49824

Closes Homebrew/homebrew#49840.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-07 19:28:38 +08:00

58 lines
2.1 KiB
Ruby

class GnomeBuilder < Formula
desc "IDE for GNOME"
homepage "https://wiki.gnome.org/Apps/Builder"
url "https://download.gnome.org/sources/gnome-builder/3.18/gnome-builder-3.18.1.tar.xz"
mirror "https://launchpad.net/ubuntu/+archive/primary/+files/gnome-builder_3.18.1.orig.tar.xz"
sha256 "501c95220dcf8ca44a5748e863492377fe2c3aee78a95973d6819b1836e5407c"
bottle do
sha256 "f7d422a29b7c9b98c20bdce9e8a56b14265fad5d9ce174d77c686adb26d752ad" => :el_capitan
sha256 "294e0df51b9781d53996761965bde4a300485e92af2f39f79965cbee5203f4e5" => :yosemite
sha256 "0a7a3ea11c1db7a79faeb78240631b0ea55d59cc2b053a4f89e95769d1f1c26c" => :mavericks
end
depends_on "pkg-config" => :build
depends_on "intltool" => :build
depends_on "libgit2-glib"
depends_on "gtk+3"
depends_on "libpeas"
depends_on "gtksourceview3"
depends_on "hicolor-icon-theme"
depends_on "gnome-icon-theme"
depends_on "pcre"
depends_on "gjs" => :recommended
depends_on "vala" => :recommended
depends_on "devhelp" => :recommended
depends_on "ctags" => :recommended
depends_on :python3 => :optional
depends_on "pygobject3" if build.with? "python3"
needs :cxx11
def install
ENV.cxx11
# Fix build failure on case-sensitive volumes for libgit2-glib without vala.
# Reported 7th Mar 2016 to https://bugzilla.gnome.org/show_bug.cgi?id=763208
unless File.exist?(Formula["libgit2-glib"].share/"vala/vapi/ggit-1.0.vapi")
inreplace Dir["libide/{Makefile.am,Makefile.in,libide-1.0.deps}"],
"ggit-1.0", "Ggit-1.0"
end
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--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"
system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor"
end
test do
system "#{bin}/gnome-builder", "--version"
end
end