1 |
# Created by: Kubilay Kocak <koobs@FreeBSD.org> |
2 |
# $FreeBSD: head/lang/spidermonkey170/Makefile 395171 2015-08-24 13:09:11Z marino $ |
3 |
# $MidnightBSD$ |
4 |
|
5 |
PORTNAME= spidermonkey170 |
6 |
PORTVERSION= 17.0.0 |
7 |
PORTREVISION= 1 |
8 |
CATEGORIES= lang |
9 |
MASTER_SITES= MOZILLA/js |
10 |
DISTNAME= mozjs${PORTVERSION} |
11 |
|
12 |
MAINTAINER= ports@MidnightBSD.org |
13 |
COMMENT= Standalone JavaScript based from Mozilla 17-esr |
14 |
|
15 |
LICENSE= gpl2 mpl |
16 |
LICENSE_COMB= dual |
17 |
|
18 |
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip |
19 |
LIB_DEPENDS= libnspr4.so:${PORTSDIR}/devel/nspr |
20 |
|
21 |
CONFLICTS= njs-[0-9]* |
22 |
|
23 |
GNU_CONFIGURE= yes |
24 |
USES= gmake pathfix perl5 python:2,build |
25 |
USE_PERL5= build |
26 |
USE_LDCONFIG= yes |
27 |
|
28 |
WRKSRC= ${WRKDIR}/mozjs${PORTVERSION}/js/src |
29 |
|
30 |
CONFIGURE_ARGS= --with-pthreads \ |
31 |
--with-system-nspr |
32 |
|
33 |
OPTIONS_DEFINE= DEBUG DTRACE GCZEAL JEMALLOC METHODJIT OPTIMIZE READLINE \ |
34 |
THREADSAFE TRACEJIT UTF8 |
35 |
OPTIONS_DEFAULT= METHODJIT OPTIMIZE READLINE THREADSAFE TRACEJIT |
36 |
OPTIONS_SUB= yes |
37 |
|
38 |
DEBUG_DESC= Enable Debug build |
39 |
DEBUG_CONFIGURE_ENABLE= debug debug-symbols |
40 |
DEBUG_CONFIGURE_DISABLE=debug |
41 |
DTRACE_DESC= Build with DTrace probes # move to bsd.options.desc.mk |
42 |
DTRACE_CONFIGURE_ENABLE=dtrace profiling |
43 |
DTRACE_LIBS= -lelf |
44 |
GCZEAL_DESC= Enable Zealous garbage collecting |
45 |
GCZEAL_CONFIGURE_ENABLE=gczeal |
46 |
JEMALLOC_DESC= Use jemalloc as memory allocator |
47 |
JEMALLOC_CONFIGURE_ENABLE= jemalloc |
48 |
METHODJIT_DESC= Enable method JIT support |
49 |
METHODJIT_CONFIGURE_ENABLE= methodjit |
50 |
OPTIMIZE_DESC= Enable compiler optimizations |
51 |
OPTIMIZE_CONFIGURE_ENABLE= optimize |
52 |
READLINE_DESC= Link js shell to system readline library |
53 |
READLINE_CONFIGURE_ENABLE= readline |
54 |
READLINE_USES= readline |
55 |
THREADSAFE_DESC= Enable multiple thread support |
56 |
THREADSAFE_CONFIGURE_ENABLE= threadsafe |
57 |
TRACEJIT_DESC= Enable tracing JIT support |
58 |
TRACEJIT_CONFIGURE_ENABLE= tracejit |
59 |
UTF8_DESC= Treat strings as UTF8 instead of ISO-8859-1 |
60 |
UTF8_CFLAGS= -DJS_C_STRINGS_ARE_UTF8 |
61 |
|
62 |
.include <bsd.port.pre.mk> |
63 |
|
64 |
CONFIGURE_TARGET= ${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL} |
65 |
|
66 |
.if ${PORT_OPTIONS:MDTRACE} |
67 |
. if ${OSVERSION} < 1000510 |
68 |
BROKEN= dtrace -G crashes with C++ object files |
69 |
. endif |
70 |
STRIP_CMD= ${TRUE} |
71 |
.endif |
72 |
|
73 |
regression-test: build |
74 |
@${ECHO_MSG} -n "===> Running jstests.py: " |
75 |
@cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} tests/jstests.py \ |
76 |
--no-progress ./js17 |
77 |
.if ${PORT_OPTIONS:MMETHODJIT} || ${PORT_OPTIONS:MTRACEJIT} |
78 |
@${ECHO_MSG} -n "===> Running jit_test.py: " |
79 |
@cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} jit-test/jit_test.py \ |
80 |
--no-progress --jitflags=,m,j,mj,mjp,am,amj,amjp,amd ./js17 |
81 |
.endif |
82 |
|
83 |
post-install: |
84 |
${LN} -s libmozjs-17.0.so ${STAGEDIR}${PREFIX}/lib/libmozjs-17.0.so.1 |
85 |
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/js17 |
86 |
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmozjs-17.0.* |
87 |
|
88 |
.include <bsd.port.post.mk> |