summaryrefslogtreecommitdiff
path: root/repo/luajit/luajit.xibuild
blob: 09f601554caab00526d4c6ac17bc90d17268de9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

MAKEDEPS="make "
DEPS="musl lua5-1"

PKG_VER=2.1
SUBVER=20220310
SOURCE=https://github.com/openresty/luajit2/archive/refs/tags/v$PKG_VER-$SUBVER.tar.gz
ADDITIONAL="
module-paths.patch
"

DESC="OpenResty's branch of LuaJIT"

prepare () {
    apply_patches
}

build () {
    local xcflags="-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_NUMMODE=2"
	[ "$CARCH" = x86_64 ] && xcflags="$xcflags -msse4.2"
	make amalg PREFIX=/usr XCFLAGS="$xcflags"

}

package () {
    make install DESTDIR="$PKG_DEST" PREFIX=/usr

	install -Dm644 COPYRIGHT \
		$PKG_DEST/usr/share/licenses/luajit/COPYRIGHT

}