discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=a57e39a5eadfa63dcbd5af23fb57fee0a1bf7a23

commit a57e39a5eadfa63dcbd5af23fb57fee0a1bf7a23
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Jul 14 18:44:23 2017 -0400

    fix e_alert build with wayland only
---
 configure.ac           | 23 ++++++++---------------
 src/bin/Makefile.mk    |  6 ++----
 src/bin/e_alert_main.c | 14 ++++++++++----
 3 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/configure.ac b/configure.ac
index 376a54d9f..fd782eeb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -904,36 +904,29 @@ AM_CONDITIONAL([HAVE_WAYLAND_ONLY], [test 
"x${have_wayland_only}" = "xyes"])
 
 e_alert_requires="\
   evas >= $efl_version \
-  ecore >= $efl_version \
-  xcb \
-  xcb-shape \
-  xcb-keysyms \
   eina >= ${efl_version} \
   ecore >= ${efl_version} \
   ecore-ipc >= ${efl_version}"
 
 if test "x${have_wayland}" = "xyes"; then
   if test "x${HAVE_WL_DRM}" = "xyes"; then
-    if test "x${have_ecore_drm2}" = "xyes"; then
-      e_alert_requires="\
-        $e_alert_requires \
-        ecore-input >= ${efl_version} \
-        ecore-drm2 >= ${efl_ecore_drm2_version} \
-        evas >= ${efl_version}"
-    else
       e_alert_requires="\
         $e_alert_requires \
         ecore-input >= ${efl_version} \
-        ecore-drm >= ${efl_version} \
-        evas >= ${efl_version}"
-    fi
+        ecore-drm2 >= ${efl_ecore_drm2_version}"
  fi
 fi
 
 if test "x${have_wayland_only}" != "xyes"; then
-  PKG_CHECK_MODULES(E_ALERT, [$e_alert_requires])
+  e_alert_requires="\
+    $e_alert_requires \
+    xcb \
+    xcb-shape \
+    xcb-keysyms"
 fi
 
+PKG_CHECK_MODULES(E_ALERT, [$e_alert_requires])
+
 if test "x${have_wayland_only}" != "xyes"; then
   e_requires="$e_requires ecore-x >= $efl_version"
 fi
diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index ce078156f..1885b4815 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -49,11 +49,9 @@ src/bin/enlightenment_fm_op \
 src/bin/enlightenment_sys \
 src/bin/enlightenment_thumb \
 src/bin/enlightenment_elm_cfgtool \
-src/bin/enlightenment_static_grabber
+src/bin/enlightenment_static_grabber \
+src/bin/enlightenment_alert
 
-if ! HAVE_WAYLAND_ONLY
-internal_bin_PROGRAMS += src/bin/enlightenment_alert
-endif
 if HAVE_FREEBSD
 internal_bin_PROGRAMS += src/bin/enlightenment_ckpasswd
 endif
diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c
index 3cfcd6c58..f2aa19c74 100644
--- a/src/bin/e_alert_main.c
+++ b/src/bin/e_alert_main.c
@@ -15,11 +15,12 @@
 #include <Eina.h>
 #include <Ecore.h>
 #include <Ecore_Ipc.h>
+#ifndef HAVE_WAYLAND_ONLY
 #include <xcb/xcb.h>
 #include <xcb/xcb_keysyms.h>
 #include <xcb/shape.h>
 #include <X11/keysym.h>
-
+#endif
 #ifdef HAVE_WL_DRM
 # include <Ecore_Input.h>
 # ifdef HAVE_DRM2
@@ -67,6 +68,7 @@
 #define WINDOW_WIDTH   320
 #define WINDOW_HEIGHT  240
 
+#ifndef HAVE_WAYLAND_ONLY
 #ifndef XCB_ATOM_NONE
 # define XCB_ATOM_NONE 0
 #endif
@@ -100,9 +102,9 @@ static xcb_window_t btn2 = 0;
 static xcb_font_t font = 0;
 static xcb_gcontext_t gc = 0;
 static int fa = 0, fw = 0;
+#endif
 static int sw = 0, sh = 0;
 static int fh = 0;
-
 static const char *title = NULL, *str1 = NULL, *str2 = NULL;
 static int ret = 0, sig = 0;
 static pid_t pid;
@@ -724,8 +726,11 @@ main(int argc, char **argv)
         _e_alert_drm_run();
         _e_alert_drm_shutdown();
      }
+#endif
+#if defined(HAVE_WL_DRM) && !defined(HAVE_WAYLAND_ONLY)
    else
 #endif
+#ifndef HAVE_WAYLAND_ONLY
      {
         if (!_e_alert_connect())
           {
@@ -738,14 +743,14 @@ main(int argc, char **argv)
         _e_alert_run();
         _e_alert_shutdown();
      }
-
+#endif
    ecore_shutdown();
 
    /* ret == 1 => restart e => exit code 1 */
    /* ret == 2 => exit e => any code will do that */
    return ret;
 }
-
+#ifndef HAVE_WAYLAND_ONLY
 /* local functions */
 static int
 _e_alert_connect(void)
@@ -1296,3 +1301,4 @@ _e_alert_draw_button_text(void)
 
    xcb_image_text_8(conn, strlen(str2), btn2, gc, x, (10 + fa), str2);
 }
+#endif

-- 


Reply via email to