[Mesa-dev] [PATCH 2/5] wayland-egl: force disable --enable-bundled-wayland-egl

Emil Velikov emil.l.velikov at gmail.com
Tue Jun 5 14:14:31 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

We want to remove all the respective code, so force it off.

As people miss the warning messages produced by autoconf leave the
toggle as-is, thus anyone who explicitly enables it will get an lovely
error and effectively failure ;-)

If anyone is interested in doing the same for meson - patches welcome.

Cc: Eric Engestrom <eric.engestrom at intel.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 configure.ac                            | 16 ++++++++--------
 meson.build                             |  4 +---
 meson_options.txt                       |  6 ------
 src/Makefile.am                         |  7 -------
 src/egl/Makefile.am                     |  1 -
 src/egl/drivers/dri2/platform_wayland.c | 14 +-------------
 src/egl/meson.build                     |  2 +-
 src/meson.build                         |  3 ---
 8 files changed, 11 insertions(+), 42 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5ea52242bd1..7c19c8f99d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1768,16 +1768,19 @@ if test "x$enable_glx_read_only_text" = xyes; then
 fi
 
 dnl
-dnl TEMPORARY: mostly for stable releases
+dnl DEPRECATED: used for stable releases
 dnl
 dnl It will allow easier management as the wayland-egl library was
 dnl moved to the Wayland project
 dnl
 AC_ARG_ENABLE(bundled-wayland-egl,
    [AS_HELP_STRING([--disable-bundled-wayland-egl],
-		   [disable shipping of the wayland-egl library and pkg-config file @<:@default=enabled@:>@])],
-   [enable_wayland_egl=$enableval], [enable_wayland_egl=yes])
-AM_CONDITIONAL(BUILD_WAYLAND_EGL, test "x$enable_wayland_egl" = xyes)
+		   [DEPRECATED: disable shipping of the wayland-egl library and pkg-config file @<:@default=disabled@:>@])],
+    [enable_wayland_egl=$enableval], [enable_wayland_egl=no])
+if test "x$enable_wayland_egl" != xno; then
+    AC_MSG_ERROR([--enable-bundled-wayland-egl is deprecated. The library is shipped by Wayland 1.15 or later])
+fi
+
 
 dnl
 dnl DEPRECATED: EGL Platforms configuration
@@ -1820,9 +1823,8 @@ for plat in $platforms; do
 
         PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
         PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
-        if test "x$enable_egl" = xyes -a "x$enable_wayland_egl" != xyes; then
+        if test "x$enable_egl" = xyes; then
             PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= 3])
-            DEFINES="$DEFINES -DUSE_EXTERNAL_WAYLAND_EGL"
         fi
         PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
@@ -3036,8 +3038,6 @@ AC_CONFIG_FILES([Makefile
                  src/egl/Makefile
                  src/egl/main/egl.pc
                  src/egl/wayland/wayland-drm/Makefile
-                 src/egl/wayland/wayland-egl/Makefile
-                 src/egl/wayland/wayland-egl/wayland-egl.pc
                  src/gallium/Makefile
                  src/gallium/auxiliary/Makefile
                  src/gallium/auxiliary/pipe-loader/Makefile
diff --git a/meson.build b/meson.build
index a4c72dad41a..be39551de64 100644
--- a/meson.build
+++ b/meson.build
@@ -1232,13 +1232,11 @@ if with_platform_wayland
   # TODO: Bump to 1.15 -> the first version that ships wayland-egl-backend
   dep_wayland_client = dependency('wayland-client', version : '>=1.11')
   dep_wayland_server = dependency('wayland-server', version : '>=1.11')
-  build_wayland_egl = get_option('bundled-wayland-egl')
-  if with_egl and not build_wayland_egl
+  if with_egl
     dep_wayland_egl = dependency('wayland-egl-backend', version : '>= 3')
     dep_wayland_egl_headers = declare_dependency(
       compile_args : run_command(prog_pkgconfig, ['wayland-egl-backend', '--cflags']).stdout().split()
     )
-    pre_args += ['-DUSE_EXTERNAL_WAYLAND_EGL']
   else
     dep_wayland_egl_headers = null_dep
   endif
diff --git a/meson_options.txt b/meson_options.txt
index 77d7c283fc9..2c1f514debe 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -212,12 +212,6 @@ option(
   choices : ['auto', 'true', 'false'],
   description : 'Build support for EGL platform'
 )
-option(
-  'bundled-wayland-egl',
-  type : 'boolean',
-  value : true,
-  description : 'Build/ship the wayland-egl library and pkg-config file'
-)
 option(
   'glvnd',
   type : 'boolean',
diff --git a/src/Makefile.am b/src/Makefile.am
index d91ecb3e239..9bb3bce3c07 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -95,13 +95,6 @@ if HAVE_GBM
 SUBDIRS += gbm
 endif
 
-## Optionally required by EGL
-if HAVE_PLATFORM_WAYLAND
-if BUILD_WAYLAND_EGL
-SUBDIRS += egl/wayland/wayland-egl
-endif
-endif
-
 if HAVE_EGL
 SUBDIRS += egl
 endif
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index bde400bb47f..7c4b3286a9b 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -115,7 +115,6 @@ AM_CFLAGS += \
 	-I$(top_builddir)/src/egl/drivers/dri2 \
 	-I$(top_srcdir)/src/egl/drivers/dri2 \
 	-I$(top_srcdir)/src/gbm/backends/dri \
-	-I$(top_srcdir)/src/egl/wayland/wayland-egl \
 	-I$(top_builddir)/src/egl/wayland/wayland-drm \
 	-I$(top_srcdir)/src/egl/wayland/wayland-drm \
 	-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index c49041f1174..be5a872e4fe 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -45,15 +45,11 @@
 #include "util/u_vector.h"
 #include "eglglobals.h"
 
+#include <wayland-egl-backend.h>
 #include <wayland-client.h>
 #include "wayland-drm-client-protocol.h"
 #include "linux-dmabuf-unstable-v1-client-protocol.h"
 
-#ifdef USE_EXTERNAL_WAYLAND_EGL
-#include <wayland-egl-backend.h>
-#else
-#include "wayland/wayland-egl/wayland-egl-backend.h"
-#endif
 
 #ifndef DRM_FORMAT_MOD_INVALID
 #define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1)
@@ -302,11 +298,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
                       dri2_surf->wl_queue);
 
    dri2_surf->wl_win = window;
-#ifdef USE_EXTERNAL_WAYLAND_EGL
    dri2_surf->wl_win->driver_private = dri2_surf;
-#else
-   dri2_surf->wl_win->private = dri2_surf;
-#endif
    dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
    if (dri2_dpy->flush)
       dri2_surf->wl_win->resize_callback = resize_callback;
@@ -392,11 +384,7 @@ dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
       wl_callback_destroy(dri2_surf->throttle_callback);
 
    if (dri2_surf->wl_win) {
-#ifdef USE_EXTERNAL_WAYLAND_EGL
       dri2_surf->wl_win->driver_private = NULL;
-#else
-      dri2_surf->wl_win->private = NULL;
-#endif
       dri2_surf->wl_win->resize_callback = NULL;
       dri2_surf->wl_win->destroy_window_callback = NULL;
    }
diff --git a/src/egl/meson.build b/src/egl/meson.build
index be5a09106c6..0341ad19d5b 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -125,7 +125,7 @@ if with_platform_wayland
     wayland_drm_client_protocol_h,
   ]
   incs_for_egl += include_directories(
-    'wayland/wayland-egl', 'wayland/wayland-drm',
+    'wayland/wayland-drm',
   )
 endif
 if with_platform_android
diff --git a/src/meson.build b/src/meson.build
index 50af466c2ad..452e32118e8 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -75,9 +75,6 @@ if with_gbm
 else
   inc_gbm = []
 endif
-if with_egl and build_wayland_egl
-  subdir('egl')
-endif
 if with_gallium
   subdir('gallium')
   # This has to be here since it requires libgallium, and subdir cannot
-- 
2.16.0



More information about the mesa-dev mailing list