Off Wayland in rosa2016.1

A new build error occured:

```
../../ui/ozone/platform/wayland/host/wayland_window.cc:7:10: fatal error: 'bits/stdint-intn.h' file not found
include <bits/stdint-intn.h>
         ^~~~~~~~~~~~~~~~~~~~
```

I am fed up with fixing Wayland in rosa2016.1

Took flags from https://gitlab.com/noencoding/OS-X-Chromium-with-proprietary-codecs/-/wikis/List-of-all-gn-arguments-for-Chromium-build
This commit is contained in:
Mikhail Novosyolov 2021-11-13 12:12:41 +03:00
parent cdd2c949a7
commit 69ee7beee6
2 changed files with 5 additions and 38 deletions

View file

@ -116,8 +116,6 @@ Patch190: chromium-69-gn-bootstrap.patch
Patch601: chromium-62-include-cstdlib.patch
# Add "ROSA" to the user agent string
Patch627: chromium-68.0.3440.106-rosa-user-agent.patch
# Fix building third_party/wayland on rosa2016.1
Patch639: wayland-strndup.patch
# Fix building with current glib2.0
# Hunks from https://build.opensuse.org/package/view_file/openSUSE:Factory/chromium/chromium-gcc11.patch
Patch643: glib2.0.patch
@ -432,8 +430,12 @@ export PYTHONPATH="../../third_party/pyjson5/src:../../xcb-proto-%{xcb_version}"
%if %{mdvver} >= 201910
%define pipewire_enablement rtc_use_pipewire=true rtc_link_pipewire=true rtc_pipewire_version="0.3"
%define wayland_enablement %{nil}
%else
%define pipewire_enablement rtc_use_pipewire=false
# Wayland parts regularly require adjusting for old glibc in rosa2016.1,
# but wayland is generally not widely used there
%define wayland_enablement enable_wayland_server=false ozone_platform_wayland=false
%endif
%ifarch aarch64
@ -476,6 +478,7 @@ export PYTHONPATH="../../third_party/pyjson5/src:../../xcb-proto-%{xcb_version}"
use_pulseaudio=true \
link_pulseaudio=true \
%{pipewire_enablement} \
%{wayland_enablement} \
use_gnome_keyring=false \
use_allocator="none" \
treat_warnings_as_errors=false \

View file

@ -1,36 +0,0 @@
Upstream commit added this code:
https://github.com/wayland-project/wayland/commit/4a1f348c20157db7bd7c759fdeb23fbe8729c571
For some reasones something goes wrong and HAVE_STRNDUP does not get defined on rosa2016.1,
(no problems on rosa2019.05 and rosa2019.1).
The compiler fails:
../../third_party/wayland/src/src/scanner.c:979:1: error: expected identifier or '('
strndup(const char *s, size_t size)
glibc in rosa2016.1-rosa2019.1 does have strndup, workaround this issue by removing not needed code.
// mikhailnov, 09.01.2021
diff --git a/src/scanner.c b/src/scanner.c
index 7ed1ba1a..2b3adbda 100644
--- a/third_party/wayland/src/src/scanner.c
+++ b/third_party/wayland/src/src/scanner.c
@@ -974,17 +916,6 @@
}
-#ifndef HAVE_STRNDUP
-char *
-strndup(const char *s, size_t size)
-{
- char *r = malloc(size + 1);
- strncpy(r, s, size);
- r[size] = '\0';
- return r;
-}
-#endif
-
static void
end_element(void *data, const XML_Char *name)
{