Index: Mk/Uses/luajit.mk =================================================================== --- /dev/null +++ Mk/Uses/luajit.mk @@ -0,0 +1,29 @@ +# Select your favorite luajit runtime +# Feature: luajit +# Usage: USES= luajit[:version] +# MAINTAINER: ports@FreeBSD.org + +.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} +.endif + +.if empty(VALID_LUAJIT_VER:M${LUAJIT_VER}) +IGNORE= Invalid luajit version ${LUAJIT_VER}: valid versions are ${VALID_LUAJIT_VER} +.endif + +LIB_DEPENDS= libluajit-5.1.so:lang/${LUAJIT_VER} + +.endif Index: Mk/bsd.default-versions.mk =================================================================== --- Mk/bsd.default-versions.mk +++ Mk/bsd.default-versions.mk @@ -86,6 +86,8 @@ . endif # Possible values: 5.1, 5.2, 5.3, 5.4 LUA_DEFAULT?= 5.2 +# Possible values: luajit, luajit-devel, luajit-openresty +LUAJIT_DEFAULT?= luajit-devel # Possible values: 5.10, 5.20, 6.8 MONO_DEFAULT= 5.10 # Possible values: 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.7p, 5.7w