diff --git a/Mk/Uses/luajit.mk b/Mk/Uses/luajit.mk new file mode 100644 --- /dev/null +++ b/Mk/Uses/luajit.mk @@ -0,0 +1,27 @@ +# Select your favorite luajit runtime +# Feature: luajit +# Usage: USES= luajit[:version] +# MAINTAINER: adamw@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} +.elif 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 diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -17,9 +17,10 @@ LOCALBASE?= /usr/local -. for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT GL GO \ - IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MONO MYSQL NINJA NODEJS PERL5 \ - PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH +. for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC \ + GHOSTSCRIPT GL GO IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \ + LUA LUAJIT MONO MYSQL NINJA NODEJS PERL5 PGSQL PHP PYTHON \ + PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH . if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" . endif @@ -86,6 +87,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