summaryrefslogtreecommitdiff
path: root/devel/luv/Makefile
blob: 410fb020769e2416d11760b1550f2a705d5c2d75 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

PORTNAME=	luv
DISTVERSION=	1.30.1-1
PORTREVISION=	1
CATEGORIES=	devel

MAINTAINER=	checo1705@secmail.pro
COMMENT=	libuv bindings for lua

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

LIB_DEPENDS=	libuv.so:devel/libuv

USES=		cmake
USE_LDCONFIG=	yes
USE_GITHUB=	yes
GH_ACCOUNT=	luvit keplerproject:compat
GH_PROJECT=	luv lua-compat-5.3:compat
GH_TAGNAME=	bc91f40:compat
GH_SUBDIR=	deps/lua-compat-5.3:compat

OPTIONS_DEFINE=		DOCS EXAMPLES LUAJIT
OPTIONS_DEFAULT_amd64=	LUAJIT
OPTIONS_DEFAULT_i386=	LUAJIT
OPTIONS_DEFAULT_powerpc64=	LUAJIT

LUAJIT_DESC=		Use LuaJIT (instead of just Lua)
LUAJIT_LIB_DEPENDS=	${LUAJIT_LIB_DEPENDS_${ARCH}}
LUAJIT_LIB_DEPENDS_amd64=	libluajit-5.1.so:lang/luajit
LUAJIT_LIB_DEPENDS_i386=	libluajit-5.1.so:lang/luajit
LUAJIT_LIB_DEPENDS_powerpc64=	libluajit-5.1.so:lang/luajit-openresty
LUAJIT_CMAKE_ON=	-DWITH_LUA_ENGINE=LuaJIT
LUAJIT_USES_OFF=	lua
LUAJIT_CMAKE_OFF=	-DWITH_LUA_ENGINE=Lua

CMAKE_ON=	BUILD_SHARED_LIBS WITH_SHARED_LIBUV
CMAKE_OFF=	BUILD_MODULE
CMAKE_ARGS=	-DLUA_BUILD_TYPE=System \
		-DLUA_COMPAT53_DIR=deps/lua-compat-5.3

PLIST_FILES=	lib/libluv.so \
		lib/libluv.so.1 \
		lib/libluv.so.1.30.1 \
		libdata/pkgconfig/libluv.pc \
		include/luv/util.h \
		include/luv/luv.h \
		include/luv/lreq.h \
		include/luv/lhandle.h

PORTDOCS=	docs.md

PORTEXAMPLES=	*

post-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/docs.md ${STAGEDIR}${DOCSDIR}

post-install-EXAMPLES-on:
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>