pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel Add devel/wayland.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c2f48b9d43df
branches:  trunk
changeset: 338097:c2f48b9d43df
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Aug 18 16:05:11 2019 +0000

description:
Add devel/wayland.

Wayland is a protocol for a compositor to talk to its clients as
well as a C library implementation of that protocol.

Wayland is intended to be simpler replacement for the X window
system, easier to develop and maintain.

diffstat:

 devel/Makefile                                       |    3 +-
 devel/wayland/DESCR                                  |    5 +
 devel/wayland/Makefile                               |   32 +
 devel/wayland/PLIST                                  |   28 +
 devel/wayland/buildlink3.mk                          |   14 +
 devel/wayland/distinfo                               |   21 +
 devel/wayland/files/event-loop-kqueue.c              |  800 +++++++++++++++++++
 devel/wayland/patches/patch-Makefile.am              |   25 +
 devel/wayland/patches/patch-configure.ac             |   67 +
 devel/wayland/patches/patch-src_event-loop.c         |   32 +
 devel/wayland/patches/patch-src_wayland-os.c         |  120 ++
 devel/wayland/patches/patch-src_wayland-os.h         |   33 +
 devel/wayland/patches/patch-src_wayland-server.c     |  100 ++
 devel/wayland/patches/patch-src_wayland-shm.c        |  151 +++
 devel/wayland/patches/patch-tests_client-test.c      |   23 +
 devel/wayland/patches/patch-tests_connection-test.c  |   33 +
 devel/wayland/patches/patch-tests_event-loop-test.c  |   44 +
 devel/wayland/patches/patch-tests_os-wrappers-test.c |  203 ++++
 devel/wayland/patches/patch-tests_queue-test.c       |   25 +
 devel/wayland/patches/patch-tests_sanity-test.c      |   27 +
 devel/wayland/patches/patch-tests_test-helpers.c     |   56 +
 devel/wayland/patches/patch-tests_test-runner.c      |  139 +++
 22 files changed, 1980 insertions(+), 1 deletions(-)

diffs (truncated from 2079 to 300 lines):

diff -r 3aca65c6094c -r c2f48b9d43df devel/Makefile
--- a/devel/Makefile    Sun Aug 18 16:00:34 2019 +0000
+++ b/devel/Makefile    Sun Aug 18 16:05:11 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2897 2019/08/11 03:33:55 markd Exp $
+# $NetBSD: Makefile,v 1.2898 2019/08/18 16:05:11 nia Exp $
 #
 
 COMMENT=       Development utilities
@@ -2826,6 +2826,7 @@
 SUBDIR+=       visualvm
 SUBDIR+=       vtcl
 SUBDIR+=       waf
+SUBDIR+=       wayland
 SUBDIR+=       woboq_codebrowser
 SUBDIR+=       xa65
 SUBDIR+=       xdelta
diff -r 3aca65c6094c -r c2f48b9d43df devel/wayland/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/wayland/DESCR       Sun Aug 18 16:05:11 2019 +0000
@@ -0,0 +1,5 @@
+Wayland is a protocol for a compositor to talk to its clients as
+well as a C library implementation of that protocol.
+
+Wayland is intended to be simpler replacement for the X window
+system, easier to develop and maintain.
diff -r 3aca65c6094c -r c2f48b9d43df devel/wayland/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/wayland/Makefile    Sun Aug 18 16:05:11 2019 +0000
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2019/08/18 16:05:12 nia Exp $
+
+DISTNAME=      wayland-1.17.0
+CATEGORIES=    devel
+MASTER_SITES=  https://wayland.freedesktop.org/releases/
+EXTRACT_SUFX=  .tar.xz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://wayland.freedesktop.org/
+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
+CONFIGURE_ARGS+=       --disable-documentation
+
+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
+
+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
+
+.include "../../devel/libffi/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 3aca65c6094c -r c2f48b9d43df devel/wayland/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/wayland/PLIST       Sun Aug 18 16:05:11 2019 +0000
@@ -0,0 +1,28 @@
+@comment $NetBSD: PLIST,v 1.1 2019/08/18 16:05:12 nia Exp $
+bin/wayland-scanner
+include/wayland-client-core.h
+include/wayland-client-protocol.h
+include/wayland-client.h
+include/wayland-cursor.h
+include/wayland-egl-backend.h
+include/wayland-egl-core.h
+include/wayland-egl.h
+include/wayland-server-core.h
+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/pkgconfig/wayland-client.pc
+lib/pkgconfig/wayland-cursor.pc
+lib/pkgconfig/wayland-egl-backend.pc
+lib/pkgconfig/wayland-egl.pc
+lib/pkgconfig/wayland-scanner.pc
+lib/pkgconfig/wayland-server.pc
+share/aclocal/wayland-scanner.m4
+share/wayland/wayland-scanner.mk
+share/wayland/wayland.dtd
+share/wayland/wayland.xml
diff -r 3aca65c6094c -r c2f48b9d43df devel/wayland/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/wayland/buildlink3.mk       Sun Aug 18 16:05:11 2019 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2019/08/18 16:05:12 nia Exp $
+
+BUILDLINK_TREE+=       wayland
+
+.if !defined(WAYLAND_BUILDLINK3_MK)
+WAYLAND_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.wayland+=        wayland>=1.9.90
+BUILDLINK_PKGSRCDIR.wayland?=  ../../devel/wayland
+
+.include "../../devel/libffi/buildlink3.mk"
+.endif # WAYLAND_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -wayland
diff -r 3aca65c6094c -r c2f48b9d43df devel/wayland/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/wayland/distinfo    Sun Aug 18 16:05:11 2019 +0000
@@ -0,0 +1,21 @@
+$NetBSD: distinfo,v 1.1 2019/08/18 16:05:12 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-src_event-loop.c) = 04d0eed4ba0708518201ec630dab97d52735fb0c
+SHA1 (patch-src_wayland-os.c) = fc1a70d4baf8311afce92a081368104b7a732e27
+SHA1 (patch-src_wayland-os.h) = 2e8fb20d4adfb3666adffe48104205488b4a1c7b
+SHA1 (patch-src_wayland-server.c) = 335de8f5390eb337dfbde26f523162bd44c06baf
+SHA1 (patch-src_wayland-shm.c) = a59ddce3a161bb21fedb04737ff502da608b1da9
+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) = 0b45e6952d23589e4991149143331fdb9e0386e1
+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
diff -r 3aca65c6094c -r c2f48b9d43df devel/wayland/files/event-loop-kqueue.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/wayland/files/event-loop-kqueue.c   Sun Aug 18 16:05:11 2019 +0000
@@ -0,0 +1,800 @@
+/*
+ * Copyright © 2008 Kristian Høgsberg
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include "config.h"
+
+#ifdef HAVE_SYS_EVENT_H
+#include <stddef.h>
+#include <stdio.h>
+#include <err.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/types.h>
+#include <sys/event.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include "wayland-util.h"
+#include "wayland-private.h"
+#include "wayland-server-core.h"
+#include "wayland-os.h"
+
+/** \cond INTERNAL */
+
+struct wl_event_loop {
+       int event_fd;
+       struct wl_list check_list;
+       struct wl_list idle_list;
+       struct wl_list destroy_list;
+
+       struct wl_signal destroy_signal;
+};
+
+struct wl_event_source_interface {
+       int (*dispatch)(struct wl_event_source *source,
+                       struct kevent *ev);
+};
+
+struct wl_event_source {
+       struct wl_event_source_interface *interface;
+       struct wl_event_loop *loop;
+       struct wl_list link;
+       void *data;
+       int fd;
+};
+
+struct wl_event_source_fd {
+       struct wl_event_source base;
+       wl_event_loop_fd_func_t func;
+       int fd;
+};
+
+/** \endcond */
+
+static int
+wl_event_source_fd_dispatch(struct wl_event_source *source,
+                           struct kevent *ev)
+{
+       struct wl_event_source_fd *fd_source = (struct wl_event_source_fd *) source;
+       uint32_t mask;
+
+       mask = 0;
+       if (ev->filter == EVFILT_READ)
+               mask |= WL_EVENT_READABLE;
+       if (ev->filter == EVFILT_WRITE)
+               mask |= WL_EVENT_WRITABLE;
+       if (ev->flags & EV_EOF)
+               mask |= WL_EVENT_HANGUP;
+       if (ev->flags & EV_ERROR)
+               mask |= WL_EVENT_ERROR;
+
+       return fd_source->func(source->fd, mask, source->data);
+}
+
+struct wl_event_source_interface fd_source_interface = {
+       wl_event_source_fd_dispatch,
+};
+
+static struct wl_event_source *
+add_source(struct wl_event_loop *loop,
+          struct wl_event_source *source, uint32_t mask, void *data)
+{
+       source->loop = loop;
+       source->data = data;
+       wl_list_init(&source->link);
+
+       return source;
+}
+
+/** Create a file descriptor event source
+ *
+ * \param loop The event loop that will process the new source.
+ * \param fd The file descriptor to watch.
+ * \param mask A bitwise-or of which events to watch for: \c WL_EVENT_READABLE,
+ * \c WL_EVENT_WRITABLE.
+ * \param func The file descriptor dispatch function.
+ * \param data User data.
+ * \return A new file descriptor event source.
+ *
+ * The given file descriptor is initially watched for the events given in
+ * \c mask. This can be changed as needed with wl_event_source_fd_update().
+ *
+ * If it is possible that program execution causes the file descriptor to be
+ * read while leaving the data in a buffer without actually processing it,
+ * it may be necessary to register the file descriptor source to be re-checked,
+ * see wl_event_source_check(). This will ensure that the dispatch function
+ * gets called even if the file descriptor is not readable or writable
+ * anymore. This is especially useful with IPC libraries that automatically
+ * buffer incoming data, possibly as a side-effect of other operations.
+ *
+ * \sa wl_event_loop_fd_func_t
+ * \memberof wl_event_source
+ */
+WL_EXPORT struct wl_event_source *
+wl_event_loop_add_fd(struct wl_event_loop *loop,
+                    int fd, uint32_t mask,
+                    wl_event_loop_fd_func_t func,
+                    void *data)
+{
+       struct wl_event_source_fd *source;
+
+       struct kevent events[2];
+       unsigned int num_events = 0;
+
+       source = malloc(sizeof *source);
+       if (source == NULL)
+               return NULL;
+
+       source->base.interface = &fd_source_interface;
+       source->base.fd = wl_os_dupfd_cloexec(fd, 0);
+       source->func = func;
+       source->fd = fd;



Home | Main Index | Thread Index | Old Index