jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=45b103eb0a3a91238f6ee1d66ccb2614925a2e64

commit 45b103eb0a3a91238f6ee1d66ccb2614925a2e64
Author: Subhransu Mohanty <sub.moha...@samsung.com>
Date:   Thu Oct 13 17:09:39 2016 +0900

    evas/module: add a new module in vg_loader for eet
    
    Reviewers: jpeg
    
    Subscribers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D4347
---
 configure.ac                                       |  3 ++
 m4/evas_check_loader.m4                            | 16 ++++++
 src/Makefile_Evas.am                               | 31 +++++++++--
 src/lib/evas/file/evas_module.c                    |  4 ++
 src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c | 60 ++++++++++++++++++++++
 5 files changed, 110 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0b7adba..0794852 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2391,6 +2391,8 @@ case "$host_os" in
 esac
 
 ARG_ENABLE_EVAS_VG_LOADER(SVG, static)
+ARG_ENABLE_EVAS_VG_LOADER(EET, static)
+
 
 ARG_ENABLE_EVAS_IMAGE_LOADER(BMP, static)
 ARG_ENABLE_EVAS_IMAGE_LOADER(Eet, static)
@@ -2713,6 +2715,7 @@ AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_COMMON], [test 
"x${have_static_evas_engine_
 ## Vg Loaders
 
 EVAS_CHECK_VG_LOADER([SVG], [${want_evas_vg_loader_svg}])
+EVAS_CHECK_VG_LOADER([EET], [${want_evas_vg_loader_eet}])
 
 ## Image Loaders
 
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
index 5bf9277..b574931 100644
--- a/m4/evas_check_loader.m4
+++ b/m4/evas_check_loader.m4
@@ -42,6 +42,22 @@ AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
 
 ])
 
+dnl use: EVAS_CHECK_VG_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, 
ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_EET],
+[
+
+have_dep="yes"
+evas_vg_loader_[]$1[]_cflags=""
+evas_vg_loader_[]$1[]_libs=""
+
+AC_SUBST([evas_vg_loader_$1_cflags])
+AC_SUBST([evas_vg_loader_$1_libs])
+
+AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
+
+])
+
 dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value)
 
 AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER],
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 369e3eb..0b9e79e 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -1531,10 +1531,6 @@ if EVAS_STATIC_BUILD_VG_SVG
 lib_evas_libevas_la_SOURCES += modules/evas/vg_loaders/svg/evas_vg_load_svg.c
 lib_evas_libevas_la_CPPFLAGS += @evas_vg_loader_svg_cflags@
 lib_evas_libevas_la_LIBADD += @evas_vg_loader_svg_libs@
-if EVAS_CSERVE2
-bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_vg_loader_svg_cflags@
-bin_evas_evas_cserve2_slave_LDADD += @evas_vg_loader_svg_libs@
-endif
 else
 vgloadersvgpkgdir = $(libdir)/evas/modules/vg_loaders/svg/$(MODULE_ARCH)
 vgloadersvgpkg_LTLIBRARIES = modules/evas/vg_loaders/svg/module.la
@@ -1558,6 +1554,33 @@ modules_evas_vg_loaders_svg_module_la_LIBTOOLFLAGS = 
--tag=disable-static
 endif
 endif
 
+if BUILD_VG_LOADER_EET
+if EVAS_STATIC_BUILD_VG_EET
+lib_evas_libevas_la_SOURCES += modules/evas/vg_loaders/eet/evas_vg_load_eet.c
+lib_evas_libevas_la_CPPFLAGS += @evas_vg_loader_eet_cflags@
+lib_evas_libevas_la_LIBADD += @evas_vg_loader_eet_libs@
+else
+vgloadereetpkgdir = $(libdir)/evas/modules/vg_loaders/eet/$(MODULE_ARCH)
+vgloadereetpkg_LTLIBRARIES = modules/evas/vg_loaders/eet/module.la
+
+# Workaround for broken parallel install support in automake (relink issue)
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
+install_vgloadereetpkgLTLIBRARIES = install-vgloadereetpkgLTLIBRARIES
+$(install_vgloadereetpkgLTLIBRARIES): install-libLTLIBRARIES
+
+modules_evas_vg_loaders_eet_module_la_SOURCES = 
modules/evas/vg_loaders/eet/evas_vg_load_eet.c
+modules_evas_vg_loaders_eet_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
\
+-I$(top_srcdir)/src/lib/evas/include \
+@EVAS_CFLAGS@ \
+@evas_vg_loader_eet_cflags@
+modules_evas_vg_loaders_eet_module_la_LIBADD = \
+@USE_EVAS_LIBS@ \
+@evas_vg_loader_eet_libs@
+modules_evas_vg_loaders_eet_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
+modules_evas_vg_loaders_eet_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
+modules_evas_vg_loaders_eet_module_la_LIBTOOLFLAGS = --tag=disable-static
+endif
+endif
 
 
 if BUILD_LOADER_BMP
diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index f8d2787..ea4f5c2 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -130,6 +130,7 @@ EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
 #endif
 
 #if !EVAS_MODULE_NO_VG_LOADERS
+EVAS_EINA_STATIC_MODULE_DEFINE(vg_loader, eet);
 EVAS_EINA_STATIC_MODULE_DEFINE(vg_loader, svg);
 #endif
 
@@ -203,6 +204,9 @@ static const struct {
 #ifdef EVAS_STATIC_BUILD_VG_SVG
   EVAS_EINA_STATIC_MODULE_USE(vg_loader, svg),
 #endif
+#ifdef EVAS_STATIC_BUILD_VG_EET
+  EVAS_EINA_STATIC_MODULE_USE(vg_loader, eet),
+#endif
 #endif
 #if !EVAS_MODULE_NO_IMAGE_LOADERS
 #ifdef EVAS_STATIC_BUILD_BMP
diff --git a/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c 
b/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c
new file mode 100644
index 0000000..485157a
--- /dev/null
+++ b/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c
@@ -0,0 +1,60 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "evas_common_private.h"
+#include "evas_private.h"
+
+static int _evas_vg_loader_eet_log_dom = -1;
+
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_vg_loader_eet_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_vg_loader_eet_log_dom, __VA_ARGS__)
+
+static void*
+evas_vg_load_file_data_eet(Eina_File *f EINA_UNUSED, Eina_Stringshare *key 
EINA_UNUSED, int *error EINA_UNUSED)
+{
+   INF("No Implementation Yet");
+   return NULL;
+}
+
+static Evas_Vg_Load_Func evas_vg_load_eet_func =
+{
+   evas_vg_load_file_data_eet
+};
+
+static int
+module_open(Evas_Module *em)
+{
+   if (!em) return 0;
+   em->functions = (void *)(&evas_vg_load_eet_func);
+   return 1;
+}
+
+static void
+module_close(Evas_Module *em EINA_UNUSED)
+{
+}
+
+static Evas_Module_Api evas_modapi =
+{
+   EVAS_MODULE_API_VERSION,
+   "eet",
+   "none",
+   {
+     module_open,
+     module_close
+   }
+};
+
+EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_LOADER, vg_loader, eet);
+
+#ifndef EVAS_STATIC_BUILD_VG_EET
+EVAS_EINA_MODULE_DEFINE(vg_loader, eet);
+#endif
\ No newline at end of file

-- 


Reply via email to