Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2022 08:34:14 +0000
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Tatsuki Makino <tatsuki_makino@hotmail.com>
Cc:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: Would like to use ARCH (uname -p) but it's not always correct (e.g. arm64)
Message-ID:  <CAFDf7ULRhUvhbq3epsWgKURyrA2QhUc02itKq-zp_HmThXMq0A@mail.gmail.com>
In-Reply-To: <CAFDf7UJD6wL=wG3Ab9vL_5M07ND3FNmpP2_JkAqNqzQiwxHO2Q@mail.gmail.com>
References:  <CAFDf7U%2Br8hUbXASD81qJndsR=tU7kmqCPUATLgb5_PM=WRT%2B5g@mail.gmail.com> <PSAPR03MB56392BB6047FF29F806F703FFAF39@PSAPR03MB5639.apcprd03.prod.outlook.com> <PSAPR03MB563906C23BBDD46A798875A4FAF39@PSAPR03MB5639.apcprd03.prod.outlook.com> <CAFDf7UJD6wL=wG3Ab9vL_5M07ND3FNmpP2_JkAqNqzQiwxHO2Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000001b6c3c05f10778cd
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

(...)
A good example:

"x11-wm/nscde: fix packaging when uname -m !=3D uname -p"
https://cgit.freebsd.org/ports/commit/?id=3D4ae82fd2ee2059cd9ee0ec99bd6fd80=
62cd5dbdd

Nuno Teixeira <eduardo@freebsd.org> escreveu no dia sexta, 30/12/2022 =C3=
=A0(s)
08:22:

> Hello Tatsuki!
>
> I't seems that you dig it into source configs, I will take a look into
> this too.
>
> I was talking using ARCH (and OSREL, OSVERSION, etc) in a more generic wa=
y
> and only related to ports framework to easier some tasks like dinamic pli=
st
> for some files that change with this vars:
>
> ---
> PLIST_SUB=3D ARCH=3D${ARCH}
> plist:
> libexec/NsCDE/FreeBSD_%%ARCH%%/colorpicker
> ---
> ---
> PLIST_SUB+=3D SHLIB_SHVER=3D"${DISTVERSION:R}" \
>                        SHLIB_VER=3D"${DISTVERSION}"
> plist:
> lib/root/libRHTTPSniff.so.%%SHLIB_SHVER%%
> lib/root/libRHTTPSniff.so.%%SHLIB_VER%%
> ---
>
> So my question is why people often choose a hack to `uname -m` instead of
> using ARCH (uname -p).
>
> Thanks
>
> Tatsuki Makino <tatsuki_makino@hotmail.com> escreveu no dia quinta,
> 29/12/2022 =C3=A0(s) 21:41:
>
>> Tatsuki Makino wrote on 2022/12/30 06:17:
>> > For x11-wm/nscde, this is present in ${WRCSRC}/configure.ac.
>> >
>> > OS_PLUS_MACHINE_ARCH=3D`uname -sm | tr ' ' '_'`
>> > AC_SUBST(OS_PLUS_MACHINE_ARCH)
>> >
>>
>> Then, in the case of security/zeek, it seems that uname -m is used in
>> zeek-5.0.4/cmake/GetArchitecture.cmake of distfile.
>> That's also where FreeBSD gets lowercased.
>>
>> Regards.
>>
>>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)
>


--=20
Nuno Teixeira
FreeBSD Committer (ports)

--0000000000001b6c3c05f10778cd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>(...)</div><div>A good example:</div><div><br></div><=
div>&quot;x11-wm/nscde: fix packaging when uname -m !=3D uname -p&quot;</di=
v><div><a href=3D"https://cgit.freebsd.org/ports/commit/?id=3D4ae82fd2ee205=
9cd9ee0ec99bd6fd8062cd5dbdd">https://cgit.freebsd.org/ports/commit/?id=3D4a=
e82fd2ee2059cd9ee0ec99bd6fd8062cd5dbdd</a></div></div><br><div class=3D"gma=
il_quote"><div dir=3D"ltr" class=3D"gmail_attr">Nuno Teixeira &lt;<a href=
=3D"mailto:eduardo@freebsd.org">eduardo@freebsd.org</a>&gt; escreveu no dia=
 sexta, 30/12/2022 =C3=A0(s) 08:22:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex"><div dir=3D"ltr"><div>Hello Tatsuki!</div><div><br></di=
v><div>I&#39;t seems that you dig it into source configs, I will take a loo=
k into this too.</div><div><br></div><div>I was talking using ARCH (and OSR=
EL, OSVERSION, etc) in a more generic way and only related to ports framewo=
rk to easier some tasks like dinamic plist for some files that change with =
this vars:</div><div><br></div><div>---<br></div><div>PLIST_SUB=3D ARCH=3D$=
{ARCH}<br></div><div>plist:<br></div><div>libexec/NsCDE/FreeBSD_%%ARCH%%/co=
lorpicker</div><div>---</div>---<br>PLIST_SUB+=3D	SHLIB_SHVER=3D&quot;${DIS=
TVERSION:R}&quot; \<br><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 SHLIB_VER=3D&quot;${DISTVERSION}&quot;</div><div>plist:<br></d=
iv><div>lib/root/libRHTTPSniff.so.%%SHLIB_SHVER%%<br>lib/root/libRHTTPSniff=
.so.%%SHLIB_VER%%</div><div>---</div><div><br></div><div>So my question is =
why people often choose a hack to `uname -m` instead of using ARCH (uname -=
p).</div><div><br></div><div>Thanks<br></div></div><br><div class=3D"gmail_=
quote"><div dir=3D"ltr" class=3D"gmail_attr">Tatsuki Makino &lt;<a href=3D"=
mailto:tatsuki_makino@hotmail.com" target=3D"_blank">tatsuki_makino@hotmail=
.com</a>&gt; escreveu no dia quinta, 29/12/2022 =C3=A0(s) 21:41:<br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex">Tatsuki Makino wrote on 20=
22/12/30 06:17:<br>
&gt; For x11-wm/nscde, this is present in ${WRCSRC}/<a href=3D"http://confi=
gure.ac" rel=3D"noreferrer" target=3D"_blank">configure.ac</a>.<br>
&gt; <br>
&gt; OS_PLUS_MACHINE_ARCH=3D`uname -sm | tr &#39; &#39; &#39;_&#39;`<br>
&gt; AC_SUBST(OS_PLUS_MACHINE_ARCH)<br>
&gt; <br>
<br>
Then, in the case of security/zeek, it seems that uname -m is used in zeek-=
5.0.4/cmake/GetArchitecture.cmake of distfile.<br>
That&#39;s also where FreeBSD gets lowercased.<br>
<br>
Regards.<br>
<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr"><div dir=
=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Co=
mmitter (ports)</span></div></div>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun=
o Teixeira<br>FreeBSD Committer (ports)</span></div></div>

--0000000000001b6c3c05f10778cd--



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