pkgsrc/devel/wayland/patches/patch-configure.ac
nia a9a915ad15 wayland: Update to 1.18.0
Based on a patch from wiz@, thanks! The main change I made was tricking
autoconf into thinking NetBSD doesn't have posix_fallocate.

The main new features in this release are:

- Add support for the Meson build system (autotools is still supported
  but will be removed in a future release)
- Add API to tag proxy objects to allow applications and toolkits to
  share the same Wayland connection
- Track wayland-server timers in user-space to prevent creating too
  many FDs
- Add wl_global_remove, a new function to mitigate race conditions with
  globals
2020-03-15 16:03:26 +00:00

45 lines
1.8 KiB
Text

$NetBSD: patch-configure.ac,v 1.3 2020/03/15 16:03:26 nia Exp $
https://lists.freedesktop.org/archives/wayland-devel/2019-February/040024.html
--- configure.ac.orig 2020-02-11 23:46:03.000000000 +0000
+++ configure.ac
@@ -71,6 +71,17 @@ 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/epoll.h sys/event.h])
+if test "x$ac_cv_header_sys_epoll_h" != "xyes" && test "x$ac_cv_header_sys_event_h" != "xyes"; then
+ AC_MSG_ERROR([Can't find sys/epoll.h or sys/event.h. Please ensure either epoll or kqueue is available.])
+fi
+
+AC_CHECK_HEADERS([sys/ucred.h])
+
+# dlopen()
+AC_CHECK_LIB([dl], [dlsym], [DL_LIBS=-ldl])
+AC_SUBST([DL_LIBS])
+
AC_ARG_ENABLE([libraries],
[AC_HELP_STRING([--disable-libraries],
[Disable compilation of wayland libraries])],
@@ -106,12 +117,14 @@ AC_SUBST([ICONDIR])
if test "x$enable_libraries" = "xyes"; then
PKG_CHECK_MODULES(FFI, [libffi])
- AC_CHECK_DECL(SFD_CLOEXEC,[],
- [AC_MSG_ERROR("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")],
- [[#include <sys/timerfd.h>]])
+ if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
+ AC_CHECK_DECL(SFD_CLOEXEC,[],
+ [AC_MSG_ERROR("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")],
+ [[#include <sys/timerfd.h>]])
+ fi
AC_CHECK_DECL(CLOCK_MONOTONIC,[],
[AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland libraries")],
[[#include <time.h>]])