ecore: use new bs static lib

This commit is contained in:
Marcel Hollerbach 2018-02-16 20:37:17 +01:00
parent c93bd1b81b
commit 17d8781a2a
8 changed files with 48 additions and 66 deletions

View File

@ -141,7 +141,9 @@ lib/ecore/ecore_exe.c \
lib/ecore/ecore_exe_private.h \
lib/ecore/ecore_private.h \
lib/ecore/ecore_internal.h \
lib/ecore/ecore_main_common.h
lib/ecore/ecore_main_common.h \
static_libs/buildsystem/buildsystem.h \
static_libs/buildsystem/buildsystem_autotools.c
if HAVE_WIN32
@ -164,6 +166,7 @@ lib_ecore_libecore_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ecore\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
@ECORE_CFLAGS@
lib_ecore_libecore_la_LIBADD = @ECORE_LIBS@ @EVIL_LIBS@
lib_ecore_libecore_la_DEPENDENCIES = @ECORE_INTERNAL_LIBS@

View File

@ -118,7 +118,9 @@ lib/ecore_con/efl_net_ssl_context.c \
lib/ecore_con/efl_net_dialer_ssl.c \
lib/ecore_con/efl_net_server_ssl.c \
lib/ecore_con/ecore_con_local.c \
lib/ecore_con/efl_net_ip_address.c
lib/ecore_con/efl_net_ip_address.c \
static_libs/buildsystem/buildsystem.h \
static_libs/buildsystem/buildsystem_autotools.c
if EFL_NET_CONTROL_BACKEND_CONNMAN
lib_ecore_con_libecore_con_la_SOURCES += \
@ -167,6 +169,7 @@ lib_ecore_con_libecore_con_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ecore\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
@ECORE_CON_CFLAGS@
lib_ecore_con_libecore_con_la_LIBADD = @ECORE_CON_LIBS@ @EVIL_LIBS@
lib_ecore_con_libecore_con_la_DEPENDENCIES = @ECORE_CON_INTERNAL_LIBS@

View File

@ -23,7 +23,9 @@ lib/ecore_evas/ecore_evas_wayland.h \
lib/ecore_evas/ecore_evas_cocoa.h \
lib/ecore_evas/ecore_evas_win32.h \
lib/ecore_evas/ecore_evas_x11.h \
lib/ecore_evas/ecore_evas_util.c
lib/ecore_evas/ecore_evas_util.c \
static_libs/buildsystem/buildsystem.h \
static_libs/buildsystem/buildsystem_autotools.c
lib_ecore_evas_libecore_evas_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/modules/evas/engines/buffer \
@ -31,6 +33,7 @@ lib_ecore_evas_libecore_evas_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ecore_evas\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
@ECORE_EVAS_CFLAGS@
lib_ecore_evas_libecore_evas_la_LIBADD = @ECORE_EVAS_LIBS@
lib_ecore_evas_libecore_evas_la_DEPENDENCIES = @ECORE_EVAS_INTERNAL_LIBS@

View File

@ -12,13 +12,16 @@ lib_ecore_imf_libecore_imf_la_SOURCES = \
lib/ecore_imf/ecore_imf.c \
lib/ecore_imf/ecore_imf_context.c \
lib/ecore_imf/ecore_imf_module.c \
lib/ecore_imf/ecore_imf_private.h
lib/ecore_imf/ecore_imf_private.h \
static_libs/buildsystem/buildsystem.h \
static_libs/buildsystem/buildsystem_autotools.c
lib_ecore_imf_libecore_imf_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ecore_imf\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
@ECORE_IMF_CFLAGS@
lib_ecore_imf_libecore_imf_la_LIBADD = @ECORE_IMF_LIBS@
lib_ecore_imf_libecore_imf_la_DEPENDENCIES = @ECORE_IMF_INTERNAL_LIBS@

View File

@ -32,6 +32,7 @@
#include "Ecore.h"
#include "Efl_Core.h"
#include "ecore_private.h"
#include "../../static_libs/buildsystem/buildsystem.h"
#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO)
#include <malloc.h>
@ -164,9 +165,7 @@ ecore_system_modules_load(void)
const char **itr;
for (itr = built_modules; *itr != NULL; itr++)
{
snprintf(buf, sizeof(buf),
"%s/src/modules/ecore/system/%s/.libs",
PACKAGE_BUILD_DIR, *itr);
bs_mod_get(buf, sizeof(buf), "ecore/system", "system");
module_list = eina_module_list_get(module_list, buf,
EINA_FALSE, NULL, NULL);
}

View File

@ -18,6 +18,7 @@
#include "ecore_private.h"
#include "Ecore_Con.h"
#include "ecore_con_private.h"
#include "../../static_libs/buildsystem/buildsystem.h"
typedef struct {
Eina_Thread_Queue *thq;
@ -87,9 +88,7 @@ _efl_net_proxy_helper_spawn(void)
}
// find binary location path
if (run_in_tree == 1)
snprintf
(buf, sizeof(buf),
PACKAGE_BUILD_DIR"/src/bin/ecore_con/utils/efl_net_proxy_helper"HELPER_EXT);
bs_binary_get(buf, sizeof(buf), "ecore_con/utils", "efl_net_proxy_helper");
else
#endif
snprintf

View File

@ -9,6 +9,8 @@
#include "ecore_evas_private.h"
#include <unistd.h>
#include "../../static_libs/buildsystem/buildsystem.h"
static Eina_Hash *_registered_engines = NULL;
static Eina_List *_engines_paths = NULL;
static Eina_List *_engines_available = NULL;
@ -63,26 +65,23 @@ Eina_Module *
_ecore_evas_vnc_server_module_load(void)
{
char *prefix;
char buf[PATH_MAX];
if (_ecore_evas_vnc)
return _ecore_evas_vnc;
#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
if (bs_mod_get(buf, sizeof(buf), "ecore_evas", "vnc_server"))
{
if (getenv("EFL_RUN_IN_TREE"))
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
{
_ecore_evas_vnc = _ecore_evas_vnc_server_module_try_load(PACKAGE_BUILD_DIR
"/src/modules/ecore_evas/vnc_server/.libs/"
ECORE_EVAS_ENGINE_NAME,
_ecore_evas_vnc = _ecore_evas_vnc_server_module_try_load(buf,
EINA_TRUE);
if (_ecore_evas_vnc)
return _ecore_evas_vnc;
}
}
#endif
prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load,
"/ecore_evas");
@ -105,41 +104,31 @@ _ecore_evas_engine_load(const char *engine)
const char *path;
Eina_List *l;
Eina_Module *em = NULL;
#ifdef NEED_RUN_IN_TREE
Eina_Bool run_in_tree;
#endif
char tmp[PATH_MAX] = "";
EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL);
em = (Eina_Module *)eina_hash_find(_registered_engines, engine);
if (em) return em;
#ifdef NEED_RUN_IN_TREE
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
#endif
if (bs_mod_get(tmp, sizeof(tmp), "ecore_evas/engines", engine))
{
em = eina_module_new(tmp);
if (!em) return NULL;
if (!eina_module_load(em))
{
eina_module_free(em);
return NULL;
}
if (eina_hash_add(_registered_engines, engine, em))
return em;
}
EINA_LIST_FOREACH(_engines_paths, l, path)
{
char tmp[PATH_MAX] = "";
#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
{
if (run_in_tree)
{
snprintf(tmp, sizeof(tmp), "%s/%s/.libs/%s",
path, engine, ECORE_EVAS_ENGINE_NAME);
if (!_file_exists(tmp))
tmp[0] = '\0';
}
}
#endif
if (tmp[0] == '\0')
snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
path, engine, MODULE_ARCH, ECORE_EVAS_ENGINE_NAME);
snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
path, engine, MODULE_ARCH, ECORE_EVAS_ENGINE_NAME);
em = eina_module_new(tmp);
if (!em) continue;
@ -167,23 +156,6 @@ _ecore_evas_engine_init(void)
// _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
_registered_engines = eina_hash_string_small_new(NULL);
#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
{
if (getenv("EFL_RUN_IN_TREE"))
{
const char mp[] = PACKAGE_BUILD_DIR"/src/modules/ecore_evas/engines/";
if (_file_exists(mp))
{
_engines_paths = eina_list_append(_engines_paths, strdup(mp));
return;
}
}
}
#endif
/* 1. libecore_evas.so/../ecore_evas/engines/ */
paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines");
#ifndef _WIN32
@ -218,7 +190,7 @@ _ecore_evas_engine_shutdown(void)
_registered_engines = NULL;
}
*/
EINA_LIST_FREE(_engines_paths, path)
free(path);

View File

@ -14,6 +14,8 @@
#include "Ecore_IMF.h"
#include "ecore_imf_private.h"
#include "../../static_libs/buildsystem/buildsystem.h"
static void _ecore_imf_module_free(Ecore_IMF_Module *module);
static int _ecore_imf_modules_exists(const char *ctx_id);
@ -77,9 +79,7 @@ ecore_imf_module_init(void)
}
for (itr = modules_load; *itr != NULL; itr++)
{
snprintf(buf, sizeof(buf),
"%s/src/modules/ecore_imf/%s/.libs",
PACKAGE_BUILD_DIR, *itr);
bs_mod_dir_get(buf, sizeof(buf), "ecore_imf", *itr);
module_list = eina_module_list_get
(module_list, buf, EINA_FALSE, NULL, NULL);
}