summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-09-12 08:39:14 -0400
committerChris Michael <cp.michael@samsung.com>2018-09-12 08:39:14 -0400
commit4aa480f6d34a8095ebab6abb780993bfca1b7744 (patch)
treeaab0a84e2e643bc93760b5b39438d592d3d01d84
parent945eeeab330b8f404d6405c0f9a7049ca5ecc8b5 (diff)
ecore_wl2: add support for intree loading of the module
Summary: the module was not loaded when we were running intree. Reviewers: ManMower, devilhorns Reviewed By: devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7023
-rw-r--r--src/Makefile_Ecore_Wl2.am6
-rw-r--r--src/lib/ecore_wl2/ecore_wl2.c21
2 files changed, 26 insertions, 1 deletions
diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index df89b22..452e145 100644
--- a/src/Makefile_Ecore_Wl2.am
+++ b/src/Makefile_Ecore_Wl2.am
@@ -26,7 +26,9 @@ static_libs/libdrm/exynos_drmif.h \
26static_libs/libdrm/i915_drm.h \ 26static_libs/libdrm/i915_drm.h \
27static_libs/libdrm/intel_bufmgr.h \ 27static_libs/libdrm/intel_bufmgr.h \
28static_libs/libdrm/vc4_drm.h \ 28static_libs/libdrm/vc4_drm.h \
29static_libs/libdrm/LICENSE 29static_libs/libdrm/LICENSE \
30static_libs/buildsystem/buildsystem.h \
31static_libs/buildsystem/buildsystem_autotools.c
30 32
31 33
32nodist_lib_ecore_wl2_libecore_wl2_la_SOURCES = \ 34nodist_lib_ecore_wl2_libecore_wl2_la_SOURCES = \
@@ -51,6 +53,8 @@ lib_ecore_wl2_libecore_wl2_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
51@ECORE_WL2_CFLAGS@ \ 53@ECORE_WL2_CFLAGS@ \
52-I$(top_srcdir)/src/static_libs/libdrm \ 54-I$(top_srcdir)/src/static_libs/libdrm \
53-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 55-DPACKAGE_LIB_DIR=\"$(libdir)\" \
56-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
57-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
54-DMODULE_ARCH=\"$(MODULE_ARCH)\" 58-DMODULE_ARCH=\"$(MODULE_ARCH)\"
55lib_ecore_wl2_libecore_wl2_la_LIBADD = @ECORE_WL2_LIBS@ 59lib_ecore_wl2_libecore_wl2_la_LIBADD = @ECORE_WL2_LIBS@
56lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@ 60lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index 78ac85b..fe447e0 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -2,6 +2,10 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef NEED_RUN_IN_TREE
6# include "../../static_libs/buildsystem/buildsystem.h"
7#endif
8
5#include "ecore_wl2_private.h" 9#include "ecore_wl2_private.h"
6 10
7/* local variables */ 11/* local variables */
@@ -66,6 +70,23 @@ _ecore_wl2_surface_modules_init(void)
66{ 70{
67 const char *mod_dir; 71 const char *mod_dir;
68 72
73#ifdef NEED_RUN_IN_TREE
74#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
75 if (getuid() == geteuid())
76#endif
77 {
78 char path[PATH_MAX];
79 //when running in tree we are ignoring all the settings
80 //and just load the intree module that we have build
81 if (bs_mod_get(path, sizeof(path), "ecore_wl2/engines","dmabuf"))
82 {
83 Eina_Module *local_module = eina_module_new(path);
84 EINA_SAFETY_ON_NULL_RETURN_VAL(local_module, EINA_FALSE);
85 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_module_load(local_module), EINA_FALSE);
86 return EINA_TRUE;
87 }
88 }
89#endif
69 supplied_modules = eina_module_arch_list_get(NULL, 90 supplied_modules = eina_module_arch_list_get(NULL,
70 PACKAGE_LIB_DIR"/ecore_wl2/engines", 91 PACKAGE_LIB_DIR"/ecore_wl2/engines",
71 MODULE_ARCH); 92 MODULE_ARCH);