2012/11/28 Justin <j...@gentoo.org>: > Hi, > > and another one. > > Problem: > Some packages aren't lucky and their buildsystem doesn't create > pkg-config files out of the box. > > Solution: > Create them by hand. > > Eclass: > Simplifies this by providing a general function for that. > > Example: > https://github.com/gentoo-science/sci/blob/pkg-config/sci-libs/mmdb/mmdb-1.24.ebuild > > Thanks for comments, > Justin Great jobs, I had a similar eclass on my mind for a long time. It will for sure be useful for Gentoo prefix builds.
However, I have some suggestions: - Cflags should contain -I${includedir} and Libs should contain -L${libdir} by default (see <http://people.freedesktop.org/~dbn/pkg-config-guide.html#concepts>). - Reduce the number of global variables. Arguments to create_pkgconfig are as useful as global variables. - arguments like -{l,L}* can be used as Libs to avoid redundancy in the syntax (example: "-lm" instead of "-l -lm"), same for -I* - it is only one function, maybe it could be added to eutils eclass - pc files created by this eclass should go into a Gentoo specific directory (/usr/share/gentoo/lib/pkgconfig?) to avoid confusion with upstream pc files. This directory can then be added to PKG_CONFIG_PATH during the build. Can you also remind me what should go into these private variables and what not? Since Fedora has started their DSO Linking policy I am very confused about flags like -lm and -pthreads. -- Christoph Junghans http://dev.gentoo.org/~ottxor/