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:           Thu Aug  4 15:21:26 UTC 2022

Modified Files:
        pkgsrc/devel/wayland: Makefile PLIST buildlink3.mk distinfo
        pkgsrc/devel/wayland/patches: patch-src_wayland-os.c
Added Files:
        pkgsrc/devel/wayland/patches: patch-meson.build
Removed Files:
        pkgsrc/devel/wayland/files: event-loop-kqueue.c
        pkgsrc/devel/wayland/patches: patch-Makefile.am patch-configure.ac
            patch-src_wayland-os.h patch-src_wayland-server.c
            patch-src_wayland-shm.c patch-tests_os-wrappers-test.c

Log Message:
wayland: Update to 1.21.0. This allows wayland to work on NetBSD again
with the latest gtk3. However, I have decided to drop the custom kqueue
patches and use libepoll-shim now that it seems relatively stable.

We can take advantage of the relatively useful OS abstractions in the
latest version of the source tree. Thanks for throwing a twig, upstream!
Shame about the input API.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/devel/wayland/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/wayland/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/wayland/buildlink3.mk
cvs rdiff -u -r1.10 -r1.11 pkgsrc/devel/wayland/distinfo
cvs rdiff -u -r1.2 -r0 pkgsrc/devel/wayland/files/event-loop-kqueue.c
cvs rdiff -u -r1.3 -r0 pkgsrc/devel/wayland/patches/patch-Makefile.am \
    pkgsrc/devel/wayland/patches/patch-configure.ac \
    pkgsrc/devel/wayland/patches/patch-src_wayland-os.h \
    pkgsrc/devel/wayland/patches/patch-src_wayland-server.c \
    pkgsrc/devel/wayland/patches/patch-src_wayland-shm.c \
    pkgsrc/devel/wayland/patches/patch-tests_os-wrappers-test.c
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/wayland/patches/patch-meson.build
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/wayland/patches/patch-src_wayland-os.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.13 pkgsrc/devel/wayland/Makefile:1.14
--- pkgsrc/devel/wayland/Makefile:1.13  Mon Apr 18 19:10:56 2022
+++ pkgsrc/devel/wayland/Makefile       Thu Aug  4 15:21:26 2022
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2022/04/18 19:10:56 adam Exp $
+# $NetBSD: Makefile,v 1.14 2022/08/04 15:21:26 nia Exp $
 
-DISTNAME=      wayland-1.18.0
-PKGREVISION=   5
+DISTNAME=      wayland-1.21.0
 CATEGORIES=    devel
-MASTER_SITES=  https://wayland.freedesktop.org/releases/
+MASTER_SITES=  https://gitlab.freedesktop.org/wayland/wayland/-/releases/${PKGVERSION_NOREV}/downloads/
 EXTRACT_SUFX=  .tar.xz
 
 MAINTAINER=    nia%NetBSD.org@localhost
@@ -11,33 +10,21 @@ HOMEPAGE=   https://wayland.freedesktop.or
 COMMENT=       Display server protocol - development libraries
 LICENSE=       mit
 
-GNU_CONFIGURE= YES
-USE_LIBTOOL=   YES
-
-USE_TOOLS+=    autoconf automake autoreconf
-USE_TOOLS+=    gmake pkg-config
+USE_TOOLS+=    pkg-config
 
 USE_LANGUAGES= c c++
 
-CONFIGURE_ARGS+=       --disable-documentation
+MESON_ARGS+=   -Ddocumentation=false
+MESON_ARGS+=   -Dtests=false
 
-# 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-scanner.pc.in
-PKGCONFIG_OVERRIDE+=   src/wayland-server.pc.in
-
-pre-configure:
-       # https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
-       ${CP} ${FILESDIR}/event-loop-kqueue.c ${WRKSRC}/src
-       cd ${WRKSRC} && autoreconf -fvi
+CFLAGS.NetBSD+=        -D_NETBSD_SOURCE
 
 .include "platform.mk"
+.include "../../devel/meson/build.mk"
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} != "Linux"
+.  include "../../devel/libepoll-shim/buildlink3.mk"
+.endif
 .include "../../devel/libffi/buildlink3.mk"
 .include "../../textproc/expat/buildlink3.mk"
 .include "../../textproc/libxslt/buildlink3.mk"

Index: pkgsrc/devel/wayland/PLIST
diff -u pkgsrc/devel/wayland/PLIST:1.1 pkgsrc/devel/wayland/PLIST:1.2
--- pkgsrc/devel/wayland/PLIST:1.1      Sun Aug 18 16:05:12 2019
+++ pkgsrc/devel/wayland/PLIST  Thu Aug  4 15:21:26 2022
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2019/08/18 16:05:12 nia Exp $
+@comment $NetBSD: PLIST,v 1.2 2022/08/04 15:21:26 nia Exp $
 bin/wayland-scanner
 include/wayland-client-core.h
 include/wayland-client-protocol.h
@@ -12,10 +12,18 @@ include/wayland-server-protocol.h
 include/wayland-server.h
 include/wayland-util.h
 include/wayland-version.h
-lib/libwayland-client.la
-lib/libwayland-cursor.la
-lib/libwayland-egl.la
-lib/libwayland-server.la
+lib/libwayland-client.so
+lib/libwayland-client.so.0
+lib/libwayland-client.so.0.21.0
+lib/libwayland-cursor.so
+lib/libwayland-cursor.so.0
+lib/libwayland-cursor.so.0.21.0
+lib/libwayland-egl.so
+lib/libwayland-egl.so.1
+lib/libwayland-egl.so.${PKGVERSION}
+lib/libwayland-server.so
+lib/libwayland-server.so.0
+lib/libwayland-server.so.0.21.0
 lib/pkgconfig/wayland-client.pc
 lib/pkgconfig/wayland-cursor.pc
 lib/pkgconfig/wayland-egl-backend.pc

Index: pkgsrc/devel/wayland/buildlink3.mk
diff -u pkgsrc/devel/wayland/buildlink3.mk:1.3 pkgsrc/devel/wayland/buildlink3.mk:1.4
--- pkgsrc/devel/wayland/buildlink3.mk:1.3      Wed Dec  8 16:02:04 2021
+++ pkgsrc/devel/wayland/buildlink3.mk  Thu Aug  4 15:21:26 2022
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.3 2021/12/08 16:02:04 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2022/08/04 15:21:26 nia Exp $
 
 BUILDLINK_TREE+=       wayland
 
@@ -9,6 +9,10 @@ BUILDLINK_API_DEPENDS.wayland+=        wayland>
 BUILDLINK_ABI_DEPENDS.wayland?=        wayland>=1.18.0nb3
 BUILDLINK_PKGSRCDIR.wayland?=  ../../devel/wayland
 
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} != "Linux"
+.  include "../../devel/libepoll-shim/buildlink3.mk"
+.endif
 .include "../../devel/libffi/buildlink3.mk"
 .endif # WAYLAND_BUILDLINK3_MK
 

Index: pkgsrc/devel/wayland/distinfo
diff -u pkgsrc/devel/wayland/distinfo:1.10 pkgsrc/devel/wayland/distinfo:1.11
--- pkgsrc/devel/wayland/distinfo:1.10  Tue Oct 26 10:20:08 2021
+++ pkgsrc/devel/wayland/distinfo       Thu Aug  4 15:21:26 2022
@@ -1,14 +1,7 @@
-$NetBSD: distinfo,v 1.10 2021/10/26 10:20:08 nia Exp $
+$NetBSD: distinfo,v 1.11 2022/08/04 15:21:26 nia Exp $
 
-BLAKE2s (wayland-1.18.0.tar.xz) = 7c9e98fb32566a14dd6ff1d8ada2ffe07cabed85d99fd8e0720bae68c86d58db
-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) = 5d30f67968b2516f3335fb2da559883a952ed355
-SHA1 (patch-src_wayland-shm.c) = 8a2e5ae22bc400cd2c5c9dec421d536229b2943f
-SHA1 (patch-tests_os-wrappers-test.c) = a17a2e3cbab039becc8c4cb2f1be379b3bffba0e
-SHA1 (patch-tests_test-runner.c) = e97cfc48340b0de1c2642cb7cc48d9acf0a533eb
+BLAKE2s (wayland-1.21.0.tar.xz) = a4c8a8c41c3b502fe6f56a5ad4913762ddfe6dea619287d44443b8b54633847f
+SHA512 (wayland-1.21.0.tar.xz) = 5575216d30fdf5c63caa6bcad071e15f2a4f3acb12df776806073f65db37a50b5b5b3cc7957c5497636f4ac01893e2eaab26e453ded44b287acde01762f5fdc3
+Size (wayland-1.21.0.tar.xz) = 225936 bytes
+SHA1 (patch-meson.build) = 50b64c24a298596c7fdadf96551e8923a1f3eb38
+SHA1 (patch-src_wayland-os.c) = 8bbd574108e06697c874d372062d3129eb7937d1

Index: pkgsrc/devel/wayland/patches/patch-src_wayland-os.c
diff -u pkgsrc/devel/wayland/patches/patch-src_wayland-os.c:1.3 pkgsrc/devel/wayland/patches/patch-src_wayland-os.c:1.4
--- pkgsrc/devel/wayland/patches/patch-src_wayland-os.c:1.3     Sun Jan  5 19:30:48 2020
+++ pkgsrc/devel/wayland/patches/patch-src_wayland-os.c Thu Aug  4 15:21:26 2022
@@ -1,52 +1,31 @@
-$NetBSD: patch-src_wayland-os.c,v 1.3 2020/01/05 19:30:48 nia Exp $
+$NetBSD: patch-src_wayland-os.c,v 1.4 2022/08/04 15:21:26 nia Exp $
 
-https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
+Support for NetBSD.
 
---- src/wayland-os.c.orig      2019-03-21 00:55:25.000000000 +0000
+--- src/wayland-os.c.orig      2022-06-30 21:59:11.000000000 +0000
 +++ src/wayland-os.c
-@@ -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>
-+#endif
-+
-+#ifdef HAVE_SYS_EVENT_H
-+#include <sys/event.h>
-+#endif
-+
- #include "wayland-os.h"
- 
- static int
-@@ -132,6 +140,7 @@ wl_os_recvmsg_cloexec(int sockfd, struct
-       return recvmsg_cloexec_fallback(sockfd, msg, flags);
- }
- 
-+#ifdef HAVE_SYS_EPOLL_H
- int
- 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);
+@@ -100,6 +100,24 @@ wl_os_socket_peercred(int sockfd, uid_t 
+ #endif
+       return 0;
  }
++#elif defined(__NetBSD__)
++#ifndef SOL_LOCAL
++#define SOL_LOCAL (0)
 +#endif
-+
-+#ifdef HAVE_SYS_EVENT_H
 +int
-+wl_os_queue_create_cloexec(void)
++wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)
 +{
-+      int fd;
++      socklen_t len;
++      struct sockcred ucred;
 +
-+      fd = kqueue();
-+      return set_cloexec_or_close(fd);
++      len = sizeof(ucred);
++      if (getsockopt(sockfd, SOL_LOCAL, LOCAL_CREDS, &ucred, &len) < 0)
++              return -1;
++      *uid = ucred.sc_uid;
++      *gid = ucred.sc_gid;
++      *pid = 0;
++      return 0;
 +}
-+#endif
- 
+ #elif defined(SO_PEERCRED)
  int
- wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
+ wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)

Added files:

Index: pkgsrc/devel/wayland/patches/patch-meson.build
diff -u /dev/null pkgsrc/devel/wayland/patches/patch-meson.build:1.1
--- /dev/null   Thu Aug  4 15:21:27 2022
+++ pkgsrc/devel/wayland/patches/patch-meson.build      Thu Aug  4 15:21:26 2022
@@ -0,0 +1,42 @@
+$NetBSD: patch-meson.build,v 1.1 2022/08/04 15:21:26 nia Exp $
+
+Support for NetBSD.
+
+--- meson.build.orig   2022-06-30 21:59:11.000000000 +0000
++++ meson.build
+@@ -38,6 +38,18 @@ foreach h: [ 'sys/prctl.h', 'sys/procctl
+       config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
+ endforeach
+ 
++# NetBSD defines posix_fallocate(), but it always returns failure.
++# Cleanly fall back to ftruncate.
++if host_machine.system() == 'netbsd'
++have_funcs = [
++      'accept4',
++      'mkostemp',
++      'prctl',
++      'memfd_create',
++      'mremap',
++      'strndup',
++]
++else
+ have_funcs = [
+       'accept4',
+       'mkostemp',
+@@ -47,6 +59,7 @@ have_funcs = [
+       'mremap',
+       'strndup',
+ ]
++endif
+ foreach f: have_funcs
+       config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
+ endforeach
+@@ -69,7 +82,7 @@ endif
+ config_h.set10('HAVE_BROKEN_MSG_CMSG_CLOEXEC', have_broken_msg_cmsg_cloexec)
+ 
+ if get_option('libraries')
+-      if host_machine.system() == 'freebsd'
++      if host_machine.system() == 'freebsd' or host_machine.system() == 'netbsd'
+               # When building for FreeBSD, epoll(7) is provided by a userspace
+               # wrapper around kqueue(2).
+               epoll_dep = dependency('epoll-shim')



Home | Main Index | Thread Index | Old Index