summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-08-01 06:29:26 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-08-01 06:29:26 +0000
commitdebbdfe022610edb9c545ac4f2777151d73958aa (patch)
tree4e7ad0a0830a84253d611de39afcb398ba6105de /legacy
parent7150d2f266bdcb3af282058cf3977cc8ecdab908 (diff)
use eina_prefix for module finding as well as generic util bins... and
fix to proviude data file to prefix finding works right with debina multiarch. SVN revision: 74710
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/configure.ac1
-rw-r--r--legacy/evas/data/Makefile.am6
-rw-r--r--legacy/evas/data/checkme2
-rw-r--r--legacy/evas/src/lib/file/evas_module.c19
4 files changed, 24 insertions, 4 deletions
diff --git a/legacy/evas/configure.ac b/legacy/evas/configure.ac
index 46ebb80c32..47cee6580d 100644
--- a/legacy/evas/configure.ac
+++ b/legacy/evas/configure.ac
@@ -1945,6 +1945,7 @@ src/static_deps/liblinebreak/Makefile
1945src/lib/include/Makefile 1945src/lib/include/Makefile
1946src/examples/Makefile 1946src/examples/Makefile
1947src/tests/Makefile 1947src/tests/Makefile
1948data/Makefile
1948evas.spec 1949evas.spec
1949]) 1950])
1950 1951
diff --git a/legacy/evas/data/Makefile.am b/legacy/evas/data/Makefile.am
new file mode 100644
index 0000000000..80a8cc6a07
--- /dev/null
+++ b/legacy/evas/data/Makefile.am
@@ -0,0 +1,6 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3filesdir = $(datadir)/evas
4files_DATA = checkme
5
6EXTRA_DIST = $(files_DATA)
diff --git a/legacy/evas/data/checkme b/legacy/evas/data/checkme
new file mode 100644
index 0000000000..987063d4cb
--- /dev/null
+++ b/legacy/evas/data/checkme
@@ -0,0 +1,2 @@
1This is just a test file used to help evas determine its prefix
2location.
diff --git a/legacy/evas/src/lib/file/evas_module.c b/legacy/evas/src/lib/file/evas_module.c
index ffef61e3e9..bdb94dfb7c 100644
--- a/legacy/evas/src/lib/file/evas_module.c
+++ b/legacy/evas/src/lib/file/evas_module.c
@@ -42,7 +42,7 @@ _evas_module_append(Eina_List *list, char *path)
42void 42void
43evas_module_paths_init(void) 43evas_module_paths_init(void)
44{ 44{
45 char *path; 45 char *libdir, *path;
46 46
47 /* 1. ~/.evas/modules/ */ 47 /* 1. ~/.evas/modules/ */
48 path = eina_module_environment_path_get("HOME", "/.evas/modules"); 48 path = eina_module_environment_path_get("HOME", "/.evas/modules");
@@ -56,13 +56,24 @@ evas_module_paths_init(void)
56 evas_module_paths = _evas_module_append(evas_module_paths, path); 56 evas_module_paths = _evas_module_append(evas_module_paths, path);
57 57
58 /* 3. libevas.so/../evas/modules/ */ 58 /* 3. libevas.so/../evas/modules/ */
59 path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules"); 59 libdir = (char *)_evas_module_libdir_get();
60 if (!libdir)
61 path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules");
62 else
63 {
64 path = malloc(strlen(libdir) + strlen("/evas/modules") + 1);
65 if (path)
66 {
67 strcpy(path, libdir);
68 strcat(path, "/evas/modules");
69 }
70 }
60 if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) 71 if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
61 free(path); 72 free(path);
62 else 73 else
63 evas_module_paths = _evas_module_append(evas_module_paths, path); 74 evas_module_paths = _evas_module_append(evas_module_paths, path);
64 75
65 /* 4. PREFIX/evas/modules/ */ 76 /* 4. PREFIX/lib/evas/modules/ */
66#ifndef _MSC_VER 77#ifndef _MSC_VER
67 path = PACKAGE_LIB_DIR "/evas/modules"; 78 path = PACKAGE_LIB_DIR "/evas/modules";
68 if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) 79 if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
@@ -616,7 +627,7 @@ EAPI const char *
616_evas_module_libdir_get(void) 627_evas_module_libdir_get(void)
617{ 628{
618 if (!pfx) pfx = eina_prefix_new 629 if (!pfx) pfx = eina_prefix_new
619 (NULL, _evas_module_libdir_get, "EVAS", "evas", NULL, 630 (NULL, _evas_module_libdir_get, "EVAS", "evas", "checkme",
620 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); 631 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
621 if (!pfx) return NULL; 632 if (!pfx) return NULL;
622 return eina_prefix_lib_get(pfx); 633 return eina_prefix_lib_get(pfx);