mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2026-05-06 07:27:03 -04:00
dev-lang/luajit: add 2.1.1770848219
Last snapshot was over a year ago, so this is probably due. This additionally fixes a bizarre issue I've encountered where compiling neovim with luajit built with clang-22 -march=x86-64-v3 and above breaks vim.cmd, likely caused by UB. Signed-off-by: Violet Purcell <vimproved@inventati.org> Part-of: https://github.com/gentoo/gentoo/pull/45777 Closes: https://github.com/gentoo/gentoo/pull/45777 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
2f539e89e3
commit
6fd9f63b52
@@ -1,2 +1,3 @@
|
||||
DIST luajit-2.1.1716656478.tar.gz 1081717 BLAKE2B 42807910aa81e705ff39c382e98e479d46d31453fd6fc1857220c7d4cb66d0801e2ffd813ea3c55ab2bcde8e64275d0fec2044514d7b0ef5287714ec8061bf7a SHA512 6b00d37a33f0bafbd953569ef035546a97237a53cfb718d8aecca7e9c7afe5e4706e4a53e40b9afb8720adc8eee044d8d75b8ea6cdc50d2c3f8461d79bb73b26
|
||||
DIST luajit-2.1.1731601260.tar.gz 1082678 BLAKE2B 07b8a9f1457db314785f9ab6ad87907b48a2dcee2a8a85e231779661ffe9b92e8b32cf790955537e86b519d61a8316848260fb83e7ba6746a816e2e0e59976e0 SHA512 4219017edd359bd5c92a37f1e3837c6ef8d9d8be89e53d80e110801e0eb7c8c2a74460376d1e3edef328e9d94f2eef9785e253027c67e1c91716e303e303a766
|
||||
DIST luajit-2.1.1770848219.tar.gz 1093911 BLAKE2B 592d9d80bcedda89da32b7deeca79d8159bdacb3c62d6ec9a2333a72d649aeb3a94772792675e67aa9f3f3ea1d7bb8f8becbd43238b3f9951b82736840929766 SHA512 329b5f09240df9f3f4dea98ce5fd90ac5bec2647280271db19a007434ef976f40a225b3f20828111718d839b804dd2f4a136ce8a39f3acf80e4242a588eaadb5
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
# 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 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=233ad24035944ece5367157e824e8357df3417d9
|
||||
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() {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user