On Sat Jul 30, 2022 at 09:03:28PM +0200, Sebastien Marie wrote:
> Hi,
>
> The following diff updates wayland/wayland to 1.21.0 and
> wayland/wayland-protocols to 1.26.
>
> wayland-protocols is simple.
>
> wayland is more complex.
>
> - I bumped SHARED_LIBS for wayland-client and wayland-server (new symbols
> added). For the comment with the upstream version, I looked at meson.build
> file, but I am a bit unsure (wayland-client seems to have switched from 3.0 to
> 0.21.0 ?!)
>
> - Regarding the code, I sent a MR request to upstream. The current patches
> permits to build wayland on OpenBSD (and still on Linux), all tests are
> passing.
>
> - define _BSD_SOURCE to get SOCK_CLOEXEC and mkostemp (there is a
> _POSIX_C_SOURCE on command-line which hide it else)
> - in tests, use llvm-nm(1) instead of nm(1) (BSD nm has incompatible options with GNU)
> - provide a compat layer for waitid()
> - epoll(7) has userspace wrapper around kqueue(2) is upstreamed: use it for OpenBSD
> - when using SO_PEERCRED, the struct to use onOpenBSD is `struct sockpeercred`
> - provide a compat layer for count_open_fds() (for tests)
>
> Comments or OK ?
> --
> Sebastien Marie
>
>
>
Merci Sebastien! OK with two tweaks:
- Fix / Change MASTER_SITES (Upstream switch to gitlab.freedesktop.org)
- Wayland protocols depends on >=1.20.0:
-BUILD_DEPENDS = wayland/wayland
-RUN_DEPENDS = wayland/wayland
+BUILD_DEPENDS = wayland/wayland>=1.20.0
+RUN_DEPENDS = wayland/wayland>=1.20.0
Qt5 and Qt6 wayland are happy with the update.
Rafael
Index: wayland/Makefile
===================================================================
RCS file: /cvs/ports/wayland/wayland/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- wayland/Makefile 11 Mar 2022 20:04:05 -0000 1.3
+++ wayland/Makefile 13 Aug 2022 07:16:03 -0000
@@ -1,23 +1,23 @@
COMMENT = Display server protocol
-DISTNAME = wayland-1.19.0
-REVISION = 0
+V = 1.21.0
+DISTNAME = wayland-${V}
CATEGORIES = wayland
HOMEPAGE = https://wayland.freedesktop.org/
-SHARED_LIBS += wayland-client 0.0 # 3.0
-SHARED_LIBS += wayland-cursor 0.0 # 0.0
+SHARED_LIBS += wayland-client 0.1 # 0.21.0
+SHARED_LIBS += wayland-cursor 0.0 # 0.21.0
SHARED_LIBS += wayland-egl 0.0 # 1.0
-SHARED_LIBS += wayland-server 0.0 # 1.0
+SHARED_LIBS += wayland-server 0.1 # 0.21.0
WANTLIB += c epoll-shim expat ffi xml2
# MIT
PERMIT_PACKAGE = Yes
-MASTER_SITES = https://wayland.freedesktop.org/releases/
+MASTER_SITES = https://gitlab.freedesktop.org/wayland/wayland/-/releases/${V}/downloads/
EXTRACT_SUFX = .tar.xz
MODULES = devel/meson
@@ -30,8 +30,8 @@ LIB_DEPENDS = devel/libffi \
textproc/libxml \
devel/epoll-shim
-CFLAGS+= "-I${LOCALBASE}/include/libepoll-shim"
-
MODMESON_CONFIGURE_ARGS += -Ddocumentation=false
+
+TEST_DEPENDS = devel/llvm,-main
.include <bsd.port.mk>
Index: wayland/distinfo
===================================================================
RCS file: /cvs/ports/wayland/wayland/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- wayland/distinfo 6 Nov 2021 18:58:28 -0000 1.1.1.1
+++ wayland/distinfo 13 Aug 2022 07:16:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (wayland-1.19.0.tar.xz) = uszZAjANNUWBzVrTzEnapJIdVftBaliD4hh1D+8WbRU=
-SIZE (wayland-1.19.0.tar.xz) = 456380
+SHA256 (wayland-1.21.0.tar.xz) = bcZNf8FoN6aTpRz9suVo21OL/cn0V9RlYoW7lZTvEaw=
+SIZE (wayland-1.21.0.tar.xz) = 225936
Index: wayland/patches/patch-cursor_os-compatibility_c
===================================================================
RCS file: wayland/patches/patch-cursor_os-compatibility_c
diff -N wayland/patches/patch-cursor_os-compatibility_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ wayland/patches/patch-cursor_os-compatibility_c 13 Aug 2022 07:16:03 -0000
@@ -0,0 +1,14 @@
+https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/256
+
+Index: cursor/os-compatibility.c
+--- cursor/os-compatibility.c.orig
++++ cursor/os-compatibility.c
+@@ -23,6 +23,8 @@
+ * SOFTWARE.
+ */
+
++#define _BSD_SOURCE
++#define _DEFAULT_SOURCE
+ #define _GNU_SOURCE
+
+ #include "config.h"
Index: wayland/patches/patch-egl_meson_build
===================================================================
RCS file: wayland/patches/patch-egl_meson_build
diff -N wayland/patches/patch-egl_meson_build
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ wayland/patches/patch-egl_meson_build 13 Aug 2022 07:16:03 -0000
@@ -0,0 +1,14 @@
+https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/256
+
+Index: egl/meson.build
+--- egl/meson.build.orig
++++ egl/meson.build
+@@ -11,7 +11,7 @@ wayland_egl = library(
+
+ executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c')
+
+-nm_path = find_program('nm').full_path()
++nm_path = find_program(['llvm-nm', 'nm']).full_path()
+
+ test(
+ 'wayland-egl symbols check',
Index: wayland/patches/patch-meson_build
===================================================================
RCS file: /cvs/ports/wayland/wayland/patches/patch-meson_build,v
retrieving revision 1.2
diff -u -p -r1.2 patch-meson_build
--- wayland/patches/patch-meson_build 11 Mar 2022 20:04:05 -0000 1.2
+++ wayland/patches/patch-meson_build 13 Aug 2022 07:16:03 -0000
@@ -1,34 +1,36 @@
+https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/256
+
Index: meson.build
--- meson.build.orig
+++ meson.build
-@@ -26,7 +26,14 @@ add_project_arguments(
+@@ -34,7 +34,12 @@ add_project_arguments(
language: 'c'
)
--foreach h: [ 'sys/prctl.h' ]
+-foreach h: [ 'sys/prctl.h', 'sys/procctl.h', 'sys/ucred.h' ]
+have_headers = [
-+ 'signal.h',
-+ 'sys/epoll.h',
-+ 'sys/prctl.h',
-+ 'sys/ucred.h',
-+ ]
-+
++ 'sys/prctl.h',
++ 'sys/procctl.h',
++ 'sys/ucred.h',
++]
+foreach h: have_headers
config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
endforeach
-@@ -37,12 +44,14 @@ have_funcs = [
- 'prctl',
+@@ -46,6 +51,7 @@ have_funcs = [
'memfd_create',
+ 'mremap',
'strndup',
+ 'waitid',
]
foreach f: have_funcs
config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
- endforeach
+@@ -69,7 +75,7 @@ endif
+ config_h.set10('HAVE_BROKEN_MSG_CMSG_CLOEXEC', have_broken_msg_cmsg_cloexec)
if get_option('libraries')
-+ epoll_dep = dependency('epoll-shim', required: true)
- ffi_dep = dependency('libffi')
-
- decls = [
+- if host_machine.system() == 'freebsd'
++ if host_machine.system() in ['freebsd', 'openbsd']
+ # When building for FreeBSD, epoll(7) is provided by a userspace
+ # wrapper around kqueue(2).
+ epoll_dep = dependency('epoll-shim')
Index: wayland/patches/patch-src_meson_build
===================================================================
RCS file: wayland/patches/patch-src_meson_build
diff -N wayland/patches/patch-src_meson_build
--- wayland/patches/patch-src_meson_build 11 Mar 2022 20:04:05 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-Index: src/meson.build
---- src/meson.build.orig
-+++ src/meson.build
-@@ -77,7 +77,7 @@ if get_option('libraries')
- 'connection.c',
- 'wayland-os.c'
- ],
-- dependencies: [ ffi_dep, rt_dep ]
-+ dependencies: [ epoll_dep, ffi_dep, rt_dep ]
- )
-
- wayland_private_dep = declare_dependency(
-@@ -152,6 +152,7 @@ if get_option('libraries')
- version: '0.1.0',
- dependencies: [
- ffi_dep,
-+ epoll_dep,
- wayland_private_dep,
- wayland_util_dep,
- mathlib_dep,
-@@ -165,7 +166,7 @@ if get_option('libraries')
- wayland_server_dep = declare_dependency(
- link_with: wayland_server,
- include_directories: [ root_inc, include_directories('.') ],
-- dependencies: [ ffi_dep, mathlib_dep, threads_dep ],
-+ dependencies: [ epoll_dep, ffi_dep, mathlib_dep, threads_dep ],
- sources: [
- wayland_server_protocol_core_h,
- wayland_server_protocol_h
-@@ -195,6 +196,7 @@ if get_option('libraries')
- version: '0.3.0',
- dependencies: [
- ffi_dep,
-+ epoll_dep,
- wayland_private_dep,
- wayland_util_dep,
- mathlib_dep,
Index: wayland/patches/patch-src_wayland-os_c
===================================================================
RCS file: /cvs/ports/wayland/wayland/patches/patch-src_wayland-os_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_wayland-os_c
--- wayland/patches/patch-src_wayland-os_c 11 Mar 2022 20:04:05 -0000 1.2
+++ wayland/patches/patch-src_wayland-os_c 13 Aug 2022 07:16:03 -0000
@@ -1,98 +1,26 @@
+https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/256
+
Index: src/wayland-os.c
--- src/wayland-os.c.orig
+++ src/wayland-os.c
-@@ -25,6 +25,8 @@
+@@ -23,6 +23,8 @@
+ * SOFTWARE.
+ */
++#define _BSD_SOURCE
++#define _DEFAULT_SOURCE
#define _GNU_SOURCE
-+#include "../config.h"
-+
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <unistd.h>
-@@ -32,7 +34,6 @@
- #include <errno.h>
- #include <sys/epoll.h>
-
--#include "../config.h"
- #include "wayland-os.h"
-
- static int
-@@ -62,26 +63,50 @@ wl_os_socket_cloexec(int domain, int type, int protoco
- {
- int fd;
-
-+#ifdef SOCK_CLOEXEC
- fd = socket(domain, type | SOCK_CLOEXEC, protocol);
- if (fd >= 0)
- return fd;
- if (errno != EINVAL)
- return -1;
-+
No comments:
Post a Comment