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

Jan Vesely jan.vesely at rutgers.edu
Wed Dec 18 12:06:10 PST 2013


On Wed, 2013-12-18 at 00:01 -0500, Tom Stellard wrote:
> On Mon, Dec 16, 2013 at 06:56:51PM -0500, Jan Vesely wrote:
> > 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.
> 
> I think the current behavior is standard for most projects, so I think
> we should leave the configure script as-is.  I usually put my configure
> invocations in a shell script, and you could achieve the same thing
> with:
> 
> PREFIX=/home/$USER/.local ./configure --prefix=$PREFIX --pkgcofigdir=$PREFIX/lib/pkgconfig
> 
> Or you could just add $PREFIX/share/pkgconfig to your PKG_CONFIG_PATH.
> The reason libclc installs its .pc file to $PREFIX/share/pkgconfig is
> to simplify the install on multilib systems, since libclc is platform
> independent.

OK, thanks for the explanation. I don't insist, it just made my life a
little easier.

thank you,
Jan

> 
> -Tom
> 
> > 
> > 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>
> 
> 

-- 
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/20131218/969f56f3/attachment.sig>


More information about the Libclc-dev mailing list