From nobody Mon Jul 25 10:04:24 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 4Lrwd4753Lz4X3T8 for ; Mon, 25 Jul 2022 10:04:40 +0000 (UTC) (envelope-from andrea@pappacoda.it) Received: from mail.pappacoda.it (mail.pappacoda.it [128.116.175.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lrwd36dl9z3ynt; Mon, 25 Jul 2022 10:04:39 +0000 (UTC) (envelope-from andrea@pappacoda.it) Received: from [192.168.178.195] (mail.pappacoda.it [128.116.175.254]) by mail.pappacoda.it (Postfix) with ESMTPSA id CF6EA3D51D; Mon, 25 Jul 2022 12:04:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pappacoda.it; s=20211226; t=1658743471; bh=8+XjRFtALpk/H/psa1gkiwR9tQo1q1c+uzV1EEYmffA=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From; b=U9jVslUBOBGFAo7DT1zQOrIWieaWBepP46/ejEVzsvJIBM7K7oUBEBPJXvHIxbOQw 0/z/4AiJ7EwdbFFgR9RJveMKmC1x0ApQLurKitlKsPLkBK4zwWFlkZ/EZnpdwRy8wV ccrKsuXiQdAZDdGVHZU8cZ6oo1FMbTU30vXdawaNgPRlZVBkeSfUH/cfq6E5gBzpyf k9JHMKo3qax5Ouze64+DlWVhjifDibTNVV7pIbsbzg/qHKY6ZSTs07TJO/VnAAisKQ NYl8fi76SYtUA5kWjxl1rg0poQygs4ZLFSn/woNj9+S7IWA7DruiVzgXoPD+6QhPP1 Cb/BSkB+Djzfw== Date: Mon, 25 Jul 2022 12:04:24 +0200 From: Andrea Pappacoda Subject: Re: pkg-config and share/ To: Baptiste Daroussin Cc: Alex Dupre , freebsd-hackers@FreeBSD.org Message-Id: In-Reply-To: <20220725090824.qfeypgyugx6f7i6q@aniel.nours.eu> References: <50B3D276-5E68-4F87-97FB-71D75D3D9602@pappacoda.it> <20220725081535.vuxy74odqt2cxdnw@aniel.nours.eu> <20220725090824.qfeypgyugx6f7i6q@aniel.nours.eu> X-Mailer: geary/40.0 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 Content-Type: text/plain; charset=us-ascii; format=flowed X-Rspamd-Queue-Id: 4Lrwd36dl9z3ynt X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=pappacoda.it header.s=20211226 header.b=U9jVslUB; dmarc=pass (policy=reject) header.from=pappacoda.it; spf=pass (mx1.freebsd.org: domain of andrea@pappacoda.it designates 128.116.175.254 as permitted sender) smtp.mailfrom=andrea@pappacoda.it X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[pappacoda.it,reject]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[pappacoda.it:s=20211226]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@FreeBSD.org]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:35612, ipnet:128.116.128.0/17, country:IT]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[pappacoda.it:+]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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? >> 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). > 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