dev-lang/luajit: add 2.1.1787165859 (2026-08-19)

Fixes accidental use of SSE3 instructions on x86.

Closes: https://bugs.gentoo.org/981316
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1715
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Holger Hoffstätte
2026-08-24 10:56:16 +02:00
committed by Arthur Zamarin
parent 5ced481b73
commit 47b29a8763
2 changed files with 100 additions and 0 deletions

View File

@@ -2,3 +2,4 @@ DIST luajit-2.1.1716656478.tar.gz 1081717 BLAKE2B 42807910aa81e705ff39c382e98e47
DIST luajit-2.1.1731601260.tar.gz 1082678 BLAKE2B 07b8a9f1457db314785f9ab6ad87907b48a2dcee2a8a85e231779661ffe9b92e8b32cf790955537e86b519d61a8316848260fb83e7ba6746a816e2e0e59976e0 SHA512 4219017edd359bd5c92a37f1e3837c6ef8d9d8be89e53d80e110801e0eb7c8c2a74460376d1e3edef328e9d94f2eef9785e253027c67e1c91716e303e303a766
DIST luajit-2.1.1770848219.tar.gz 1093911 BLAKE2B 592d9d80bcedda89da32b7deeca79d8159bdacb3c62d6ec9a2333a72d649aeb3a94772792675e67aa9f3f3ea1d7bb8f8becbd43238b3f9951b82736840929766 SHA512 329b5f09240df9f3f4dea98ce5fd90ac5bec2647280271db19a007434ef976f40a225b3f20828111718d839b804dd2f4a136ce8a39f3acf80e4242a588eaadb5
DIST luajit-2.1.1780076327.tar.gz 1094494 BLAKE2B 964d82145b29bb9c3764fb8ed6f43c9c46ee1c835209bb57c73997ba401aabe9f17beaef5c244ca0773199fa5f08c1b4f4fdd4a60ee3ca05c5226381fa0b973e SHA512 05ccca981c978b4021430bd7ad902156d3aebb7cd3cb2a68f0d64f0086893281b5da66df9c8809e3385cf0bd1750d435d6ce446bd49e4e2073d08fbc20ca490d
DIST luajit-2.1.1787165859.tar.gz 1103140 BLAKE2B 3e2cb9fad02fc9c734833c9df134fa3b0fb09b5341a64f48c2fe072e4b0fd6a7e00ec4dec464fb05a9b915d74acad4084a55d564ffd7a0f889f1ae2184cebf93 SHA512 67a591306ec33d505528a07e59f478b8d940fb0a5c7d5c324d7b16761cf7e052caa6e817f5f2e92668eb8c28e5343bf2d69549f73f5c23c5ba8b3b698c077a2e

View File

@@ -0,0 +1,99 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Upstream doesn't make releases anymore and instead have a (broken) "rolling
# git tag" model.
#
# https://github.com/LuaJIT/LuaJIT/issues/665#issuecomment-784452583
# https://www.freelists.org/post/luajit/LuaJIT-uses-rolling-releases
#
# Regular snapshots should be made from the v2.1 branch. Get the version with
# `git show -s --format=%ct`
inherit flag-o-matic 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 [[ ${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="v${VER_CHANNEL}"
EGIT_REPO_URI="https://luajit.org/git/luajit.git"
inherit git-r3
else
# Update this commit hash to bump a pinned-commit ebuild.
GIT_COMMIT=1ee778a4e37122d8ca7d5733c590a47dafd6b15c
SRC_URI="https://github.com/LuaJIT/LuaJIT/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/LuaJIT-${GIT_COMMIT}"
KEYWORDS="~amd64 ~arm ~arm64 -hppa ~mips ~ppc -riscv -sparc ~x86"
fi
LICENSE="MIT"
# this should probably be pkgmoved to 2.1 for sake of consistency.
SLOT="2/${PV}"
IUSE="lua52compat static-libs"
_emake() {
emake \
Q= \
PREFIX="${EPREFIX}/usr" \
MULTILIB="$(get_libdir)" \
DESTDIR="${D}" \
CFLAGS="" \
LDFLAGS="" \
HOST_CC="$(tc-getBUILD_CC)" \
HOST_CFLAGS="${BUILD_CPPFLAGS} ${BUILD_CFLAGS}" \
HOST_LDFLAGS="${BUILD_LDFLAGS}" \
STATIC_CC="$(tc-getCC)" \
DYNAMIC_CC="$(tc-getCC) -fPIC" \
TARGET_LD="$(tc-getCC)" \
TARGET_CFLAGS="${CPPFLAGS} ${CFLAGS}" \
TARGET_LDFLAGS="${LDFLAGS}" \
TARGET_SHLDFLAGS="${LDFLAGS}" \
TARGET_AR="$(tc-getAR) rcus" \
BUILDMODE="$(usex static-libs mixed dynamic)" \
TARGET_STRIP="true" \
INSTALL_LIB="${ED}/usr/$(get_libdir)" \
"$@"
}
src_compile() {
# https://bugs.gentoo.org/669284
filter-flags -fno-asynchronous-unwind-tables
tc-export_build_env
_emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
}
src_install() {
_emake install
# 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
}