diff --git a/legacy/eina/ChangeLog b/legacy/eina/ChangeLog index 2e73efba5d..7c75b01983 100644 --- a/legacy/eina/ChangeLog +++ b/legacy/eina/ChangeLog @@ -314,3 +314,9 @@ 2012-07-05 Raphael Kubo da Costa * Handle NULL in all eina_*_free function. + +2012-08-01 Carsten Haitzler (The Rasterman) + + * Modify eina_prefix to deal with debian's fun new + multiarch... if you are a shared library. + diff --git a/legacy/eina/src/lib/eina_prefix.c b/legacy/eina/src/lib/eina_prefix.c index 2322311600..79fecacc7f 100644 --- a/legacy/eina/src/lib/eina_prefix.c +++ b/legacy/eina/src/lib/eina_prefix.c @@ -578,6 +578,9 @@ eina_prefix_new(const char *argv0, void *symbol, const char *envprefix, * bin_dir = /blah/whatever/bin * data_dir = /blah/whatever/share/enlightenment * lib_dir = /blah/whatever/lib + * + * new case - debian multiarch goop. + * exe = /blah/whatever/lib/arch/libexe.so */ DBG("From exe %s figure out the rest", pfx->exe_path); p = strrchr(pfx->exe_path, DSEP_C); @@ -633,6 +636,22 @@ eina_prefix_new(const char *argv0, void *symbol, const char *envprefix, /* magic file not there. time to start hunting! */ else { + if (buf[0]) + { + for (;p > pfx->exe_path; p--) + { + if (*p == DSEP_C) + { + p--; + break; + } + } + if (p > pfx->exe_path) + { + continue; + DBG("Go back one directory"); + } + } WRN("Magic failed"); _fallback(pfx, pkg_bin, pkg_lib, pkg_data, pkg_locale, envprefix);