167 lines
5 KiB
Ruby
167 lines
5 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.28/gnome-builder-3.28.2.tar.xz"
|
|
sha256 "398baaf8b14407a666b9d9eddbe9bde0812a86479f534085080149bd3271372e"
|
|
|
|
bottle do
|
|
sha256 "8cfc8d3e17e341c0b40a43967f3908f7fecd4d2488f99c8cad2fd73e0c49df4e" => :high_sierra
|
|
sha256 "acfaf7f5b87851c9ed6aaa4d929c0baec657490140fdc991362b651b197a85f5" => :sierra
|
|
sha256 "fe2c92cf12c1ae1870ff86a2e84cba7e82fef49ccdffd2d982d98347644d473f" => :el_capitan
|
|
end
|
|
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "meson-internal" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "python" => :build
|
|
depends_on "dbus"
|
|
depends_on "gtk+3"
|
|
depends_on "libdazzle"
|
|
depends_on "gtksourceview3"
|
|
depends_on "json-glib"
|
|
depends_on "jsonrpc-glib"
|
|
depends_on "template-glib"
|
|
depends_on "libpeas"
|
|
depends_on "vte3"
|
|
depends_on "libxml2"
|
|
depends_on "libgit2-glib"
|
|
depends_on "gspell"
|
|
depends_on "hicolor-icon-theme"
|
|
depends_on "adwaita-icon-theme"
|
|
|
|
# fix sandbox violation and remove unavailable linker option
|
|
patch :DATA
|
|
|
|
needs :cxx11
|
|
|
|
def install
|
|
ENV.cxx11
|
|
ENV["DESTDIR"] = ""
|
|
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
-Dwith_git=true
|
|
-Dwith_autotools=true
|
|
-Dwith_history=true
|
|
-Dwith_webkit=false
|
|
-Dwith_clang=false
|
|
-Dwith_devhelp=false
|
|
-Dwith_flatpak=false
|
|
-Dwith_sysprof=false
|
|
-Dwith_vapi=false
|
|
-Dwith_vala_pack=false
|
|
-Dwith_qemu=false
|
|
-Dwith_safe_path=#{HOMEBREW_PREFIX}/bin:/usr/bin:/bin
|
|
]
|
|
|
|
# prevent sandbox violation
|
|
pyver = Language::Python.major_minor_version "python3"
|
|
inreplace "src/libide/meson.build",
|
|
"install_dir: pygobject_override_dir",
|
|
"install_dir: '#{lib}/python#{pyver}/site-packages'"
|
|
|
|
mkdir "build" do
|
|
system "meson", *args, ".."
|
|
system "ninja"
|
|
system "ninja", "install"
|
|
end
|
|
|
|
# meson-internal gives wrong install_names for dylibs due to their unusual installation location
|
|
# create softlinks to fix
|
|
ln_s Dir.glob("#{lib}/gnome-builder/*dylib"), lib
|
|
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
|
|
assert_match version.to_s, shell_output("#{bin}/gnome-builder --version")
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/src/libide/meson.build b/src/libide/meson.build
|
|
index 055801b..4e29f9d 100644
|
|
--- a/src/libide/meson.build
|
|
+++ b/src/libide/meson.build
|
|
@@ -160,37 +160,6 @@ if get_option('with_editorconfig')
|
|
]
|
|
endif
|
|
|
|
-# We want to find the subdirectory to install our override into:
|
|
-python3 = find_program('python3')
|
|
-
|
|
-get_overridedir = '''
|
|
-import os
|
|
-import sysconfig
|
|
-
|
|
-libdir = sysconfig.get_config_var('LIBDIR')
|
|
-if not libdir:
|
|
- libdir = '/usr/lib'
|
|
-
|
|
-try:
|
|
- import gi
|
|
- overridedir = gi._overridesdir
|
|
-except ImportError:
|
|
- purelibdir = sysconfig.get_path('purelib')
|
|
- overridedir = os.path.join(purelibdir, 'gi', 'overrides')
|
|
-
|
|
-if overridedir.startswith(libdir): # Should always be True..
|
|
- overridedir = overridedir[len(libdir) + 1:]
|
|
-
|
|
-print(overridedir)
|
|
-'''
|
|
-
|
|
-ret = run_command([python3, '-c', get_overridedir])
|
|
-if ret.returncode() != 0
|
|
- error('Failed to determine pygobject overridedir')
|
|
-else
|
|
- pygobject_override_dir = join_paths(get_option('libdir'), ret.stdout().strip())
|
|
-endif
|
|
-
|
|
install_data('Ide.py', install_dir: pygobject_override_dir)
|
|
|
|
libide_deps = [
|
|
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
|
|
index d97d7e3..646e7f3 100644
|
|
--- a/src/plugins/meson.build
|
|
+++ b/src/plugins/meson.build
|
|
@@ -5,10 +5,8 @@ gnome_builder_plugins_sources = ['gnome-builder-plugins.c']
|
|
gnome_builder_plugins_args = []
|
|
gnome_builder_plugins_deps = [libpeas_dep, libide_plugin_dep, libide_dep]
|
|
gnome_builder_plugins_link_with = []
|
|
-gnome_builder_plugins_link_deps = join_paths(meson.current_source_dir(), 'plugins.map')
|
|
-gnome_builder_plugins_link_args = [
|
|
- '-Wl,--version-script,' + gnome_builder_plugins_link_deps,
|
|
-]
|
|
+gnome_builder_plugins_link_deps = []
|
|
+gnome_builder_plugins_link_args = []
|
|
|
|
subdir('autotools')
|
|
subdir('autotools-templates')
|
|
@@ -76,7 +74,6 @@ gnome_builder_plugins = shared_library(
|
|
gnome_builder_plugins_sources,
|
|
|
|
dependencies: gnome_builder_plugins_deps,
|
|
- link_depends: 'plugins.map',
|
|
c_args: gnome_builder_plugins_args,
|
|
link_args: gnome_builder_plugins_link_args,
|
|
link_with: gnome_builder_plugins_link_with,
|
|
|
|
diff --git a/src/main.c b/src/main.c
|
|
index f3bea6d..8f7eab8 100644
|
|
--- a/src/main.c
|
|
+++ b/src/main.c
|
|
@@ -109,6 +109,9 @@ main (int argc,
|
|
/* Setup our gdb fork()/exec() helper */
|
|
bug_buddy_init ();
|
|
|
|
+ /* macOS dbus hack */
|
|
+ g_setenv("DBUS_SESSION_BUS_ADDRESS", "launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET", TRUE);
|
|
+
|
|
/*
|
|
* We require a desktop session that provides a properly working
|
|
* DBus environment. Bail if for some reason that is not the case.
|