162 lines
4.7 KiB
Ruby
162 lines
4.7 KiB
Ruby
class Vte3 < Formula
|
|
desc "Terminal emulator widget used by GNOME terminal"
|
|
homepage "https://developer.gnome.org/vte/"
|
|
url "https://download.gnome.org/sources/vte/0.64/vte-0.64.2.tar.xz"
|
|
sha256 "2b3c820b65a667c1d8859ba20478be626d1519cc3159dac25f703330c6d07e18"
|
|
license "LGPL-2.0-or-later"
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "9f516a4870878d39bf2913997df595b7e153829c3e3aee764a0e81bdba3c6152"
|
|
sha256 arm64_big_sur: "805b98e4a5b77ac8385fdf15c555bdbc6cfa19fa586e140d7f030366c80b1f69"
|
|
sha256 monterey: "3967df10f8100cc5a5e99f740b6cade8d3f58fcb9589cc974fd6292a60a2fa4e"
|
|
sha256 big_sur: "80db6f9c0b62cd99beaf9eaadde7be8cfe3c09a54eb9b385bd103891d7a12af8"
|
|
sha256 catalina: "ad7a7e195ce43afdf30eff81f83e606b79e78db8e6ed39f0370ef34ebeeb39e4"
|
|
sha256 mojave: "2404d321dc1eb3e61c5f6282c214395beae288e97ae62d6d6b5afe3edd9b7adf"
|
|
sha256 x86_64_linux: "fb813f9bc1317086d4e1374aa003f0796084aeabc85fa077a40e0a785b877a54"
|
|
end
|
|
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "vala" => :build
|
|
depends_on "gettext"
|
|
depends_on "gnutls"
|
|
depends_on "gtk+3"
|
|
depends_on macos: :mojave
|
|
depends_on "pcre2"
|
|
|
|
on_linux do
|
|
depends_on "linux-headers@4.15" => :build
|
|
depends_on "gcc" # for C++17
|
|
depends_on "systemd"
|
|
end
|
|
|
|
fails_with gcc: "5"
|
|
|
|
# submitted upstream as https://gitlab.gnome.org/tschoonj/vte/merge_requests/1
|
|
patch :DATA
|
|
|
|
def install
|
|
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
|
|
|
args = std_meson_args + %w[
|
|
-Dgir=true
|
|
-Dgtk3=true
|
|
-Dgnutls=true
|
|
-Dvapi=true
|
|
-D_b_symbolic_functions=false
|
|
]
|
|
|
|
mkdir "build" do
|
|
system "meson", *args, ".."
|
|
system "ninja", "-v"
|
|
system "ninja", "install", "-v"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <vte/vte.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
guint v = vte_get_major_version();
|
|
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"]
|
|
gnutls = Formula["gnutls"]
|
|
gtkx3 = Formula["gtk+3"]
|
|
harfbuzz = Formula["harfbuzz"]
|
|
libepoxy = Formula["libepoxy"]
|
|
libpng = Formula["libpng"]
|
|
libtasn1 = Formula["libtasn1"]
|
|
nettle = Formula["nettle"]
|
|
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#{gnutls.opt_include}
|
|
-I#{gtkx3.opt_include}/gtk-3.0
|
|
-I#{harfbuzz.opt_include}/harfbuzz
|
|
-I#{include}/vte-2.91
|
|
-I#{libepoxy.opt_include}
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{libtasn1.opt_include}
|
|
-I#{nettle.opt_include}
|
|
-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#{gnutls.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
|
|
-lgnutls
|
|
-lgobject-2.0
|
|
-lgtk-3
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
-lvte-2.91
|
|
-lz
|
|
]
|
|
on_macos do
|
|
flags << "-lintl"
|
|
end
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/meson.build b/meson.build
|
|
index e2200a75..df98872f 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -78,6 +78,8 @@ lt_age = vte_minor_version * 100 + vte_micro_version - lt_revision
|
|
lt_current = vte_major_version + lt_age
|
|
|
|
libvte_gtk3_soversion = '@0@.@1@.@2@'.format(libvte_soversion, lt_current, lt_revision)
|
|
+osx_version_current = lt_current + 1
|
|
+libvte_gtk3_osxversions = [osx_version_current, '@0@.@1@.0'.format(osx_version_current, lt_revision)]
|
|
libvte_gtk4_soversion = libvte_soversion.to_string()
|
|
|
|
# i18n
|
|
diff --git a/src/meson.build b/src/meson.build
|
|
index 79d4a702..0495dea8 100644
|
|
--- a/src/meson.build
|
|
+++ b/src/meson.build
|
|
@@ -224,6 +224,7 @@ if get_option('gtk3')
|
|
vte_gtk3_api_name,
|
|
sources: libvte_gtk3_sources,
|
|
version: libvte_gtk3_soversion,
|
|
+ darwin_versions: libvte_gtk3_osxversions,
|
|
include_directories: incs,
|
|
dependencies: libvte_gtk3_deps,
|
|
cpp_args: libvte_gtk3_cppflags,
|