LuaJIT add lua 5.2 compatibility build option

This commit is contained in:
John 2021-05-23 10:50:50 +02:00
parent f536a5d517
commit 92b6926565

View file

@ -13,6 +13,8 @@ homepage="http://www.luajit.org"
distfiles="http://luajit.org/download/${pkgname}-${_dist_version}.tar.gz"
checksum=1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3
build_options="lua52compat"
_cross_cc="cc"
if [ "$XBPS_WORDSIZE" != "$XBPS_TARGET_WORDSIZE" ]; then
if [ "${XBPS_MACHINE/-musl/}" = "x86_64" ]; then
@ -48,10 +50,15 @@ do_build() {
local cross="CROSS=${XBPS_CROSS_TRIPLET}-"
fi
if [ "$build_option_lua52compat" ]; then
local _xcflags="XCFLAGS=-DLUAJIT_ENABLE_LUA52COMPAT"
fi
unset CFLAGS LDFLAGS
make ${makejobs} PREFIX=/usr HOST_LUA=lua5.2 HOST_CC="${_cross_cc}" \
HOST_CFLAGS="$XBPS_CFLAGS" HOST_LDFLAGS="$XBPS_LDFLAGS" \
TARGET_CFLAGS="${_cflags}" TARGET_LDFLAGS="${_ldflags}" ${cross}
TARGET_CFLAGS="${_cflags}" TARGET_LDFLAGS="${_ldflags}" \
${_xcflags} ${cross}
}
do_install() {