macOSX: Gtk+3 not support Chinese input method, use meson and the way ninja build.
- brew install gtk+3
- launch gtk3-demo
- run Assistant demo
- In GtkEntry, switch to Chinese input method
After compiling gtk 3.24.10 use meson and the way ninja, does not support Chinese input method, I roll back versions of history, found gtk 3.24.10 use autoconf, automake and libtool support Chinese input. There is no problem with copying and pasting , that is, I can't wake up Chinese input method.
Asked homebrew they didn't find the reason, let me ask you。
https://github.com/Homebrew/homebrew-core/issues/44664
I also used the old way of compiling gtk 3.24.11 version and found no problems. The comparison code is as follows:
diff --git a/Formula/gtk+3.rb b/Formula/gtk+3.rb
index 375e40abf9..b7df8dd341 100644
--- a/Formula/gtk+3.rb
+++ b/Formula/gtk+3.rb
@@ -10,11 +10,10 @@ class Gtkx3 < Formula
sha256 "680b254667a32e784ce478d0f79d8044974a5bacf1fc08b7cc5eb82325c9fade" => :sierra
end
- depends_on "docbook" => :build
- depends_on "docbook-xsl" => :build
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
depends_on "gobject-introspection" => :build
- depends_on "meson" => :build
- depends_on "ninja" => :build
+ depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "atk"
depends_on "gdk-pixbuf"
@@ -26,26 +25,22 @@ class Gtkx3 < Formula
def install
args = %W[
+ --enable-debug=minimal
+ --disable-dependency-tracking
--prefix=#{prefix}
- -Dx11_backend=false
- -Dquartz_backend=true
- -Dgtk_doc=false
- -Dman=true
- -Dintrospection=true
+ --disable-glibtest
+ --enable-introspection=yes
+ --disable-schemas-compile
+ --enable-quartz-backend
+ --disable-x11-backend
]
- # ensure that we don't run the meson post install script
- ENV["DESTDIR"] = "/"
-
- # Find our docbook catalog
- ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
-
- mkdir "build" do
- system "meson", *args, ".."
- system "ninja", "-v"
- system "ninja", "install", "-v"
- end
-
+ system "autoreconf", "-fi"
+ 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
Edited by Ghost User