GNOME Bugzilla – Bug 554524
better relocatibility of pango.modules
Last modified: 2010-07-22 18:59:38 UTC
Right now, you can't relocate the entire Pango install tree somewhere else just by setting environment variables... you actually have to write out an RC file to point to your pango.modules file and then point to the RC file with PANGO_RC_FILE. This is pretty sucky. I'll attach a patch that makes things a little better by adding PANGO_SYSCONFDIR and PANGO_LIBDIR environment variables (GTK+ weirdly has GTK_SYCONFDIR and GTK_EXE_PREFIX + "/lib, I'd rather be internally consistent than copy that.) You might wonder then, how this avoids writing a temporary file. Don't you still need to write a pango.modules file? It works for me because I wanted this on OS X and you can pass @executable_path/../lib/pango/modules/... to dlopen() there, so I put that in the pango.modules. But it wouldn't work on most Unix. It would be possible: - Use dladdr() to locate the path to the library to avoid environment variables. - Implement a generic solution like the Win32 path-rewriting hack in find_or_create_module. And then the Pango install tree could just be relocated on any Unix. (OTOH, on Linux, people seldom want relocatable trees.)
Created attachment 119701 [details] [review] Patch as described
Hum, similar things have been proposed before and I turned down. Can't do to yours :). Making module file paths relative to pango.modules files is one step. I don't like the dladdr approach, so lets just take your patch. Feel free to document and commit. Thanks.
Created attachment 165515 [details] [review] Add PANGO_LIBDIR and PANGO_SYSCONFDIR enviroment variables Rebased to HEAD
Pushed to master
Thanks.