pkg-config and rpm relocations
Kevin Fox
Kevin.Fox at pnl.gov
Tue May 11 08:53:39 PDT 2010
Is there anything I need to fix up in this patch? Is this the right
approach? Is the idea valid or in the category of "wont ever accept"?
Looking for more info.
Thanks,
Kevin
On Wed, 2010-04-21 at 16:54 -0700, Fox, Kevin M wrote:
> Since I didn't hear any objections to my proposed solution, I coded up a
> patch real quick. See attached file. It is mostly a copy/paste from the
> windows prefix relocation code already in pkg-config. I couldn't get to
> pkg-config's git repo (stupid firewall) so I made the patch against
> 0.23. If you need me to fix anything, please let me know.
>
> To use it, you do stuff like this in your .pc file:
> relocroot=
> relocprefix=/usr
> prefix=${relocroot}${relocprefix}
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> sysconfdir=${relocroot}/etc
>
> Name: Simple test
> Description: Dummy pkgconfig test package for testing pkgconfig
> Version: 1.0.0
> Requires:
> Libs: -L${libdir} -lsimple
> Libs.private: -lm
> Cflags: -I${includedir} -DSIMPLECONF=${sysconfdir}/simple.conf
>
> If the file does not reside in /usr/lib/pkgconfig, but does live
> under /XXX/lib/pkgconfig, relocroot becomes /XXX and relocprefix becomes
> "". Otherwise, it leaves relocprefix and relocroot alone.
>
> Thanks,
> Kevin
>
> On Mon, 2010-04-05 at 23:47 -0700, Tollef Fog Heen wrote:
> > ]] Dan Nicholson
> >
> > (Kevin, not sure if you're subscribed or not, so Cc-ing you)
> >
> > | You can already do that today just by setting the variables in your
> > | .pc file appropriately.
> > |
> > | foo.pc:
> > | relocatableprefix=
> > | prefix=${relocatableprefix}/usr
> > | exec_prefix=${prefix}
> > | includedir=${prefix}/include
> > | libdir=${exec_prefix}/lib
> > |
> > | Cflags: -I${includedir}
> > | Libs.private: -L${libdir} -lfoo
> > |
> > | In fact, you can probably fake it today with most .pc files just by
> > | using "pkg-config --define-variable=prefix=$relocatableprefix".
> >
> > I believe Kevin wants this to happen automatically, and you might
> > reasonably want to relocate some, but not all of your libraries,
> > something this approach does not support.
> >
>
More information about the pkg-config
mailing list