pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/spidermonkey - Build the library with JS_THREADSA...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/04c318f4dad1
branches:  trunk
changeset: 522118:04c318f4dad1
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Sun Dec 03 10:11:49 2006 +0000

description:
- 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:

 lang/spidermonkey/Makefile         |  19 ++++++++++----
 lang/spidermonkey/buildlink3.mk    |  11 +++----
 lang/spidermonkey/distinfo         |   6 ++--
 lang/spidermonkey/files/pkgsrc.mk  |  22 ++++------------
 lang/spidermonkey/patches/patch-ab |  20 ---------------
 lang/spidermonkey/patches/patch-ad |  15 +++++++++--
 lang/spidermonkey/patches/patch-ae |  49 ++++++++++++++++++++++++++++++++++++++
 7 files changed, 88 insertions(+), 54 deletions(-)

diffs (245 lines):

diff -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/Makefile
--- a/lang/spidermonkey/Makefile        Sun Dec 03 09:28:36 2006 +0000
+++ b/lang/spidermonkey/Makefile        Sun Dec 03 10:11:49 2006 +0000
@@ -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@localhost
 HOMEPAGE=      http://www.mozilla.org/js/spidermonkey/
@@ -16,6 +16,10 @@
 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 @@
        ${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 -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/buildlink3.mk
--- a/lang/spidermonkey/buildlink3.mk   Sun Dec 03 09:28:36 2006 +0000
+++ b/lang/spidermonkey/buildlink3.mk   Sun Dec 03 10:11:49 2006 +0000
@@ -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 @@
 
 .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 -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/distinfo
--- a/lang/spidermonkey/distinfo        Sun Dec 03 09:28:36 2006 +0000
+++ b/lang/spidermonkey/distinfo        Sun Dec 03 10:11:49 2006 +0000
@@ -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 -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/files/pkgsrc.mk
--- a/lang/spidermonkey/files/pkgsrc.mk Sun Dec 03 09:28:36 2006 +0000
+++ b/lang/spidermonkey/files/pkgsrc.mk Sun Dec 03 10:11:49 2006 +0000
@@ -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 @@
 # (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 @@
 
 GFX_ARCH = x
 
-OS_LIBS = -lm -lc
+OS_LIBS = -lm $(LDFLAGS)
 
 ASFLAGS += -x assembler-with-cpp
 
@@ -87,17 +87,7 @@
 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 -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/patches/patch-ab
--- a/lang/spidermonkey/patches/patch-ab        Sun Dec 03 09:28:36 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/patches/patch-ad
--- a/lang/spidermonkey/patches/patch-ad        Sun Dec 03 09:28:36 2006 +0000
+++ b/lang/spidermonkey/patches/patch-ad        Sun Dec 03 10:11:49 2006 +0000
@@ -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 -r 2847d1c87def -r 04c318f4dad1 lang/spidermonkey/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey/patches/patch-ae        Sun Dec 03 10:11:49 2006 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index