From e6052cc5ad3baded0fa331a52fa2eb9fd5a982a6 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 28 Oct 2015 19:40:49 +0900 Subject: [PATCH] add dummy x11 module for avoiding build break Change-Id: Ieb750c5164278967f1d37137e83ef6c7ca75a0fd --- configure.ac | 21 +++++++++++++++++++++ packaging/e-mod-tizen-eom.spec | 3 ++- src/Makefile.am | 8 ++++++++ src/e_mod_main_x11.c | 26 ++++++++++++++++++++++++++ src/e_mod_main_x11.h | 11 +++++++++++ 5 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 src/e_mod_main_x11.c create mode 100644 src/e_mod_main_x11.h diff --git a/configure.ac b/configure.ac index 39a2c1b..cec8ae1 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,27 @@ PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) PKG_CHECK_MODULES(WAYLAND, [wayland-server]) PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment]) +dnl ======================================================================== +# checks for wayland only argument +dnl ======================================================================== +have_wayland_only=no +AC_ARG_ENABLE([wayland-only], + AS_HELP_STRING([--enable-wayland-only],[enable wayland-only version of enlightenment @<:@default=disabled@:>@]), + [have_wayland_only=$enableval], + [have_wayland_only=no]) +AC_MSG_CHECKING([whether wayland-only version is enabled]) +AM_CONDITIONAL(WAYLAND_ONLY, test x$have_wayland_only = xyes) +if test "x${have_wayland_only}" != "xno"; then + AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment]) +fi + +dnl ======================================================================== +# checks for wayland only argument +dnl ======================================================================== +if test "x${have_wayland_only}" = "xyes"; then + PKG_CHECK_MODULES(WAYLAND, [wayland-server]) +fi + AC_SUBST(ENLIGHTENMENT_CFLAGS) AC_SUBST(ENLIGHTENMENT_LIBS) diff --git a/packaging/e-mod-tizen-eom.spec b/packaging/e-mod-tizen-eom.spec index a290b5d..52e9762 100644 --- a/packaging/e-mod-tizen-eom.spec +++ b/packaging/e-mod-tizen-eom.spec @@ -12,6 +12,7 @@ License: BSD-2-Clause BuildRequires: pkgconfig(enlightenment) BuildRequires: gettext %if %{with x} +BuildRequires: pkgconfig(x11) %endif %if %{with wayland} BuildRequires: pkgconfig(wayland-server) @@ -35,7 +36,7 @@ export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib" %autogen %if %{with wayland} -%configure --prefix=/usr +%configure --prefix=/usr --enable-wayland-only %else %configure --prefix=/usr %endif diff --git a/src/Makefile.am b/src/Makefile.am index ee78075..7ae647e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,8 @@ filesdir = $(libdir)/enlightenment/modules/$(MODULE) pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la + +if WAYLAND_ONLY module_la_SOURCES = e_mod_main.c eom-protocol.c module_la_LIBADD = module_la_CFLAGS = @WAYLAND_CFLAGS@ @ENLIGHTENMENT_CFLAGS@ -DHAVE_WAYLAND_ONLY @@ -26,3 +28,9 @@ CLEANFILES = $(BUILT_SOURCES) %-client-protocol.h : $(top_srcdir)/protocol/%.xml $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ +else +module_la_SOURCES = e_mod_main_x11.c +module_la_LIBADD = +module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@ +module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@ +endif diff --git a/src/e_mod_main_x11.c b/src/e_mod_main_x11.c new file mode 100644 index 0000000..964e025 --- /dev/null +++ b/src/e_mod_main_x11.c @@ -0,0 +1,26 @@ +#include "e.h" +#include "e_mod_main.h" + +EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "EOM Module of Window Manager" }; + +EAPI void * +e_modapi_init(E_Module *m) +{ + + return m; +} + +EAPI int +e_modapi_shutdown(E_Module *m EINA_UNUSED) +{ + + return 1; +} + +EAPI int +e_modapi_save(E_Module *m EINA_UNUSED) +{ + /* Save something to be kept */ + return 1; +} + diff --git a/src/e_mod_main_x11.h b/src/e_mod_main_x11.h new file mode 100644 index 0000000..b848208 --- /dev/null +++ b/src/e_mod_main_x11.h @@ -0,0 +1,11 @@ +#ifndef E_MOD_MAIN_H +#define E_MOD_MAIN_H + +/*** E Module ***/ +EAPI extern E_Module_Api e_modapi; + +EAPI void *e_modapi_init(E_Module *m); +EAPI int e_modapi_shutdown(E_Module *m); +EAPI int e_modapi_save(E_Module *m); + +#endif -- 2.34.1