Page MenuHomeFreeBSD

D20099.diff
No OneTemporary

D20099.diff

Index: head/graphics/wayland/Makefile
===================================================================
--- head/graphics/wayland/Makefile
+++ head/graphics/wayland/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= wayland
-PORTVERSION= 1.16.0
-PORTREVISION= 1
+PORTVERSION= 1.17.0
CATEGORIES= graphics wayland
MASTER_SITES= https://wayland.freedesktop.org/releases/
Index: head/graphics/wayland/distinfo
===================================================================
--- head/graphics/wayland/distinfo
+++ head/graphics/wayland/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1539381179
-SHA256 (wayland-1.16.0.tar.xz) = 4e72c2b56109ccfb6610d776e465f4ca0af2280c9c2f7d5cc23f0ed2548752f5
-SIZE (wayland-1.16.0.tar.xz) = 435216
+TIMESTAMP = 1553129725
+SHA256 (wayland-1.17.0.tar.xz) = 72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4
+SIZE (wayland-1.17.0.tar.xz) = 437680
Index: head/graphics/wayland/files/patch-Makefile.am
===================================================================
--- head/graphics/wayland/files/patch-Makefile.am
+++ head/graphics/wayland/files/patch-Makefile.am
@@ -1,4 +1,4 @@
---- Makefile.am.orig 2018-04-10 14:53:32 UTC
+--- Makefile.am.orig 2019-03-21 00:55:25 UTC
+++ Makefile.am
@@ -71,7 +71,7 @@ nodist_include_HEADERS = \
protocol/wayland-client-protocol.h
@@ -18,12 +18,12 @@
libwayland_client_la_LDFLAGS = -version-info 3:0:3
libwayland_client_la_SOURCES = \
src/wayland-client.c
-@@ -223,7 +223,7 @@ libtest_runner_la_LIBADD = \
- libwayland-util.la \
+@@ -227,7 +227,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)
-
array_test_SOURCES = tests/array-test.c
+ array_test_LDADD = libtest-runner.la
Index: head/graphics/wayland/files/patch-cursor_os-compatibility.c
===================================================================
--- head/graphics/wayland/files/patch-cursor_os-compatibility.c
+++ head/graphics/wayland/files/patch-cursor_os-compatibility.c
@@ -0,0 +1,60 @@
+--- cursor/os-compatibility.c.orig 2019-03-21 00:55:25 UTC
++++ cursor/os-compatibility.c
+@@ -23,6 +23,10 @@
+ * SOFTWARE.
+ */
+
++#ifdef __FreeBSD__
++#include <sys/mman.h>
++#endif
++
+ #define _GNU_SOURCE
+
+ #include <sys/types.h>
+@@ -59,6 +63,7 @@ err:
+ }
+ #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__
++ 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);
Index: head/graphics/wayland/files/patch-tests_sanity-test.c
===================================================================
--- head/graphics/wayland/files/patch-tests_sanity-test.c
+++ head/graphics/wayland/files/patch-tests_sanity-test.c
@@ -1,22 +0,0 @@
---- tests/sanity-test.c.orig 2018-04-09 17:19:26 UTC
-+++ tests/sanity-test.c
-@@ -97,7 +97,8 @@ FAIL_TEST(sanity_malloc_direct)
- TEST(disable_leak_checks)
- {
- volatile void *mem;
-- assert(leak_check_enabled);
-+// XXX FreeBSD disables leak checks...
-+// assert(leak_check_enabled);
- /* normally this should be on the beginning of the test.
- * Here we need to be sure, that the leak checks are
- * turned on */
-@@ -183,7 +184,8 @@ sanity_fd_no_leak(void)
- {
- int fd[2];
-
-- assert(leak_check_enabled);
-+// XXX FreeBSD leak checks are disabled
-+// assert(leak_check_enabled);
-
- /* leak 2 file descriptors */
- if (pipe(fd) < 0)
Index: head/graphics/wayland/files/patch-tests_test-runner.c
===================================================================
--- head/graphics/wayland/files/patch-tests_test-runner.c
+++ head/graphics/wayland/files/patch-tests_test-runner.c
@@ -1,4 +1,4 @@
---- tests/test-runner.c.orig 2018-08-24 18:04:36 UTC
+--- tests/test-runner.c.orig 2019-03-21 00:55:25 UTC
+++ tests/test-runner.c
@@ -25,6 +25,12 @@
@@ -13,7 +13,7 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-@@ -37,19 +43,36 @@
+@@ -37,13 +43,23 @@
#include <errno.h>
#include <limits.h>
#include <sys/ptrace.h>
@@ -27,19 +27,6 @@
#include "test-runner.h"
- static int num_alloc;
-+
-+extern const struct test __start_test_section, __stop_test_section;
-+
-+/* This is all disabled for FreeBSD because it gives "can't allocate initial
-+ * thread" aborts otherwise. */
-+#ifndef __FreeBSD__
- static void* (*sys_malloc)(size_t);
- static void (*sys_free)(void*);
- static void* (*sys_realloc)(void*, size_t);
- static void* (*sys_calloc)(size_t, size_t);
-+#endif
-
+#ifdef __FreeBSD__
+/* XXX review ptrace() usage */
+#define PTRACE_ATTACH PT_ATTACH
@@ -47,10 +34,10 @@
+#define PTRACE_DETACH PT_DETACH
+#endif
+
- /* when set to 1, check if tests are not leaking memory and opened files.
+ /* 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. */
-@@ -57,7 +80,7 @@ int leak_check_enabled;
+@@ -51,7 +67,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
@@ -59,23 +46,7 @@
static int timeouts_enabled = 1;
/* set to one if the output goes to the terminal */
-@@ -65,6 +88,7 @@ static int is_atty = 0;
-
- extern const struct test __start_test_section, __stop_test_section;
-
-+#ifndef __FreeBSD__
- __attribute__ ((visibility("default"))) void *
- malloc(size_t size)
- {
-@@ -98,6 +122,7 @@ calloc(size_t nmemb, size_t size)
-
- return sys_calloc(nmemb, size);
- }
-+#endif
-
- static const struct test *
- find_test(const char *name)
-@@ -292,6 +317,8 @@ is_debugger_attached(void)
+@@ -239,6 +255,8 @@ is_debugger_attached(void)
return 0;
}
@@ -84,7 +55,7 @@
pid = fork();
if (pid == -1) {
perror("fork");
-@@ -312,13 +339,14 @@ is_debugger_attached(void)
+@@ -259,13 +277,14 @@ is_debugger_attached(void)
_exit(1);
if (!waitpid(-1, NULL, 0))
_exit(1);
@@ -100,7 +71,7 @@
rc = prctl(PR_SET_PTRACER, pid);
if (rc != 0 && errno != EINVAL) {
/* An error prevents us from telling if a debugger is attached.
-@@ -328,7 +356,9 @@ is_debugger_attached(void)
+@@ -275,7 +294,9 @@ is_debugger_attached(void)
*/
perror("prctl");
write(pipefd[1], "-", 1);
@@ -111,7 +82,7 @@
/* Signal to client that parent is ready by passing '+' */
write(pipefd[1], "+", 1);
}
-@@ -346,17 +376,19 @@ int main(int argc, char *argv[])
+@@ -293,7 +314,11 @@ int main(int argc, char *argv[])
const struct test *t;
pid_t pid;
int total, pass;
@@ -121,38 +92,9 @@
+ int status;
+#endif
-+#ifndef __FreeBSD__
- /* Load system malloc, free, and realloc */
- sys_calloc = dlsym(RTLD_NEXT, "calloc");
- sys_realloc = dlsym(RTLD_NEXT, "realloc");
- sys_malloc = dlsym(RTLD_NEXT, "malloc");
- sys_free = dlsym(RTLD_NEXT, "free");
-
-- if (isatty(fileno(stderr)))
-- is_atty = 1;
--
- if (is_debugger_attached()) {
- leak_check_enabled = 0;
- timeouts_enabled = 0;
-@@ -364,7 +396,17 @@ int main(int argc, char *argv[])
- leak_check_enabled = !getenv("WAYLAND_TEST_NO_LEAK_CHECK");
- timeouts_enabled = !getenv("WAYLAND_TEST_NO_TIMEOUTS");
- }
-+#else
-+ /* Disable leak checking on FreeBSD since we can't override malloc(). */
-+ leak_check_enabled = 0;
-+ /* XXX review later */
-+ timeouts_enabled = 0;
-+#endif
-
-+ if (isatty(fileno(stderr)))
-+ is_atty = 1;
-+
-+
- if (argc == 2 && strcmp(argv[1], "--help") == 0)
- usage(argv[0], EXIT_SUCCESS);
-
-@@ -395,7 +437,8 @@ int main(int argc, char *argv[])
+ if (isatty(fileno(stderr)))
+ is_atty = 1;
+@@ -336,7 +361,8 @@ int main(int argc, char *argv[])
if (pid == 0)
run_test(t); /* never returns */
@@ -162,7 +104,7 @@
stderr_set_color(RED);
fprintf(stderr, "waitid failed: %m\n");
stderr_reset_color();
-@@ -426,6 +469,25 @@ int main(int argc, char *argv[])
+@@ -367,6 +393,25 @@ int main(int argc, char *argv[])
break;
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 15, 2:48 PM (13 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15811729
Default Alt Text
D20099.diff (8 KB)

Event Timeline