summaryrefslogtreecommitdiff
path: root/lang/spidermonkey
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2006-12-03 10:11:49 +0000
committerxtraeme <xtraeme>2006-12-03 10:11:49 +0000
commit2f564e8c392be88629e26f1584bcd579a964ab98 (patch)
tree32ab9a6898fd29ed2a5a3152ba4f07776af2a919 /lang/spidermonkey
parente3e14ce0cde1d0d6a179e497e38a34a6990d9742 (diff)
downloadpkgsrc-2f564e8c392be88629e26f1584bcd579a964ab98.tar.gz
- Build the library with JS_THREADSAFE set (required by the upcoming
avidemux-2.3.0 pkg). - Disable debug entirely, why do we need this? - And more things I can't remember... Bump PKGREVISION.
Diffstat (limited to 'lang/spidermonkey')
-rw-r--r--lang/spidermonkey/Makefile19
-rw-r--r--lang/spidermonkey/buildlink3.mk11
-rw-r--r--lang/spidermonkey/distinfo6
-rw-r--r--lang/spidermonkey/files/pkgsrc.mk22
-rw-r--r--lang/spidermonkey/patches/patch-ab20
-rw-r--r--lang/spidermonkey/patches/patch-ad15
-rw-r--r--lang/spidermonkey/patches/patch-ae49
7 files changed, 88 insertions, 54 deletions
diff --git a/lang/spidermonkey/Makefile b/lang/spidermonkey/Makefile
index 880c185a7cd..50302ab9714 100644
--- a/lang/spidermonkey/Makefile
+++ b/lang/spidermonkey/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.9 2006/12/01 10:55:24 hubertf Exp $
+# $NetBSD: Makefile,v 1.10 2006/12/03 10:11:49 xtraeme Exp $
DISTNAME= js-1.5
PKGNAME= ${DISTNAME:S/js/spidermonkey/}
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= lang
-MASTER_SITES= http://ftp.mozilla.org/pub/mozilla.org/js/
+MASTER_SITES= ${MASTER_SITE_MOZILLA:=js/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.mozilla.org/js/spidermonkey/
@@ -16,6 +16,10 @@ NO_CONFIGURE= yes
USE_TOOLS+= gmake
MAKE_FILE= Makefile.ref
+# JS_THREADSAFE
+PTHREAD_AUTO_VARS= yes
+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 \
@@ -41,13 +45,16 @@ post-extract:
${CP} ${FILESDIR}/pkgsrc.mk ${WRKSRC}/config
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${BUILDDIRPREFIX}_DBG.OBJ/js \
+ ${INSTALL_PROGRAM} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/js \
${PREFIX}/bin
- ${INSTALL_LIB} ${WRKSRC}/${BUILDDIRPREFIX}_DBG.OBJ/libjs.${SO_SUFFIX} \
+ ${INSTALL_LIB} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/libjs.${SO_SUFFIX} \
${PREFIX}/lib
- ${CP} ${WRKSRC}/${BUILDDIRPREFIX}_DBG.OBJ/jsautocfg.h ${WRKSRC}
+ ${CP} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/jsautocfg.h ${WRKSRC}
.for f in ${DIST_HEADERS}
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/include
.endfor
+.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/buildlink3.mk b/lang/spidermonkey/buildlink3.mk
index 7340c1fa041..58d6405d25d 100644
--- a/lang/spidermonkey/buildlink3.mk
+++ b/lang/spidermonkey/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.7 2006/08/08 21:08:14 tron Exp $
+# $NetBSD: buildlink3.mk,v 1.8 2006/12/03 10:11:49 xtraeme Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
SPIDERMONKEY_BUILDLINK3_MK:= ${SPIDERMONKEY_BUILDLINK3_MK}+
@@ -13,12 +13,11 @@ BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}spidermonkey
.if !empty(SPIDERMONKEY_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.spidermonkey+= spidermonkey>=1.5
-.if ${OPSYS} == "Darwin"
-BUILDLINK_ABI_DEPENDS.spidermonkey?= spidermonkey>=1.5nb4
-.else
-BUILDLINK_ABI_DEPENDS.spidermonkey?= spidermonkey>=1.5nb1
-.endif
+BUILDLINK_ABI_DEPENDS.spidermonkey?= spidermonkey>=1.5nb6
BUILDLINK_PKGSRCDIR.spidermonkey?= ../../lang/spidermonkey
.endif # SPIDERMONKEY_BUILDLINK3_MK
+.include "../../devel/readline/buildlink3.mk"
+.include "../../devel/nspr/buildlink3.mk"
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/lang/spidermonkey/distinfo b/lang/spidermonkey/distinfo
index b8d529f4fa6..ca7b9966ce3 100644
--- a/lang/spidermonkey/distinfo
+++ b/lang/spidermonkey/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.5 2006/08/08 21:08:14 tron Exp $
+$NetBSD: distinfo,v 1.6 2006/12/03 10:11:49 xtraeme Exp $
SHA1 (js-1.5.tar.gz) = 707755be3a94207d5d10ccd1011ca00babe0a689
RMD160 (js-1.5.tar.gz) = a1f23d53c259a9fa354f29eecdc1c56472f4f626
Size (js-1.5.tar.gz) = 958135 bytes
SHA1 (patch-aa) = 25de332b3ec78da45727cedf33f695caee416519
-SHA1 (patch-ab) = 9f78175b240add7ed2dc3d49c90367c9fa5d16ea
SHA1 (patch-ac) = 2a9a4834dcc82dbab04d1bfc9a58c3e2b41f17dc
-SHA1 (patch-ad) = 25619a532bcf023bc751fdff7f6694a0ff0b309b
+SHA1 (patch-ad) = 80550041ceb7f067d1b4bca1eb471b5bd6c59a7a
+SHA1 (patch-ae) = 22effe11d88ad370074ae547882959f6d1a765bb
diff --git a/lang/spidermonkey/files/pkgsrc.mk b/lang/spidermonkey/files/pkgsrc.mk
index a835d0418d4..0ddbef2b5c1 100644
--- a/lang/spidermonkey/files/pkgsrc.mk
+++ b/lang/spidermonkey/files/pkgsrc.mk
@@ -43,11 +43,12 @@
#CC = gcc
#CCC = g++
-CFLAGS += -Wall -Wno-format
-OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE # -DHAVE_LOCALTIME_R
+CFLAGS+= -Wall -Wno-format
+OS_CFLAGS= -DJS_THREADSAFE -DXP_UNIX -DSVR4
+OS_CFLAGS+= -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE # -DHAVE_LOCALTIME_R
RANLIB = echo
-MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS)
+MKSHLIB = $(LD) -lplds4 -lplc4 -lnspr4 -shared $(LDFLAGS) $(XMKSHLIBOPTS)
#.c.o:
# $(CC) -c -MD $*.d $(CFLAGS) $<
@@ -64,7 +65,6 @@ ifeq (gcc, $(CC))
# (http://bugzilla.mozilla.org/show_bug.cgi?id=24892)
GCC_VERSION := $(shell gcc -v 2>&1 | grep version | awk '{ print $$3 }')
GCC_LIST:=$(sort 2.91.66 $(GCC_VERSION) )
-
ifeq (2.91.66, $(firstword $(GCC_LIST)))
CFLAGS+= -DGCC_OPT_BUG
endif
@@ -74,7 +74,7 @@ endif
GFX_ARCH = x
-OS_LIBS = -lm -lc
+OS_LIBS = -lm $(LDFLAGS)
ASFLAGS += -x assembler-with-cpp
@@ -87,17 +87,7 @@ ifeq ($(CPU_ARCH),alpha)
OS_CFLAGS += -mieee
endif
-# Use the editline library to provide line-editing support.
-JS_EDITLINE = 1
+JS_READLINE = 1
-ifeq ($(CPU_ARCH),amd64)
-# 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
diff --git a/lang/spidermonkey/patches/patch-ab b/lang/spidermonkey/patches/patch-ab
deleted file mode 100644
index e9458123340..00000000000
--- a/lang/spidermonkey/patches/patch-ab
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2006/02/26 20:36:58 joerg Exp $
-
---- fdlibm/k_standard.c.orig 2006-02-26 20:29:51.000000000 +0000
-+++ fdlibm/k_standard.c
-@@ -52,14 +52,7 @@
-
- #include "fdlibm.h"
-
--/* XXX ugly hack to get msvc to link without error. */
--#if _LIB_VERSION == _IEEE_ && !(defined(DARWIN) || defined(XP_MACOSX))
-- int errno;
--# define EDOM 0
--# define ERANGE 0
--#else
--# include <errno.h>
--#endif
-+#include <errno.h>
-
-
- #ifndef _USE_WRITE
diff --git a/lang/spidermonkey/patches/patch-ad b/lang/spidermonkey/patches/patch-ad
index fd6e9c019c0..1be0a3a9235 100644
--- a/lang/spidermonkey/patches/patch-ad
+++ b/lang/spidermonkey/patches/patch-ad
@@ -1,7 +1,16 @@
-$NetBSD: patch-ad,v 1.1 2006/08/08 21:08:14 tron Exp $
+$NetBSD: patch-ad,v 1.2 2006/12/03 10:11:50 xtraeme Exp $
---- rules.mk.orig 2003-11-15 00:11:04.000000000 +0000
-+++ rules.mk 2006-08-08 21:45:40.000000000 +0100
+--- rules.mk.orig 2003-11-15 01:11:04.000000000 +0100
++++ rules.mk 2006-12-02 20:58:07.000000000 +0100
+@@ -58,7 +58,7 @@
+ # TARGETS = $(LIBRARY) # $(PROGRAM) not supported for MSVC yet
+ TARGETS += $(SHARED_LIBRARY) $(PROGRAM) # it is now
+ else
+-TARGETS += $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)
++TARGETS += $(SHARED_LIBRARY) $(PROGRAM)
+ endif
+
+ all:
@@ -115,9 +115,13 @@
$(RANLIB) $@
diff --git a/lang/spidermonkey/patches/patch-ae b/lang/spidermonkey/patches/patch-ae
new file mode 100644
index 00000000000..6250d669f54
--- /dev/null
+++ b/lang/spidermonkey/patches/patch-ae
@@ -0,0 +1,49 @@
+$NetBSD: patch-ae,v 1.1 2006/12/03 10:11:50 xtraeme Exp $
+
+--- Makefile.ref.orig 2003-11-15 01:10:55.000000000 +0100
++++ Makefile.ref 2006-12-03 11:01:14.000000000 +0100
+@@ -55,8 +55,6 @@
+
+ ifdef USE_MSVC
+ OTHER_LIBS += fdlibm/$(OBJDIR)/fdlibm.lib
+-else
+-OTHER_LIBS += -Lfdlibm/$(OBJDIR) -lfdm
+ endif
+
+ ifdef JS_THREADSAFE
+@@ -80,7 +78,8 @@
+ #
+ # XCFLAGS may be set in the environment or on the gmake command line
+ #
+-CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
++CFLAGS += -L$(PREFIX)/lib $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) \
++ $(INCLUDES) $(XCFLAGS)
+
+ LDFLAGS = $(XLDFLAGS)
+
+@@ -241,12 +240,9 @@
+ 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
+@@ -300,9 +296,9 @@
+ $(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
+ link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
+ else
+-$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
+- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
+- $(PROG_LIBS)
++$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) $(FDLIBM_LIBRARY)
++ $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) $(LDFLAGS) \
++ $(OTHER_LIBS) $(PROG_LIBS) -ljs -lm
+ endif
+
+ $(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY)