LuaJIT: misc tweaks to allow native arm/musl builds; use host lua.
This commit is contained in:
parent
c6793d2cb2
commit
737b6aa18d
|
@ -1,7 +1,8 @@
|
|||
# Template file for 'LuaJIT'
|
||||
pkgname=LuaJIT
|
||||
version=2.0.4
|
||||
revision=1
|
||||
revision=2
|
||||
hostmakedepends="lua52-BitOp"
|
||||
short_desc="A Just-In-Time Compiler for Lua"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://www.luajit.org"
|
||||
|
@ -9,34 +10,27 @@ license="MIT"
|
|||
distfiles="http://luajit.org/download/$pkgname-$version.tar.gz"
|
||||
checksum=620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv[67]l-musl) broken="http://build.voidlinux.eu/builders/armv6l-musl_builder/builds/2807/steps/shell_3/logs/stdio";;
|
||||
esac
|
||||
|
||||
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
hostmakedepends="gcc-multilib"
|
||||
if [ "$CROSS_BUILD" -a "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
hostmakedepends+=" gcc-multilib"
|
||||
fi
|
||||
|
||||
do_build() {
|
||||
local _cflags=$CFLAGS
|
||||
local _ldflags=$LDFLAGS
|
||||
local _cross_cc
|
||||
local _cross_cc=cc
|
||||
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
_cross_cc="cc -m32"
|
||||
else
|
||||
_cross_cc=cc
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
local cross="CROSS=${XBPS_CROSS_TRIPLET}-"
|
||||
case "$XBPS_MACHINE" in
|
||||
x86_64) _cross_cc="cc -m32";;
|
||||
*) _cross_cc="cc";;
|
||||
esac
|
||||
fi
|
||||
|
||||
unset CFLAGS LDFLAGS
|
||||
make ${makejobs} \
|
||||
PREFIX=/usr \
|
||||
CC=${CC} \
|
||||
TARGET_CFLAGS="$_cflags" \
|
||||
TARGET_LDFLAGS="$_ldflags" \
|
||||
TARGET_STRIP=: \
|
||||
HOST_CC="$_cross_cc"
|
||||
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}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
|
Loading…
Reference in New Issue