diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2019-09-09 15:10:57 +0200 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2019-09-09 15:12:47 +0200 |
commit | 4ec57607714d2bc977b1219e72f82d22cbec144c (patch) | |
tree | ca171478a3b5ed41b12aae3be900553b810d65b2 | |
parent | e25a56077c27a83d8b3e6574368a271d3b9ff7fa (diff) |
evas_filter_parser: add a workaround for in-tree runs
Without this, the prefix would get pointed to something like
/path/to/efl/build/share/evas, which is not a valid path when
building. That would cause the docs build to fail.
-rw-r--r-- | doc/meson.build | 6 | ||||
-rw-r--r-- | src/lib/evas/filters/evas_filter_parser.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/doc/meson.build b/doc/meson.build index a362c6d2ba..576d2fed4f 100644 --- a/doc/meson.build +++ b/doc/meson.build | |||
@@ -114,7 +114,11 @@ foreach text_filter_property : text_filter_properties | |||
114 | filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua')) | 114 | filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua')) |
115 | 115 | ||
116 | doc_target += custom_target('preview_text_filters_'+name, | 116 | doc_target += custom_target('preview_text_filters_'+name, |
117 | command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size], | 117 | command: [ |
118 | env, 'EFL_RUN_IN_TREE=1', | ||
119 | 'EFL_EVAS_FILTER_LUA_PREFIX=' + join_paths(meson.source_root(), 'src', 'lib', 'evas'), | ||
120 | preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size | ||
121 | ], | ||
118 | depends: preview_text_filter, | 122 | depends: preview_text_filter, |
119 | output: 'filter_'+name+'.png', | 123 | output: 'filter_'+name+'.png', |
120 | build_by_default: false | 124 | build_by_default: false |
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c index 264f6a6ffa..72308d2a9e 100644 --- a/src/lib/evas/filters/evas_filter_parser.c +++ b/src/lib/evas/filters/evas_filter_parser.c | |||
@@ -2262,7 +2262,13 @@ static char *_lua_color_code = NULL; | |||
2262 | static inline void | 2262 | static inline void |
2263 | _lua_import_path_get(char *path, size_t len, const char *name) | 2263 | _lua_import_path_get(char *path, size_t len, const char *name) |
2264 | { | 2264 | { |
2265 | const char *pfx = _evas_module_datadir_get(); | 2265 | const char *pfx = NULL; |
2266 | /* a hack for in-tree runs, can point this to src/lib/evas */ | ||
2267 | if (getenv("EFL_RUN_IN_TREE")) | ||
2268 | pfx = getenv("EFL_EVAS_FILTER_LUA_PREFIX"); | ||
2269 | /* the real path not for in-tree runs */ | ||
2270 | if (!pfx) | ||
2271 | pfx = _evas_module_datadir_get(); | ||
2266 | size_t r = 0; | 2272 | size_t r = 0; |
2267 | 2273 | ||
2268 | #ifdef FILTERS_DEBUG | 2274 | #ifdef FILTERS_DEBUG |