[weasel-commit] Source: spidermonkey=1.7.0-1

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Tue, 29 Jun 2010 16:46:14 -0400

================================
spidermonkey:source=1.7.0-1
cvc rdiff spidermonkey -1 /weasel.rpath.org@wgl:3-devel/1.7.0-1
================================
1.7.0-1 Filip Brcic (brcha@xxxxxxxxxxxx) Tue Jun 29 16:45:41 2010
    spidermonkey 1.7.0

js-1.7.0.tar.gz: new
spidermonkey-1.7.0-threadsafe.diff: new
--- /dev/null
+++ spidermonkey-1.7.0-threadsafe.diff
@@ -0,0 +18 @@
+Index: src/Makefile.ref
+===================================================================
+--- src.orig/Makefile.ref
++++ src/Makefile.ref
+@@ -63,11 +63,11 @@ INCLUDES   += -I$(OBJDIR)
+ 
+ ifdef JS_THREADSAFE
+ DEFINES += -DJS_THREADSAFE
+-INCLUDES += -I$(DIST)/include/nspr
++INCLUDES += -I/usr/include/nspr
+ ifdef USE_MSVC
+ OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib
+ else
+-OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX)
++OTHER_LIBS += -L/usr/$(LIBDIR)/nspr -lnspr$(NSPR_LIBSUFFIX)
+ endif
+ endif
+ 

spidermonkey-1.5-build.patch: new
--- /dev/null
+++ spidermonkey-1.5-build.patch
@@ -0,0 +138 @@
+--- js/src/Makefile.ref
++++ js/src/Makefile.ref
+@@ -127,7 +127,7 @@ endif 
+ ifdef JS_READLINE
+ # For those platforms with the readline library installed.
+ DEFINES += -DEDITLINE
+-PROG_LIBS += -lreadline -ltermcap
++PROG_LIBS += -lreadline
+ else
+ ifdef JS_EDITLINE
+ # Use the editline library, built locally.
+@@ -370,3 +370,16 @@ TARFILES = files `cat files`
+ SUFFIXES: .i
+ %.i: %.c
+       $(CC) -C -E $(CFLAGS) $< > $*.i
++
++DESTDIR :=
++PREFIX := /usr
++BINDIR := $(PREFIX)/bin
++MY_LIBDIR := $(PREFIX)/$(LIBDIR)
++INCLUDEDIR := $(PREFIX)/include/js
++INSTALL := install -g 0 -o root
++install:
++      $(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(MY_LIBDIR) 
$(DESTDIR)$(BINDIR)
++      $(INSTALL) -m 755 $(SHARED_LIBRARY) $(DESTDIR)$(MY_LIBDIR)
++      $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(MY_LIBDIR)
++      $(INSTALL) -m 755 $(OBJDIR)/js $(OBJDIR)/jscpucfg $(DESTDIR)$(BINDIR)
++      $(INSTALL) -m 644 $(HFILES) $(DESTDIR)$(INCLUDEDIR)
+--- js/src/config/Linux_All.mk
++++ js/src/config/Linux_All.mk
+@@ -41,37 +41,15 @@
+ # Config for all versions of Linux
+ #
+ 
+-CC = gcc
+-CCC = g++
+ CFLAGS +=  -Wall -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE 
-DHAVE_LOCALTIME_R
+ 
+ RANLIB = echo
+-MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS)
++MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) -soname $(notdir $@)
+ 
+ #.c.o:
+ #      $(CC) -c -MD $*.d $(CFLAGS) $<
+ 
+-CPU_ARCH = $(shell uname -m)
+-# don't filter in x86-64 architecture
+-ifneq (x86_64,$(CPU_ARCH))
+-ifeq (86,$(findstring 86,$(CPU_ARCH)))
+-CPU_ARCH = x86
+-OS_CFLAGS+= -DX86_LINUX
+-
+-ifeq (gcc, $(CC))
+-# if using gcc on x86, check version for opt bug 
+-# (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
+-endif
+-endif
+-endif
+-
+ GFX_ARCH = x
+ 
+ OS_LIBS = -lm -lc
+@@ -88,16 +66,6 @@
+ endif
+ 
+ # Use the editline library to provide line-editing support.
+-JS_EDITLINE = 1
++JS_READLINE = 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/src/rules.mk
++++ js/src/rules.mk
+@@ -82,6 +82,10 @@ $(OBJDIR)/%.o: %.c
+       @$(MAKE_OBJDIR)
+       $(CC) -o $@ -c $(CFLAGS) $*.c
+ 
++$(OBJDIR)/%.lo: %.c
++      @$(MAKE_OBJDIR)
++      $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC
++
+ $(OBJDIR)/%.o: %.s
+       @$(MAKE_OBJDIR)
+       $(AS) -o $@ $(ASFLAGS) $*.s
+@@ -111,11 +115,12 @@ $(SHARED_LIBRARY): $(LIB_OBJS)
+           /implib:"$(OBJDIR)/$(@F:.dll=.lib)" $^
+ else
+ $(LIBRARY): $(LIB_OBJS)
+-      $(AR) rv $@ $?
++      $(AR) cr $@ $?
+       $(RANLIB) $@
+ 
+-$(SHARED_LIBRARY): $(LIB_OBJS)
+-      $(MKSHLIB) -o $@ $(LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
++SHARED_LIB_OBJS := $(LIB_OBJS:.o=.lo)
++$(SHARED_LIBRARY): $(SHARED_LIB_OBJS)
++      $(MKSHLIB) -o $@ $(SHARED_LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
+ endif
+ endif
+ 
+--- js/src/fdlibm/Makefile.ref
++++ js/src/fdlibm/Makefile.ref
+@@ -151,7 +151,7 @@
+ 
+ $(OBJDIR)/%.o: %.c
+       @$(MAKE_OBJDIR)
+-      $(CC) -o $@ -c $(CFLAGS) $*.c
++      $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC
+ 
+ $(OBJDIR)/%.o: %.s
+       @$(MAKE_OBJDIR)
+--- js/src/config.mk
++++ js/src/config.mk
+@@ -112,6 +112,8 @@
+ CP = cp
+ endif
+ 
++BUILD_OPT := 1
++
+ ifdef BUILD_OPT
+ OPTIMIZER  = -O
+ DEFINES    += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami)

spidermonkey-1.6-header.patch: new
--- /dev/null
+++ spidermonkey-1.6-header.patch
@@ -0,0 +13 @@
+Index: src/Makefile.ref
+===================================================================
+--- src.orig/Makefile.ref
++++ src/Makefile.ref
+@@ -185,6 +185,8 @@ JS_HFILES =                \
+       jsstr.h         \
+       jsxdrapi.h      \
+       jsxml.h         \
++      jsutil.h        \
++      jsprf.h         \
+       $(NULL)
+ 
+ API_HFILES =          \

spidermonkey.recipe: new
--- /dev/null
+++ spidermonkey.recipe
@@ -0,0 +52 @@
+#
+# Copyright (c) 2010 Weasel GNU/Linux [Filip Brcic (brcha@xxxxxxxxxxxx)]
+# Distributed under the terms of the GNU General Public License v3
+#
+
+class Spidermonkey(CPackageRecipe):
+    name = 'spidermonkey'
+    version = '1.7.0'
+
+    buildRequires = [
+        'nspr:devel', 'readline:devel',
+        ]
+
+    shortDesc  = 'Stand-alone JavaScript C library'
+    longDesc   = """
+SpiderMonkey is the code-name for the Mozilla's C implementation of JavaScript.
+"""
+    url        = 'http://www.mozilla.org/js/spidermonkey/'
+    licenses   = [ 'NPL-1.1' ]
+    categories = [ 'Development/Languages' ]
+
+    def setup(r):
+        r.macros.archive_name = 'js'
+        r.addArchive('ftp://ftp.mozilla.org/pub/mozilla.org/js/')
+
+        r.addPatch('spidermonkey-1.5-build.patch')
+        r.addPatch('spidermonkey-1.6-header.patch')
+        r.addPatch('spidermonkey-1.7.0-threadsafe.diff')
+
+        # Disable setting uid and gid by install
+        r.Replace('install -g 0 -o root', 'install',
+                  'src/Makefile.ref')
+
+        r.disableParallelMake()
+
+        r.Make(
+            ' -f Makefile.ref'
+            ' LIBDIR="%(lib)s"'
+            ' JS_THREADSAFE=1'
+            , dir='src'
+            )
+
+        r.MakeInstall(
+            ' -f Makefile.ref'
+            ' LIBDIR="%(lib)s"'
+            , dir='src'
+            )
+
+        r.AutoDoc(exceptions='.*')
+
+        r.Doc('jsd/README')
+        r.Doc('src/README.html', dir='html')


Committed by: brcha

Other related posts: