git: a6b06460a563 - main - Uses/luajit.mk: Set a path to the luajit headers
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Oct 2022 18:02:31 UTC
The branch main has been updated by adamw: URL: https://cgit.FreeBSD.org/ports/commit/?id=a6b06460a563185c4d13db874052ae989f8cb556 commit a6b06460a563185c4d13db874052ae989f8cb556 Author: Adam Weinberger <adamw@FreeBSD.org> AuthorDate: 2022-10-14 18:02:19 +0000 Commit: Adam Weinberger <adamw@FreeBSD.org> CommitDate: 2022-10-14 18:02:27 +0000 Uses/luajit.mk: Set a path to the luajit headers --- Mk/Uses/luajit.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Mk/Uses/luajit.mk b/Mk/Uses/luajit.mk index c2be165d1353..452370b55de6 100644 --- a/Mk/Uses/luajit.mk +++ b/Mk/Uses/luajit.mk @@ -3,6 +3,10 @@ # Usage: USES= luajit[:version] # MAINTAINER: adamw@FreeBSD.org +# 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 + .if !defined(_INCLUDE_USES_LUAJIT_MK) _INCLUDE_USES_LUAJIT_MK=yes @@ -22,6 +26,12 @@ IGNORE= Invalid luajit default version ${LUAJIT_DEFAULT}: valid versions are ${V IGNORE= Invalid luajit version ${LUAJIT_VER}: valid versions are ${VALID_LUAJIT_VER} .endif +.if ${LUAJIT_VER} == luajit +LUAJIT_INCDIR= ${LOCALBASE}/include/luajit-2.0 +.else +LUAJIT_INCDIR= ${LOCALBASE}/include/luajit-2.1 +.endif + LIB_DEPENDS+= libluajit-5.1.so:lang/${LUAJIT_VER} .endif