blob: 71f6d13fa5cd6ab33abfb60fa9e936ab9d624145 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# Created by: Kubilay Kocak <koobs@FreeBSD.org>
# $FreeBSD$
PORTNAME= spidermonkey185
PORTVERSION= 1.8.5
PORTREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= js
DISTNAME= js185-1.0.0
MAINTAINER= koobs@FreeBSD.org
COMMENT= Standalone JavaScript (1.8.5) interpreter from Mozilla
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
LIB_DEPENDS= libnspr4.so:${PORTSDIR}/devel/nspr
CONFLICTS= njs-[0-9]*
USES= gmake pathfix perl5 pkgconfig
USE_AUTOTOOLS= autoconf213:env
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
USE_PERL5= build
USE_PYTHON_BUILD= 2
WRKSRC= ${WRKDIR}/js-${PORTVERSION}/js/src
CONFIGURE_ARGS= --with-pthreads \
--with-system-nspr
# This comes from bsd.gecko.mk, fixes linking issues on 9.0 and higher.
post-configure:
${ECHO_CMD} "fenv.h" >> ${WRKSRC}/config/system-headers
${ECHO_CMD} "pthread_np.h" >> ${WRKSRC}/config/system-headers
OPTIONS_DEFINE= DEBUG GCZEAL JEMALLOC METHODJIT OPTIMIZE READLINE \
THREADSAFE TRACEJIT UTF8 \
OPTIONS_DEFAULT= METHODJIT OPTIMIZE READLINE THREADSAFE TRACEJIT
DEBUG_DESC= Enable Debug build
GCZEAL_DESC= Enable Zealous garbage collecting
JEMALLOC_DESC= Use jemalloc as memory allocator
METHODJIT_DESC= Enable method JIT support
OPTIMIZE_DESC= Enable compiler optimizations
READLINE_DESC= Link js shell to system readline library
THREADSAFE_DESC= Enable multiple thread support
TRACEJIT_DESC= Enable tracing JIT support
UTF8_DESC= Treat strings as UTF8 instead of ISO-8859-1
DEBUG_CONFIGURE_ENABLE= debug
DEBUG_CONFIGURE_ON= --enable-debug-sumbols
GCZEAL_CONFIGURE_ENABLE= gczeal
JEMALLOC_CONFIGURE_ENABLE= jemalloc
METHODJIT_CONFIGURE_ENABLE= methodjit
OPTIMIZE_CONFIGURE_ENABLE= optimize
READLINE_CONFIGURE_ENABLE= readline
READLINE_USES= readline
THREADSAFE_CONFIGURE_ENABLE= threadsafe
TRACEJIT_CONFIGURE_ENABLE= tracejit
UTF8_CFLAGS= -DJS_C_STRINGS_ARE_UTF8
.include <bsd.port.options.mk>
.if ${ARCH} == amd64
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
.if ${ARCH} == "sparc64" && ${OSVERSION} > 900000
BROKEN= Does not build on sparc64-9: fails to link
.endif
.if ${ARCH} == "amd64"
PLIST_SUB+= AMD64=""
.else
PLIST_SUB+= AMD64="@comment "
.endif
.if ${ARCH} == "i386"
PLIST_SUB+= I386=""
.else
PLIST_SUB+= I386="@comment "
.endif
.if ${ARCH} == "arm"
PLIST_SUB+= ARM=""
.else
PLIST_SUB+= ARM="@comment "
.endif
.if ${ARCH} == "mips"
PLIST_SUB+= MIPS=""
.else
PLIST_SUB+= MIPS="@comment "
.endif
.if ${ARCH} == "powerpc" || ${ARCH} == "powerpc64"
PLIST_SUB+= PPC=""
.else
PLIST_SUB+= PPC="@comment "
.endif
.if ${ARCH} == "sparc64"
PLIST_SUB+= SPARC=""
.else
PLIST_SUB+= SPARC="@comment "
.endif
pre-configure:
(cd ${WRKSRC} && ${AUTOCONF})
regression-test: build
@${ECHO_MSG} -n "===> Running jstests.py: "
@cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} tests/jstests.py \
--no-progress --worker-count=${MAKE_JOBS_NUMBER} ./js
.if ${PORT_OPTIONS:MMETHODJIT} || ${PORT_OPTIONS:MTRACEJIT}
@${ECHO_MSG} -n "===> Running jit_test.py: "
@cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} jit-test/jit_test.py \
--no-progress --jitflags=,m,j,mj,mjp,am,amj,amjp,amd ./js
.endif
post-install:
${LN} -sf libmozjs185.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libmozjs185.so
${LN} -sf libmozjs185.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libmozjs185.so.1
${LN} -sf libmozjs185.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libmozjs185.so.1.0
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmozjs185.so.1.0.0
.include <bsd.port.mk>
|