Page MenuHomeFreeBSD

D23643.id68172.diff
No OneTemporary

D23643.id68172.diff

Index: graphics/wayland/Makefile
===================================================================
--- graphics/wayland/Makefile
+++ graphics/wayland/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= wayland
-PORTVERSION= 1.17.0
+PORTVERSION= 1.18.0
CATEGORIES= graphics wayland
MASTER_SITES= https://wayland.freedesktop.org/releases/
@@ -23,7 +23,7 @@
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-documentation
-CONFIGURE_ENV= ac_cv_func_posix_fallocate=no # EINVAL for many FS on 12.0
+CONFIGURE_ENV= ac_cv_func_posix_fallocate=no # EINVAL on ZFS since FreeBSD 12.0
INSTALL_TARGET= install-strip
.include <bsd.port.mk>
Index: graphics/wayland/distinfo
===================================================================
--- graphics/wayland/distinfo
+++ graphics/wayland/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1553129725
-SHA256 (wayland-1.17.0.tar.xz) = 72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4
-SIZE (wayland-1.17.0.tar.xz) = 437680
+TIMESTAMP = 1581464763
+SHA256 (wayland-1.18.0.tar.xz) = 4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d
+SIZE (wayland-1.18.0.tar.xz) = 453968
Index: graphics/wayland/files/patch-Makefile.am
===================================================================
--- graphics/wayland/files/patch-Makefile.am
+++ graphics/wayland/files/patch-Makefile.am
@@ -1,29 +1,29 @@
---- Makefile.am.orig 2019-03-21 00:55:25 UTC
-+++ Makefile.am
-@@ -71,7 +71,7 @@ nodist_include_HEADERS = \
+--- Makefile.am.orig 2020-02-12 11:06:28.441898339 +0000
++++ Makefile.am 2020-02-12 11:07:37.372933596 +0000
+@@ -73,7 +73,7 @@ nodist_include_HEADERS = \
protocol/wayland-client-protocol.h
libwayland_server_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread
--libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm
-+libwayland_server_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la -lrt -lm
+-libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la $(RT_LIBS) -lm
++libwayland_server_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la $(RT_LIBS) -lm
libwayland_server_la_LDFLAGS = -version-info 1:0:1
libwayland_server_la_SOURCES = \
src/wayland-server.c \
-@@ -83,7 +83,7 @@ nodist_libwayland_server_la_SOURCES = \
+@@ -85,7 +85,7 @@ nodist_libwayland_server_la_SOURCES = \
protocol/wayland-protocol.c
libwayland_client_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread
--libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm
-+libwayland_client_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la -lrt -lm
+-libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la $(RT_LIBS) -lm
++libwayland_client_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la $(RT_LIBS) -lm
libwayland_client_la_LDFLAGS = -version-info 3:0:3
libwayland_client_la_SOURCES = \
src/wayland-client.c
-@@ -227,7 +227,7 @@ libtest_runner_la_LIBADD = \
+@@ -230,7 +230,7 @@ libtest_runner_la_LIBADD = \
libwayland-client.la \
libwayland-server.la \
libtest-helpers.la \
-- -lrt -ldl $(FFI_LIBS)
-+ -lrt $(DL_LIBS) $(FFI_LIBS) $(EPOLLSHIM_LIBS)
+- $(RT_LIBS) $(DL_LIBS) $(FFI_LIBS)
++ $(RT_LIBS) $(DL_LIBS) $(FFI_LIBS) $(EPOLLSHIM_LIBS)
array_test_SOURCES = tests/array-test.c
array_test_LDADD = libtest-runner.la
Index: graphics/wayland/files/patch-cursor_os-compatibility.c
===================================================================
--- graphics/wayland/files/patch-cursor_os-compatibility.c
+++ graphics/wayland/files/patch-cursor_os-compatibility.c
@@ -1,60 +1,21 @@
---- cursor/os-compatibility.c.orig 2019-03-21 00:55:25 UTC
+--- cursor/os-compatibility.c.orig 2020-02-11 23:46:03 UTC
+++ cursor/os-compatibility.c
-@@ -23,6 +23,10 @@
- * SOFTWARE.
- */
+@@ -34,7 +34,7 @@
+ #include <string.h>
+ #include <stdlib.h>
-+#ifdef __FreeBSD__
-+#include <sys/mman.h>
-+#endif
-+
- #define _GNU_SOURCE
-
- #include <sys/types.h>
-@@ -59,6 +63,7 @@ err:
- }
+-#ifdef HAVE_MEMFD_CREATE
++#if defined(HAVE_MEMFD_CREATE) || defined(__FreeBSD__)
+ #include <sys/mman.h>
#endif
-+#ifndef __FreeBSD__
- static int
- create_tmpfile_cloexec(char *tmpname)
- {
-@@ -78,6 +83,7 @@ create_tmpfile_cloexec(char *tmpname)
-
- return fd;
- }
-+#endif
-
- /*
- * Create a new, unique, anonymous file of the given size, and
-@@ -103,11 +109,14 @@ create_tmpfile_cloexec(char *tmpname)
- int
- os_create_anonymous_file(off_t size)
- {
-+ int fd;
-+ int ret;
-+#ifdef __FreeBSD__
+@@ -132,6 +132,9 @@ os_create_anonymous_file(off_t size)
+ */
+ fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
+ } else
++#elif defined(__FreeBSD__)
+ fd = shm_open(SHM_ANON, O_CREAT | O_RDWR | O_CLOEXEC, 0600); // shm_open is always CLOEXEC
-+#else
- static const char template[] = "/wayland-cursor-shared-XXXXXX";
- const char *path;
- char *name;
-- int fd;
-- int ret;
-
- path = getenv("XDG_RUNTIME_DIR");
- if (!path) {
-@@ -125,11 +134,12 @@ os_create_anonymous_file(off_t size)
- fd = create_tmpfile_cloexec(name);
-
- free(name);
-+#endif /* __FreeBSD__ */
-
- if (fd < 0)
- return -1;
-
--#ifdef HAVE_POSIX_FALLOCATE
-+#if defined(HAVE_POSIX_FALLOCATE) && !defined(__FreeBSD__)
- ret = posix_fallocate(fd, 0, size);
- if (ret != 0) {
- close(fd);
++ if (fd < 0)
+ #endif
+ {
+ path = getenv("XDG_RUNTIME_DIR");
Index: graphics/wayland/files/patch-src_wayland-server.c
===================================================================
--- graphics/wayland/files/patch-src_wayland-server.c
+++ graphics/wayland/files/patch-src_wayland-server.c
@@ -1,4 +1,4 @@
---- src/wayland-server.c.orig 2018-04-09 17:19:26 UTC
+--- src/wayland-server.c.orig 2020-02-11 23:46:03 UTC
+++ src/wayland-server.c
@@ -25,6 +25,8 @@
@@ -6,10 +6,10 @@
+#include "../config.h"
+
+ #include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
- #include <stddef.h>
-@@ -43,6 +45,11 @@
+@@ -44,6 +46,11 @@
#include <sys/file.h>
#include <sys/stat.h>
@@ -20,8 +20,8 @@
+
#include "wayland-util.h"
#include "wayland-private.h"
- #include "wayland-server.h"
-@@ -77,7 +84,13 @@ struct wl_client {
+ #include "wayland-server-private.h"
+@@ -79,7 +86,13 @@ struct wl_client {
struct wl_list link;
struct wl_map objects;
struct wl_priv_signal destroy_signal;
@@ -35,7 +35,7 @@
int error;
struct wl_priv_signal resource_created_signal;
};
-@@ -303,7 +316,13 @@ wl_resource_post_error(struct wl_resource *resource,
+@@ -315,7 +328,13 @@ wl_resource_post_error(struct wl_resource *resource,
static void
destroy_client_with_error(struct wl_client *client, const char *reason)
{
@@ -49,7 +49,7 @@
wl_client_destroy(client);
}
-@@ -517,10 +536,20 @@ wl_client_create(struct wl_display *display, int fd)
+@@ -529,10 +548,20 @@ wl_client_create(struct wl_display *display, int fd)
if (!client->source)
goto err_client;
@@ -70,7 +70,7 @@
client->connection = wl_connection_create(fd);
if (client->connection == NULL)
-@@ -574,12 +603,23 @@ WL_EXPORT void
+@@ -586,12 +615,23 @@ WL_EXPORT void
wl_client_get_credentials(struct wl_client *client,
pid_t *pid, uid_t *uid, gid_t *gid)
{
Index: graphics/wayland/files/patch-src_wayland-shm.c
===================================================================
--- graphics/wayland/files/patch-src_wayland-shm.c
+++ graphics/wayland/files/patch-src_wayland-shm.c
@@ -1,25 +1,25 @@
---- src/wayland-shm.c.orig 2018-04-09 17:19:26 UTC
+--- src/wayland-shm.c.orig 2020-02-11 23:46:03 UTC
+++ src/wayland-shm.c
-@@ -30,6 +30,8 @@
+@@ -32,6 +32,8 @@
- #define _GNU_SOURCE
+ #include "config.h"
+#include "../config.h"
+
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-@@ -59,6 +61,9 @@ struct wl_shm_pool {
- char *data;
+@@ -64,6 +66,9 @@ struct wl_shm_pool {
int32_t size;
int32_t new_size;
+ bool sigbus_is_impossible;
+#ifdef HAVE_SYS_UCRED_H
+ int fd;
+#endif
};
struct wl_shm_buffer {
-@@ -76,15 +81,24 @@ struct wl_shm_sigbus_data {
+@@ -81,15 +86,24 @@ struct wl_shm_sigbus_data {
int fallback_mapping_used;
};
@@ -45,7 +45,7 @@
if (data == MAP_FAILED) {
wl_resource_post_error(pool->resource,
WL_SHM_ERROR_INVALID_FD,
-@@ -110,6 +124,10 @@ shm_pool_unref(struct wl_shm_pool *pool, bool external
+@@ -115,6 +129,10 @@ shm_pool_unref(struct wl_shm_pool *pool, bool external
if (pool->internal_refcount + pool->external_refcount)
return;
@@ -56,7 +56,7 @@
munmap(pool->data, pool->size);
free(pool);
}
-@@ -223,6 +241,73 @@ shm_pool_destroy(struct wl_client *client, struct wl_r
+@@ -228,6 +246,73 @@ shm_pool_destroy(struct wl_client *client, struct wl_r
wl_resource_destroy(resource);
}
@@ -130,8 +130,8 @@
static void
shm_pool_resize(struct wl_client *client, struct wl_resource *resource,
int32_t size)
-@@ -284,7 +369,14 @@ shm_create_pool(struct wl_client *client, struct wl_re
- "failed mmap fd %d: %m", fd);
+@@ -300,7 +385,14 @@ shm_create_pool(struct wl_client *client, struct wl_re
+ strerror(errno));
goto err_free;
}
+
Index: graphics/wayland/files/patch-tests_event-loop-test.c
===================================================================
--- graphics/wayland/files/patch-tests_event-loop-test.c
+++ graphics/wayland/files/patch-tests_event-loop-test.c
@@ -1,6 +1,6 @@
---- tests/event-loop-test.c.orig 2017-08-08 18:20:52 UTC
+--- tests/event-loop-test.c.orig 2020-02-11 23:46:03 UTC
+++ tests/event-loop-test.c
-@@ -167,10 +167,10 @@ TEST(event_loop_signal)
+@@ -168,10 +168,10 @@ TEST(event_loop_signal)
signal_callback, &got_it);
assert(source);
@@ -14,26 +14,31 @@
assert(got_it == 1);
wl_event_source_remove(source);
-@@ -234,11 +234,19 @@ TEST(event_loop_timer)
+@@ -235,11 +235,11 @@ TEST(event_loop_timer)
- source = wl_event_loop_add_timer(loop, timer_callback, &got_it);
- assert(source);
-- wl_event_source_timer_update(source, 10);
-- wl_event_loop_dispatch(loop, 0);
-+ assert(wl_event_source_timer_update(source, 10) == 0);
-+ assert(wl_event_loop_dispatch(loop, 0) == 0);
- assert(!got_it);
-- wl_event_loop_dispatch(loop, 20);
-+ /* FreeBSD has a bug where it converts ms_timeout to ticks; it always adds 1 to the tick count.
-+ * Consequently, we need to grossly overcompensate here.
-+ * See: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2012-07/msg00319.html */
-+ assert(wl_event_loop_dispatch(loop, 50) == 0);
+ source1 = wl_event_loop_add_timer(loop, timer_callback, &got_it);
+ assert(source1);
+- wl_event_source_timer_update(source1, 20);
++ assert(wl_event_source_timer_update(source1, 20) == 0);
+
+ source2 = wl_event_loop_add_timer(loop, timer_callback, &got_it);
+ assert(source2);
+- wl_event_source_timer_update(source2, 100);
++ assert(wl_event_source_timer_update(source2, 100) == 0);
+
+ /* Check that the timer marked for 20 msec from now fires within 30
+ * msec, and that the timer marked for 100 msec is expected to fire
+@@ -248,11 +248,11 @@ TEST(event_loop_timer)
+
+ wl_event_loop_dispatch(loop, 0);
+ assert(got_it == 0);
+- wl_event_loop_dispatch(loop, 30);
++ assert(wl_event_loop_dispatch(loop, 30) == 0);
assert(got_it == 1);
-+
-+ /* Check it doesn't fire again. */
-+ got_it = 0;
-+ assert(wl_event_loop_dispatch(loop, 20) == 0);
-+ assert(!got_it);
+ wl_event_loop_dispatch(loop, 0);
+ assert(got_it == 1);
+- wl_event_loop_dispatch(loop, 90);
++ assert(wl_event_loop_dispatch(loop, 90) == 0);
+ assert(got_it == 2);
- wl_event_source_remove(source);
- wl_event_loop_destroy(loop);
+ wl_event_source_remove(source1);

File Metadata

Mime Type
text/plain
Expires
Tue, May 19, 2:49 AM (11 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33287887
Default Alt Text
D23643.id68172.diff (11 KB)

Event Timeline