aboutsummaryrefslogtreecommitdiff
path: root/lang/mujs/Makefile
blob: 4a2c2b887a0e49190da4a4b74c3199883e1caef6 (plain) (blame)
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
PORTNAME=	mujs
DISTVERSION=	1.0.7
PORTREVISION=	1
CATEGORIES=	lang devel

PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${PORTNAME}/commit/
PATCHFILES=	d9a1f4c57f976eeb67d877101fcdca89ecc047ed.patch:-p1 # Enable readline on FreeBSD

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Embeddable Javascript interpreter in C

LICENSE=	ISCL
LICENSE_FILE=	${WRKSRC}/COPYING

USES=		compiler:c11 gmake readline # c11 is induced by the FreeBSD headers via isnan(3), etc, otherwise the project is all c99 code
USE_GITHUB=	yes
GH_ACCOUNT=	ccxvii
USE_LDCONFIG=	yes
ALL_TARGET=	shared static
INSTALL_TARGET=	install-shared install-static

.if defined(WITH_DEBUG) # this project manages its build options itself
MAKE_ARGS=	build=debug
.endif

PLIST_FILES=	bin/mujs \
		include/mujs.h \
		lib/libmujs.so \
		lib/libmujs.a \
		libdata/pkgconfig/mujs.pc

OPTIONS_DEFINE=		32BIT SANITIZED
OPTIONS_DEFAULT=	32BIT

32BIT_DESC=		32-bit address space to allow for larger programs
32BIT_MAKE_ARGS=	XCFLAGS="-DJS_INSTRUCTION=int"

SANITIZED_DESC=		Sanitized build (only for debugging)
SANITIZED_MAKE_ARGS=	build=sanitize

post-install: # https://github.com/ccxvii/mujs/issues/99
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmujs.so

.include <bsd.port.mk>