Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135595752
D23644.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D23644.diff
View Options
Index: head/graphics/wayland/Makefile
===================================================================
--- head/graphics/wayland/Makefile
+++ head/graphics/wayland/Makefile
@@ -7,6 +7,9 @@
CATEGORIES= graphics wayland
MASTER_SITES= https://wayland.freedesktop.org/releases/
+PATCH_SITES= https://gitlab.freedesktop.org/${PORTNAME}/${PORTNAME}/commit/
+PATCHFILES+= 0fc00fff3015.patch:-p1 # https://gitlab.freedesktop.org/wayland/wayland/merge_requests/60
+
MAINTAINER= x11@FreeBSD.org
COMMENT= Wayland composite "server"
@@ -19,12 +22,13 @@
CFLAGS+= "-I${LOCALBASE}/include/libepoll-shim"
-USES= autoreconf gmake gnome libtool localbase pathfix pkgconfig tar:xz
+USES= meson pkgconfig tar:xz
USE_GNOME= libxslt:build
USE_LDCONFIG= yes
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-documentation
-CONFIGURE_ENV= ac_cv_func_posix_fallocate=no # EINVAL on ZFS since FreeBSD 12.0
-INSTALL_TARGET= install-strip
+MESON_ARGS= -Ddocumentation=false
+
+post-patch:
+# posix_fallocate returns EINVAL on ZFS since FreeBSD 12.0
+ @${REINPLACE_CMD} '/posix_fallocate/d' ${WRKSRC}/meson.build
.include <bsd.port.mk>
Index: head/graphics/wayland/distinfo
===================================================================
--- head/graphics/wayland/distinfo
+++ head/graphics/wayland/distinfo
@@ -1,3 +1,5 @@
TIMESTAMP = 1581464763
SHA256 (wayland-1.18.0.tar.xz) = 4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d
SIZE (wayland-1.18.0.tar.xz) = 453968
+SHA256 (0fc00fff3015.patch) = 5e36dc6d5b28bb2062afe8e66e8069555701b3bbf4c7e233903761346e8b3432
+SIZE (0fc00fff3015.patch) = 3868
Index: head/graphics/wayland/files/patch-Makefile.am
===================================================================
--- head/graphics/wayland/files/patch-Makefile.am
+++ head/graphics/wayland/files/patch-Makefile.am
@@ -1,29 +0,0 @@
---- Makefile.am.orig 2020-02-11 23:46:03 UTC
-+++ Makefile.am
-@@ -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 $(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 \
-@@ -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 $(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
-@@ -230,7 +230,7 @@ libtest_runner_la_LIBADD = \
- libwayland-client.la \
- libwayland-server.la \
- libtest-helpers.la \
-- $(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: head/graphics/wayland/files/patch-configure.ac
===================================================================
--- head/graphics/wayland/files/patch-configure.ac
+++ head/graphics/wayland/files/patch-configure.ac
@@ -1,51 +0,0 @@
---- configure.ac.orig 2020-02-11 23:46:03 UTC
-+++ configure.ac
-@@ -71,6 +71,25 @@ WESTON_SEARCH_LIBS([DL], [dl], [dlsym])
- # OpenBSD doesn't have librt, but it has its functions in libc
- WESTON_SEARCH_LIBS([RT], [rt], [clock_gettime])
-
-+AC_CHECK_HEADERS([sys/signalfd.h sys/timerfd.h])
-+
-+# Use epoll on Linux and epoll-shim (kqueue) on BSD
-+AC_CHECK_HEADERS([sys/epoll.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])],
-@@ -106,16 +125,20 @@ AC_SUBST([ICONDIR])
-
- if test "x$enable_libraries" = "xyes"; then
- PKG_CHECK_MODULES(FFI, [libffi])
-+dnl convert SFD_CLOEXEC and TFD_CLOEXEC to warning while figuring out how to do this.
- AC_CHECK_DECL(SFD_CLOEXEC,[],
-- [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland libraries")],
-+ [AC_MSG_WARN("SFD_CLOEXEC is needed to compile wayland libraries")],
- [[#include <sys/signalfd.h>]])
- AC_CHECK_DECL(TFD_CLOEXEC,[],
-- [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland libraries")],
-+ [AC_MSG_WARN("TFD_CLOEXEC is needed to compile wayland libraries")],
- [[#include <sys/timerfd.h>]])
- 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])
-
Index: head/graphics/wayland/files/patch-meson.build
===================================================================
--- head/graphics/wayland/files/patch-meson.build
+++ head/graphics/wayland/files/patch-meson.build
@@ -0,0 +1,33 @@
+--- meson.build.orig 2020-02-11 23:46:03 UTC
++++ meson.build
+@@ -26,7 +26,14 @@ add_project_arguments(
+ language: 'c'
+ )
+
+-foreach h: [ 'sys/prctl.h' ]
++have_headers = [
++ 'signal.h',
++ 'sys/epoll.h',
++ 'sys/prctl.h',
++ 'sys/ucred.h',
++]
++
++foreach h: have_headers
+ config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
+ endforeach
+
+@@ -37,12 +44,14 @@ have_funcs = [
+ 'prctl',
+ 'memfd_create',
+ 'strndup',
++ 'waitid',
+ ]
+ foreach f: have_funcs
+ config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
+ endforeach
+
+ if get_option('libraries')
++ epoll_dep = dependency('epoll-shim', required: false)
+ ffi_dep = dependency('libffi')
+
+ decls = [
Index: head/graphics/wayland/files/patch-src_meson.build
===================================================================
--- head/graphics/wayland/files/patch-src_meson.build
+++ head/graphics/wayland/files/patch-src_meson.build
@@ -0,0 +1,36 @@
+--- src/meson.build.orig 2020-02-11 23:46:03 UTC
++++ src/meson.build
+@@ -71,7 +71,7 @@ if get_option('libraries')
+ 'connection.c',
+ 'wayland-os.c'
+ ],
+- dependencies: [ ffi_dep, ]
++ dependencies: [ epoll_dep, ffi_dep, ]
+ )
+
+ wayland_private_dep = declare_dependency(
+@@ -145,6 +145,7 @@ if get_option('libraries')
+ ],
+ version: '0.1.0',
+ dependencies: [
++ epoll_dep,
+ ffi_dep,
+ wayland_private_dep,
+ wayland_util_dep,
+@@ -158,7 +159,7 @@ if get_option('libraries')
+ wayland_server_dep = declare_dependency(
+ link_with: wayland_server,
+ include_directories: [ root_inc, include_directories('.') ],
+- dependencies: [ ffi_dep, mathlib_dep, threads_dep ],
++ dependencies: [ epoll_dep, ffi_dep, mathlib_dep, threads_dep ],
+ sources: [
+ wayland_server_protocol_core_h,
+ wayland_server_protocol_h
+@@ -187,6 +188,7 @@ if get_option('libraries')
+ ],
+ version: '0.3.0',
+ dependencies: [
++ epoll_dep,
+ ffi_dep,
+ wayland_private_dep,
+ wayland_util_dep,
Index: head/graphics/wayland/files/patch-tests_test-helpers.c
===================================================================
--- head/graphics/wayland/files/patch-tests_test-helpers.c
+++ head/graphics/wayland/files/patch-tests_test-helpers.c
@@ -1,19 +1,15 @@
--- tests/test-helpers.c.orig 2020-02-11 23:46:03 UTC
+++ tests/test-helpers.c
-@@ -25,6 +25,12 @@
+@@ -25,6 +25,8 @@
#include "config.h"
+#include "../config.h"
+
-+#ifdef HAVE_SYS_PARAM_H
-+#include <sys/param.h>
-+#endif
-+
#include <assert.h>
#include <errno.h>
#include <dirent.h>
-@@ -41,6 +47,16 @@
+@@ -41,6 +43,16 @@
#include "test-runner.h"
@@ -30,7 +26,7 @@
int
count_open_fds(void)
{
-@@ -48,8 +64,8 @@ count_open_fds(void)
+@@ -48,8 +60,8 @@ count_open_fds(void)
struct dirent *ent;
int count = 0;
@@ -41,7 +37,7 @@
errno = 0;
while ((ent = readdir(dir))) {
-@@ -58,7 +74,7 @@ count_open_fds(void)
+@@ -58,7 +70,7 @@ count_open_fds(void)
continue;
count++;
}
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,19 +1,15 @@
--- tests/test-runner.c.orig 2020-02-11 23:46:03 UTC
+++ tests/test-runner.c
-@@ -25,6 +25,12 @@
+@@ -25,6 +25,8 @@
#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,23 @@
+@@ -37,13 +39,23 @@
#include <errno.h>
#include <limits.h>
#include <sys/ptrace.h>
@@ -37,7 +33,7 @@
/* 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 +67,7 @@ int fd_leak_check_enabled;
+@@ -51,7 +63,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
@@ -46,7 +42,7 @@
static int timeouts_enabled = 1;
/* set to one if the output goes to the terminal */
-@@ -239,6 +255,8 @@ is_debugger_attached(void)
+@@ -239,6 +251,8 @@ is_debugger_attached(void)
return 0;
}
@@ -55,7 +51,7 @@
pid = fork();
if (pid == -1) {
perror("fork");
-@@ -259,13 +277,14 @@ is_debugger_attached(void)
+@@ -259,13 +273,14 @@ is_debugger_attached(void)
_exit(1);
if (!waitpid(-1, NULL, 0))
_exit(1);
@@ -71,7 +67,7 @@
rc = prctl(PR_SET_PTRACER, pid);
if (rc != 0 && errno != EINVAL) {
/* An error prevents us from telling if a debugger is attached.
-@@ -275,7 +294,9 @@ is_debugger_attached(void)
+@@ -275,7 +290,9 @@ is_debugger_attached(void)
*/
perror("prctl");
write(pipefd[1], "-", 1);
@@ -82,7 +78,7 @@
/* Signal to client that parent is ready by passing '+' */
write(pipefd[1], "+", 1);
}
-@@ -293,7 +314,11 @@ int main(int argc, char *argv[])
+@@ -293,7 +310,11 @@ int main(int argc, char *argv[])
const struct test *t;
pid_t pid;
int total, pass;
@@ -94,7 +90,7 @@
if (isatty(fileno(stderr)))
is_atty = 1;
-@@ -336,7 +361,8 @@ int main(int argc, char *argv[])
+@@ -336,7 +357,8 @@ int main(int argc, char *argv[])
if (pid == 0)
run_test(t); /* never returns */
@@ -104,7 +100,7 @@
stderr_set_color(RED);
fprintf(stderr, "waitid failed: %s\n",
strerror(errno));
-@@ -368,6 +394,25 @@ int main(int argc, char *argv[])
+@@ -368,6 +390,25 @@ int main(int argc, char *argv[])
break;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 12, 3:54 AM (3 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25192680
Default Alt Text
D23644.diff (10 KB)
Attached To
Mode
D23644: graphics/wayland: convert to USES=meson
Attached
Detach File
Event Timeline
Log In to Comment