forked from opnsense/ports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
luajit.mk
40 lines (32 loc) · 1.16 KB
/
luajit.mk
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
33
34
35
36
37
38
39
40
# Select your favorite luajit runtime
# Feature: luajit
# Usage: USES= luajit[:version]
# MAINTAINER: [email protected]
# After bsd.port.options.mk or bsd.port.pre.mk, the following are set:
# LUAJIT_VER: The selected luajit version
# LUAJIT_INCDIR: The path to luajit's header files
# LUAJIT_LUAVER: Which luajit spec version is selected
# (2.0 for luajit, else 2.1)
.if !defined(_INCLUDE_USES_LUAJIT_MK)
_INCLUDE_USES_LUAJIT_MK=yes
.if !empty(luajit_ARGS)
LUAJIT_VER= ${luajit_ARGS}
.else
LUAJIT_VER= ${LUAJIT_DEFAULT}
.endif
# When adding a version, please keep the comment in
# Mk/bsd.default-versions.mk in sync
VALID_LUAJIT_VER= luajit luajit-devel luajit-openresty
.if empty(VALID_LUAJIT_VER:M${LUAJIT_DEFAULT})
IGNORE= Invalid luajit default version ${LUAJIT_DEFAULT}: valid versions are ${VALID_LUAJIT_VER}
.elif empty(VALID_LUAJIT_VER:M${LUAJIT_VER})
IGNORE= Invalid luajit version ${LUAJIT_VER}: valid versions are ${VALID_LUAJIT_VER}
.endif
.if ${LUAJIT_VER} == luajit
LUAJIT_LUAVER= 2.0
.else
LUAJIT_LUAVER= 2.1
.endif
LIB_DEPENDS+= libluajit-5.1.so:lang/${LUAJIT_VER}
LUAJIT_INCDIR= ${LOCALBASE}/include/luajit-${LUAJIT_LUAVER}
.endif