aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2013-03-29 17:57:40 +0800
committerkwm <kwm@FreeBSD.org>2013-03-29 17:57:40 +0800
commit4dd693421d91305813b6961d9db23e6fd009d066 (patch)
tree665c1d0c1d621b3456276dd589207f548fb89d0c /lang
parent81662bbb9d6dc2945585067100cd7f70d2b7b64c (diff)
downloadfreebsd-ports-gnome-4dd693421d91305813b6961d9db23e6fd009d066.tar.gz
freebsd-ports-gnome-4dd693421d91305813b6961d9db23e6fd009d066.tar.zst
freebsd-ports-gnome-4dd693421d91305813b6961d9db23e6fd009d066.zip
Add spidermonkey 17.0
This is the spidermonkey version shipped with the firefox-esr series 17.0. Not to be confused with spidermonkey17 ports which is 1.7. Borrow patch from firefox-esr to fix the build with clang.
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/spidermonkey170/Makefile121
-rw-r--r--lang/spidermonkey170/distinfo2
-rw-r--r--lang/spidermonkey170/files/patch-bug78463152
-rw-r--r--lang/spidermonkey170/pkg-descr3
-rw-r--r--lang/spidermonkey170/pkg-plist73
6 files changed, 252 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index b6993c9eb459..cef501a0b54d 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -329,6 +329,7 @@
SUBDIR += sml-nj-devel
SUBDIR += snobol4
SUBDIR += spidermonkey17
+ SUBDIR += spidermonkey170
SUBDIR += spidermonkey185
SUBDIR += spl
SUBDIR += squeak
diff --git a/lang/spidermonkey170/Makefile b/lang/spidermonkey170/Makefile
new file mode 100644
index 000000000000..1087e2e01a19
--- /dev/null
+++ b/lang/spidermonkey170/Makefile
@@ -0,0 +1,121 @@
+# Created by: Kubilay Kocak <koobs@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= spidermonkey
+PORTVERSION= 17.0.0
+CATEGORIES= lang
+MASTER_SITES= ${MASTER_SITE_MOZILLA}
+MASTER_SITE_SUBDIR= js
+DISTNAME= mozjs${PORTVERSION}
+
+MAINTAINER= kwm@FreeBSD.org
+COMMENT= Standalone JavaScript based from Mozilla 17-esr
+
+BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
+LIB_DEPENDS= nspr4:${PORTSDIR}/devel/nspr
+
+CONFLICTS= njs-[0-9]*
+
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USES= pathfix
+USE_LDCONFIG= yes
+USE_PERL5_BUILD= yes
+USE_PYTHON_BUILD= 2.5-2.7
+MAKE_JOBS_SAFE= yes
+
+WRKSRC= ${WRKDIR}/mozjs${PORTVERSION}/js/src
+
+CONFIGURE_ARGS= --with-pthreads \
+ --with-system-nspr
+
+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
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+CONFIGURE_ARGS+= --enable-debug \
+ --enable-debug-symbols
+.else
+CONFIGURE_ARGS+= --disable-debug
+.endif
+
+.if ${PORT_OPTIONS:MGCZEAL}
+CONFIGURE_ARGS+= --enable-gczeal
+.else
+CONFIGURE_ARGS+= --disable-gczeal
+.endif
+
+.if ${PORT_OPTIONS:MJEMALLOC}
+CONFIGURE_ARGS+= --enable-jemalloc
+.else
+CONFIGURE_ARGS+= --disable-jemalloc
+.endif
+
+.if ${PORT_OPTIONS:MMETHODJIT}
+CONFIGURE_ARGS+= --enable-methodjit
+.else
+CONFIGURE_ARGS+= --disable-methodjit
+.endif
+
+.if ${PORT_OPTIONS:MOPTIMIZE}
+CONFIGURE_ARGS+= --enable-optimize
+.else
+CONFIGURE_ARGS+= --disable-optimize
+.endif
+
+.if ${PORT_OPTIONS:MREADLINE}
+CONFIGURE_ARGS+= --enable-readline
+.else
+CONFIGURE_ARGS+= --disable-readline
+.endif
+
+.if ${PORT_OPTIONS:MTHREADSAFE}
+CONFIGURE_ARGS+= --enable-threadsafe
+.else
+CONFIGURE_ARGS+= --disable-threadsafe
+.endif
+
+.if ${PORT_OPTIONS:MTRACEJIT}
+CONFIGURE_ARGS+= --enable-tracejit
+.else
+CONFIGURE_ARGS+= --disable-tracejit
+.endif
+
+.if ${PORT_OPTIONS:MUTF8}
+CFLAGS+= -DJS_C_STRINGS_ARE_UTF8
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == amd64
+CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
+.endif
+
+regression-test: build
+ @${ECHO_MSG} -n "===> Running jstests.py: "
+ @cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} tests/jstests.py \
+ --no-progress ./js17
+.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 ./js17
+.endif
+
+post-install:
+ ${LN} -s libmozjs-17.0.so ${PREFIX}/lib/libmozjs-17.0.so.1
+
+.include <bsd.port.post.mk>
diff --git a/lang/spidermonkey170/distinfo b/lang/spidermonkey170/distinfo
new file mode 100644
index 000000000000..d88e3b46eaff
--- /dev/null
+++ b/lang/spidermonkey170/distinfo
@@ -0,0 +1,2 @@
+SHA256 (mozjs17.0.0.tar.gz) = 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba
+SIZE (mozjs17.0.0.tar.gz) = 6778934
diff --git a/lang/spidermonkey170/files/patch-bug784631 b/lang/spidermonkey170/files/patch-bug784631
new file mode 100644
index 000000000000..9855da64eac3
--- /dev/null
+++ b/lang/spidermonkey170/files/patch-bug784631
@@ -0,0 +1,52 @@
+commit 66b3921
+Author: Terrence Cole <terrence@mozilla.com>
+Date: Tue Sep 11 12:31:04 2012 -0700
+
+ Bug 784631 - Fix some clang build errors in SpiderMonkey; r=Waldo f=espindola
+
+ Computed gotos are not in the C++ standard: clang and gcc differ on semantics.
+---
+ js/src/jsinterp.cpp | 3 ++-
+ js/src/jsutil.h | 8 ++++----
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git js/src/jsinterp.cpp js/src/jsinterp.cpp
+index 0094c72..27a64a7 100644
+--- js/src/jsinterp.cpp
++++ jsinterp.cpp
+@@ -1231,6 +1231,7 @@ js::Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode)
+ RootedPropertyName rootName0(cx);
+ RootedId rootId0(cx);
+ RootedShape rootShape0(cx);
++ DebugOnly<uint32_t> blockDepth;
+
+ if (!entryFrame)
+ entryFrame = regs.fp();
+@@ -3650,7 +3651,7 @@ BEGIN_CASE(JSOP_LEAVEBLOCK)
+ BEGIN_CASE(JSOP_LEAVEFORLETIN)
+ BEGIN_CASE(JSOP_LEAVEBLOCKEXPR)
+ {
+- DebugOnly<uint32_t> blockDepth = regs.fp()->blockChain().stackDepth();
++ blockDepth = regs.fp()->blockChain().stackDepth();
+
+ regs.fp()->popBlock(cx);
+
+diff --git js/src/jsutil.h js/src/jsutil.h
+index 8838b6f..016a877 100644
+--- js/src/jsutil.h
++++ jsutil.h
+@@ -432,10 +432,10 @@ typedef size_t jsbitmap;
+ #if defined(__clang__)
+ # define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
+ JS_BEGIN_MACRO \
+- _Pragma("clang diagnostic push") \
+- _Pragma("clang diagnostic ignored \"-Wunused-value\"") \
+- expr; \
+- _Pragma("clang diagnostic pop") \
++ _Pragma("(clang diagnostic push)") \
++ _Pragma("(clang diagnostic ignored \"-Wunused-value\")") \
++ {expr;} \
++ _Pragma("(clang diagnostic pop)") \
+ JS_END_MACRO
+ #elif (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+ # define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
diff --git a/lang/spidermonkey170/pkg-descr b/lang/spidermonkey170/pkg-descr
new file mode 100644
index 000000000000..db4318240eed
--- /dev/null
+++ b/lang/spidermonkey170/pkg-descr
@@ -0,0 +1,3 @@
+Spidermonkey is the JavaScript interpreter from the Mozilla project.
+
+WWW: http://www.mozilla.org/js/spidermonkey/
diff --git a/lang/spidermonkey170/pkg-plist b/lang/spidermonkey170/pkg-plist
new file mode 100644
index 000000000000..eaf6d1c97a19
--- /dev/null
+++ b/lang/spidermonkey170/pkg-plist
@@ -0,0 +1,73 @@
+bin/js17
+bin/js17-config
+include/js-17.0/ds/BitArray.h
+include/js-17.0/gc/Barrier.h
+include/js-17.0/gc/Heap.h
+include/js-17.0/gc/Root.h
+include/js-17.0/gc/Statistics.h
+include/js-17.0/gc/StoreBuffer.h
+include/js-17.0/js-config.h
+include/js-17.0/js.msg
+include/js-17.0/js/HashTable.h
+include/js-17.0/js/LegacyIntTypes.h
+include/js-17.0/js/MemoryMetrics.h
+include/js-17.0/js/RequiredDefines.h
+include/js-17.0/js/TemplateLib.h
+include/js-17.0/js/Utility.h
+include/js-17.0/js/Vector.h
+include/js-17.0/jsalloc.h
+include/js-17.0/jsapi.h
+include/js-17.0/jsatom.h
+include/js-17.0/jsatom.tbl
+include/js-17.0/jsclass.h
+include/js-17.0/jsclist.h
+include/js-17.0/jscpucfg.h
+include/js-17.0/jsdbgapi.h
+include/js-17.0/jsdhash.h
+include/js-17.0/jsfriendapi.h
+include/js-17.0/jsgc.h
+include/js-17.0/jslock.h
+include/js-17.0/json.h
+include/js-17.0/jsperf.h
+include/js-17.0/jsprf.h
+include/js-17.0/jsproto.tbl
+include/js-17.0/jsproxy.h
+include/js-17.0/jsprvtd.h
+include/js-17.0/jspubtd.h
+include/js-17.0/jstypes.h
+include/js-17.0/jsutil.h
+include/js-17.0/jsval.h
+include/js-17.0/jsversion.h
+include/js-17.0/jswrapper.h
+include/js-17.0/mozilla/Assertions.h
+include/js-17.0/mozilla/Attributes.h
+include/js-17.0/mozilla/BloomFilter.h
+include/js-17.0/mozilla/CheckedInt.h
+include/js-17.0/mozilla/Constants.h
+include/js-17.0/mozilla/FloatingPoint.h
+include/js-17.0/mozilla/GuardObjects.h
+include/js-17.0/mozilla/HashFunctions.h
+include/js-17.0/mozilla/Likely.h
+include/js-17.0/mozilla/LinkedList.h
+include/js-17.0/mozilla/MSStdInt.h
+include/js-17.0/mozilla/MathAlgorithms.h
+include/js-17.0/mozilla/NullPtr.h
+include/js-17.0/mozilla/RangedPtr.h
+include/js-17.0/mozilla/RefPtr.h
+include/js-17.0/mozilla/SHA1.h
+include/js-17.0/mozilla/Scoped.h
+include/js-17.0/mozilla/StandardInteger.h
+include/js-17.0/mozilla/ThreadLocal.h
+include/js-17.0/mozilla/TypeTraits.h
+include/js-17.0/mozilla/Types.h
+include/js-17.0/mozilla/Util.h
+include/js-17.0/mozilla/WeakPtr.h
+lib/libmozjs-17.0.a
+lib/libmozjs-17.0.so
+lib/libmozjs-17.0.so.1
+libdata/pkgconfig/mozjs-17.0.pc
+@dirrm include/js-17.0/mozilla
+@dirrm include/js-17.0/js
+@dirrm include/js-17.0/gc
+@dirrm include/js-17.0/ds
+@dirrm include/js-17.0