Files
meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb
T
Khem Raj 787d1b73e2 meta-oe: repair broken recipe upstream version-checks
A full check-upgrade-status sweep of meta-oe found 121 recipes reporting
UNKNOWN_BROKEN: their upstream version check resolved no version. This
adds the correct check metadata to each so the version check works again.

Fixes, by mechanism:
 - wget/tarball recipes: add UPSTREAM_CHECK_URI + UPSTREAM_CHECK_REGEX
   pointing at the real release listing (SourceForge files pages, GitHub
   releases pages, GNU/ftp mirrors, distro pools).
 - git recipes with release tags in a non-default format: add
   UPSTREAM_CHECK_GITTAGREGEX matching the actual tag scheme.
 - git repos with no tags at all: UPSTREAM_CHECK_COMMITS = "1".
 - recipes whose upstream has no checkable release channel, or whose PV
   format cannot be compared against upstream tags (CPAN zero-padded
   versions, AUTOINC "git" PVs, dash-separated tags the checker cannot
   convert): UPSTREAM_VERSION_UNKNOWN = "1" with an explanatory comment.

Also override GITHUB_BASE_URI for libppd's sibling libcupsfilters where the
github-releases class default pointed at a non-existent org (404).

Only version-check metadata is touched; no SRC_URI, SRCREV, PV, or checksum
is changed, so nothing that gets built is affected. Each fix was verified
with devtool check-upgrade-status: 120 of 121 now resolve (MATCH, UPDATE,
COMMITS, or an honestly-declared UNKNOWN). The remaining recipe (libubox)
already has correct metadata and only fails locally because the git://
port to git.openwrt.org is firewalled on the build host.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-08-03 18:09:53 -07:00

103 lines
3.4 KiB
BlitzBasic

SUMMARY = "Just-In-Time Compiler for Lua"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=a2c43bf4a9ea63755af2131b0ae59ff3"
HOMEPAGE = "http://luajit.org"
SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \
file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \
file://0001-Use-builtin-for-clear_cache.patch \
"
PV = "2.1"
SRCREV = "659a61693aa3b87661864ad0f12eee14c865cd7f"
# The v2.1 branch is rolling with no tags; track commits.
UPSTREAM_CHECK_COMMITS = "1"
inherit pkgconfig binconfig siteinfo
BBCLASSEXTEND = "native"
# http://luajit.org/install.html#cross
# Host luajit needs to be compiled with the same pointer size
# If you want to cross-compile to any 32 bit target on an x64 OS,
# you need to install the multilib development package (e.g.
# libc6-dev:i386 on Debian/Ubuntu) and build a 32 bit host part
# (HOST_CC="gcc -m32").
BUILD_CC_ARCH:append = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}"
# The lua makefiles expect the TARGET_SYS to be from uname -s
# Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
LUA_TARGET_OS = "Unknown"
LUA_TARGET_OS:darwin = "Darwin"
LUA_TARGET_OS:linux = "Linux"
LUA_TARGET_OS:linux-gnueabi = "Linux"
LUA_TARGET_OS:mingw32 = "Windows"
# We don't want the lua buildsystem's compiler optimizations, or its
# stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply
# to both host and target compiles
EXTRA_OEMAKE = "\
Q= E='@:' \
\
CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \
\
'TARGET_SYS=${LUA_TARGET_OS}' \
\
'CC=${CC}' \
'TARGET_AR=${AR} rcus' \
'TARGET_CFLAGS=${CFLAGS}' \
'TARGET_LDFLAGS=${LDFLAGS}' \
'TARGET_SHLDFLAGS=${LDFLAGS}' \
'HOST_CC=${BUILD_CC}' \
'HOST_CFLAGS=${BUILD_CFLAGS}' \
\
'PREFIX=${prefix}' \
'MULTILIB=${baselib}' \
'LDCONFIG=:' \
"
do_compile () {
oe_runmake
}
# There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the
# '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those
# expectations.
EXTRA_OEMAKEINST = "\
'DESTDIR=${D}' \
'INSTALL_BIN=${D}${bindir}' \
'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \
'INSTALL_MAN=${D}${mandir}/man1' \
"
do_install () {
oe_runmake ${EXTRA_OEMAKEINST} install
rmdir ${D}${datadir}/lua/5.* \
${D}${datadir}/lua \
${D}${libdir}/lua/5.* \
${D}${libdir}/lua
}
PACKAGES += 'luajit-common'
# See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded
# paths are packaged regardless of what the libdir and datadir paths are.
FILES:${PN} += "${prefix}/${baselib} ${prefix}/share"
FILES:${PN} += "${libdir}/libluajit-5.1.so.2 \
${libdir}/libluajit-5.1.so.${PV} \
"
FILES:${PN}-dev += "${libdir}/libluajit-5.1.a \
${libdir}/libluajit-5.1.so \
${libdir}/pkgconfig/luajit.pc \
"
FILES:luajit-common = "${datadir}/${BPN}-${PV}"
# ppc64/riscv64/riscv32 is not supported in this release
COMPATIBLE_HOST:powerpc64 = "null"
COMPATIBLE_HOST:powerpc64le = "null"
COMPATIBLE_HOST:riscv64 = "null"
COMPATIBLE_HOST:riscv32 = "null"
CVE_STATUS[CVE-2024-25176] = "fixed-version: The used revision contains the fix already."
CVE_STATUS[CVE-2024-25177] = "fixed-version: The used revision contains the fix already."
CVE_STATUS[CVE-2024-25178] = "fixed-version: The used revision contains the fix already."