From nobody Fri Oct 14 19:01:25 2022 X-Original-To: dev-commits-ports-main@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 4MpwjM1lR0z4g4KX for ; Fri, 14 Oct 2022 19:01:43 +0000 (UTC) (envelope-from adamw@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4MpwjM1QWcz3TgF for ; Fri, 14 Oct 2022 19:01:43 +0000 (UTC) (envelope-from adamw@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665774103; 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=i7fD5jar+UecbsGYHDdH8lpSkB1z8395/ETPw98dg5k=; b=cpLa3AWGxI8F67OyFbCIU/8X0sBhxPBke7cMIlnnxFrrFMvngmJYSEL0D26YO1LeafCEYo 7rTVbcECABCDpkeAAEgBvWspZwpqI5s9EMJnpLtVjPxhK96S81XJziXxTHWwwAn6r8yIg4 kG/UBGoOqJc7ZL8RD6TF4gdfQexjMXG2/mbF+iOL2NztbITlItzVLKdwaIcKQFLh9VQV0D SSuhJfw3c5AFHi4Vw5XxjOhNJVHJSdlPW7QVdIyFX4C7ifY4np1OrTBSmDRjMY0t9SgmQd vfrYn3ZtwxjKBl9ilsDU/Bql22Yzk1ahVt7Qj8/aHQxRjqjEepMkMfDGTaW2aA== Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: adamw/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MpwjM0FNPz1FWZ for ; Fri, 14 Oct 2022 19:01:43 +0000 (UTC) (envelope-from adamw@freebsd.org) Received: by mail-ed1-f54.google.com with SMTP id e18so8076447edj.3 for ; Fri, 14 Oct 2022 12:01:42 -0700 (PDT) X-Gm-Message-State: ACrzQf2LDoY1k3s+gmA/FhfBOnJTnM6Era3e80SUW5o7BdDnZbZ8+2Ii lRThkh6v2O02IXNFYDw6WmtstDX91AnVelg8j7qO9Q== X-Google-Smtp-Source: AMsMyM6cC6Q4VqH9f4scS0lBvHz6ADq2Bgimu81zDOhQz8xvIzCEsQk6JKJHGroLWTGEA3OXNjWiRPZpJM/tGTf1QJc= X-Received: by 2002:a50:fe0a:0:b0:458:dce8:2b6b with SMTP id f10-20020a50fe0a000000b00458dce82b6bmr5459588edt.84.1665774101506; Fri, 14 Oct 2022 12:01:41 -0700 (PDT) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 References: <202210141707.29EH7i08013647@gitrepo.freebsd.org> In-Reply-To: From: Adam Weinberger Date: Fri, 14 Oct 2022 13:01:25 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 9d241a90370c - main - Mk: Add USES=luajit To: Piotr Kubaj Cc: Adam Weinberger , ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000098c5fe05eb0341cc" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665774103; 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=i7fD5jar+UecbsGYHDdH8lpSkB1z8395/ETPw98dg5k=; b=T9rhkPsUAjTF2ozsvF4keNAvx4buOQIFHJYAOGQRwvSDJObYTEfosqjtg3pjCR608pU/Bv Vf6Ule5KFH8yMHjNMhrObJAAW9wcGhaakcuE5VzlnctTVf+OPeug6H5C0I+tsa9zLEseJs 7nNLmG3zTDa1LA+N6kyGu+Vu1unbWDEeLbb8F2XIGiejOKcYojKc/dA6gPIaLXwOQBHn8Z L7upZlbvOeZEX+mrmVWgjVYDSBTetxp9qkv0yKjcM6GV8tLKrND37gKIs5leLgu+xZpjbW zWG62W97fo+BqGx2vdWF4JqqwNc0E0OGp1nQ0Wenehp5BxZ002nt+c4hYogJBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665774103; a=rsa-sha256; cv=none; b=YmkkLrkL1KDRsh5QFvSFw2T3xD4fUe8h5uKYLCRN37s5IncJ3jt6wzYBYnKvjOtYstAHOL lcBW8QMfFR04yH8Gvq17iXesd14aP5gQ60juDrpMvgMTRuJcvDXhMXlHx953OTKtR8eTCk gOPH28hF2tbRkUBXrkyv0G4ephTgAMCyfv3Jjd1OxUafyAUgJZ4CS21+fsnb7F3/CfBL41 4RYUxmFJmYgKkux5RKtnFfn9RmvhieqmH7pD87k4Tb7P7Bt/i4DNBFa2LuEGJkWyp1IbTS Qxuh3kRajYGFONLafDHbBI3ApnJ30B44taM59TeMR0Vnleam3VJqcZyS5QYmYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --00000000000098c5fe05eb0341cc Content-Type: text/plain; charset="UTF-8" On Fri, Oct 14, 2022 at 12:58 PM Piotr Kubaj wrote: > On 22-10-14 17:07:44, Adam Weinberger wrote: > >The branch main has been updated by adamw: > > > >URL: > https://cgit.FreeBSD.org/ports/commit/?id=9d241a90370c9410d997be37db5e3a5657bdb4ca > > > >commit 9d241a90370c9410d997be37db5e3a5657bdb4ca > >Author: Adam Weinberger > >AuthorDate: 2022-10-14 16:50:39 +0000 > >Commit: Adam Weinberger > >CommitDate: 2022-10-14 17:07:39 +0000 > > > > Mk: Add USES=luajit > > > > USES=luajit centralizes luajit dependencies via > bsd.default-versions.mk > > (defaulting to luajit-devel). > > > > Ports currently depend on: > > lang/luajit: 42 > > lang/luajit-devel: 0 > > lang/luajit-openresty: 51 > > > > The difficulty here is that: > > - They all conflict with each other > > - Upstream is very clear about not intending for users to use the > > version in lang/luajit at all, and wants all luajit users to use > > lang/luajit-devel > > - luajit-openresty is very aggressive about being drop-in compatible > > with luajit-devel (though not the other direction) > > > > For the vast majority of situations, USES=luajit will be sufficient. > > Ports that use openresty's API additions can specify > > USES=luajit:openresty. > > > > I'm adding this into head very early in the 2022Q4 cycle so that > there's > > ample time to address the default. It's a difficult decision. osa, the > > maintainer of luajit and luajit-devel, prefers that the default be > > luajit, but I went the other direction because it's in direct conflict > > with upstream's clear stated intention. It's not a simple decision; > see > > the review below for a little discussion on it. > > > > The TL;DR here is that this defaults to the one luajit version that no > > port currently depends on. However, this version is what OpenBSD, > > Homebrew, Ubuntu, Debian, Fedora, MacPorts, and Arch default to (and > > none of them even provide the stale version lang/luajit provides). > > This will bring FreeBSD in line with nearly every other OS package > > system, and with upstream's intention. > > > > See also PRs 225342, 257051. > > > > Reviewed by: bapt, tcberner > > Approved by: portmgr (bapt, tcberner) > > Differential Revision: https://reviews.freebsd.org/D36947 > >--- > > Mk/Uses/luajit.mk | 27 +++++++++++++++++++++++++++ > > Mk/bsd.default-versions.mk | 9 ++++++--- > > 2 files changed, 33 insertions(+), 3 deletions(-) > > > >diff --git a/Mk/Uses/luajit.mk b/Mk/Uses/luajit.mk > >new file mode 100644 > >index 000000000000..75e54407d484 > >--- /dev/null > >+++ b/Mk/Uses/luajit.mk > >@@ -0,0 +1,27 @@ > >+# Select your favorite luajit runtime > >+# Feature: luajit > >+# Usage: USES= luajit[:version] > >+# MAINTAINER: adamw@FreeBSD.org > >+ > >+.if !defined(_INCLUDE_USES_LUAJIT_MK) > >+_INCLUDE_USES_LUAJIT_MK=yes > >+ > >+.if !empty(luajit_ARGS) > >+LUAJIT_VER= ${luajit_ARGS} > >+.else > >+LUAJIT_VER= ${LUAJIT_DEFAULT} > >+.endif > >+ > >+# When adding a version, please keep the comment in > >+# Mk/bsd.default-versions.mk in sync > >+VALID_LUAJIT_VER= luajit luajit-devel luajit-openresty > >+ > >+.if empty(VALID_LUAJIT_VER:M${LUAJIT_DEFAULT}) > >+IGNORE= Invalid luajit default version ${LUAJIT_DEFAULT}: valid > versions are ${VALID_LUAJIT_VER} > >+.elif empty(VALID_LUAJIT_VER:M${LUAJIT_VER}) > >+IGNORE= Invalid luajit version ${LUAJIT_VER}: valid versions are > ${VALID_LUAJIT_VER} > >+.endif > >+ > >+LIB_DEPENDS= libluajit-5.1.so:lang/${LUAJIT_VER} > >+ > >+.endif > >diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk > >index bbf3d5880c70..5a36e0b9c4d0 100644 > >--- a/Mk/bsd.default-versions.mk > >+++ b/Mk/bsd.default-versions.mk > >@@ -17,9 +17,10 @@ _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes > > > > LOCALBASE?= /usr/local > > > >-. for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC > GHOSTSCRIPT GL GO \ > >- IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MONO MYSQL NINJA > NODEJS PERL5 \ > >- PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH > >+. for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC \ > >+ GHOSTSCRIPT GL GO IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \ > >+ LUA LUAJIT MONO MYSQL NINJA NODEJS PERL5 PGSQL PHP PYTHON \ > >+ PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH > > . if defined(${lang}_DEFAULT) > > ERROR+= "The variable ${lang}_DEFAULT is set and it should only be > defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in > /etc/make.conf" > > . endif > >@@ -86,6 +87,8 @@ LLVM_DEFAULT?= 90 > > . endif > > # Possible values: 5.1, 5.2, 5.3, 5.4 > > LUA_DEFAULT?= 5.2 > >+# Possible values: luajit, luajit-devel, luajit-openresty > >+LUAJIT_DEFAULT?= luajit-devel > > # Possible values: 5.10, 5.20, 6.8 > > MONO_DEFAULT= 5.10 > > # Possible values: 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.7p, 5.7w > > Could you make USES=luajit default to openresty on powerpc64 and > powerpc64le? lang/luajit and lang/luajit-devel don't support those, but > openresty fork does. > > I believe aarch64 is in similar situation, except that it's also > supported by luajit-devel. > Are you positive on that? luajit-devel just has IGNORE_riscv64 (which no luajit works on), and includes a block specifically for powerpc*. # Adam -- Adam Weinberger adamw@adamw.org // adamw@FreeBSD.org https://www.adamw.org --00000000000098c5fe05eb0341cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= div dir=3D"ltr" class=3D"gmail_attr">On Fri, Oct 14, 2022 at 12:58 PM Piotr= Kubaj <pkubaj@anongoth.pl>= wrote:
On 22-10= -14 17:07:44, Adam Weinberger wrote:
>The branch main has been updated by adamw:
>
>URL: https:/= /cgit.FreeBSD.org/ports/commit/?id=3D9d241a90370c9410d997be37db5e3a5657bdb4= ca
>
>commit 9d241a90370c9410d997be37db5e3a5657bdb4ca
>Author:=C2=A0 =C2=A0 =C2=A0Adam Weinberger <adamw@FreeBSD.org> >AuthorDate: 2022-10-14 16:50:39 +0000
>Commit:=C2=A0 =C2=A0 =C2=A0Adam Weinberger <adamw@FreeBSD.org> >CommitDate: 2022-10-14 17:07:39 +0000
>
>=C2=A0 =C2=A0 Mk: Add USES=3Dluajit
>
>=C2=A0 =C2=A0 USES=3Dluajit centralizes luajit dependencies via bs= d.default-versions.mk
>=C2=A0 =C2=A0 (defaulting to luajit-devel).
>
>=C2=A0 =C2=A0 Ports currently depend on:
>=C2=A0 =C2=A0 =C2=A0 lang/luajit: 42
>=C2=A0 =C2=A0 =C2=A0 lang/luajit-devel: 0
>=C2=A0 =C2=A0 =C2=A0 lang/luajit-openresty: 51
>
>=C2=A0 =C2=A0 The difficulty here is that:
>=C2=A0 =C2=A0 =C2=A0 - They all conflict with each other
>=C2=A0 =C2=A0 =C2=A0 - Upstream is very clear about not intending for u= sers to use the
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 version in lang/luajit at all, and wants al= l luajit users to use
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 lang/luajit-devel
>=C2=A0 =C2=A0 =C2=A0 - luajit-openresty is very aggressive about being = drop-in compatible
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 with luajit-devel (though not the other dir= ection)
>
>=C2=A0 =C2=A0 For the vast majority of situations, USES=3Dluajit will b= e sufficient.
>=C2=A0 =C2=A0 Ports that use openresty's API additions can specify<= br> >=C2=A0 =C2=A0 USES=3Dluajit:openresty.
>
>=C2=A0 =C2=A0 I'm adding this into head very early in the 2022Q4 cy= cle so that there's
>=C2=A0 =C2=A0 ample time to address the default. It's a difficult d= ecision. osa, the
>=C2=A0 =C2=A0 maintainer of luajit and luajit-devel, prefers that the d= efault be
>=C2=A0 =C2=A0 luajit, but I went the other direction because it's i= n direct conflict
>=C2=A0 =C2=A0 with upstream's clear stated intention. It's not = a simple decision; see
>=C2=A0 =C2=A0 the review below for a little discussion on it.
>
>=C2=A0 =C2=A0 The TL;DR here is that this defaults to the one luajit ve= rsion that no
>=C2=A0 =C2=A0 port currently depends on. However, this version is what = OpenBSD,
>=C2=A0 =C2=A0 Homebrew, Ubuntu, Debian, Fedora, MacPorts, and Arch defa= ult to (and
>=C2=A0 =C2=A0 none of them even provide the stale version lang/luajit p= rovides).
>=C2=A0 =C2=A0 This will bring FreeBSD in line with nearly every other O= S package
>=C2=A0 =C2=A0 system, and with upstream's intention.
>
>=C2=A0 =C2=A0 See also PRs 225342, 257051.
>
>=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 bapt, tcberner
>=C2=A0 =C2=A0 Approved by:=C2=A0 =C2=A0 portmgr (bapt, tcberner)
>=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://reviews.fre= ebsd.org/D36947
>---
> Mk/Uses/luajit.mk=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 27 ++++++++++++++++++= +++++++++
> Mk/bsd.default-versions.mk |=C2=A0 9 ++++++---
> 2 files changed, 33 insertions(+), 3 deletions(-)
>
>diff --git a/Mk/Uses/luajit.mk b/Mk/Uses/luajit.mk
>new file mode 100644
>index 000000000000..75e54407d484
>--- /dev/null
>+++ b/Mk/Uses/luajit.mk
>@@ -0,0 +1,27 @@
>+# Select your favorite luajit runtime
>+# Feature:=C2=A0 =C2=A0 luajit
>+# Usage:=C2=A0 =C2=A0 =C2=A0 USES=3D=C2=A0 luajit[:version]
>+# MAINTAINER: adamw@FreeBSD.org
>+
>+.if !defined(_INCLUDE_USES_LUAJIT_MK)
>+_INCLUDE_USES_LUAJIT_MK=3Dyes
>+
>+.if !empty(luajit_ARGS)
>+LUAJIT_VER=3D=C2=A0 =C2=A0${luajit_ARGS}
>+.else
>+LUAJIT_VER=3D=C2=A0 =C2=A0${LUAJIT_DEFAULT}
>+.endif
>+
>+# When adding a version, please keep the comment in
>+# Mk/bsd.default-versions.mk in sync
>+VALID_LUAJIT_VER=3D=C2=A0 =C2=A0 =C2=A0luajit luajit-devel luajit-open= resty
>+
>+.if empty(VALID_LUAJIT_VER:M${LUAJIT_DEFAULT})
>+IGNORE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0Invalid luajit default version ${L= UAJIT_DEFAULT}: valid versions are ${VALID_LUAJIT_VER}
>+.elif empty(VALID_LUAJIT_VER:M${LUAJIT_VER})
>+IGNORE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0Invalid luajit version ${LUAJIT_VE= R}: valid versions are ${VALID_LUAJIT_VER}
>+.endif
>+
>+LIB_DEPENDS=3D=C2=A0 libluajit-5.1.so:lang/${LUAJIT_VER}
>+
>+.endif
>diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-= versions.mk
>index bbf3d5880c70..5a36e0b9c4d0 100644
>--- a/Mk/bsd.default-versions.mk
>+++ b/Mk/bsd.default-versions.mk
>@@ -17,9 +17,10 @@ _INCLUDE_BSD_DEFAULT_VERSIONS_MK=3D=C2=A0 =C2=A0yes<= br> >
> LOCALBASE?=3D=C2=A0 =C2=A0/usr/local
>
>-.=C2=A0 for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC= GHOSTSCRIPT GL GO \
>-=C2=A0 =C2=A0 =C2=A0 IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA = MONO MYSQL NINJA NODEJS PERL5 \
>-=C2=A0 =C2=A0 =C2=A0 PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA = SSL TCLTK VARNISH
>+.=C2=A0 for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC= \
>+=C2=A0 =C2=A0 =C2=A0 GHOSTSCRIPT GL GO IMAGEMAGICK JAVA LAZARUS LIBRSV= G2 LINUX LLVM \
>+=C2=A0 =C2=A0 =C2=A0 LUA LUAJIT MONO MYSQL NINJA NODEJS PERL5 PGSQL PH= P PYTHON \
>+=C2=A0 =C2=A0 =C2=A0 PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH=
> .=C2=A0 =C2=A0 if defined(${lang}_DEFAULT)
> ERROR+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0"The variable ${lang}_DEFAULT= is set and it should only be defined through DEFAULT_VERSIONS+=3D${lang:tl= }=3D${${lang}_DEFAULT} in /etc/make.conf"
> .=C2=A0 =C2=A0 endif
>@@ -86,6 +87,8 @@ LLVM_DEFAULT?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A090
> .=C2=A0 endif
> # Possible values: 5.1, 5.2, 5.3, 5.4
> LUA_DEFAULT?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A05.2
>+# Possible values: luajit, luajit-devel, luajit-openresty
>+LUAJIT_DEFAULT?=3D=C2=A0 =C2=A0 =C2=A0 luajit-devel
> # Possible values: 5.10, 5.20, 6.8
> MONO_DEFAULT=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A05.10
> # Possible values: 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.7p, 5.7w

Could you make USES=3Dluajit default to openresty on powerpc64 and
powerpc64le? lang/luajit and lang/luajit-devel don't support those, but=
openresty fork does.

I believe aarch64 is in similar situation, except that it's also
supported by luajit-devel.

Are you positive on that? luajit-devel just= has IGNORE_riscv64 (which no luajit works on), and includes a block specif= ically for powerpc*.

# Adam


--
Adam Weinberger
adamw@adamw.org // adamw@FreeBSD.org
https://www.adamw.org
--00000000000098c5fe05eb0341cc--