void-packages/srcpkgs/LuaJIT/template
2017-05-06 08:54:15 +02:00

57 lines
1.5 KiB
Bash

# Template file for 'LuaJIT'
pkgname=LuaJIT
version=2.0.5
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"
license="MIT"
distfiles="http://luajit.org/download/$pkgname-$version.tar.gz"
checksum=874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979
case "$XBPS_TARGET_MACHINE" in
armv[67]l-musl) broken="http://build.voidlinux.eu/builders/armv7l-musl_builder/builds/6757/steps/shell_3/logs/stdio";;
aarch64*) broken="unsupported";;
esac
if [ "$CROSS_BUILD" -a "$XBPS_MACHINE" = "x86_64" ]; then
hostmakedepends+=" gcc-multilib"
fi
do_build() {
local _cflags=$CFLAGS
local _ldflags=$LDFLAGS
local _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 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() {
make DPREFIX=${DESTDIR}/usr DESTDIR=${DESTDIR} \
INSTALL_SHARE=${DESTDIR}/usr/share PREFIX=/usr install
ln -fs libluajit-5.1.so.${version} ${DESTDIR}/usr/lib/libluajit-5.1.so.2
}
LuaJIT-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}