2012-12-21 12:59:31 +01:00
|
|
|
# Template file for 'LuaJIT'
|
|
|
|
pkgname=LuaJIT
|
2015-05-15 06:56:15 +02:00
|
|
|
version=2.0.4
|
2015-11-01 12:23:44 +01:00
|
|
|
revision=2
|
|
|
|
hostmakedepends="lua52-BitOp"
|
2013-06-18 10:46:54 +02:00
|
|
|
short_desc="A Just-In-Time Compiler for Lua"
|
2015-04-10 09:16:30 +02:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2012-12-21 12:59:31 +01:00
|
|
|
homepage="http://www.luajit.org"
|
|
|
|
license="MIT"
|
2013-04-12 09:01:46 +02:00
|
|
|
distfiles="http://luajit.org/download/$pkgname-$version.tar.gz"
|
2015-05-15 06:56:15 +02:00
|
|
|
checksum=620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d
|
2014-05-18 17:53:18 +02:00
|
|
|
|
2015-12-10 00:06:26 +01:00
|
|
|
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";;
|
|
|
|
esac
|
|
|
|
|
2015-11-01 12:23:44 +01:00
|
|
|
if [ "$CROSS_BUILD" -a "$XBPS_MACHINE" = "x86_64" ]; then
|
|
|
|
hostmakedepends+=" gcc-multilib"
|
2014-03-16 23:24:05 +01:00
|
|
|
fi
|
2012-12-21 12:59:31 +01:00
|
|
|
|
|
|
|
do_build() {
|
2014-03-16 23:24:05 +01:00
|
|
|
local _cflags=$CFLAGS
|
|
|
|
local _ldflags=$LDFLAGS
|
2015-11-01 12:23:44 +01:00
|
|
|
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
|
2015-05-15 07:03:32 +02:00
|
|
|
fi
|
|
|
|
|
2014-03-16 23:24:05 +01:00
|
|
|
unset CFLAGS LDFLAGS
|
2015-11-01 12:23:44 +01:00
|
|
|
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}
|
2012-12-21 12:59:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2013-04-12 09:01:46 +02:00
|
|
|
make DPREFIX=${DESTDIR}/usr DESTDIR=${DESTDIR} \
|
|
|
|
INSTALL_SHARE=${DESTDIR}/usr/share PREFIX=/usr install
|
2014-05-18 17:53:18 +02:00
|
|
|
|
2015-05-15 06:56:15 +02:00
|
|
|
ln -fs libluajit-5.1.so.2.0.4 ${DESTDIR}/usr/lib/libluajit-5.1.so.2
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
LuaJIT-devel_package() {
|
2014-02-21 12:55:32 +01:00
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
2013-06-18 10:46:54 +02:00
|
|
|
short_desc+=" - development files"
|
2013-04-12 09:01:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/pkgconfig
|
2013-06-18 10:46:54 +02:00
|
|
|
vmove "usr/lib/*.a"
|
|
|
|
vmove "usr/lib/*.so"
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|