2012-12-21 11:59:31 +00:00
|
|
|
# Template file for 'LuaJIT'
|
|
|
|
pkgname=LuaJIT
|
2015-05-15 04:56:15 +00:00
|
|
|
version=2.0.4
|
|
|
|
revision=1
|
2013-06-18 08:46:54 +00:00
|
|
|
short_desc="A Just-In-Time Compiler for Lua"
|
2015-04-10 07:16:30 +00:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2012-12-21 11:59:31 +00:00
|
|
|
homepage="http://www.luajit.org"
|
|
|
|
license="MIT"
|
2013-04-12 07:01:46 +00:00
|
|
|
distfiles="http://luajit.org/download/$pkgname-$version.tar.gz"
|
2015-05-15 04:56:15 +00:00
|
|
|
checksum=620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d
|
2014-05-18 15:53:18 +00:00
|
|
|
|
2014-03-16 22:24:05 +00:00
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" -a "$CROSS_BUILD" ]; then
|
|
|
|
hostmakedepends="cross-i686-pc-linux-gnu glibc-32bit"
|
2014-03-16 22:30:32 +00:00
|
|
|
_cross_cc="HOST_CC=i686-pc-linux-gnu-gcc"
|
2014-05-18 16:52:46 +00:00
|
|
|
else
|
|
|
|
_cross_cc="HOST_CC=cc"
|
2014-03-16 22:24:05 +00:00
|
|
|
fi
|
2012-12-21 11:59:31 +00:00
|
|
|
|
|
|
|
do_build() {
|
2014-03-16 22:24:05 +00:00
|
|
|
local _cflags=$CFLAGS
|
|
|
|
local _ldflags=$LDFLAGS
|
|
|
|
unset CFLAGS LDFLAGS
|
|
|
|
make ${makejobs} \
|
|
|
|
PREFIX=/usr \
|
|
|
|
CC=${CC} \
|
|
|
|
TARGET_CFLAGS="$_cflags" \
|
|
|
|
TARGET_LDFLAGS="$_ldflags" \
|
2014-03-16 22:30:32 +00:00
|
|
|
TARGET_STRIP=: \
|
|
|
|
$_cross_cc
|
2012-12-21 11:59:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2013-04-12 07:01:46 +00:00
|
|
|
make DPREFIX=${DESTDIR}/usr DESTDIR=${DESTDIR} \
|
|
|
|
INSTALL_SHARE=${DESTDIR}/usr/share PREFIX=/usr install
|
2014-05-18 15:53:18 +00:00
|
|
|
|
2015-05-15 04:56:15 +00:00
|
|
|
ln -fs libluajit-5.1.so.2.0.4 ${DESTDIR}/usr/lib/libluajit-5.1.so.2
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LuaJIT-devel_package() {
|
2014-02-21 11:55:32 +00:00
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
2013-06-18 08:46:54 +00:00
|
|
|
short_desc+=" - development files"
|
2013-04-12 07:01:46 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/pkgconfig
|
2013-06-18 08:46:54 +00:00
|
|
|
vmove "usr/lib/*.a"
|
|
|
|
vmove "usr/lib/*.so"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|