[21088] trunk/dports/lang/spidermonkey
source_changes at macosforge.org
source_changes at macosforge.org
Sun Dec 31 09:24:37 PST 2006
Revision: 21088
http://trac.macosforge.org/projects/macports/changeset/21088
Author: markd at macports.org
Date: 2006-12-31 09:24:37 -0800 (Sun, 31 Dec 2006)
Log Message:
-----------
Closes #10914. Adds all headers and enables threadsafe support.
Modified Paths:
--------------
trunk/dports/lang/spidermonkey/Portfile
Added Paths:
-----------
trunk/dports/lang/spidermonkey/files/
trunk/dports/lang/spidermonkey/files/patch-config-Darwin.mk
trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-build.patch
trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-header.diff
trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-threadsafe.diff
Modified: trunk/dports/lang/spidermonkey/Portfile
===================================================================
--- trunk/dports/lang/spidermonkey/Portfile 2006-12-31 17:17:45 UTC (rev 21087)
+++ trunk/dports/lang/spidermonkey/Portfile 2006-12-31 17:24:37 UTC (rev 21088)
@@ -4,7 +4,7 @@
name spidermonkey
version 1.5
-revision 1
+revision 2
categories lang
platforms darwin
maintainers nomaintainer at macports.org
@@ -18,19 +18,26 @@
distname js-${version}
checksums md5 863bb6462f4ce535399a7c6276ae6776
+depends_build port:readline \
+ port:nspr
worksrcdir js/src
+patchfiles spidermonkey-1.5-build.patch \
+ spidermonkey-1.5-threadsafe.diff \
+ spidermonkey-1.5-header.diff \
+ patch-config-Darwin.mk
+
+post-patch {
+ reinplace "s|__PREFIX__|${prefix}|g" \
+ ${worksrcpath}/Makefile.ref
+}
+
use_configure no
-build.args -f Makefile.ref
+build.args -j1 -f Makefile.ref LIBDIR="/lib" SO_SUFFIX=dylib JS_THREADSAFE=1
+
post-build {
- system "ranlib ${worksrcpath}//Darwin_DBG.OBJ/libjs.a"
+ system "ranlib ${worksrcpath}/Darwin_OPT.OBJ/libjs.a"
}
-destroot {
- xinstall -m 755 -d ${destroot}${prefix}/include/${name}
- xinstall -m 755 ${worksrcpath}/Darwin_DBG.OBJ/js ${destroot}${prefix}/bin
- xinstall -m 644 -W ${worksrcpath} jsapi.h Darwin_DBG.OBJ/jsautocfg.h \
- ${destroot}${prefix}/include/${name}
- xinstall -m 644 ${worksrcpath}/Darwin_DBG.OBJ/libjs.a ${destroot}${prefix}/lib
-}
+destroot.args -f Makefile.ref LIBDIR="/lib" SO_SUFFIX=dylib
Added: trunk/dports/lang/spidermonkey/files/patch-config-Darwin.mk
===================================================================
--- trunk/dports/lang/spidermonkey/files/patch-config-Darwin.mk (rev 0)
+++ trunk/dports/lang/spidermonkey/files/patch-config-Darwin.mk 2006-12-31 17:24:37 UTC (rev 21088)
@@ -0,0 +1,45 @@
+$NetBSD: patch-ac,v 1.2 2006/12/05 18:04:18 tron Exp $
+
+--- config/Darwin.mk.orig 2005-02-12 20:10:33.000000000 +0000
++++ config/Darwin.mk 2006-12-05 16:41:04.000000000 +0000
+@@ -43,13 +43,13 @@
+ # Just ripped from Linux config
+ #
+
+-CC = cc
++CC = gcc
+ CCC = g++
+-CFLAGS += -Wall -Wno-format
+-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
+
+ RANLIB = ranlib
+-MKSHLIB = libtool $(XMKSHLIBOPTS) -framework System
++MKSHLIB = $(CC) -framework System -dynamiclib $(XMKSHLIBOPTS) -lm -lplds4 -lplc4 -lnspr4 $(LDFLAGS)
+
+ #.c.o:
+ # $(CC) -c -MD $*.d $(CFLAGS) $<
+@@ -57,7 +57,6 @@
+ CPU_ARCH = $(shell uname -m)
+ ifeq (86,$(findstring 86,$(CPU_ARCH)))
+ CPU_ARCH = x86
+-OS_CFLAGS+= -DX86_LINUX
+ endif
+ GFX_ARCH = x
+
+@@ -65,14 +64,6 @@
+
+ ASFLAGS += -x assembler-with-cpp
+
+-ifeq ($(CPU_ARCH),alpha)
+-
+-# Ask the C compiler on alpha linux to let us work with denormalized
+-# double values, which are required by the ECMA spec.
+-
+-OS_CFLAGS += -mieee
+-endif
+-
+ # Use the editline library to provide line-editing support.
+ JS_EDITLINE = 1
+
Property changes on: trunk/dports/lang/spidermonkey/files/patch-config-Darwin.mk
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-build.patch
===================================================================
--- trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-build.patch (rev 0)
+++ trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-build.patch 2006-12-31 17:24:37 UTC (rev 21088)
@@ -0,0 +1,138 @@
+--- Makefile.ref.org
++++ 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 := __PREFIX__
++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)
+--- config/Linux_All.mk.org
++++ 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
+--- rules.mk.org
++++ 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) -install_name $(PREFIX)/lib/$(notdir $@)
+ endif
+ endif
+
+--- fdlibm/Makefile.ref.org
++++ 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)
+--- config.mk.org
++++ config.mk
+@@ -112,6 +112,8 @@
+ CP = cp
+ endif
+
++BUILD_OPT := 1
++
+ ifdef BUILD_OPT
+ OPTIMIZER = -O
+ DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami)
Property changes on: trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-build.patch
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-header.diff
===================================================================
--- trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-header.diff (rev 0)
+++ trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-header.diff 2006-12-31 17:24:37 UTC (rev 21088)
@@ -0,0 +1,11 @@
+--- Makefile.ref.orig 2006-03-06 00:42:57.000000000 +0100
++++ Makefile.ref 2006-03-06 00:43:24.000000000 +0100
+@@ -179,6 +179,8 @@
+ jsscript.h \
+ jsstr.h \
+ jsxdrapi.h \
++ jsutil.h \
++ jsprf.h \
+ $(NULL)
+
+ API_HFILES = \
Property changes on: trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-header.diff
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-threadsafe.diff
===================================================================
--- trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-threadsafe.diff (rev 0)
+++ trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-threadsafe.diff 2006-12-31 17:24:37 UTC (rev 21088)
@@ -0,0 +1,16 @@
+--- Makefile.ref.orig 2006-03-06 03:31:04.000000000 +0000
++++ Makefile.ref 2006-03-06 03:33:03.000000000 +0000
+@@ -61,11 +61,11 @@
+
+ ifdef JS_THREADSAFE
+ DEFINES += -DJS_THREADSAFE
+-INCLUDES += -I../../dist/$(OBJDIR)/include
++INCLUDES += -I__PREFIX__/include/nspr
+ ifdef USE_MSVC
+ OTHER_LIBS += ../../dist/$(OBJDIR)/lib/libnspr${NSPR_LIBSUFFIX}.lib
+ else
+-OTHER_LIBS += -L../../dist/$(OBJDIR)/lib -lnspr${NSPR_LIBSUFFIX}
++OTHER_LIBS += -L__PREFIX__$(LIBDIR) -lnspr${NSPR_LIBSUFFIX}
+ endif
+ endif
+
Property changes on: trunk/dports/lang/spidermonkey/files/spidermonkey-1.5-threadsafe.diff
___________________________________________________________________
Name: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20061231/1b6abf11/attachment.html
More information about the macports-changes
mailing list