From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C5840158042 for ; Thu, 14 Nov 2024 03:23:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 214CAE088F; Thu, 14 Nov 2024 03:23:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 04B26E088F for ; Thu, 14 Nov 2024 03:23:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C5A6335C11 for ; Thu, 14 Nov 2024 03:23:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA8DB1AED for ; Thu, 14 Nov 2024 03:23:22 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1731554554.dd75a9dac59efef496f2fafac20ebe42f2c4fcd0.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/luajit/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/luajit/luajit-2.1.1727870382.ebuild dev-lang/luajit/luajit-2.1.9999999999.ebuild X-VCS-Directories: dev-lang/luajit/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: dd75a9dac59efef496f2fafac20ebe42f2c4fcd0 X-VCS-Branch: master Date: Thu, 14 Nov 2024 03:23:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5a819f6d-9ce5-45b9-8395-d59f3f2ad477 X-Archives-Hash: fbe5eee5b315297992b8b3eef47088ca commit: dd75a9dac59efef496f2fafac20ebe42f2c4fcd0 Author: Artemis Everfree artemis sh> AuthorDate: Thu Nov 14 02:35:51 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu Nov 14 03:22:34 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd75a9da dev-lang/luajit: Use luajit_relver in bin symlink Previously we were generating this symlink: /usr/bin/luajit -> /usr/bin/luajit-${PV} This failed for 2.1.9999999999, as the binary was instead at /usr/bin/luajit-2.1.${relver}, for the corresponding relver of the commit. We now read `src/luajit_relver.txt` generated by luajit's build process, which always contains the correct relver suffix for both snapshot and live builds. The 9999999999 support is also now agnostic to which release channel is being built, so a theoretical 2.2.9999999999 could be supported by copying the 2.1.9999999999 ebuild without modification. Closes: https://bugs.gentoo.org/943404 Signed-off-by: Artemis Everfree artemis.sh> Closes: https://github.com/gentoo/gentoo/pull/39312 Signed-off-by: Sam James gentoo.org> dev-lang/luajit/luajit-2.1.1727870382.ebuild | 30 +++++++++++++++++++++------- dev-lang/luajit/luajit-2.1.9999999999.ebuild | 30 +++++++++++++++++++++------- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/dev-lang/luajit/luajit-2.1.1727870382.ebuild b/dev-lang/luajit/luajit-2.1.1727870382.ebuild index 1a9014c337c4..ba62499c0453 100644 --- a/dev-lang/luajit/luajit-2.1.1727870382.ebuild +++ b/dev-lang/luajit/luajit-2.1.1727870382.ebuild @@ -14,19 +14,20 @@ EAPI=8 inherit toolchain-funcs +# Split release channel (such as "2.1") from relver (such as "1727870382") +VER_CHANNEL=${PV%.*} +VER_RELVER=${PV##*.} + DESCRIPTION="Just-In-Time Compiler for the Lua programming language" HOMEPAGE="https://luajit.org/" -if [[ ${PV} == 2.1.9999999999 ]]; then - # This is the 2.1 rolling release live build. When a 2.2 or 3.x branch comes - # out, create a new ebuild for it. - # - # Upstream recommends pulling rolling releases from the v2.1 branch. +if [[ ${VER_RELVER} == 9999999999 ]]; then + # Upstream recommends pulling rolling releases from versioned branches. # > The old git master branch is phased out and stays pinned to the v2.0 # > branch. Please follow the versioned branches instead. # # See http://luajit.org/status.html for additional information. - EGIT_BRANCH="v2.1" + EGIT_BRANCH="v${VER_CHANNEL}" EGIT_REPO_URI="https://luajit.org/git/luajit.git" inherit git-r3 else @@ -73,7 +74,22 @@ src_compile() { src_install() { _emake install - dosym luajit-"${PV}" /usr/bin/luajit + + # For tarballs downloaded from github, the relver is provided in + # ${S}/.relver, a file populated when generating the tarball as directed by + # .gitattributes. That file will contain the same relver as the relver + # in our version number. + # + # For the live build, this is not populated, but luajit's build process + # inspects the git repository directly with this command: + # + # git show -s --format=%ct + # + # In both cases, luajit puts the relver in src/luajit_relver.txt during + # the build. We read this file to ensure we're using the same source of + # truth as luajit's own build does when generating the binary's filename. + local relver="$(cat "${S}/src/luajit_relver.txt" || die 'error retrieving relver')" + dosym luajit-"${VER_CHANNEL}.${relver}" /usr/bin/luajit HTML_DOCS="doc/." einstalldocs } diff --git a/dev-lang/luajit/luajit-2.1.9999999999.ebuild b/dev-lang/luajit/luajit-2.1.9999999999.ebuild index f4cd0a39d8e1..f8f7cfba19d2 100644 --- a/dev-lang/luajit/luajit-2.1.9999999999.ebuild +++ b/dev-lang/luajit/luajit-2.1.9999999999.ebuild @@ -14,19 +14,20 @@ EAPI=8 inherit toolchain-funcs +# Split release channel (such as "2.1") from relver (such as "1727870382") +VER_CHANNEL=${PV%.*} +VER_RELVER=${PV##*.} + DESCRIPTION="Just-In-Time Compiler for the Lua programming language" HOMEPAGE="https://luajit.org/" -if [[ ${PV} == 2.1.9999999999 ]]; then - # This is the 2.1 rolling release live build. When a 2.2 or 3.x branch comes - # out, create a new ebuild for it. - # - # Upstream recommends pulling rolling releases from the v2.1 branch. +if [[ ${VER_RELVER} == 9999999999 ]]; then + # Upstream recommends pulling rolling releases from versioned branches. # > The old git master branch is phased out and stays pinned to the v2.0 # > branch. Please follow the versioned branches instead. # # See http://luajit.org/status.html for additional information. - EGIT_BRANCH="v2.1" + EGIT_BRANCH="v${VER_CHANNEL}" EGIT_REPO_URI="https://luajit.org/git/luajit.git" inherit git-r3 else @@ -73,7 +74,22 @@ src_compile() { src_install() { _emake install - dosym luajit-"${PV}" /usr/bin/luajit + + # For tarballs downloaded from github, the relver is provided in + # ${S}/.relver, a file populated when generating the tarball as directed by + # .gitattributes. That file will contain the same relver as the relver + # in our version number. + # + # For the live build, this is not populated, but luajit's build process + # inspects the git repository directly with this command: + # + # git show -s --format=%ct + # + # In both cases, luajit puts the relver in src/luajit_relver.txt during + # the build. We read this file to ensure we're using the same source of + # truth as luajit's own build does when generating the binary's filename. + local relver="$(cat "${S}/src/luajit_relver.txt" || die 'error retrieving relver')" + dosym luajit-"${VER_CHANNEL}.${relver}" /usr/bin/luajit HTML_DOCS="doc/." einstalldocs }