fix std::tie issue, fix old xkb issue

epel8
Tom spot Callaway 2 years ago
parent a64efb0677
commit 3b8ca2ebd5

@ -0,0 +1,11 @@
diff -up chromium-100.0.4896.75/net/base/address_list.h.missing-include-tuple chromium-100.0.4896.75/net/base/address_list.h
--- chromium-100.0.4896.75/net/base/address_list.h.missing-include-tuple 2022-04-08 10:03:31.950894611 -0400
+++ chromium-100.0.4896.75/net/base/address_list.h 2022-04-08 10:03:43.926970267 -0400
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <string>
+#include <tuple>
#include <utility>
#include <vector>

@ -0,0 +1,49 @@
diff -up chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc.old-xkb chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
--- chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc.old-xkb 2022-04-08 10:12:14.725197002 -0400
+++ chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2022-04-08 10:13:04.512511489 -0400
@@ -31,14 +31,6 @@
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
-// xkb_keymap_key_get_mods_for_level is relatively new (introduced in ver 1.0,
-// Sep 6, 2020), thus it is not available on some platform, such as Ubuntu
-// 18.04, which we still supports.
-// Thus declare the function as weak here, so we can check the availability on
-// runtime.
-extern "C" __attribute__((weak)) decltype(
- xkb_keymap_key_get_mods_for_level) xkb_keymap_key_get_mods_for_level;
-
namespace ui {
namespace {
@@ -925,18 +917,10 @@ void XkbKeyboardLayoutEngine::SetKeymap(
const xkb_keysym_t* keysyms;
int num_syms = xkb_keymap_key_get_syms_by_level(keymap, keycode, layout,
level, &keysyms);
- if (xkb_keymap_key_get_mods_for_level) {
- xkb_mod_mask_t masks[100]; // Large enough buffer.
- int num_mods = xkb_keymap_key_get_mods_for_level(
- keymap, keycode, layout, level, masks, std::size(masks));
- AddEntries(base::make_span(keysyms, num_syms),
- base::make_span(masks, num_mods), keycode);
- } else {
// If not, unfortunately, there's no convenient/efficient way
// to take the possible masks. Thus, use mask 0 always.
constexpr xkb_mod_mask_t kMask[] = {0};
AddEntries(base::make_span(keysyms, num_syms), kMask, keycode);
- }
}
}
}
@@ -1000,10 +984,7 @@ int XkbKeyboardLayoutEngine::UpdateModif
DomCode XkbKeyboardLayoutEngine::GetDomCodeByKeysym(uint32_t keysym,
uint32_t modifiers) const {
- // If xkb_keymap_key_get_mods_for_level is not available, all entries are
- // stored with modifiers mask is 0.
- if (!xkb_keymap_key_get_mods_for_level)
- modifiers = 0;
+ modifiers = 0;
auto iter = xkb_keysym_map_.find(XkbKeysymMapKey(keysym, modifiers));
if (iter == xkb_keysym_map_.end()) {

@ -292,6 +292,8 @@ Patch64: chromium-91.0.4472.77-aarch64-cxxflags-addition.patch
# Fix issue where closure_compiler thinks java is only allowed in android builds
# https://bugs.chromium.org/p/chromium/issues/detail?id=1192875
Patch65: chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch
# Need <tuple> for std::tie
Patch66: chromium-100.0.4896.75-missing-include-tuple.patch
# Fix missing cstring in remoting code
Patch67: chromium-98.0.4758.80-remoting-cstring.patch
@ -358,6 +360,10 @@ Patch109: chromium-98.0.4758.80-epel7-erase-fix.patch
Patch110: chromium-90.0.4430.93-epel8-aarch64-libpng16-symbol-prefixes.patch
# Add additional operator== to make el7 happy.
Patch111: chromium-99.0.4844.51-el7-extra-operator==.patch
# EPEL7 and EPEL8 do not have a new enough libxkbcommon to support xkb_keymap_key_get_mods_for_level
# and the weak attribute hack that chromium tries doesn't seem to work on gcc
Patch112: chromium-100.0.4896.75-old-xkb.patch
# VAAPI
# Upstream turned VAAPI on in Linux in 86
@ -999,6 +1005,7 @@ udev.
%patch63 -p1 -b .SCTHashdanceMetadata-move
%patch64 -p1 -b .aarch64-cxxflags-addition
%patch65 -p1 -b .java-only-allowed
%patch66 -p1 -b .missing-include-tuple
%patch67 -p1 -b .remoting-cstring
%patch68 -p1 -b .i686-textrels
%patch79 -p1 -b .widevine-no-download
@ -1036,6 +1043,10 @@ udev.
%patch110 -p1 -b .el8-aarch64-libpng16-symbol-prefixes
%endif
%if 0%{?rhel} == 7 || 0%{?rhel} == 8
%patch111 -p1 -b .old-xkb
%endif
# Feature specific patches
%if %{use_vaapi}
%patch202 -p1 -b .accel-mjpeg

Loading…
Cancel
Save