View previous topic :: View next topic |
Author |
Message |
Zephire n00b
Joined: 29 Jan 2013 Posts: 3
|
Posted: Wed Jan 30, 2013 10:45 am Post subject: Making libraries available to the system |
|
|
If I write an ebuild for a library, what is the right way to install it so other ebuilds can use it?
1. Think of a good name and directory and install it there and never never ever change it so other ebuilds can hardcode the path for the compiler.
2. Always install a .pc file in the right directory so other ebuilds can use pkg-config to find my library and they don't have to rely on me fixing the path forever.
3. There is a clever gentoo way for making the system aware of my library? (Like for runtime linking env-update collects LDPATH in /etc/env.d/ and automatically writes ld config file)
I looked a bit inside the Development Guide but could not find anything about. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9523 Location: beyond the rim
|
Posted: Wed Jan 30, 2013 3:33 pm Post subject: |
|
|
The standard answer is to put it into /usr/$(get_libdir), there both the linker and the runtime linker will find it by default. If for some reason you can't or don't want to do that the next best thing is to install a pkgconfig file to specify locations for libraries and header files.
Note that this is the standard answer, there are exceptions to this (precompiled packages, special upstream/community requirements, ...). |
|
Back to top |
|
|
|