pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/wayland



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Jan  5 19:30:48 UTC 2020

Modified Files:
        pkgsrc/devel/wayland: Makefile distinfo
        pkgsrc/devel/wayland/patches: patch-Makefile.am patch-configure.ac
            patch-cursor_os-compatibility.c patch-cursor_wayland-cursor.c
            patch-src_event-loop.c patch-src_wayland-os.c
            patch-src_wayland-os.h patch-src_wayland-server.c
            patch-src_wayland-shm.c patch-tests_os-wrappers-test.c
            patch-tests_test-runner.c
Removed Files:
        pkgsrc/devel/wayland/patches: patch-tests_client-test.c
            patch-tests_connection-test.c patch-tests_event-loop-test.c
            patch-tests_queue-test.c patch-tests_sanity-test.c
            patch-tests_test-helpers.c

Log Message:
wayland: Simplify patches.

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/wayland/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/devel/wayland/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/wayland/patches/patch-Makefile.am \
    pkgsrc/devel/wayland/patches/patch-configure.ac \
    pkgsrc/devel/wayland/patches/patch-cursor_os-compatibility.c \
    pkgsrc/devel/wayland/patches/patch-cursor_wayland-cursor.c \
    pkgsrc/devel/wayland/patches/patch-src_event-loop.c \
    pkgsrc/devel/wayland/patches/patch-src_wayland-server.c \
    pkgsrc/devel/wayland/patches/patch-tests_test-runner.c
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/wayland/patches/patch-src_wayland-os.c \
    pkgsrc/devel/wayland/patches/patch-src_wayland-os.h \
    pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c \
    pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c
cvs rdiff -u -r1.1 -r0 pkgsrc/devel/wayland/patches/patch-tests_client-test.c \
    pkgsrc/devel/wayland/patches/patch-tests_connection-test.c \
    pkgsrc/devel/wayland/patches/patch-tests_event-loop-test.c \
    pkgsrc/devel/wayland/patches/patch-tests_queue-test.c \
    pkgsrc/devel/wayland/patches/patch-tests_sanity-test.c \
    pkgsrc/devel/wayland/patches/patch-tests_test-helpers.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/wayland/Makefile
diff -u pkgsrc/devel/wayland/Makefile:1.4 pkgsrc/devel/wayland/Makefile:1.5
--- pkgsrc/devel/wayland/Makefile:1.4   Mon Sep  9 20:26:58 2019
+++ pkgsrc/devel/wayland/Makefile       Sun Jan  5 19:30:48 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2019/09/09 20:26:58 nia Exp $
+# $NetBSD: Makefile,v 1.5 2020/01/05 19:30:48 nia Exp $
 
 DISTNAME=      wayland-1.17.0
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    devel
 MASTER_SITES=  https://wayland.freedesktop.org/releases/
 EXTRACT_SUFX=  .tar.xz
@@ -11,10 +11,14 @@ HOMEPAGE=   https://wayland.freedesktop.or
 COMMENT=       Display server protocol - development libraries
 LICENSE=       mit
 
-USE_TOOLS+=            autoconf automake autoreconf gmake pkg-config
-USE_LANGUAGES+=                c c++
-GNU_CONFIGURE=         YES
-USE_LIBTOOL=           YES
+GNU_CONFIGURE= YES
+USE_LIBTOOL=   YES
+
+USE_TOOLS+=    autoconf automake autoreconf
+USE_TOOLS+=    gmake pkg-config
+
+USE_LANGUAGES= c c++
+
 CONFIGURE_ARGS+=       --disable-documentation
 
 PKGCONFIG_OVERRIDE+=   src/wayland-client.pc.in
@@ -27,6 +31,7 @@ pre-configure:
        ${CP} ${FILESDIR}/event-loop-kqueue.c ${WRKSRC}/src
        cd ${WRKSRC} && autoreconf -fvi
 
+.include "platform.mk"
 .include "../../devel/libffi/buildlink3.mk"
 .include "../../textproc/expat/buildlink3.mk"
 .include "../../textproc/libxslt/buildlink3.mk"

Index: pkgsrc/devel/wayland/distinfo
diff -u pkgsrc/devel/wayland/distinfo:1.6 pkgsrc/devel/wayland/distinfo:1.7
--- pkgsrc/devel/wayland/distinfo:1.6   Mon Sep  9 20:26:58 2019
+++ pkgsrc/devel/wayland/distinfo       Sun Jan  5 19:30:48 2020
@@ -1,23 +1,17 @@
-$NetBSD: distinfo,v 1.6 2019/09/09 20:26:58 nia Exp $
+$NetBSD: distinfo,v 1.7 2020/01/05 19:30:48 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) = af2c47eb2e1a4924ea842aeea1d0f00832762ec0
-SHA1 (patch-configure.ac) = df15013a1639d673e5f0a86433a074f6201dbbc4
-SHA1 (patch-cursor_os-compatibility.c) = 9aac1c734199bc7e33e7735356bc8dbc80fba89d
-SHA1 (patch-cursor_wayland-cursor.c) = 81c6896b3a541e662db440d8557c6b3e70fcb580
-SHA1 (patch-src_event-loop.c) = 04d0eed4ba0708518201ec630dab97d52735fb0c
-SHA1 (patch-src_wayland-os.c) = 7297f8259aea9603a7ba20fe58f79e3fd0042990
-SHA1 (patch-src_wayland-os.h) = 1e01dfadb5ed5889d76e024d30537935f33631a3
-SHA1 (patch-src_wayland-server.c) = 335de8f5390eb337dfbde26f523162bd44c06baf
-SHA1 (patch-src_wayland-shm.c) = 694232eac180f1a6a31c96f9ac98cb0b5a016d20
-SHA1 (patch-tests_client-test.c) = 6ffe18dfd64176a92f6f795eb757c54a3cf0ad10
-SHA1 (patch-tests_connection-test.c) = af53116c99cbb8d6570bcec66bfd895c1ae01700
-SHA1 (patch-tests_event-loop-test.c) = 79909fdce7b73a7b19c58d3711329f6288fe7204
-SHA1 (patch-tests_os-wrappers-test.c) = 9d154702d0b0238cba554df18e5dbdc620bd9ab8
-SHA1 (patch-tests_queue-test.c) = 3ee8433faa50b033ab880d3c5b6a9846063d6bd6
-SHA1 (patch-tests_sanity-test.c) = 80e06834ccf344fda16a6a8f85e062f2b4a744ec
-SHA1 (patch-tests_test-helpers.c) = 1895c0bdadefdaeaa421e7051b71a297b3a5e2c3
-SHA1 (patch-tests_test-runner.c) = 35d911064c1b65537ef2276797b8041fd6b023f7
+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 (patch-src_wayland-os.c) = eb51bf1dc539926a14848097d04bb762cf1fe962
+SHA1 (patch-src_wayland-os.h) = d07a731f081c1600c3041cc1349120031d28337f
+SHA1 (patch-src_wayland-server.c) = 25c884c08a229f2e5fe56e4b864a68ffcce2eda5
+SHA1 (patch-src_wayland-shm.c) = 8a2e5ae22bc400cd2c5c9dec421d536229b2943f
+SHA1 (patch-tests_os-wrappers-test.c) = a17a2e3cbab039becc8c4cb2f1be379b3bffba0e
+SHA1 (patch-tests_test-runner.c) = e97cfc48340b0de1c2642cb7cc48d9acf0a533eb

Index: pkgsrc/devel/wayland/patches/patch-Makefile.am
diff -u pkgsrc/devel/wayland/patches/patch-Makefile.am:1.1 pkgsrc/devel/wayland/patches/patch-Makefile.am:1.2
--- pkgsrc/devel/wayland/patches/patch-Makefile.am:1.1  Sun Aug 18 16:05:12 2019
+++ pkgsrc/devel/wayland/patches/patch-Makefile.am      Sun Jan  5 19:30:48 2020
@@ -1,4 +1,4 @@
-$NetBSD: patch-Makefile.am,v 1.1 2019/08/18 16:05:12 nia Exp $
+$NetBSD: patch-Makefile.am,v 1.2 2020/01/05 19:30:48 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
@@ -9,8 +9,8 @@ https://lists.freedesktop.org/archives/w
        src/wayland-server.c                    \
        src/wayland-shm.c                       \
 -      src/event-loop.c
-+      src/event-loop.c                        \
-+      src/event-loop-kqueue.c 
++      src/event-loop.c                        \
++      src/event-loop-kqueue.c
  
  nodist_libwayland_server_la_SOURCES =         \
        protocol/wayland-server-protocol.h      \
Index: pkgsrc/devel/wayland/patches/patch-configure.ac
diff -u pkgsrc/devel/wayland/patches/patch-configure.ac:1.1 pkgsrc/devel/wayland/patches/patch-configure.ac:1.2
--- pkgsrc/devel/wayland/patches/patch-configure.ac:1.1 Sun Aug 18 16:05:12 2019
+++ pkgsrc/devel/wayland/patches/patch-configure.ac     Sun Jan  5 19:30:48 2020
@@ -1,41 +1,28 @@
-$NetBSD: patch-configure.ac,v 1.1 2019/08/18 16:05:12 nia Exp $
-
-BSD support from FreeBSD
+$NetBSD: patch-configure.ac,v 1.2 2020/01/05 19:30:48 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
-@@ -65,6 +65,28 @@ AC_SUBST(GCC_CFLAGS)
+@@ -65,6 +65,17 @@ AC_SUBST(GCC_CFLAGS)
  AC_CHECK_HEADERS([sys/prctl.h])
  AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl])
  
-+
 +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
 +      AC_MSG_ERROR([Can't find sys/epoll.h or sys/event.h. Please ensure either epoll or kqueue is available.])
 +fi
 +
-+AC_CHECK_HEADERS([sys/signalfd.h sys/timerfd.h])
-+
-+# Credential support on FreeBSD
 +AC_CHECK_HEADERS([sys/ucred.h])
 +
 +# dlopen()
 +AC_CHECK_LIB([dl], [dlsym], [DL_LIBS=-ldl])
 +AC_SUBST([DL_LIBS])
 +
-+# Defines __FreeBSD__ if we're on FreeBSD
-+AC_CHECK_HEADERS([sys/param.h])
-+
-+# waitid() and signal.h are needed for the test suite.
-+AC_CHECK_FUNCS([waitid])
-+AC_CHECK_HEADERS([signal.h])
-+
  AC_ARG_ENABLE([libraries],
              [AC_HELP_STRING([--disable-libraries],
                              [Disable compilation of wayland libraries])],
-@@ -100,17 +122,23 @@ AC_SUBST([ICONDIR])
+@@ -100,12 +111,14 @@ AC_SUBST([ICONDIR])
  
  if test "x$enable_libraries" = "xyes"; then
        PKG_CHECK_MODULES(FFI, [libffi])
@@ -45,23 +32,14 @@ https://lists.freedesktop.org/archives/w
 -      AC_CHECK_DECL(TFD_CLOEXEC,[],
 -                    [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland libraries")],
 -                    [[#include <sys/timerfd.h>]])
-+dnl convert SFD_CLOEXEC and TFD_CLOEXEC to warning while figuring out how to do this.
 +      if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
 +              AC_CHECK_DECL(SFD_CLOEXEC,[],
-+                            [AC_MSG_WARN("SFD_CLOEXEC is needed to compile wayland libraries")],
++                            [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland libraries")],
 +                            [[#include <sys/signalfd.h>]])
 +              AC_CHECK_DECL(TFD_CLOEXEC,[],
-+                            [AC_MSG_WARN("TFD_CLOEXEC is needed to compile wayland libraries")],
++                            [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland libraries")],
 +                            [[#include <sys/timerfd.h>]])
 +      fi
        AC_CHECK_DECL(CLOCK_MONOTONIC,[],
                      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland libraries")],
                      [[#include <time.h>]])
- fi
- 
-+EPOLLSHIM_LIBS="-lepoll-shim"
-+AC_SUBST(EPOLLSHIM_LIBS)
-+
- PKG_CHECK_MODULES(EXPAT, [expat])
- 
- AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"])
Index: pkgsrc/devel/wayland/patches/patch-cursor_os-compatibility.c
diff -u pkgsrc/devel/wayland/patches/patch-cursor_os-compatibility.c:1.1 pkgsrc/devel/wayland/patches/patch-cursor_os-compatibility.c:1.2
--- pkgsrc/devel/wayland/patches/patch-cursor_os-compatibility.c:1.1    Mon Aug 19 12:50:23 2019
+++ pkgsrc/devel/wayland/patches/patch-cursor_os-compatibility.c        Sun Jan  5 19:30:48 2020
@@ -1,7 +1,7 @@
-$NetBSD: patch-cursor_os-compatibility.c,v 1.1 2019/08/19 12:50:23 nia Exp $
+$NetBSD: patch-cursor_os-compatibility.c,v 1.2 2020/01/05 19:30:48 nia Exp $
 
-fallocate is currently a no-op on NetBSD.
-Make sure ftruncate is used instead.
+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
Index: pkgsrc/devel/wayland/patches/patch-cursor_wayland-cursor.c
diff -u pkgsrc/devel/wayland/patches/patch-cursor_wayland-cursor.c:1.1 pkgsrc/devel/wayland/patches/patch-cursor_wayland-cursor.c:1.2
--- pkgsrc/devel/wayland/patches/patch-cursor_wayland-cursor.c:1.1      Mon Sep  9 20:08:29 2019
+++ pkgsrc/devel/wayland/patches/patch-cursor_wayland-cursor.c  Sun Jan  5 19:30:48 2020
@@ -1,6 +1,7 @@
-$NetBSD: patch-cursor_wayland-cursor.c,v 1.1 2019/09/09 20:08:29 nia Exp $
+$NetBSD: patch-cursor_wayland-cursor.c,v 1.2 2020/01/05 19:30:48 nia Exp $
 
-fallocate is currently a no-op on NetBSD.
+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
Index: pkgsrc/devel/wayland/patches/patch-src_event-loop.c
diff -u pkgsrc/devel/wayland/patches/patch-src_event-loop.c:1.1 pkgsrc/devel/wayland/patches/patch-src_event-loop.c:1.2
--- pkgsrc/devel/wayland/patches/patch-src_event-loop.c:1.1     Sun Aug 18 16:05:12 2019
+++ pkgsrc/devel/wayland/patches/patch-src_event-loop.c Sun Jan  5 19:30:48 2020
@@ -1,31 +1,19 @@
-$NetBSD: patch-src_event-loop.c,v 1.1 2019/08/18 16:05:12 nia Exp $
+$NetBSD: patch-src_event-loop.c,v 1.2 2020/01/05 19:30:48 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
-@@ -22,7 +22,8 @@
-  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+@@ -23,6 +23,8 @@
   * SOFTWARE.
   */
--
+ 
 +#include "config.h"
 +#ifdef HAVE_SYS_EPOLL_H
  #include <stddef.h>
  #include <stdio.h>
  #include <errno.h>
-@@ -35,9 +36,9 @@
- #include <sys/socket.h>
- #include <sys/un.h>
- #include <sys/epoll.h>
-+#include <unistd.h>
- #include <sys/signalfd.h>
- #include <sys/timerfd.h>
--#include <unistd.h>
- #include "wayland-util.h"
- #include "wayland-private.h"
- #include "wayland-server-core.h"
-@@ -702,3 +703,4 @@ wl_event_loop_get_destroy_listener(struc
+@@ -702,3 +704,4 @@ wl_event_loop_get_destroy_listener(struc
  {
        return wl_signal_get(&loop->destroy_signal, notify);
  }
Index: pkgsrc/devel/wayland/patches/patch-src_wayland-server.c
diff -u pkgsrc/devel/wayland/patches/patch-src_wayland-server.c:1.1 pkgsrc/devel/wayland/patches/patch-src_wayland-server.c:1.2
--- pkgsrc/devel/wayland/patches/patch-src_wayland-server.c:1.1 Sun Aug 18 16:05:12 2019
+++ pkgsrc/devel/wayland/patches/patch-src_wayland-server.c     Sun Jan  5 19:30:48 2020
@@ -1,22 +1,15 @@
-$NetBSD: patch-src_wayland-server.c,v 1.1 2019/08/18 16:05:12 nia Exp $
+$NetBSD: patch-src_wayland-server.c,v 1.2 2020/01/05 19:30:48 nia Exp $
 
-BSD support from FreeBSD
+NetBSD support
 
 --- src/wayland-server.c.orig  2019-03-21 00:55:25.000000000 +0000
 +++ src/wayland-server.c
-@@ -25,6 +25,8 @@
- 
- #define _GNU_SOURCE
- 
-+#include "../config.h"
-+
- #include <stdlib.h>
- #include <stdint.h>
- #include <stddef.h>
-@@ -43,6 +45,11 @@
+@@ -43,6 +43,13 @@
  #include <sys/file.h>
  #include <sys/stat.h>
  
++#include "../config.h"
++
 +#ifdef HAVE_SYS_UCRED_H
 +#include <sys/types.h>
 +#include <sys/ucred.h>
@@ -31,10 +24,10 @@ BSD support from FreeBSD
        struct wl_priv_signal destroy_signal;
 +#ifdef HAVE_SYS_UCRED_H
 +#ifdef __NetBSD__
-+      struct uucred xucred;
++      struct uucred ucred;
 +#else
 +      /* FreeBSD */
-+      struct xucred xucred;
++      struct xucred ucred;
 +#endif
 +#else
 +      /* Linux */
@@ -43,49 +36,42 @@ BSD support from FreeBSD
        int error;
        struct wl_priv_signal resource_created_signal;
  };
-@@ -312,7 +329,8 @@ wl_resource_post_error(struct wl_resourc
+@@ -312,7 +329,11 @@ wl_resource_post_error(struct wl_resourc
  static void
  destroy_client_with_error(struct wl_client *client, const char *reason)
  {
--      wl_log("%s (pid %u)\n", reason, client->ucred.pid);
++#ifdef __linux__
+       wl_log("%s (pid %u)\n", reason, client->ucred.pid);
++#else
 +      wl_log("Destroying with error: %s\n", reason);
-+      //wl_log("%s (pid %u)\n", reason, client->ucred.pid);
++#endif
        wl_client_destroy(client);
  }
  
-@@ -526,10 +544,20 @@ wl_client_create(struct wl_display *disp
-       if (!client->source)
+@@ -527,9 +548,11 @@ wl_client_create(struct wl_display *disp
                goto err_client;
  
-+#if defined(SO_PEERCRED)
-+      /* Linux */
        len = sizeof client->ucred;
++#ifdef SO_PEERCRED
        if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED,
                       &client->ucred, &len) < 0)
                goto err_source;
-+#elif defined(LOCAL_PEERCRED)
-+      /* FreeBSD */
-+      len = sizeof client->xucred;
-+      if (getsockopt(fd, SOL_SOCKET, LOCAL_PEERCRED,
-+                     &client->xucred, &len) < 0 ||
-+                     client->xucred.cr_version != XUCRED_VERSION)
-+              goto err_source;
 +#endif
  
        client->connection = wl_connection_create(fd);
        if (client->connection == NULL)
-@@ -583,12 +611,23 @@ WL_EXPORT void
+@@ -583,12 +606,23 @@ WL_EXPORT void
  wl_client_get_credentials(struct wl_client *client,
                          pid_t *pid, uid_t *uid, gid_t *gid)
  {
 +#ifdef HAVE_SYS_UCRED_H
-+      /* FreeBSD */
++      /* BSD */
 +      if (pid)
-+              *pid = 0; /* FIXME: not defined on FreeBSD */
++              *pid = 0; /* FIXME: should be set*/
 +      if (uid)
-+              *uid = client->xucred.cr_uid;
++              *uid = client->ucred.cr_uid;
 +      if (gid)
-+              *gid = client->xucred.cr_gid;
++              *gid = client->ucred.cr_gid;
 +#else
 +      /* Linux */
        if (pid)
Index: pkgsrc/devel/wayland/patches/patch-tests_test-runner.c
diff -u pkgsrc/devel/wayland/patches/patch-tests_test-runner.c:1.1 pkgsrc/devel/wayland/patches/patch-tests_test-runner.c:1.2
--- pkgsrc/devel/wayland/patches/patch-tests_test-runner.c:1.1  Sun Aug 18 16:05:12 2019
+++ pkgsrc/devel/wayland/patches/patch-tests_test-runner.c      Sun Jan  5 19:30:48 2020
@@ -1,30 +1,23 @@
-$NetBSD: patch-tests_test-runner.c,v 1.1 2019/08/18 16:05:12 nia Exp $
+$NetBSD: patch-tests_test-runner.c,v 1.2 2020/01/05 19:30:48 nia Exp $
 
-BSD support from FreeBSD
+NetBSD support
 
 --- tests/test-runner.c.orig   2019-03-21 00:55:25.000000000 +0000
 +++ tests/test-runner.c
-@@ -25,6 +25,12 @@
- 
- #define _GNU_SOURCE
- 
-+#include "../config.h"
-+
-+#ifdef HAVE_SYS_PARAM_H
-+#include <sys/param.h>
-+#endif
-+
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -37,13 +43,28 @@
+@@ -31,19 +31,34 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
++#include <signal.h>
+ #include <string.h>
+ #include <assert.h>
+ #include <dlfcn.h>
  #include <errno.h>
  #include <limits.h>
  #include <sys/ptrace.h>
-+#ifdef HAVE_SYS_PRCTL_H
++#if defined(HAVE_PRCTL)
  #include <sys/prctl.h>
 +#endif
-+#include <signal.h>
  #ifndef PR_SET_PTRACER
  # define PR_SET_PTRACER 0x59616d61
  #endif
@@ -46,25 +39,7 @@ BSD support from FreeBSD
  /* when set to 1, check if tests are not leaking opened files.
   * It is turned on by default. It can be turned off by
   * WAYLAND_TEST_NO_LEAK_CHECK environment variable. */
-@@ -51,7 +72,7 @@ int fd_leak_check_enabled;
- 
- /* when this var is set to 0, every call to test_set_timeout() is
-  * suppressed - handy when debugging the test. Can be set by
-- * WAYLAND_TEST_NO_TIMEOUTS environment variable. */
-+ * WAYLAND_TESTS_NO_TIMEOUTS evnironment var */
- static int timeouts_enabled = 1;
- 
- /* set to one if the output goes to the terminal */
-@@ -239,6 +260,8 @@ is_debugger_attached(void)
-               return 0;
-       }
- 
-+
-+// xxx start here
-       pid = fork();
-       if (pid == -1) {
-               perror("fork");
-@@ -259,13 +282,14 @@ is_debugger_attached(void)
+@@ -259,12 +274,13 @@ is_debugger_attached(void)
                        _exit(1);
                if (!waitpid(-1, NULL, 0))
                        _exit(1);
@@ -75,12 +50,11 @@ BSD support from FreeBSD
        } else {
                close(pipefd[0]);
  
-               /* Enable child to ptrace the parent process */
 +#if defined(HAVE_PRCTL)
+               /* Enable child to ptrace the parent process */
                rc = prctl(PR_SET_PTRACER, pid);
                if (rc != 0 && errno != EINVAL) {
-                       /* An error prevents us from telling if a debugger is attached.
-@@ -275,7 +299,9 @@ is_debugger_attached(void)
+@@ -275,7 +291,9 @@ is_debugger_attached(void)
                         */
                        perror("prctl");
                        write(pipefd[1], "-", 1);
@@ -91,49 +65,3 @@ BSD support from FreeBSD
                        /* Signal to client that parent is ready by passing '+' */
                        write(pipefd[1], "+", 1);
                }
-@@ -295,9 +321,6 @@ int main(int argc, char *argv[])
-       int total, pass;
-       siginfo_t info;
- 
--      if (isatty(fileno(stderr)))
--              is_atty = 1;
--
-       if (is_debugger_attached()) {
-               fd_leak_check_enabled = 0;
-               timeouts_enabled = 0;
-@@ -336,7 +359,8 @@ int main(int argc, char *argv[])
-               if (pid == 0)
-                       run_test(t); /* never returns */
- 
--              if (waitid(P_PID, pid, &info, WEXITED)) {
-+#ifdef HAVE_WAITID
-+              if (waitid(P_PID, 0, &info, WEXITED)) {
-                       stderr_set_color(RED);
-                       fprintf(stderr, "waitid failed: %m\n");
-                       stderr_reset_color();
-@@ -367,6 +391,25 @@ int main(int argc, char *argv[])
- 
-                       break;
-               }
-+#else
-+               if (waitpid(-1, &status, 0) == -1) {
-+                       fprintf(stderr, "waitpid failed: %s\n",
-+                               strerror(errno));
-+                       abort();
-+               }
-+
-+               fprintf(stderr, "test \"%s\":\t", t->name);
-+               if (WIFEXITED(status)) {
-+                       fprintf(stderr, "exit status %d", WEXITSTATUS(status));
-+                       if (WEXITSTATUS(status) == EXIT_SUCCESS)
-+                               success = 1;
-+               } else if (WIFSIGNALED(status)) {
-+                       fprintf(stderr, "signal %d", WTERMSIG(status));
-+               }
-+#endif
-+
-+              if (t->must_fail)
-+                      success = !success;
- 
-               if (success) {
-                       pass++;

Index: pkgsrc/devel/wayland/patches/patch-src_wayland-os.c
diff -u pkgsrc/devel/wayland/patches/patch-src_wayland-os.c:1.2 pkgsrc/devel/wayland/patches/patch-src_wayland-os.c:1.3
--- pkgsrc/devel/wayland/patches/patch-src_wayland-os.c:1.2     Wed Aug 28 10:35:40 2019
+++ pkgsrc/devel/wayland/patches/patch-src_wayland-os.c Sun Jan  5 19:30:48 2020
@@ -1,96 +1,29 @@
-$NetBSD: patch-src_wayland-os.c,v 1.2 2019/08/28 10:35:40 nia Exp $
-
-BSD support from FreeBSD
+$NetBSD: patch-src_wayland-os.c,v 1.3 2020/01/05 19:30:48 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
 --- src/wayland-os.c.orig      2019-03-21 00:55:25.000000000 +0000
 +++ src/wayland-os.c
-@@ -25,14 +25,20 @@
- 
- #define _GNU_SOURCE
- 
-+#include "../config.h"
-+
- #include <sys/types.h>
- #include <sys/socket.h>
+@@ -30,9 +30,17 @@
  #include <unistd.h>
  #include <fcntl.h>
  #include <errno.h>
+-#include <sys/epoll.h>
+ 
+ #include "../config.h"
++
 +#ifdef HAVE_SYS_EPOLL_H
- #include <sys/epoll.h>
++#include <sys/epoll.h>
 +#endif
++
 +#ifdef HAVE_SYS_EVENT_H
 +#include <sys/event.h>
 +#endif
- 
--#include "../config.h"
++
  #include "wayland-os.h"
  
  static int
-@@ -62,26 +68,50 @@ wl_os_socket_cloexec(int domain, int typ
- {
-       int fd;
- 
-+#ifdef SOCK_CLOEXEC
-       fd = socket(domain, type | SOCK_CLOEXEC, protocol);
-       if (fd >= 0)
-               return fd;
-       if (errno != EINVAL)
-               return -1;
-+#endif
- 
-       fd = socket(domain, type, protocol);
-       return set_cloexec_or_close(fd);
- }
- 
- int
-+wl_os_socketpair_cloexec(int domain, int type, int protocol, int sv[2])
-+{
-+       int retval;
-+
-+#ifdef SOCK_CLOEXEC
-+       retval = socketpair(domain, type | SOCK_CLOEXEC, protocol, sv);
-+       if (retval >= 0)
-+               return retval;
-+       if (errno != EINVAL)
-+               return -1;
-+#endif
-+
-+       retval = socketpair(domain, type, protocol, sv);
-+       if (set_cloexec_or_close(sv[0]) < 0 || set_cloexec_or_close(sv[1]) < 0)
-+               retval = -1;
-+
-+       return retval;
-+}
-+
-+int
- wl_os_dupfd_cloexec(int fd, long minfd)
- {
-       int newfd;
- 
-+#ifdef F_DUPFD_CLOEXEC
-       newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd);
-       if (newfd >= 0)
-               return newfd;
-       if (errno != EINVAL)
-               return -1;
-+#endif
- 
-       newfd = fcntl(fd, F_DUPFD, minfd);
-       return set_cloexec_or_close(newfd);
-@@ -123,15 +153,18 @@ wl_os_recvmsg_cloexec(int sockfd, struct
- {
-       ssize_t len;
- 
-+#ifdef MSG_CMSG_CLOEXEC
-       len = recvmsg(sockfd, msg, flags | MSG_CMSG_CLOEXEC);
-       if (len >= 0)
-               return len;
-       if (errno != EINVAL)
-               return -1;
-+#endif
- 
+@@ -132,6 +140,7 @@ wl_os_recvmsg_cloexec(int sockfd, struct
        return recvmsg_cloexec_fallback(sockfd, msg, flags);
  }
  
@@ -98,7 +31,7 @@ https://lists.freedesktop.org/archives/w
  int
  wl_os_epoll_create_cloexec(void)
  {
-@@ -148,6 +181,18 @@ wl_os_epoll_create_cloexec(void)
+@@ -148,6 +157,18 @@ wl_os_epoll_create_cloexec(void)
        fd = epoll_create(1);
        return set_cloexec_or_close(fd);
  }
Index: pkgsrc/devel/wayland/patches/patch-src_wayland-os.h
diff -u pkgsrc/devel/wayland/patches/patch-src_wayland-os.h:1.2 pkgsrc/devel/wayland/patches/patch-src_wayland-os.h:1.3
--- pkgsrc/devel/wayland/patches/patch-src_wayland-os.h:1.2     Wed Aug 28 10:35:40 2019
+++ pkgsrc/devel/wayland/patches/patch-src_wayland-os.h Sun Jan  5 19:30:48 2020
@@ -1,26 +1,10 @@
-$NetBSD: patch-src_wayland-os.h,v 1.2 2019/08/28 10:35:40 nia Exp $
-
-BSD support from FreeBSD
+$NetBSD: patch-src_wayland-os.h,v 1.3 2020/01/05 19:30:48 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
 --- src/wayland-os.h.orig      2019-03-21 00:55:25.000000000 +0000
 +++ src/wayland-os.h
-@@ -26,17 +26,29 @@
- #ifndef WAYLAND_OS_H
- #define WAYLAND_OS_H
- 
-+#include "../config.h"
-+
- int
- wl_os_socket_cloexec(int domain, int type, int protocol);
- 
- int
-+wl_os_socketpair_cloexec(int domain, int type, int protocol, int sv[2]);
-+
-+int
- wl_os_dupfd_cloexec(int fd, long minfd);
- 
+@@ -35,8 +35,15 @@ wl_os_dupfd_cloexec(int fd, long minfd);
  ssize_t
  wl_os_recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags);
  
Index: pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c
diff -u pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c:1.2 pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c:1.3
--- pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c:1.2    Mon Sep  9 20:26:58 2019
+++ pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c        Sun Jan  5 19:30:48 2020
@@ -1,6 +1,6 @@
-$NetBSD: patch-src_wayland-shm.c,v 1.2 2019/09/09 20:26:58 nia Exp $
+$NetBSD: patch-src_wayland-shm.c,v 1.3 2020/01/05 19:30:48 nia Exp $
 
-Support NetBSD-style mremap.
+NetBSD support
 
 --- src/wayland-shm.c.orig     2019-03-21 00:55:25.000000000 +0000
 +++ src/wayland-shm.c
Index: pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c
diff -u pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c:1.2 pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c:1.3
--- pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c:1.2     Thu Aug 29 12:22:13 2019
+++ pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c Sun Jan  5 19:30:48 2020
@@ -1,35 +1,27 @@
-$NetBSD: patch-tests_os-wrappers-test.c,v 1.2 2019/08/29 12:22:13 nia Exp $
-
-BSD support from FreeBSD
+$NetBSD: patch-tests_os-wrappers-test.c,v 1.3 2020/01/05 19:30:48 nia Exp $
 
 https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
 
 --- tests/os-wrappers-test.c.orig      2019-03-21 00:55:25.000000000 +0000
 +++ tests/os-wrappers-test.c
-@@ -26,6 +26,8 @@
- 
- #define _GNU_SOURCE
- 
-+#include "../config.h"
-+
- #include <stdlib.h>
- #include <stdint.h>
- #include <assert.h>
-@@ -38,7 +40,13 @@
+@@ -38,7 +38,16 @@
  #include <stdarg.h>
  #include <fcntl.h>
  #include <stdio.h>
 +
++#include "../config.h"
++
 +#ifdef HAVE_SYS_EPOLL_H
  #include <sys/epoll.h>
 +#endif
++
 +#ifdef HAVE_SYS_EVENT_H
 +#include <sys/event.h>
 +#endif
  
  #include "wayland-private.h"
  #include "test-runner.h"
-@@ -55,8 +63,14 @@ static int wrapped_calls_fcntl;
+@@ -55,8 +64,15 @@ static int wrapped_calls_fcntl;
  static ssize_t (*real_recvmsg)(int, struct msghdr *, int);
  static int wrapped_calls_recvmsg;
  
@@ -37,6 +29,7 @@ https://lists.freedesktop.org/archives/w
  static int (*real_epoll_create1)(int);
  static int wrapped_calls_epoll_create1;
 +#endif
++
 +#ifdef HAVE_SYS_EVENT_H
 +static int (*real_kqueue)(void);
 +static int wrapped_calls_kqueue;
@@ -44,7 +37,7 @@ https://lists.freedesktop.org/archives/w
  
  static void
  init_fallbacks(int do_fallbacks)
-@@ -65,7 +79,12 @@ init_fallbacks(int do_fallbacks)
+@@ -65,7 +81,12 @@ init_fallbacks(int do_fallbacks)
        real_socket = dlsym(RTLD_NEXT, "socket");
        real_fcntl = dlsym(RTLD_NEXT, "fcntl");
        real_recvmsg = dlsym(RTLD_NEXT, "recvmsg");
@@ -57,43 +50,7 @@ https://lists.freedesktop.org/archives/w
  }
  
  __attribute__ ((visibility("default"))) int
-@@ -73,10 +92,12 @@ socket(int domain, int type, int protoco
- {
-       wrapped_calls_socket++;
- 
-+#ifdef SOCK_CLOEXEC
-       if (fall_back && (type & SOCK_CLOEXEC)) {
-               errno = EINVAL;
-               return -1;
-       }
-+#endif
- 
-       return real_socket(domain, type, protocol);
- }
-@@ -89,10 +110,12 @@ fcntl(int fd, int cmd, ...)
- 
-       wrapped_calls_fcntl++;
- 
-+#ifdef F_DUPFD_CLOEXEC
-       if (fall_back && (cmd == F_DUPFD_CLOEXEC)) {
-               errno = EINVAL;
-               return -1;
-       }
-+#endif
- 
-       va_start(ap, cmd);
-       arg = va_arg(ap, void*);
-@@ -106,14 +129,17 @@ recvmsg(int sockfd, struct msghdr *msg, 
- {
-       wrapped_calls_recvmsg++;
- 
-+#ifdef MSG_CMSG_CLOEXEC
-       if (fall_back && (flags & MSG_CMSG_CLOEXEC)) {
-               errno = EINVAL;
-               return -1;
-       }
-+#endif
- 
+@@ -114,6 +135,7 @@ recvmsg(int sockfd, struct msghdr *msg, 
        return real_recvmsg(sockfd, msg, flags);
  }
  
@@ -101,7 +58,7 @@ https://lists.freedesktop.org/archives/w
  __attribute__ ((visibility("default"))) int
  epoll_create1(int flags)
  {
-@@ -127,6 +153,23 @@ epoll_create1(int flags)
+@@ -127,6 +149,23 @@ epoll_create1(int flags)
  
        return real_epoll_create1(flags);
  }
@@ -125,62 +82,15 @@ https://lists.freedesktop.org/archives/w
  
  static void
  do_os_wrappers_socket_cloexec(int n)
-@@ -156,12 +199,14 @@ TEST(os_wrappers_socket_cloexec)
-       do_os_wrappers_socket_cloexec(0);
- }
- 
-+#ifdef SOCK_CLOEXEC
- TEST(os_wrappers_socket_cloexec_fallback)
- {
-       /* forced fallback */
-       init_fallbacks(1);
-       do_os_wrappers_socket_cloexec(1);
- }
-+#endif
- 
- static void
- do_os_wrappers_dupfd_cloexec(int n)
-@@ -195,11 +240,13 @@ TEST(os_wrappers_dupfd_cloexec)
-       do_os_wrappers_dupfd_cloexec(0);
- }
- 
-+#ifdef F_DUPFD_CLOEXEC
- TEST(os_wrappers_dupfd_cloexec_fallback)
- {
-       init_fallbacks(1);
-       do_os_wrappers_dupfd_cloexec(3);
- }
-+#endif
- 
- struct marshal_data {
-       struct wl_connection *read_connection;
-@@ -218,8 +265,7 @@ struct marshal_data {
- static void
- setup_marshal_data(struct marshal_data *data)
- {
--      assert(socketpair(AF_UNIX,
--                        SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0);
-+      assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, data->s) == 0);
- 
-       data->read_connection = wl_connection_create(data->s[0]);
-       assert(data->read_connection);
-@@ -328,12 +374,15 @@ TEST(os_wrappers_recvmsg_cloexec)
-       do_os_wrappers_recvmsg_cloexec(0);
- }
- 
-+#ifdef MSG_CMSG_CLOEXEC
- TEST(os_wrappers_recvmsg_cloexec_fallback)
- {
-       init_fallbacks(1);
+@@ -334,6 +373,7 @@ TEST(os_wrappers_recvmsg_cloexec_fallbac
        do_os_wrappers_recvmsg_cloexec(1);
  }
-+#endif
  
 +#ifdef HAVE_SYS_EPOLL_H
  static void
  do_os_wrappers_epoll_create_cloexec(int n)
  {
-@@ -365,5 +414,34 @@ TEST(os_wrappers_epoll_create_cloexec_fa
+@@ -365,5 +405,34 @@ TEST(os_wrappers_epoll_create_cloexec_fa
        init_fallbacks(1);
        do_os_wrappers_epoll_create_cloexec(2);
  }



Home | Main Index | Thread Index | Old Index