diff options
author | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2017-02-03 11:49:38 -0200 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2017-02-03 12:36:38 -0200 |
commit | 8dc853f2300ea70a9116325db773da22c6343c3c (patch) | |
tree | 841bdd4af4acac518732cd0c189de991fa4ffd73 /src/lib | |
parent | 75dc1b3fd711afa26f69f8244b64d2df9628fae4 (diff) |
ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecore/ecore.c | 2 | ||||
-rw-r--r-- | src/lib/ecore_con/ecore_con_proxy_helper.c | 4 | ||||
-rw-r--r-- | src/lib/ecore_evas/ecore_evas_module.c | 10 | ||||
-rw-r--r-- | src/lib/ecore_imf/ecore_imf_module.c | 2 | ||||
-rw-r--r-- | src/lib/edje/edje_edit.c | 2 | ||||
-rw-r--r-- | src/lib/edje/edje_module.c | 8 | ||||
-rw-r--r-- | src/lib/eeze/eeze_sensor.c | 2 | ||||
-rw-r--r-- | src/lib/elementary/elm_module.c | 2 | ||||
-rw-r--r-- | src/lib/elementary/elm_web2.c | 2 | ||||
-rw-r--r-- | src/lib/emotion/emotion_modules.c | 2 | ||||
-rw-r--r-- | src/lib/ethumb/ethumb.c | 2 | ||||
-rw-r--r-- | src/lib/evas/file/evas_module.c | 12 |
12 files changed, 50 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 9d4270a228..6c0a31e185 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c | |||
@@ -137,6 +137,7 @@ ecore_system_modules_load(void) | |||
137 | { | 137 | { |
138 | char buf[PATH_MAX] = ""; | 138 | char buf[PATH_MAX] = ""; |
139 | 139 | ||
140 | #ifdef NEED_RUN_IN_TREE | ||
140 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 141 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
141 | if (getuid() == geteuid()) | 142 | if (getuid() == geteuid()) |
142 | #endif | 143 | #endif |
@@ -173,6 +174,7 @@ ecore_system_modules_load(void) | |||
173 | } | 174 | } |
174 | } | 175 | } |
175 | } | 176 | } |
177 | #endif | ||
176 | 178 | ||
177 | snprintf(buf, sizeof(buf), "%s/ecore/system", | 179 | snprintf(buf, sizeof(buf), "%s/ecore/system", |
178 | eina_prefix_lib_get(_ecore_pfx)); | 180 | eina_prefix_lib_get(_ecore_pfx)); |
diff --git a/src/lib/ecore_con/ecore_con_proxy_helper.c b/src/lib/ecore_con/ecore_con_proxy_helper.c index eda91e9989..8fb9e0ff6a 100644 --- a/src/lib/ecore_con/ecore_con_proxy_helper.c +++ b/src/lib/ecore_con/ecore_con_proxy_helper.c | |||
@@ -57,10 +57,13 @@ _efl_net_proxy_helper_spawn(void) | |||
57 | char buf[PATH_MAX]; | 57 | char buf[PATH_MAX]; |
58 | Eina_List *l; | 58 | Eina_List *l; |
59 | Efl_Net_Proxy_Helper_Req *req; | 59 | Efl_Net_Proxy_Helper_Req *req; |
60 | #ifdef NEED_RUN_IN_TREE | ||
60 | static int run_in_tree = -1; | 61 | static int run_in_tree = -1; |
62 | #endif | ||
61 | 63 | ||
62 | if (!_efl_net_proxy_helper_works) return; | 64 | if (!_efl_net_proxy_helper_works) return; |
63 | if (_efl_net_proxy_helper_exe) return; | 65 | if (_efl_net_proxy_helper_exe) return; |
66 | #ifdef NEED_RUN_IN_TREE | ||
64 | if (run_in_tree == -1) | 67 | if (run_in_tree == -1) |
65 | { | 68 | { |
66 | run_in_tree = 0; | 69 | run_in_tree = 0; |
@@ -77,6 +80,7 @@ _efl_net_proxy_helper_spawn(void) | |||
77 | (buf, sizeof(buf), | 80 | (buf, sizeof(buf), |
78 | PACKAGE_BUILD_DIR"/src/bin/ecore_con/utils/efl_net_proxy_helper"HELPER_EXT); | 81 | PACKAGE_BUILD_DIR"/src/bin/ecore_con/utils/efl_net_proxy_helper"HELPER_EXT); |
79 | else | 82 | else |
83 | #endif | ||
80 | snprintf | 84 | snprintf |
81 | (buf, sizeof(buf), | 85 | (buf, sizeof(buf), |
82 | "%s/ecore_con/utils/"MODULE_ARCH"/efl_net_proxy_helper"HELPER_EXT, | 86 | "%s/ecore_con/utils/"MODULE_ARCH"/efl_net_proxy_helper"HELPER_EXT, |
diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c index a587ee93aa..71ca38a0f5 100644 --- a/src/lib/ecore_evas/ecore_evas_module.c +++ b/src/lib/ecore_evas/ecore_evas_module.c | |||
@@ -57,6 +57,7 @@ _ecore_evas_vnc_server_module_load(void) | |||
57 | if (_ecore_evas_vnc) | 57 | if (_ecore_evas_vnc) |
58 | return _ecore_evas_vnc; | 58 | return _ecore_evas_vnc; |
59 | 59 | ||
60 | #ifdef NEED_RUN_IN_TREE | ||
60 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 61 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
61 | if (getuid() == geteuid()) | 62 | if (getuid() == geteuid()) |
62 | #endif | 63 | #endif |
@@ -71,6 +72,7 @@ _ecore_evas_vnc_server_module_load(void) | |||
71 | return _ecore_evas_vnc; | 72 | return _ecore_evas_vnc; |
72 | } | 73 | } |
73 | } | 74 | } |
75 | #endif | ||
74 | 76 | ||
75 | prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load, | 77 | prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load, |
76 | "/ecore_evas"); | 78 | "/ecore_evas"); |
@@ -93,19 +95,24 @@ _ecore_evas_engine_load(const char *engine) | |||
93 | const char *path; | 95 | const char *path; |
94 | Eina_List *l; | 96 | Eina_List *l; |
95 | Eina_Module *em = NULL; | 97 | Eina_Module *em = NULL; |
98 | #ifdef NEED_RUN_IN_TREE | ||
96 | Eina_Bool run_in_tree; | 99 | Eina_Bool run_in_tree; |
100 | #endif | ||
97 | 101 | ||
98 | EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL); | 102 | EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL); |
99 | 103 | ||
100 | em = (Eina_Module *)eina_hash_find(_registered_engines, engine); | 104 | em = (Eina_Module *)eina_hash_find(_registered_engines, engine); |
101 | if (em) return em; | 105 | if (em) return em; |
102 | 106 | ||
107 | #ifdef NEED_RUN_IN_TREE | ||
103 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); | 108 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); |
109 | #endif | ||
104 | 110 | ||
105 | EINA_LIST_FOREACH(_engines_paths, l, path) | 111 | EINA_LIST_FOREACH(_engines_paths, l, path) |
106 | { | 112 | { |
107 | char tmp[PATH_MAX] = ""; | 113 | char tmp[PATH_MAX] = ""; |
108 | 114 | ||
115 | #ifdef NEED_RUN_IN_TREE | ||
109 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 116 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
110 | if (getuid() == geteuid()) | 117 | if (getuid() == geteuid()) |
111 | #endif | 118 | #endif |
@@ -119,6 +126,7 @@ _ecore_evas_engine_load(const char *engine) | |||
119 | tmp[0] = '\0'; | 126 | tmp[0] = '\0'; |
120 | } | 127 | } |
121 | } | 128 | } |
129 | #endif | ||
122 | 130 | ||
123 | if (tmp[0] == '\0') | 131 | if (tmp[0] == '\0') |
124 | snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s", | 132 | snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s", |
@@ -150,6 +158,7 @@ _ecore_evas_engine_init(void) | |||
150 | // _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free)); | 158 | // _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free)); |
151 | _registered_engines = eina_hash_string_small_new(NULL); | 159 | _registered_engines = eina_hash_string_small_new(NULL); |
152 | 160 | ||
161 | #ifdef NEED_RUN_IN_TREE | ||
153 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 162 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
154 | if (getuid() == geteuid()) | 163 | if (getuid() == geteuid()) |
155 | #endif | 164 | #endif |
@@ -165,6 +174,7 @@ _ecore_evas_engine_init(void) | |||
165 | } | 174 | } |
166 | } | 175 | } |
167 | } | 176 | } |
177 | #endif | ||
168 | 178 | ||
169 | /* 1. libecore_evas.so/../ecore_evas/engines/ */ | 179 | /* 1. libecore_evas.so/../ecore_evas/engines/ */ |
170 | paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines"); | 180 | paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines"); |
diff --git a/src/lib/ecore_imf/ecore_imf_module.c b/src/lib/ecore_imf/ecore_imf_module.c index 1d5747ebfe..7ec902a233 100644 --- a/src/lib/ecore_imf/ecore_imf_module.c +++ b/src/lib/ecore_imf/ecore_imf_module.c | |||
@@ -52,6 +52,7 @@ ecore_imf_module_init(void) | |||
52 | "ECORE_IMF", "ecore_imf", "checkme", | 52 | "ECORE_IMF", "ecore_imf", "checkme", |
53 | PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, | 53 | PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, |
54 | PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); | 54 | PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); |
55 | #ifdef NEED_RUN_IN_TREE | ||
55 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 56 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
56 | if (getuid() == geteuid()) | 57 | if (getuid() == geteuid()) |
57 | #endif | 58 | #endif |
@@ -88,6 +89,7 @@ ecore_imf_module_init(void) | |||
88 | } | 89 | } |
89 | } | 90 | } |
90 | } | 91 | } |
92 | #endif | ||
91 | 93 | ||
92 | env = getenv("ECORE_IMF_MODULE"); | 94 | env = getenv("ECORE_IMF_MODULE"); |
93 | #ifdef BUILD_ECORE_IMF_WAYLAND | 95 | #ifdef BUILD_ECORE_IMF_WAYLAND |
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index ee7c11997e..aaeb3a8a69 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c | |||
@@ -12469,6 +12469,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed) | |||
12469 | #else | 12469 | #else |
12470 | # define BIN_EXT | 12470 | # define BIN_EXT |
12471 | #endif | 12471 | #endif |
12472 | #ifdef NEED_RUN_IN_TREE | ||
12472 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 12473 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
12473 | if (getuid() == geteuid()) | 12474 | if (getuid() == geteuid()) |
12474 | #endif | 12475 | #endif |
@@ -12484,6 +12485,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed) | |||
12484 | embryo_cc_path[0] = '\0'; | 12485 | embryo_cc_path[0] = '\0'; |
12485 | } | 12486 | } |
12486 | } | 12487 | } |
12488 | #endif | ||
12487 | 12489 | ||
12488 | if (embryo_cc_path[0] == '\0') | 12490 | if (embryo_cc_path[0] == '\0') |
12489 | { | 12491 | { |
diff --git a/src/lib/edje/edje_module.c b/src/lib/edje/edje_module.c index cfd30088f2..68d3caa5ee 100644 --- a/src/lib/edje/edje_module.c +++ b/src/lib/edje/edje_module.c | |||
@@ -24,19 +24,24 @@ _edje_module_handle_load(const char *module) | |||
24 | const char *path; | 24 | const char *path; |
25 | Eina_List *l; | 25 | Eina_List *l; |
26 | Eina_Module *em = NULL; | 26 | Eina_Module *em = NULL; |
27 | #ifdef NEED_RUN_IN_TREE | ||
27 | Eina_Bool run_in_tree; | 28 | Eina_Bool run_in_tree; |
29 | #endif | ||
28 | 30 | ||
29 | EINA_SAFETY_ON_NULL_RETURN_VAL(module, NULL); | 31 | EINA_SAFETY_ON_NULL_RETURN_VAL(module, NULL); |
30 | 32 | ||
31 | em = (Eina_Module *)eina_hash_find(_registered_modules, module); | 33 | em = (Eina_Module *)eina_hash_find(_registered_modules, module); |
32 | if (em) return em; | 34 | if (em) return em; |
33 | 35 | ||
36 | #ifdef NEED_RUN_IN_TREE | ||
34 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); | 37 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); |
38 | #endif | ||
35 | 39 | ||
36 | EINA_LIST_FOREACH(_modules_paths, l, path) | 40 | EINA_LIST_FOREACH(_modules_paths, l, path) |
37 | { | 41 | { |
38 | char tmp[PATH_MAX] = ""; | 42 | char tmp[PATH_MAX] = ""; |
39 | 43 | ||
44 | #ifdef NEED_RUN_IN_TREE | ||
40 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 45 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
41 | if (getuid() == geteuid()) | 46 | if (getuid() == geteuid()) |
42 | #endif | 47 | #endif |
@@ -50,6 +55,7 @@ _edje_module_handle_load(const char *module) | |||
50 | tmp[0] = '\0'; | 55 | tmp[0] = '\0'; |
51 | } | 56 | } |
52 | } | 57 | } |
58 | #endif | ||
53 | 59 | ||
54 | if (tmp[0] == '\0') | 60 | if (tmp[0] == '\0') |
55 | snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s", | 61 | snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s", |
@@ -79,6 +85,7 @@ _edje_module_init(void) | |||
79 | 85 | ||
80 | _registered_modules = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free)); | 86 | _registered_modules = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free)); |
81 | 87 | ||
88 | #ifdef NEED_RUN_IN_TREE | ||
82 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 89 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
83 | if (getuid() == geteuid()) | 90 | if (getuid() == geteuid()) |
84 | #endif | 91 | #endif |
@@ -94,6 +101,7 @@ _edje_module_init(void) | |||
94 | } | 101 | } |
95 | } | 102 | } |
96 | } | 103 | } |
104 | #endif | ||
97 | 105 | ||
98 | /* 1. libedje.so/../edje/modules/ */ | 106 | /* 1. libedje.so/../edje/modules/ */ |
99 | paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules"); | 107 | paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules"); |
diff --git a/src/lib/eeze/eeze_sensor.c b/src/lib/eeze/eeze_sensor.c index 32f7a78042..284f7885e6 100644 --- a/src/lib/eeze/eeze_sensor.c +++ b/src/lib/eeze/eeze_sensor.c | |||
@@ -104,6 +104,7 @@ eeze_sensor_modules_load(void) | |||
104 | * is one of these items. We do load the modules from the builddir if the | 104 | * is one of these items. We do load the modules from the builddir if the |
105 | * environment is set. Normal case is to use installed modules from system | 105 | * environment is set. Normal case is to use installed modules from system |
106 | */ | 106 | */ |
107 | #ifdef NEED_RUN_IN_TREE | ||
107 | if ( | 108 | if ( |
108 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 109 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
109 | (getuid() == geteuid()) && | 110 | (getuid() == geteuid()) && |
@@ -122,6 +123,7 @@ eeze_sensor_modules_load(void) | |||
122 | } | 123 | } |
123 | } | 124 | } |
124 | else | 125 | else |
126 | #endif | ||
125 | { | 127 | { |
126 | snprintf(buf, sizeof(buf), "%s/eeze/modules/sensor", | 128 | snprintf(buf, sizeof(buf), "%s/eeze/modules/sensor", |
127 | eina_prefix_lib_get(pfx)); | 129 | eina_prefix_lib_get(pfx)); |
diff --git a/src/lib/elementary/elm_module.c b/src/lib/elementary/elm_module.c index febb15ec5c..03f70dc032 100644 --- a/src/lib/elementary/elm_module.c +++ b/src/lib/elementary/elm_module.c | |||
@@ -131,12 +131,14 @@ _elm_module_load(Elm_Module *m) | |||
131 | if (m->module) return EINA_TRUE; | 131 | if (m->module) return EINA_TRUE; |
132 | if (strchr(m->name, '/')) return EINA_FALSE; | 132 | if (strchr(m->name, '/')) return EINA_FALSE; |
133 | 133 | ||
134 | #ifdef NEED_RUN_IN_TREE | ||
134 | if (getenv("ELM_RUN_IN_TREE")) | 135 | if (getenv("ELM_RUN_IN_TREE")) |
135 | { | 136 | { |
136 | snprintf(buf, sizeof(buf), | 137 | snprintf(buf, sizeof(buf), |
137 | ELM_TOP_BUILD_DIR "/src/modules/%s/.libs/module"EFL_SHARED_EXTENSION, m->name); | 138 | ELM_TOP_BUILD_DIR "/src/modules/%s/.libs/module"EFL_SHARED_EXTENSION, m->name); |
138 | } | 139 | } |
139 | else | 140 | else |
141 | #endif | ||
140 | { | 142 | { |
141 | snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s/module"EFL_SHARED_EXTENSION, | 143 | snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s/module"EFL_SHARED_EXTENSION, |
142 | _elm_lib_dir, m->name, MODULE_ARCH); | 144 | _elm_lib_dir, m->name, MODULE_ARCH); |
diff --git a/src/lib/elementary/elm_web2.c b/src/lib/elementary/elm_web2.c index 3e644df292..c3dda02310 100644 --- a/src/lib/elementary/elm_web2.c +++ b/src/lib/elementary/elm_web2.c | |||
@@ -173,11 +173,13 @@ _elm_web_init(const char *engine) | |||
173 | { | 173 | { |
174 | char buf[PATH_MAX]; | 174 | char buf[PATH_MAX]; |
175 | 175 | ||
176 | #ifdef NEED_RUN_IN_TREE | ||
176 | if (getenv("ELM_RUN_IN_TREE")) | 177 | if (getenv("ELM_RUN_IN_TREE")) |
177 | snprintf(buf, sizeof(buf), | 178 | snprintf(buf, sizeof(buf), |
178 | ELM_TOP_BUILD_DIR"/src/modules/web/%s/.libs/module"EFL_SHARED_EXTENSION, | 179 | ELM_TOP_BUILD_DIR"/src/modules/web/%s/.libs/module"EFL_SHARED_EXTENSION, |
179 | engine); | 180 | engine); |
180 | else | 181 | else |
182 | #endif | ||
181 | snprintf(buf, sizeof(buf), | 183 | snprintf(buf, sizeof(buf), |
182 | "%s/elementary/modules/web/%s/%s/module"EFL_SHARED_EXTENSION, | 184 | "%s/elementary/modules/web/%s/%s/module"EFL_SHARED_EXTENSION, |
183 | _elm_lib_dir, engine, MODULE_ARCH); | 185 | _elm_lib_dir, engine, MODULE_ARCH); |
diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c index 719b5d3e85..5b9666f07a 100644 --- a/src/lib/emotion/emotion_modules.c +++ b/src/lib/emotion/emotion_modules.c | |||
@@ -62,6 +62,7 @@ _emotion_modules_load(void) | |||
62 | if (_emotion_modules_loaded) return; | 62 | if (_emotion_modules_loaded) return; |
63 | _emotion_modules_loaded = EINA_TRUE; | 63 | _emotion_modules_loaded = EINA_TRUE; |
64 | 64 | ||
65 | #ifdef NEED_RUN_IN_TREE | ||
65 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 66 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
66 | if (getuid() == geteuid()) | 67 | if (getuid() == geteuid()) |
67 | #endif | 68 | #endif |
@@ -101,6 +102,7 @@ _emotion_modules_load(void) | |||
101 | } | 102 | } |
102 | } | 103 | } |
103 | } | 104 | } |
105 | #endif | ||
104 | 106 | ||
105 | snprintf(buf, sizeof(buf), "%s/emotion/modules", eina_prefix_lib_get(_emotion_pfx)); | 107 | snprintf(buf, sizeof(buf), "%s/emotion/modules", eina_prefix_lib_get(_emotion_pfx)); |
106 | _emotion_modules = eina_module_arch_list_get(_emotion_modules, buf, MODULE_ARCH); | 108 | _emotion_modules = eina_module_arch_list_get(_emotion_modules, buf, MODULE_ARCH); |
diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c index 73ec5b9e0c..7737b01fb9 100644 --- a/src/lib/ethumb/ethumb.c +++ b/src/lib/ethumb/ethumb.c | |||
@@ -154,6 +154,7 @@ _ethumb_plugins_load(void) | |||
154 | if (_plugins_loaded) return; | 154 | if (_plugins_loaded) return; |
155 | _plugins_loaded = EINA_TRUE; | 155 | _plugins_loaded = EINA_TRUE; |
156 | 156 | ||
157 | #ifdef NEED_RUN_IN_TREE | ||
157 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 158 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
158 | if (getuid() == geteuid()) | 159 | if (getuid() == geteuid()) |
159 | #endif | 160 | #endif |
@@ -182,6 +183,7 @@ _ethumb_plugins_load(void) | |||
182 | } | 183 | } |
183 | } | 184 | } |
184 | } | 185 | } |
186 | #endif | ||
185 | 187 | ||
186 | snprintf(buf, sizeof(buf), "%s/ethumb/modules", eina_prefix_lib_get(_pfx)); | 188 | snprintf(buf, sizeof(buf), "%s/ethumb/modules", eina_prefix_lib_get(_pfx)); |
187 | _plugins = eina_module_arch_list_get(_plugins, buf, MODULE_ARCH); | 189 | _plugins = eina_module_arch_list_get(_plugins, buf, MODULE_ARCH); |
diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c index 67f565657f..f05870ad2b 100644 --- a/src/lib/evas/file/evas_module.c +++ b/src/lib/evas/file/evas_module.c | |||
@@ -110,6 +110,7 @@ evas_module_paths_init(void) | |||
110 | { | 110 | { |
111 | char *libdir, *path; | 111 | char *libdir, *path; |
112 | 112 | ||
113 | #ifdef NEED_RUN_IN_TREE | ||
113 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 114 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
114 | if (getuid() == geteuid()) | 115 | if (getuid() == geteuid()) |
115 | #endif | 116 | #endif |
@@ -125,6 +126,7 @@ evas_module_paths_init(void) | |||
125 | } | 126 | } |
126 | } | 127 | } |
127 | } | 128 | } |
129 | #endif | ||
128 | 130 | ||
129 | /* 1. libevas.so/../evas/modules/ */ | 131 | /* 1. libevas.so/../evas/modules/ */ |
130 | libdir = (char *)_evas_module_libdir_get(); | 132 | libdir = (char *)_evas_module_libdir_get(); |
@@ -408,9 +410,11 @@ evas_module_engine_list(void) | |||
408 | unsigned int i; | 410 | unsigned int i; |
409 | const char *s, *s2; | 411 | const char *s, *s2; |
410 | char buf[PATH_MAX]; | 412 | char buf[PATH_MAX]; |
413 | #ifdef NEED_RUN_IN_TREE | ||
411 | Eina_Bool run_in_tree; | 414 | Eina_Bool run_in_tree; |
412 | 415 | ||
413 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); | 416 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); |
417 | #endif | ||
414 | 418 | ||
415 | EINA_LIST_FOREACH(evas_module_paths, l, s) | 419 | EINA_LIST_FOREACH(evas_module_paths, l, s) |
416 | { | 420 | { |
@@ -424,6 +428,7 @@ evas_module_engine_list(void) | |||
424 | { | 428 | { |
425 | const char *fname = fi->path + fi->name_start; | 429 | const char *fname = fi->path + fi->name_start; |
426 | 430 | ||
431 | #ifdef NEED_RUN_IN_TREE | ||
427 | buf[0] = '\0'; | 432 | buf[0] = '\0'; |
428 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 433 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
429 | if (getuid() == geteuid()) | 434 | if (getuid() == geteuid()) |
@@ -439,6 +444,7 @@ evas_module_engine_list(void) | |||
439 | } | 444 | } |
440 | 445 | ||
441 | if (buf[0] == '\0') | 446 | if (buf[0] == '\0') |
447 | #endif | ||
442 | snprintf(buf, sizeof(buf), "%s/engines/%s/%s", | 448 | snprintf(buf, sizeof(buf), "%s/engines/%s/%s", |
443 | s, fname, MODULE_ARCH); | 449 | s, fname, MODULE_ARCH); |
444 | 450 | ||
@@ -513,7 +519,9 @@ evas_module_find_type(Evas_Module_Type type, const char *name) | |||
513 | Evas_Module *em; | 519 | Evas_Module *em; |
514 | Eina_Module *en; | 520 | Eina_Module *en; |
515 | Eina_List *l; | 521 | Eina_List *l; |
522 | #ifdef NEED_RUN_IN_TREE | ||
516 | Eina_Bool run_in_tree; | 523 | Eina_Bool run_in_tree; |
524 | #endif | ||
517 | 525 | ||
518 | if ((unsigned int)type > 5) return NULL; | 526 | if ((unsigned int)type > 5) return NULL; |
519 | 527 | ||
@@ -524,7 +532,9 @@ evas_module_find_type(Evas_Module_Type type, const char *name) | |||
524 | return NULL; | 532 | return NULL; |
525 | } | 533 | } |
526 | 534 | ||
535 | #ifdef NEED_RUN_IN_TREE | ||
527 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); | 536 | run_in_tree = !!getenv("EFL_RUN_IN_TREE"); |
537 | #endif | ||
528 | 538 | ||
529 | EINA_LIST_FOREACH(evas_module_paths, l, path) | 539 | EINA_LIST_FOREACH(evas_module_paths, l, path) |
530 | { | 540 | { |
@@ -540,6 +550,7 @@ evas_module_find_type(Evas_Module_Type type, const char *name) | |||
540 | } | 550 | } |
541 | 551 | ||
542 | buffer[0] = '\0'; | 552 | buffer[0] = '\0'; |
553 | #if NEED_RUN_IN_TREE | ||
543 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | 554 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) |
544 | if (getuid() == geteuid()) | 555 | if (getuid() == geteuid()) |
545 | #endif | 556 | #endif |
@@ -552,6 +563,7 @@ evas_module_find_type(Evas_Module_Type type, const char *name) | |||
552 | buffer[0] = '\0'; | 563 | buffer[0] = '\0'; |
553 | } | 564 | } |
554 | } | 565 | } |
566 | #endif | ||
555 | 567 | ||
556 | if (buffer[0] == '\0') | 568 | if (buffer[0] == '\0') |
557 | snprintf(buffer, sizeof(buffer), "%s/%s/%s/%s/%s", | 569 | snprintf(buffer, sizeof(buffer), "%s/%s/%s/%s/%s", |