[Libclc-dev] [PATCH 1/1] Allow $PREFIX relative paths in pkgconfigdir

Jan Vesely jan.vesely at rutgers.edu
Mon Dec 16 15:56:51 PST 2013


On Mon, 2013-12-16 at 18:47 -0500, Tom Stellard wrote:
> On Mon, Dec 16, 2013 at 06:36:50PM -0500, Jan Vesely wrote:
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> 
> Does this change the default behavior at all?  Also, can you give an
> example of something you can do with this patch that you couldn't do
> before.

Previously all paths were considered absolute. So using
--prefix =/home/$USER/.local --pkgconfigdir=lib/pkgconfig would try to
install the .pc file to /lib/pkgconfig.
The default behavior to install the file to $PREFIX/share/pkgconfig
is kept.
Invocations that use --pkgconfigdir=rel/path will change to
$PREFIX/rel/path .

The motivation was to allow simple switch from share/pkgconfig to
lib/pkgconfig (most libs on my system have pc file in lib/pkgconfig)
within the same prefix without having to write the absolute path.

regards,
Jan

> 
> -Tom
> 
> > ---
> >  configure.py | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/configure.py b/configure.py
> > index 1c6929f..598bd51 100755
> > --- a/configure.py
> > +++ b/configure.py
> > @@ -51,7 +51,10 @@ if not includedir:
> >  
> >  pkgconfigdir = options.pkgconfigdir
> >  if not pkgconfigdir:
> > -  pkgconfigdir = os.path.join(prefix, 'share/pkgconfig')
> > +  pkconfigdir = 'share/pkgconfig'
> > +
> > +if not pkgconfigdir[0] == '/':
> > +  pkgconfigdir = os.path.join(prefix, pkgconfigdir)
> >  
> >  def llvm_config(args):
> >    try:
> > -- 
> > 1.8.3.1
> > 
> > 
> > _______________________________________________
> > Libclc-dev mailing list
> > Libclc-dev at pcc.me.uk
> > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20131216/326091c3/attachment.sig>


More information about the Libclc-dev mailing list