From nobody Mon Jul 25 11:10:46 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 4Lry5P10nKz4XC00 for ; Mon, 25 Jul 2022 11:10:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lry5P0Wp8z43qh; Mon, 25 Jul 2022 11:10:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658747449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ARfKI/PaLc5oWljgtYJkt4c0Wgx0JUvlmeQj8W93nPw=; b=gjBvGQeZnYq+sMlzEWjcBFnXB39LDJ10tuks96QexWO73FWbajCXPT4hT5T8U91BpvPOFS 1iixC4aKaX1qHV3zDBoZoZybhrBqsEeBrUhT+VQ5l/2CcDVRUpV3GSS5gaVZu4SfI83ufJ x9y5//7pUAwQHdxmHs8ZkB2hAEhwxNQ9kxVfsytGENdpW32bcUSKiz2friwdtUhX1Z3HEM GEaNlulDwS9aXjwWGBMEAsnT8l7YAcCG5yibNoJ6rL7iMaP71hHG++X83tk5/GQXRxhCNR flnVtYq3GbhpFIEbeBiDlDw33DfBBW38QX6LSWamP/5feJCcmcdmW0uSmQTg8A== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (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) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Lry5N62CZz15Zl; Mon, 25 Jul 2022 11:10:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id B79A0F3A76; Mon, 25 Jul 2022 13:10:46 +0200 (CEST) Date: Mon, 25 Jul 2022 13:10:46 +0200 From: Baptiste Daroussin To: Andrea Pappacoda Cc: Alex Dupre , freebsd-hackers@FreeBSD.org Subject: Re: pkg-config and share/ Message-ID: <20220725111046.7sr7yyvsm5f3hyhj@aniel.nours.eu> References: <50B3D276-5E68-4F87-97FB-71D75D3D9602@pappacoda.it> <20220725081535.vuxy74odqt2cxdnw@aniel.nours.eu> <20220725090824.qfeypgyugx6f7i6q@aniel.nours.eu> 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 Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658747449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ARfKI/PaLc5oWljgtYJkt4c0Wgx0JUvlmeQj8W93nPw=; b=URjc2XaMFE3ks+MXIQUXdKRD7V0U33xzGEamjHlfzkAWlzaaMWECk9BtIYR/3xOGr4kY/f bsfTYTVFHtFT7eoTabMH3GzWFfNznRL6MMxf5ecP1sXvtPqy+QwJnfjKnT076SN/eqzYWU ftbd+6+CQYS4H9rzv2/PfLNMbLyafXZDDKX2IGX/reBcJtAShBFzWsZCzmEDtRYNTDfM8Q 4FUAsolU6mQQMKCf00yFsC1ZRfb2iU/Bn0nLyg+nIRs83sSDvQin8TIFVkzQVTG+yiEiFR wfEa9VmdBzM26wDzGJal8sBrAq4Q7HPwC0BTaQmtSW9sPj6LuRm0WtaO8a2UAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658747449; a=rsa-sha256; cv=none; b=qtMrW3EwACDB8lWui4FH289SKRWh365kJHCjHGUu/lA9oFIVmQSvBOmpG2cHDEDJFZLFrM p1vE0BVUL+xltTMqE4YYfKqkMyiV3iNT0nLNOi8PT2XMt3pqaxEZtAOOx0ZFCBHStJMKNO vSpR82LjW73Jl40xhIGstW/ZvfJNsjEXojMib3YW9+e7XPmNkmqv+JjF2VkhJMSKX6anbi D7x2Hk5Z7wfUkZEXWxX0nK+lalXPHBELL2/U4h0jtV2xF63PaWg/RHnU/Q6mSyQaxjwMtT TkL/M89v+zD2bz/j/3tAc5/QABcLmMs06tMUkyA1VI6tNAfl7R2rgdwkWr4z0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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! > > > > 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