From nobody Tue Jul 26 15:37:32 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lsgyl6QYsz4XL2Z for ; Tue, 26 Jul 2022 15:37:35 +0000 (UTC) (envelope-from diizzy@FreeBSD.org) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lsgyk6xhLz3N2D; Tue, 26 Jul 2022 15:37:34 +0000 (UTC) (envelope-from diizzy@FreeBSD.org) Received: (Authenticated sender: daniel.engberg@pyret.net) by mail.gandi.net (Postfix) with ESMTPA id 68E7A60008; Tue, 26 Jul 2022 15:37:32 +0000 (UTC) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Date: Tue, 26 Jul 2022 17:37:32 +0200 From: Daniel Engberg To: Baptiste Daroussin Cc: Andrea Pappacoda , Alex Dupre , freebsd-hackers@freebsd.org Subject: Re: pkg-config and share/ In-Reply-To: <20220725111046.7sr7yyvsm5f3hyhj@aniel.nours.eu> References: <50B3D276-5E68-4F87-97FB-71D75D3D9602@pappacoda.it> <20220725081535.vuxy74odqt2cxdnw@aniel.nours.eu> <20220725090824.qfeypgyugx6f7i6q@aniel.nours.eu> <20220725111046.7sr7yyvsm5f3hyhj@aniel.nours.eu> Message-ID: <5f6e03bd468695f368e55a8839dc2838@FreeBSD.org> X-Sender: diizzy@FreeBSD.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Lsgyk6xhLz3N2D X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 2001:4b98:dc4:8::223 is neither permitted nor denied by domain of diizzy@FreeBSD.org) smtp.mailfrom=diizzy@FreeBSD.org X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[2001:4b98:dc4:8::223:from]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:203476, ipnet:2001:4b98:dc4::/48, country:FR]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[diizzy]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2022-07-25 13:10, Baptiste Daroussin wrote: > 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 >> 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! It doesn't move .pc files from share on my test boxes at least >> >> > > 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