summaryrefslogtreecommitdiff
path: root/lang/spidermonkey
diff options
context:
space:
mode:
authorfhajny <fhajny>2010-12-23 12:36:01 +0000
committerfhajny <fhajny>2010-12-23 12:36:01 +0000
commitc44297ff68621cc89113946218f6e09e3e9b3ecc (patch)
treeb2de72071e93ac6b5746e4be04ab03a71a9da610 /lang/spidermonkey
parent30679f52065ff3e92d9ea3f475e8b20dce56db1a (diff)
downloadpkgsrc-c44297ff68621cc89113946218f6e09e3e9b3ecc.tar.gz
Updated lang/spidermonkey to 1.8.0 rc1 (see below).
No standard changelog provided from upstream, some bits scattered here: * http://www.mozilla.org/js/spidermonkey/release-notes/JS_170.html * https://developer.mozilla.org/En/SpiderMonkey/1.8 pkgsrc changes: * Threading support (and dependency on devel/nspr) is now optional (enabled by default). Threaded Spidermonkey may not be desirable for e.g. server-side JavaScript usage. * Unicode strings support optional. * Rudimental OpenSolaris/Solaris 11 config file provided. Release Candidate note: Spidermonkey 1.8.0 RC1 was the last version ever released as a standalone distribution, and is generally being used by the JavaScript community nowaways, if needed. In the future, ripping Spidermonkey out of the Mozilla tarball may be attempted too, to update the package to 1.9.x.
Diffstat (limited to 'lang/spidermonkey')
-rw-r--r--lang/spidermonkey/Makefile28
-rw-r--r--lang/spidermonkey/PLIST49
-rw-r--r--lang/spidermonkey/distinfo21
-rw-r--r--lang/spidermonkey/files/opensolaris.mk89
-rw-r--r--lang/spidermonkey/files/pkgsrc.mk3
-rw-r--r--lang/spidermonkey/options.mk24
-rw-r--r--lang/spidermonkey/patches/patch-aa17
-rw-r--r--lang/spidermonkey/patches/patch-ab31
-rw-r--r--lang/spidermonkey/patches/patch-ac22
-rw-r--r--lang/spidermonkey/patches/patch-ae43
-rw-r--r--lang/spidermonkey/patches/patch-af23
-rw-r--r--lang/spidermonkey/patches/patch-ah14
-rw-r--r--lang/spidermonkey/patches/patch-ai20
-rw-r--r--lang/spidermonkey/patches/patch-aj19
14 files changed, 230 insertions, 173 deletions
diff --git a/lang/spidermonkey/Makefile b/lang/spidermonkey/Makefile
index 35c3e40308e..a70b4c56cd0 100644
--- a/lang/spidermonkey/Makefile
+++ b/lang/spidermonkey/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.19 2010/01/16 15:04:32 tnn Exp $
+# $NetBSD: Makefile,v 1.20 2010/12/23 12:36:01 fhajny Exp $
-DISTNAME= js-1.60
-PKGNAME= ${DISTNAME:S/js/spidermonkey/}
-PKGREVISION= 3
+DISTNAME= js-1.8.0-rc1
+PKGNAME= spidermonkey-1.8.0rc1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_MOZILLA:=js/}
@@ -21,15 +20,10 @@ USE_TOOLS+= gmake pkg-config
MAKE_FILE= Makefile.ref
CFLAGS+= -DJS_USE_FDLIBM_MATH=0
-# JS_THREADSAFE
-PTHREAD_AUTO_VARS= yes
-MAKE_FLAGS+= BUILD_OPT=1 LDFLAGS=${LDFLAGS:Q} PREFIX=${PREFIX:Q}
+MAKE_FLAGS+= BUILD_OPT=1 LDFLAGS=${LDFLAGS:Q} PREFIX=${PREFIX:Q}
INSTALLATION_DIRS= bin include lib
-DIST_HEADERS= jsapi.h jsautocfg.h jscompat.h jslong.h \
- jsosdep.h jsotypes.h jspubtd.h jstypes.h
-
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || \
@@ -37,6 +31,9 @@ DIST_HEADERS= jsapi.h jsautocfg.h jscompat.h jslong.h \
BUILDDIRPREFIX= pkgsrc
.elif ${OPSYS} == "Linux"
BUILDDIRPREFIX= Linux_All
+.elif ${OPSYS} == "SunOS"
+SUN_PLATFORM!= ${UNAME} -i
+BUILDDIRPREFIX= ${OPSYS}${OS_VERSION}_${SUN_PLATFORM}
.else
BUILDDIRPREFIX= ${OPSYS}
.endif
@@ -48,8 +45,12 @@ SO_SUFFIX=so
.endif
PLIST_SUBST+= SO_SUFFIX=${SO_SUFFIX}
+.include "options.mk"
+
post-extract:
${CP} ${FILESDIR}/pkgsrc.mk ${WRKSRC}/config
+ ${CP} ${FILESDIR}/opensolaris.mk ${WRKSRC}/config/${BUILDDIRPREFIX}.mk
+ ${RM} ${WRKSRC}/lock_SunOS.s
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/js \
@@ -57,11 +58,8 @@ do-install:
${INSTALL_LIB} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/libjs.${SO_SUFFIX} \
${DESTDIR}${PREFIX}/lib
${CP} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/jsautocfg.h ${WRKSRC}
-.for f in ${DIST_HEADERS}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/include
-.endfor
+ ${INSTALL_DATA} ${WRKSRC}/*.h ${DESTDIR}${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/*.tbl ${DESTDIR}${PREFIX}/include
-.include "../../devel/nspr/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/spidermonkey/PLIST b/lang/spidermonkey/PLIST
index b5dc4d2e7d7..0f2c5bfcef0 100644
--- a/lang/spidermonkey/PLIST
+++ b/lang/spidermonkey/PLIST
@@ -1,11 +1,56 @@
-@comment $NetBSD: PLIST,v 1.2 2006/08/08 09:50:33 tron Exp $
+@comment $NetBSD: PLIST,v 1.3 2010/12/23 12:36:01 fhajny Exp $
bin/js
include/jsapi.h
+include/jsarena.h
+include/jsarray.h
+include/jsatom.h
include/jsautocfg.h
+include/jsbit.h
+include/jsbool.h
+include/jsclist.h
+include/jscntxt.h
include/jscompat.h
+include/jsconfig.h
+include/jscpucfg.h
+include/jsdate.h
+include/jsdbgapi.h
+include/jsdhash.h
+include/jsdtoa.h
+include/jsdtracef.h
+include/jsemit.h
+include/jsexn.h
+include/jsfile.h
+include/jsfun.h
+include/jsgc.h
+include/jshash.h
+include/jsinterp.h
+include/jsiter.h
+include/jskeyword.tbl
+include/jslibmath.h
+include/jslock.h
include/jslong.h
-include/jsosdep.h
+include/jsmath.h
+include/jsnum.h
+include/jsobj.h
+include/jsopcode.h
+include/jsopcode.tbl
include/jsotypes.h
+include/jsparse.h
+include/jsprf.h
+include/jsproto.tbl
+include/jsprvtd.h
include/jspubtd.h
+include/jsregexp.h
+include/jsreops.tbl
+include/jsscan.h
+include/jsscope.h
+include/jsscript.h
+include/jsstddef.h
+include/jsstr.h
include/jstypes.h
+include/jsutil.h
+include/jsxdrapi.h
+include/jsxml.h
+include/prmjtime.h
+include/resource.h
lib/libjs.${SO_SUFFIX}
diff --git a/lang/spidermonkey/distinfo b/lang/spidermonkey/distinfo
index 3ffb322fe7a..f5fad889d09 100644
--- a/lang/spidermonkey/distinfo
+++ b/lang/spidermonkey/distinfo
@@ -1,14 +1,11 @@
-$NetBSD: distinfo,v 1.10 2010/01/16 15:04:32 tnn Exp $
+$NetBSD: distinfo,v 1.11 2010/12/23 12:36:01 fhajny Exp $
-SHA1 (js-1.60.tar.gz) = db1457c28d2a55080520d7565a2c271eb1599064
-RMD160 (js-1.60.tar.gz) = 630e0f5606d9cc398daa41e71ca3f98c04e3aed2
-Size (js-1.60.tar.gz) = 1081150 bytes
-SHA1 (patch-aa) = bdd0e741483c5261837948b288c68d040c95e2a9
-SHA1 (patch-ab) = 1ea712aa7a8d2d48acf4980db3df74f70e616252
-SHA1 (patch-ac) = 75ccc29f5075d95b087b28dba25fb8ee78cee706
+SHA1 (js-1.8.0-rc1.tar.gz) = 1577bd39a2ebd9f5e2ec90e72d9a6aa85f840564
+RMD160 (js-1.8.0-rc1.tar.gz) = 27c6cba1185d34cb9095d2da67393025bfe673ca
+Size (js-1.8.0-rc1.tar.gz) = 1310344 bytes
+SHA1 (patch-aa) = fc4b759bc420b76f349c4669dbba378a756038b9
+SHA1 (patch-ab) = 497401caa31380869d3f56ce076f6b7d27b7f941
+SHA1 (patch-ac) = 1a3458862fe3186d24add4791d41df76d742b474
SHA1 (patch-ad) = ca651bfc31b5ad06e45010d40309121c7300807a
-SHA1 (patch-ae) = 5ac0c7013fe4290fc770c91bc2db438f17481f5e
-SHA1 (patch-af) = 353a2b119f56974cc1ae0c2a646d014c075eb5fd
-SHA1 (patch-ah) = a8a486353bc164cff0ba57efc6ad4e82ff339e3e
-SHA1 (patch-ai) = 5835ce03309d45f607a1613062b609e39cc1b974
-SHA1 (patch-aj) = f63d5ef988e3bda111af78f68152019abd0b1ac9
+SHA1 (patch-ae) = c39412d59480db7c89aed7e555f2a5e7a4cea80b
+SHA1 (patch-ai) = 1112dca0f459d98ab1b1a84b4c4ff7ce654b1821
diff --git a/lang/spidermonkey/files/opensolaris.mk b/lang/spidermonkey/files/opensolaris.mk
new file mode 100644
index 00000000000..1d8dd8b94bf
--- /dev/null
+++ b/lang/spidermonkey/files/opensolaris.mk
@@ -0,0 +1,89 @@
+# -*- Mode: makefile -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Communicator client code, released
+# March 31, 1998.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+#
+# Config stuff for SunOS5.5
+#
+
+#AS = /usr/sfw/bin/gas
+AS = gcc
+#CC = gcc
+#CCC = g++
+CFLAGS += -Wall -Wno-format
+#else
+#CC = cc
+#CCC = CC
+#endif
+
+RANLIB = echo
+
+#.c.o:
+# $(CC) -c -MD $*.d $(CFLAGS) $<
+
+CPU_ARCH = x86_64
+GFX_ARCH = x
+
+OS_CFLAGS = -DXP_UNIX -DSYSV -DSOLARIS -DHAVE_LOCALTIME_R
+OS_LIBS = -lsocket -lnsl -ldl
+
+#ASFLAGS += -P -L -K PIC -D_ASM -D__STDC__=0
+ASFLAGS += -x assembler-with-cpp
+
+HAVE_PURIFY = 1
+
+NOSUCHFILE = /solaris-rm-f-sucks
+
+MKSHLIB = $(LD) -G
+
+# Use the editline library to provide line-editing support.
+JS_EDITLINE = 1
+
+ifeq ($(CPU_ARCH),x86_64)
+# Use VA_COPY() standard macro on x86-64
+# FIXME: better use it everywhere
+OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy
+endif
+
+ifeq ($(CPU_ARCH),x86_64)
+# We need PIC code for shared libraries
+# FIXME: better patch rules.mk & fdlibm/Makefile*
+OS_CFLAGS += -DPIC -fPIC
+endif
+
+#JS_USE_FDLIBM_MATH=1
diff --git a/lang/spidermonkey/files/pkgsrc.mk b/lang/spidermonkey/files/pkgsrc.mk
index 611acb89892..4b2be22e395 100644
--- a/lang/spidermonkey/files/pkgsrc.mk
+++ b/lang/spidermonkey/files/pkgsrc.mk
@@ -44,8 +44,9 @@
#CC = gcc
#CCC = g++
CFLAGS+= -Wall -Wno-format
-OS_CFLAGS= -DJS_THREADSAFE -DXP_UNIX -DSVR4
+OS_CFLAGS= -DXP_UNIX -DSVR4
OS_CFLAGS+= -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE # -DHAVE_LOCALTIME_R
+INTERP_CFLAGS+= `pkg-config --cflags-only-I nspr`
RANLIB = echo
MKSHLIB = $(LD) -lm `pkg-config --libs nspr` -shared $(LDFLAGS) $(XMKSHLIBOPTS)
diff --git a/lang/spidermonkey/options.mk b/lang/spidermonkey/options.mk
new file mode 100644
index 00000000000..f517330cefe
--- /dev/null
+++ b/lang/spidermonkey/options.mk
@@ -0,0 +1,24 @@
+# $NetBSD: options.mk,v 1.1 2010/12/23 12:36:01 fhajny Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.spidermonkey
+PKG_SUPPORTED_OPTIONS= threads unicode
+PKG_SUGGESTED_OPTIONS= threads
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Threads support
+###
+.if !empty(PKG_OPTIONS:Mthreads)
+PTHREAD_AUTO_VARS= yes
+CFLAGS+= -DJS_THREADSAFE
+.include "../../devel/nspr/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.endif
+
+###
+### UTF8 string support
+###
+.if !empty(PKG_OPTIONS:Municode)
+CFLAGS+= -DJS_C_STRINGS_ARE_UTF8
+.endif
diff --git a/lang/spidermonkey/patches/patch-aa b/lang/spidermonkey/patches/patch-aa
index e68a5895ffc..a763842e3f5 100644
--- a/lang/spidermonkey/patches/patch-aa
+++ b/lang/spidermonkey/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.4 2007/08/12 03:04:32 wiz Exp $
+$NetBSD: patch-aa,v 1.5 2010/12/23 12:36:02 fhajny Exp $
---- config.mk.orig 2003-11-14 19:10:55.000000000 -0500
+--- config.mk.orig 2008-03-12 14:36:06.000000000 +0000
+++ config.mk
-@@ -96,10 +96,26 @@ else
+@@ -100,10 +100,26 @@ else
ifeq ($(OS_ARCH),Darwin)
OS_CONFIG := Darwin
else
@@ -29,16 +29,7 @@ $NetBSD: patch-aa,v 1.4 2007/08/12 03:04:32 wiz Exp $
ASFLAGS =
DEFINES =
-@@ -113,7 +129,7 @@ CP = cp
- endif
-
- ifdef BUILD_OPT
--OPTIMIZER = -O
-+#OPTIMIZER =
- DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami)
- OBJDIR_TAG = _OPT
- else
-@@ -126,7 +142,11 @@ DEFINES += -DDEBUG -DDEBUG_$(shell wh
+@@ -139,7 +155,11 @@ DEFINES += -DDEBUG -DDEBUG_$(USER)
OBJDIR_TAG = _DBG
endif
diff --git a/lang/spidermonkey/patches/patch-ab b/lang/spidermonkey/patches/patch-ab
index ceb69af573b..0eac81baf08 100644
--- a/lang/spidermonkey/patches/patch-ab
+++ b/lang/spidermonkey/patches/patch-ab
@@ -1,31 +1,22 @@
-$NetBSD: patch-ab,v 1.3 2007/08/12 03:04:33 wiz Exp $
+$NetBSD: patch-ab,v 1.4 2010/12/23 12:36:02 fhajny Exp $
---- js.c.orig 2006-11-29 19:34:45.000000000 -0500
+--- js.c.orig 2008-04-11 22:24:55.000000000 +0000
+++ js.c
-@@ -900,7 +900,7 @@ SrcNotes(JSContext *cx, JSScript *script
- for (sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
- delta = SN_DELTA(sn);
- offset += delta;
+@@ -1233,7 +1233,7 @@ SrcNotes(JSContext *cx, JSScript *script
+ JS_ASSERT(script->code[offset] == JSOP_NOP);
+ }
+ }
- fprintf(gOutFile, "%3u: %5u [%4u] %-8s",
+ fprintf(gOutFile, "%3tu: %5u [%4u] %-8s",
- PTRDIFF(sn, notes, jssrcnote), offset, delta,
- js_SrcNoteSpec[SN_TYPE(sn)].name);
- type = (JSSrcNoteType) SN_TYPE(sn);
-@@ -985,7 +985,7 @@ TryNotes(JSContext *cx, JSScript *script
- return JS_TRUE;
- fprintf(gOutFile, "\nException table:\nstart\tend\tcatch\n");
- while (tn->start && tn->catchStart) {
-- fprintf(gOutFile, " %d\t%d\t%d\n",
-+ fprintf(gOutFile, " %td\t%td\t%td\n",
- tn->start, tn->start + tn->length, tn->catchStart);
- tn++;
- }
-@@ -1205,7 +1205,7 @@ DumpScope(JSContext *cx, JSObject *obj,
+ PTRDIFF(sn, notes, jssrcnote), offset, delta, name);
+ switch (type) {
+ case SRC_SETLINE:
+@@ -1558,7 +1558,7 @@ DumpScope(JSContext *cx, JSObject *obj,
DUMP_ATTR(SETTER);
#undef DUMP_ATTR
- fprintf(fp, " slot %lu flags %x shortid %d\n",
+ fprintf(fp, " slot %u flags %x shortid %d\n",
- sprop->slot, sprop->flags, sprop->shortid);
+ (unsigned long)sprop->slot, sprop->flags, sprop->shortid);
}
}
diff --git a/lang/spidermonkey/patches/patch-ac b/lang/spidermonkey/patches/patch-ac
index c99076c9e63..a838dd240a8 100644
--- a/lang/spidermonkey/patches/patch-ac
+++ b/lang/spidermonkey/patches/patch-ac
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.3 2007/08/12 03:04:33 wiz Exp $
+$NetBSD: patch-ac,v 1.4 2010/12/23 12:36:02 fhajny Exp $
---- config/Darwin.mk.orig 2005-02-12 15:10:33.000000000 -0500
+--- config/Darwin.mk.orig 2008-03-02 23:10:49.000000000 +0000
+++ config/Darwin.mk
@@ -43,13 +43,13 @@
# Just ripped from Linux config
@@ -9,18 +9,18 @@ $NetBSD: patch-ac,v 1.3 2007/08/12 03:04:33 wiz Exp $
-CC = cc
+CC = gcc
CCC = g++
--CFLAGS += -Wall -Wno-format
+-CFLAGS += -Wall -Wno-format -MMD
-OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
-+CFLAGS += -Wall -Wno-format -no-cpp-precomp -fno-common -pipe
-+OS_CFLAGS = -DJS_THREADSAFE -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
++CFLAGS += -Wall -Wno-format -MMD -no-cpp-precomp -fno-common -pipe
++OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
RANLIB = ranlib
--MKSHLIB = libtool $(XMKSHLIBOPTS) -framework System
-+MKSHLIB = $(CC) -framework System -dynamiclib $(XMKSHLIBOPTS) -lm -lplds4 -lplc4 -lnspr4 $(LDFLAGS)
+-MKSHLIB = $(CC) -dynamiclib $(XMKSHLIBOPTS) -framework System
++MKSHLIB = $(CC) -dynamiclib $(XMKSHLIBOPTS) -framework System -lm -lplds4 -lplc4 -lnspr4 $(LDFLAGS)
- #.c.o:
- # $(CC) -c -MD $*.d $(CFLAGS) $<
-@@ -57,7 +57,6 @@ MKSHLIB = libtool $(XMKSHLIBOPTS) -frame
+ SO_SUFFIX = dylib
+
+@@ -59,7 +59,6 @@ SO_SUFFIX = dylib
CPU_ARCH = $(shell uname -m)
ifeq (86,$(findstring 86,$(CPU_ARCH)))
CPU_ARCH = x86
@@ -28,7 +28,7 @@ $NetBSD: patch-ac,v 1.3 2007/08/12 03:04:33 wiz Exp $
endif
GFX_ARCH = x
-@@ -65,14 +64,6 @@ OS_LIBS = -lc -framework System
+@@ -67,14 +66,6 @@ OS_LIBS = -lc -framework System
ASFLAGS += -x assembler-with-cpp
diff --git a/lang/spidermonkey/patches/patch-ae b/lang/spidermonkey/patches/patch-ae
index 9394c2d76f0..002da54ad77 100644
--- a/lang/spidermonkey/patches/patch-ae
+++ b/lang/spidermonkey/patches/patch-ae
@@ -1,47 +1,24 @@
-$NetBSD: patch-ae,v 1.3 2010/01/16 15:04:32 tnn Exp $
+$NetBSD: patch-ae,v 1.4 2010/12/23 12:36:02 fhajny Exp $
---- Makefile.ref.orig 2006-08-21 18:58:45.000000000 +0000
+--- Makefile.ref.orig 2009-02-25 13:24:29.000000000 +0000
+++ Makefile.ref
-@@ -55,8 +55,6 @@ include config.mk
-
- ifdef USE_MSVC
- OTHER_LIBS += fdlibm/$(OBJDIR)/fdlibm.lib
--else
--OTHER_LIBS += -Lfdlibm/$(OBJDIR) -lfdm
- endif
-
- ifdef JS_THREADSAFE
-@@ -80,7 +78,8 @@ endif
- #
+@@ -83,7 +83,7 @@ endif
# XCFLAGS may be set in the environment or on the gmake command line
#
+ #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS
-CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
-+CFLAGS += -L$(PREFIX)/lib $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) \
-+ $(INCLUDES) $(XCFLAGS) `pkg-config --cflags nspr`
++CFLAGS += -L$(PREFIX)/lib $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+ INTERP_CFLAGS += $(INTERP_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(INTERP_XCFLAGS)
LDFLAGS = $(XLDFLAGS)
-
-@@ -248,12 +247,9 @@ JS_CFILES = \
- prmjtime.c \
- $(NULL)
-
--PREDIRS += fdlibm
-
- ifdef USE_MSVC
- FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/fdlibm.lib
--else
--FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/libfdm.a
- endif
- JSMATH_PRELINK = $(OBJDIR)/jsmathtemp.o
- # Flag for incremental linking
-@@ -307,9 +303,9 @@ ifdef USE_MSVC
- $(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
+@@ -318,9 +318,9 @@ ifdef USE_MSVC
+ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
else
--$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
+-$(PROGRAM): $(PROG_OBJS) $(LIBRARY)
- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
- $(PROG_LIBS)
-+$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) $(FDLIBM_LIBRARY)
++$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY)
+ $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) $(LDFLAGS) \
+ $(OTHER_LIBS) $(PROG_LIBS) -ljs -lm
endif
diff --git a/lang/spidermonkey/patches/patch-af b/lang/spidermonkey/patches/patch-af
deleted file mode 100644
index 88c45b7fca1..00000000000
--- a/lang/spidermonkey/patches/patch-af
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-af,v 1.2 2007/08/12 03:04:33 wiz Exp $
-
-Only define JS_USE_FDLIBM_MATH if the user (generally) or pkgsrc (in
-this case) hasn't decided.
-
---- jslibmath.h.orig 2005-04-29 09:33:47.000000000 -0400
-+++ jslibmath.h
-@@ -54,6 +54,7 @@
- * by default since there can be problems with endian-ness and such.
- */
-
-+#if !defined(JS_USE_FDLIBM_MATH)
- #if defined(_WIN32) && !defined(__MWERKS__)
- #define JS_USE_FDLIBM_MATH 1
-
-@@ -82,6 +83,7 @@
- #else
- #define JS_USE_FDLIBM_MATH 0
- #endif
-+#endif
-
- #if !JS_USE_FDLIBM_MATH
-
diff --git a/lang/spidermonkey/patches/patch-ah b/lang/spidermonkey/patches/patch-ah
deleted file mode 100644
index 8295e32ffd9..00000000000
--- a/lang/spidermonkey/patches/patch-ah
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2007/08/12 03:04:34 wiz Exp $
-
---- jslock.c.orig 2004-12-08 20:32:19.000000000 -0500
-+++ jslock.c
-@@ -193,7 +193,9 @@ js_FinishLock(JSThinLock *tl)
- #endif
- }
-
-+#ifndef NSPR_LOCK
- static void js_Dequeue(JSThinLock *);
-+#endif
-
- #ifdef DEBUG_SCOPE_COUNT
-
diff --git a/lang/spidermonkey/patches/patch-ai b/lang/spidermonkey/patches/patch-ai
index d2054375358..7b8daf8979b 100644
--- a/lang/spidermonkey/patches/patch-ai
+++ b/lang/spidermonkey/patches/patch-ai
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.1 2007/08/12 03:04:34 wiz Exp $
+$NetBSD: patch-ai,v 1.2 2010/12/23 12:36:02 fhajny Exp $
---- jsopcode.c.orig 2006-11-29 19:34:45.000000000 -0500
+--- jsopcode.c.orig 2009-02-03 09:25:56.000000000 +0000
+++ jsopcode.c
-@@ -183,7 +183,7 @@ js_Disassemble1(JSContext *cx, JSScript
+@@ -251,7 +251,7 @@ js_Disassemble1(JSContext *cx, JSScript
case JOF_JUMP:
case JOF_JUMPX:
off = GetJumpOffset(pc, pc);
@@ -10,8 +10,8 @@ $NetBSD: patch-ai,v 1.1 2007/08/12 03:04:34 wiz Exp $
+ fprintf(fp, " %tu (%td)", loc + off, off);
break;
- case JOF_CONST:
-@@ -214,10 +214,10 @@ js_Disassemble1(JSContext *cx, JSScript
+ case JOF_ATOM:
+@@ -298,10 +298,10 @@ js_Disassemble1(JSContext *cx, JSScript
pc2 += JUMP_OFFSET_LEN;
high = GET_JUMP_OFFSET(pc2);
pc2 += JUMP_OFFSET_LEN;
@@ -24,12 +24,12 @@ $NetBSD: patch-ai,v 1.1 2007/08/12 03:04:34 wiz Exp $
pc2 += jmplen;
}
len = 1 + pc2 - pc;
-@@ -237,7 +237,7 @@ js_Disassemble1(JSContext *cx, JSScript
+@@ -321,7 +321,7 @@ js_Disassemble1(JSContext *cx, JSScript
pc2 += jmplen;
- npairs = GET_ATOM_INDEX(pc2);
- pc2 += ATOM_INDEX_LEN;
+ npairs = GET_UINT16(pc2);
+ pc2 += UINT16_LEN;
- fprintf(fp, " offset %d npairs %u", off, (uintN) npairs);
+ fprintf(fp, " offset %td npairs %u", off, (uintN) npairs);
while (npairs) {
- atom = GET_ATOM(cx, script, pc2);
- pc2 += ATOM_INDEX_LEN;
+ JS_GET_SCRIPT_ATOM(script, GET_INDEX(pc2), atom);
+ pc2 += INDEX_LEN;
diff --git a/lang/spidermonkey/patches/patch-aj b/lang/spidermonkey/patches/patch-aj
deleted file mode 100644
index a913583fc81..00000000000
--- a/lang/spidermonkey/patches/patch-aj
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2007/08/12 03:04:34 wiz Exp $
-
---- jstypes.h.orig 2005-09-18 00:35:05.000000000 -0400
-+++ jstypes.h
-@@ -387,8 +387,14 @@ typedef JSUint8 JSPackedBool;
- /*
- ** A JSWord is an integer that is the same size as a void*
- */
-+#ifndef HAVE_INTTYPES_H
- typedef long JSWord;
- typedef unsigned long JSUword;
-+#else
-+#include <inttypes.h>
-+typedef intptr_t JSWord;
-+typedef uintptr_t JSUword;
-+#endif /* HAVE_INTTYPES_H */
-
- #include "jsotypes.h"
-