pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/wayland wayland: Update to 1.18.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/177ffed53db9
branches:  trunk
changeset: 413065:177ffed53db9
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Mar 15 16:03:26 2020 +0000

description:
wayland: Update to 1.18.0

Based on a patch from wiz@, thanks! The main change I made was tricking
autoconf into thinking NetBSD doesn't have posix_fallocate.

The main new features in this release are:

- Add support for the Meson build system (autotools is still supported
  but will be removed in a future release)
- Add API to tag proxy objects to allow applications and toolkits to
  share the same Wayland connection
- Track wayland-server timers in user-space to prevent creating too
  many FDs
- Add wl_global_remove, a new function to mitigate race conditions with
  globals

diffstat:

 devel/wayland/Makefile                                |  13 ++++++++---
 devel/wayland/distinfo                                |  20 ++++++++----------
 devel/wayland/files/event-loop-kqueue.c               |  11 ++++++---
 devel/wayland/patches/patch-Makefile.am               |  15 ++-----------
 devel/wayland/patches/patch-configure.ac              |  12 +++++-----
 devel/wayland/patches/patch-cursor_os-compatibility.c |  16 ---------------
 devel/wayland/patches/patch-cursor_wayland-cursor.c   |  16 ---------------
 devel/wayland/patches/patch-src_event-loop.c          |   8 +++---
 devel/wayland/patches/patch-src_wayland-server.c      |  16 +++++++-------
 9 files changed, 46 insertions(+), 81 deletions(-)

diffs (276 lines):

diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/Makefile
--- a/devel/wayland/Makefile    Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/Makefile    Sun Mar 15 16:03:26 2020 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.7 2020/03/08 16:42:26 bsiegert Exp $
+# $NetBSD: Makefile,v 1.8 2020/03/15 16:03:26 nia Exp $
 
-DISTNAME=      wayland-1.17.0
-PKGREVISION=   5
+DISTNAME=      wayland-1.18.0
 CATEGORIES=    devel
 MASTER_SITES=  https://wayland.freedesktop.org/releases/
 EXTRACT_SUFX=  .tar.xz
@@ -21,8 +20,14 @@
 
 CONFIGURE_ARGS+=       --disable-documentation
 
+# No support in the kernel yet, always fails.
+# Make sure wayland falls back to ftruncate.
+CONFIGURE_ENV.NetBSD+= ac_cv_func_posix_fallocate=no
+
+PKGCONFIG_OVERRIDE+=   cursor/wayland-cursor.pc.in
+PKGCONFIG_OVERRIDE+=   egl/wayland-egl-backend.pc.in
+PKGCONFIG_OVERRIDE+=   egl/wayland-egl.pc.in
 PKGCONFIG_OVERRIDE+=   src/wayland-client.pc.in
-PKGCONFIG_OVERRIDE+=   src/wayland-cursor.pc.in
 PKGCONFIG_OVERRIDE+=   src/wayland-scanner.pc.in
 PKGCONFIG_OVERRIDE+=   src/wayland-server.pc.in
 
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/distinfo
--- a/devel/wayland/distinfo    Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/distinfo    Sun Mar 15 16:03:26 2020 +0000
@@ -1,17 +1,15 @@
-$NetBSD: distinfo,v 1.7 2020/01/05 19:30:48 nia Exp $
+$NetBSD: distinfo,v 1.8 2020/03/15 16:03:26 nia Exp $
 
-SHA1 (wayland-1.17.0.tar.xz) = 4d9e08a7a4a07fa37a25d7aa3ef83f08edec0600
-RMD160 (wayland-1.17.0.tar.xz) = 635494fb0f5d9eb1e782f98e08c3e0e26ff44268
-SHA512 (wayland-1.17.0.tar.xz) = c5051aab5ff078b368c196ecfedb33ccd961265bb914845d7ed81de361bb86ae18299575baa6c4eceb0d82cf8b495e8293f31b51d1cbc05d84af0a199ab3f946
-Size (wayland-1.17.0.tar.xz) = 437680 bytes
-SHA1 (patch-Makefile.am) = cfdf21bb32743590f88b6ab13ca00335f4e30475
-SHA1 (patch-configure.ac) = 57a86b0f77062d475e92123199ee61c0ac6d2443
-SHA1 (patch-cursor_os-compatibility.c) = 04bc63b40ba882dbc6babe8dca9d1619107fafb9
-SHA1 (patch-cursor_wayland-cursor.c) = 6dcb4bd2d241527e9ee62fb6ddad6447cc379ba8
-SHA1 (patch-src_event-loop.c) = 84128ea7ac073acc65d8ae2e6f4ea93f3c5fe9ec
+SHA1 (wayland-1.18.0.tar.xz) = 33e5292b32a115e829458ea627201ed1e4ad4f45
+RMD160 (wayland-1.18.0.tar.xz) = 0416292a51e3f2ed9c537a94de60ff8e02273d97
+SHA512 (wayland-1.18.0.tar.xz) = e30199e30c2bbd361ee695b4f3f7a4e264f10ed8f46f2c90762b5739fc578ae757dc39aa0258d8fbf0ed418553470bccd4b2730ed9705481cfccdab5de96a8fc
+Size (wayland-1.18.0.tar.xz) = 453968 bytes
+SHA1 (patch-Makefile.am) = de9f10054caeb6549187639973418b9039d782ee
+SHA1 (patch-configure.ac) = 01b226ecaae6ad07ce20de70e36e68990cf1daed
+SHA1 (patch-src_event-loop.c) = d49eab01c973d9d124867e8ab06c091e63e697f9
 SHA1 (patch-src_wayland-os.c) = eb51bf1dc539926a14848097d04bb762cf1fe962
 SHA1 (patch-src_wayland-os.h) = d07a731f081c1600c3041cc1349120031d28337f
-SHA1 (patch-src_wayland-server.c) = 25c884c08a229f2e5fe56e4b864a68ffcce2eda5
+SHA1 (patch-src_wayland-server.c) = 5d30f67968b2516f3335fb2da559883a952ed355
 SHA1 (patch-src_wayland-shm.c) = 8a2e5ae22bc400cd2c5c9dec421d536229b2943f
 SHA1 (patch-tests_os-wrappers-test.c) = a17a2e3cbab039becc8c4cb2f1be379b3bffba0e
 SHA1 (patch-tests_test-runner.c) = e97cfc48340b0de1c2642cb7cc48d9acf0a533eb
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/files/event-loop-kqueue.c
--- a/devel/wayland/files/event-loop-kqueue.c   Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/files/event-loop-kqueue.c   Sun Mar 15 16:03:26 2020 +0000
@@ -25,6 +25,12 @@
 
 #include "config.h"
 
+#ifndef container_of
+#define container_of(ptr, type, member) ({ \
+    const typeof(((type *)0)->member) * __mptr = (ptr); \
+    (type *)((char *)__mptr - offsetof(type, member)); })
+#endif
+
 #ifdef HAVE_SYS_EVENT_H
 #include <stddef.h>
 #include <stdio.h>
@@ -160,7 +166,7 @@
        add_source(loop, &source->base, mask, data);
 
        if (source->base.fd < 0) {
-               fprintf(stderr, "could not add source\n: %m");
+               fprintf(stderr, "could not add source\n: %s", strerror(errno));
                free(source);
                return NULL;
        }
@@ -245,9 +251,6 @@
 {
        struct wl_event_source_timer *timer_source =
                (struct wl_event_source_timer *) source;
-       uint64_t expires;
-
-       expires = ev->data;    /* XXX unused?! */
        return timer_source->func(timer_source->base.data);
 }
 
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/patches/patch-Makefile.am
--- a/devel/wayland/patches/patch-Makefile.am   Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/patches/patch-Makefile.am   Sun Mar 15 16:03:26 2020 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-Makefile.am,v 1.2 2020/01/05 19:30:48 nia Exp $
+$NetBSD: patch-Makefile.am,v 1.3 2020/03/15 16:03:26 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
---- Makefile.am.orig   2019-03-21 00:55:25.000000000 +0000
+--- Makefile.am.orig   2020-02-11 23:46:03.000000000 +0000
 +++ Makefile.am
-@@ -76,7 +76,8 @@ libwayland_server_la_LDFLAGS = -version-
+@@ -78,7 +78,8 @@ libwayland_server_la_LDFLAGS = -version-
  libwayland_server_la_SOURCES =                        \
        src/wayland-server.c                    \
        src/wayland-shm.c                       \
@@ -14,12 +14,3 @@
  
  nodist_libwayland_server_la_SOURCES =         \
        protocol/wayland-server-protocol.h      \
-@@ -227,7 +228,7 @@ libtest_runner_la_LIBADD =                 \
-       libwayland-client.la                    \
-       libwayland-server.la                    \
-       libtest-helpers.la                      \
--      -lrt -ldl $(FFI_LIBS)
-+      -lrt $(DL_LIBS) $(FFI_LIBS)
- 
- array_test_SOURCES = tests/array-test.c
- array_test_LDADD = libtest-runner.la
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/patches/patch-configure.ac
--- a/devel/wayland/patches/patch-configure.ac  Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/patches/patch-configure.ac  Sun Mar 15 16:03:26 2020 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-configure.ac,v 1.2 2020/01/05 19:30:48 nia Exp $
+$NetBSD: patch-configure.ac,v 1.3 2020/03/15 16:03:26 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
---- configure.ac.orig  2019-03-21 00:55:25.000000000 +0000
+--- configure.ac.orig  2020-02-11 23:46:03.000000000 +0000
 +++ configure.ac
-@@ -65,6 +65,17 @@ AC_SUBST(GCC_CFLAGS)
- AC_CHECK_HEADERS([sys/prctl.h])
- AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl])
+@@ -71,6 +71,17 @@ WESTON_SEARCH_LIBS([DL], [dl], [dlsym])
+ # OpenBSD doesn't have librt, but it has its functions in libc
+ WESTON_SEARCH_LIBS([RT], [rt], [clock_gettime])
  
 +AC_CHECK_HEADERS([sys/epoll.h sys/event.h])
 +if test "x$ac_cv_header_sys_epoll_h" != "xyes" && test "x$ac_cv_header_sys_event_h" != "xyes"; then
@@ -22,7 +22,7 @@
  AC_ARG_ENABLE([libraries],
              [AC_HELP_STRING([--disable-libraries],
                              [Disable compilation of wayland libraries])],
-@@ -100,12 +111,14 @@ AC_SUBST([ICONDIR])
+@@ -106,12 +117,14 @@ AC_SUBST([ICONDIR])
  
  if test "x$enable_libraries" = "xyes"; then
        PKG_CHECK_MODULES(FFI, [libffi])
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/patches/patch-cursor_os-compatibility.c
--- a/devel/wayland/patches/patch-cursor_os-compatibility.c     Sun Mar 15 16:01:20 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-cursor_os-compatibility.c,v 1.2 2020/01/05 19:30:48 nia Exp $
-
-NetBSD support: no filesystems currently support posix_fallocate,
-so it always fails
-
---- cursor/os-compatibility.c.orig     2019-03-21 00:55:25.000000000 +0000
-+++ cursor/os-compatibility.c
-@@ -129,7 +129,7 @@ os_create_anonymous_file(off_t size)
-       if (fd < 0)
-               return -1;
- 
--#ifdef HAVE_POSIX_FALLOCATE
-+#if defined(HAVE_POSIX_FALLOCATE) && !defined(__NetBSD__)
-       ret = posix_fallocate(fd, 0, size);
-       if (ret != 0) {
-               close(fd);
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/patches/patch-cursor_wayland-cursor.c
--- a/devel/wayland/patches/patch-cursor_wayland-cursor.c       Sun Mar 15 16:01:20 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-cursor_wayland-cursor.c,v 1.2 2020/01/05 19:30:48 nia Exp $
-
-NetBSD support: no filesystems currently support posix_fallocate,
-so it always fails
-
---- cursor/wayland-cursor.c.orig       2019-03-21 00:55:25.000000000 +0000
-+++ cursor/wayland-cursor.c
-@@ -86,7 +86,7 @@ shm_pool_resize(struct shm_pool *pool, i
-       if (ftruncate(pool->fd, size) < 0)
-               return 0;
- 
--#ifdef HAVE_POSIX_FALLOCATE
-+#if defined(HAVE_POSIX_FALLOCATE) && !defined(__NetBSD__)
-       errno = posix_fallocate(pool->fd, 0, size);
-       if (errno != 0)
-               return 0;
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/patches/patch-src_event-loop.c
--- a/devel/wayland/patches/patch-src_event-loop.c      Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/patches/patch-src_event-loop.c      Sun Mar 15 16:03:26 2020 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_event-loop.c,v 1.2 2020/01/05 19:30:48 nia Exp $
+$NetBSD: patch-src_event-loop.c,v 1.3 2020/03/15 16:03:26 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
---- src/event-loop.c.orig      2019-03-21 00:55:25.000000000 +0000
+--- src/event-loop.c.orig      2020-02-11 23:46:03.000000000 +0000
 +++ src/event-loop.c
 @@ -23,6 +23,8 @@
   * SOFTWARE.
@@ -10,10 +10,10 @@
  
 +#include "config.h"
 +#ifdef HAVE_SYS_EPOLL_H
+ #include <assert.h>
  #include <stddef.h>
  #include <stdio.h>
- #include <errno.h>
-@@ -702,3 +704,4 @@ wl_event_loop_get_destroy_listener(struc
+@@ -1088,3 +1090,4 @@ wl_event_loop_get_destroy_listener(struc
  {
        return wl_signal_get(&loop->destroy_signal, notify);
  }
diff -r ea6a5eeac275 -r 177ffed53db9 devel/wayland/patches/patch-src_wayland-server.c
--- a/devel/wayland/patches/patch-src_wayland-server.c  Sun Mar 15 16:01:20 2020 +0000
+++ b/devel/wayland/patches/patch-src_wayland-server.c  Sun Mar 15 16:03:26 2020 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_wayland-server.c,v 1.2 2020/01/05 19:30:48 nia Exp $
+$NetBSD: patch-src_wayland-server.c,v 1.3 2020/03/15 16:03:26 nia Exp $
 
 NetBSD support
 
---- src/wayland-server.c.orig  2019-03-21 00:55:25.000000000 +0000
+--- src/wayland-server.c.orig  2020-02-11 23:46:03.000000000 +0000
 +++ src/wayland-server.c
-@@ -43,6 +43,13 @@
+@@ -44,6 +44,13 @@
  #include <sys/file.h>
  #include <sys/stat.h>
  
@@ -17,8 +17,8 @@
 +
  #include "wayland-util.h"
  #include "wayland-private.h"
- #include "wayland-server.h"
-@@ -77,7 +84,17 @@ struct wl_client {
+ #include "wayland-server-private.h"
+@@ -79,7 +86,17 @@ struct wl_client {
        struct wl_list link;
        struct wl_map objects;
        struct wl_priv_signal destroy_signal;
@@ -36,7 +36,7 @@
        int error;
        struct wl_priv_signal resource_created_signal;
  };
-@@ -312,7 +329,11 @@ wl_resource_post_error(struct wl_resourc
+@@ -315,7 +332,11 @@ wl_resource_post_error(struct wl_resourc
  static void
  destroy_client_with_error(struct wl_client *client, const char *reason)
  {
@@ -48,7 +48,7 @@
        wl_client_destroy(client);
  }
  
-@@ -527,9 +548,11 @@ wl_client_create(struct wl_display *disp
+@@ -530,9 +551,11 @@ wl_client_create(struct wl_display *disp
                goto err_client;
  
        len = sizeof client->ucred;
@@ -60,7 +60,7 @@
  
        client->connection = wl_connection_create(fd);
        if (client->connection == NULL)
-@@ -583,12 +606,23 @@ WL_EXPORT void
+@@ -586,12 +609,23 @@ WL_EXPORT void
  wl_client_get_credentials(struct wl_client *client,
                          pid_t *pid, uid_t *uid, gid_t *gid)
  {



Home | Main Index | Thread Index | Old Index