Base Directory Specification and plugins

Yury G. Kudryashov urkud.urkud at gmail.com
Thu Sep 1 09:53:03 PDT 2011


Simon McVittie wrote:

> On Thu, 01 Sep 2011 at 00:28:37 +0400, Yury G.  Kudryashov wrote:
>> I'm replying to an old thread. The original thread can be found here:
>> http://lists.freedesktop.org/archives/xdg/2010-November/011722.html
>> 
>> Simon McVittie wrote:
>> > The most general and widely used naming scheme for ABIs in Free
>> > Software seems to be the "GNU triplets" used by autoconf and gcc, which
>> > look like CPU-OS or CPU-KERNEL-OS (e.g. x86_64-linux-gnu for Linux with
>> > GNU libc on x86-64, arm-linux-uclibc for Linux with uclibc on ARM,
>> > i486-freebsd for FreeBSD (both kernel and libc) on x86, or whatever).
>> 
>> What do you think about $XDG_LIBRARY_DIRS${LIB_SUFFIX},
>> $XDG_LIBRARY_HOME${LIB_SUFFIX}, where LIB_SUFFIX is fixed during library
>> compilation and should be available through
>> MyLib.pc/MyLibConfig.cmake/whatever? This looks easier to implement.
> 
> Perhaps; or "/${LIB_SUFFIX}",
This is a particular case of my proposal: just set my LIB_SUFFIX to 
"/${YOUR_LIB_SUFFIX}".
> which is essentially Debian-style multiarch.
> I can't help thinking that the ABI naming should be the same for the whole
> platform rather than being something you query per-library, but hopefully
> one day everyone will be using multiarch anyway.

What about the following algorithm:
 * A library/application provides a way to set LIB_SUFFIX at configure time. 
It can default to "/${GNU_TRIPPLE}" or ""/"64" but distro packages should 
have a way to override it.
 * A library/application advertices its LIB_SUFFIX somehow.
 * Plugin's buildsystem installs plugin into LIB_SUFFIX advertised by 
library.

BTW, for most libraries LIB_SUFFIX will be 
"/${GNU_TRIPPLE}/${LIBRARY_SPECIFIC_SUFFIX}". E.g., KDE currently loads 
plugins from $KDEDIRS/lib/kde4 and adds $KDEDIRS/lib/kde4/plugins to 
$QT_PLUGIN_PATH.
-- 
Yury G. Kudryashov,
mailto: urkud at mccme.ru



More information about the xdg mailing list