File chromium-115-Qt-moc-version.patch of Package chromium.18077

diff --git a/BUILD.gn b/BUILD.gn.new
index 6a67961..92cf16e 100644
--- a/ui/qt/BUILD.gn
+++ b/ui/qt/BUILD.gn
@@ -40,15 +40,6 @@ source_set("qt_interface") {
   sources = [ "qt_interface.cc" ]
 }
 
-if (!use_sysroot) {
-  action("generate_moc") {
-    script = "moc_wrapper.py"
-    inputs = [ "//ui/qt/qt_shim.h" ]
-    outputs = [ "$root_gen_dir/qt_shim_moc.cc" ]
-    args = rebase_path(inputs + outputs, root_build_dir)
-  }
-}
-
 template("qt_shim") {
   pkg_config("qt" + invoker.qt_version + "_config") {
     packages = [
@@ -56,6 +47,13 @@ template("qt_shim") {
       "Qt" + invoker.qt_version + "Widgets",
     ]
   }
+  
+  action("generate_moc" + invoker.qt_version) {
+    script = "moc_wrapper.py"
+    inputs = [ "//ui/qt/qt_shim.h" ]
+    outputs = [ "$root_gen_dir/qt" + invoker.qt_version + "_shim_moc.cc" ]
+    args = rebase_path(inputs + outputs, root_build_dir) + [ invoker.qt_version ]
+  }
 
   shared_library(target_name) {
     visibility = [
@@ -89,8 +87,8 @@ template("qt_shim") {
       # avoid a build-time dependency on `moc` when using the sysroot.
       sources += [ "qt" + invoker.qt_version + "_shim_moc.cc" ]
     } else {
-      sources += get_target_outputs(":generate_moc")
-      deps += [ ":generate_moc" ]
+      sources += get_target_outputs(":generate_moc" + invoker.qt_version)
+      deps += [ ":generate_moc" + invoker.qt_version ]
     }
   }
 }
diff --git a/moc_wrapper.py b/moc_wrapper.py.new
index 9cb04db..a9227ef 100755
--- a/ui/qt/moc_wrapper.py
+++ b/ui/qt/moc_wrapper.py
@@ -6,5 +6,5 @@
 import subprocess
 import sys
 
-
-subprocess.check_call(["moc", sys.argv[1], "-o", sys.argv[2]])
+cmd = "moc-qt" + sys.argv[3]
+subprocess.check_call([cmd, sys.argv[1], "-o", sys.argv[2]])
openSUSE Build Service is sponsored by