Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jul 2022 13:10:46 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Andrea Pappacoda <andrea@pappacoda.it>
Cc:        Alex Dupre <sysadmin@alexdupre.com>, freebsd-hackers@FreeBSD.org
Subject:   Re: pkg-config and share/
Message-ID:  <20220725111046.7sr7yyvsm5f3hyhj@aniel.nours.eu>
In-Reply-To: <CNMKFR.31V3MUTROVR7@pappacoda.it>
References:  <50B3D276-5E68-4F87-97FB-71D75D3D9602@pappacoda.it> <20220725081535.vuxy74odqt2cxdnw@aniel.nours.eu> <be19c9ab-c762-a0b4-a3d2-8ffbc45dd5ac@alexdupre.com> <20220725090824.qfeypgyugx6f7i6q@aniel.nours.eu> <CNMKFR.31V3MUTROVR7@pappacoda.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 25, 2022 at 12:04:24PM +0200, Andrea Pappacoda wrote:
> Il giorno lun 25 lug 2022 alle 11:08:24 +02:00:00, Baptiste Daroussin
> <bapt@FreeBSD.org> ha scritto:
> > On Mon, Jul 25, 2022 at 10:54:57AM +0200, Alex Dupre wrote:
> > >  On 25/07/22 10:15, Baptiste Daroussin wrote:
> > >  > When pkg-config came out, (before my time) the .pc files were
> > > naturally added to
> > >  > libdata which is where most people hacking on freebsd would have
> > > expected it.
> > >  >
> > >  > So when we switched to pkgconf we preserved that.
> > >  >
> > >  > Note that the ports tree on freebsd does not need patching as it
> > > automatically
> > >  > moves the .pc files from the "linux" location to libdata.
> > > 
> 
> Oh, nice! So I can simply install to share/ and FreeBSD will figure it out,
> right?

if you create a package for the ports tree yes!
> 
> > >  I'm not sure this fully answers Andrea's question. It explains why
> > > we use
> > >  `libdata` instead of `lib`, but not exactly why we don't use
> > > `share` at all.
> > >  Is it desired or simply it was added in pkg-config in a second time
> > > and
> > >  never added to the FreeBSD port?
> > 
> > Not really except if someone comes with a strong argument, we can
> > manipulate
> > where pkgconf does look at, via environment variable if needed.
> 
> Yeah, I still feel that ignoring share/ is a bit odd, especially because you
> lose the possibility of determining if a given .pc file refers to an
> architecture-independent library or not. I don't know how much FreeBSD cares
> about cross-builds, but I believe that keeping everything in the same dir
> makes things harder (if not impossible).

how do I lose that? there is something that I am missing here. what is
fundamentally different from share/pkgconfig and libdata/pkgconfig beside the
name of the directory?
> 
> > The reason we don't look elsewhere by default it to ensure we keep the
> > room
> > "clean" and people carefully store things where they are expected to be,
> > if they
> > don't, they do it on purpose and we offer mechanism to help them, (the
> > env
> > variable).
> 
> Yep, this makes sense. Every choice has its own trade-offs :)
> 
> Thank you both for your replies!
> 
> -- 
> OpenPGP key: 66DE F152 8299 0C21 99EF  A801 A8A1 28A8 AB1C EE49
> 
> 

Best regards,
bapt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220725111046.7sr7yyvsm5f3hyhj>