1 diff --git a/README b/README
5 1. The latest release notes for SpiderMonkey can be found at:
7 https://developer.mozilla.org/En/SpiderMonkey/1.8.5
10 2. js/jsd contains code for debugging support for the JavaScript engine in js/src.
15 +This release is based on revision 5f8f494a4c29 of https://hg.mozilla.org/releases/mozilla-2.0, with
16 +a few trivial changes applied to improve the manageability of the standalone-release. In addition
17 +to running autoconf 2.13 before bundling the release, the changes in the patches directory were
20 +This standalone release introduces a new, experimental, naming convention for the SpiderMonkey
21 +shared library. This naming convention will not be rolled back into the mainline Mozilla source
22 +tree, however the relevant patches are included with this distribution.
24 +Note: Please copy wes@page.ca on bugs related to packaging this standalone release.
26 +Linux and non-Mac OS X Unices
27 +-----------------------------
28 +Previous releases and the master source repositories build a shared library named libmozjs.so. In
29 +an effort to make version identification easier for embedders and OS distribution maintainers, this
30 +standalone release builds libmozjs185.so.1.0.0 (.dylib.1.0.0 on Mac OS X).
32 +libmozjs185 indicates that this is the SpiderMonkey library which implements JavaScript 1.8.5. The
33 +1.0.0 suffix is of the form major.minor.micro revision. While it is unlikely that more than one
34 +official source release for a given version of JavaScript will be published, it has happened in the
35 +past (e.g JS 1.4-1), and we want to provide clear direction in case there is a compelling need:
37 +* a change in major revision number indicates a change which is ABI and API incompatible with the
40 +* a change in minor revision number indicates a change which is ABI incompatible, but API
41 + compatible with the previous release,
43 +* a change in micro revision number indicates a change which is both ABI and API compatible with
44 + the previous release.
46 +A symbolic link will be provided linking libmoz185.js.so to this library, along with
47 +libmoz185.js.so.1.0 when building the install target.
49 +Most embeddings building on Unix or Linux should link against libmozjs185.so.1.0.
51 +The static library has been renamed, from libjs_static.a to libmozjs185-1.0.a.
55 +The versioning rules and symbolic links are the same as for the other flavours of Unix, but the
56 +library name is now libmozjs185.1.0.0.dylib.
58 +Most embeddings building on Mac OS X should link against libmozjs185.1.0.dylib.
62 +The versioning rules are the same as for Unix, but the the library name is now
63 +libmozjs185-1.0.dll. Symbolic links will not be created.
64 diff --git a/js/src/Makefile.in b/js/src/Makefile.in
65 --- a/js/src/Makefile.in
66 +++ b/js/src/Makefile.in
67 @@ -66,18 +66,25 @@ ifdef ENABLE_TESTS
76 +SRCREL_VERSION = 1.0.0
77 +SRCREL_ABI_VERSION := $(word 1,$(subst ., ,$(SRCREL_VERSION))).$(word 2,$(subst ., ,$(SRCREL_VERSION)))
81 +ifeq (,$(HOST_BIN_SUFFIX))
82 +LIBRARY_NAME = mozjs185
84 +LIBRARY_NAME = mozjs185-$(SRCREL_ABI_VERSION)
86 STATIC_LIBRARY_NAME = js_static
93 # icc gets special optimize flags
94 @@ -789,16 +796,17 @@ endif
96 # Compute the linker flags that programs linking against SpiderMonkey should
97 # pass to get SpiderMonkey and its dependencies, beyond just the -L and -l
98 # for the SpiderMonkey library itself.
99 # - EXTRA_DSO_LDOPTS includes the NSPR -L and -l flags.
100 # - OS_LIBS includes libraries selected by the configure script.
101 # - EXTRA_LIBS includes libraries selected by this Makefile.
102 JS_CONFIG_LIBS=$(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS)
103 +JS_CONFIG_MOZ_JS_LIBS=-L$(libdir) -l$(LIBRARY_NAME)
105 # The configure script invokes this rule explicitly at configure time!
106 # It's important that js-config be ready by the time we're done
107 # configuring, because we may be running other configure scripts that
108 # would like to run js-config themselves, before js is built.
110 # This file and rules.mk go through a certain amount of work to decide
111 # which libraries to build, what to name them, and what flags to pass
112 @@ -814,34 +822,80 @@ js-config: js-config.in Makefile $(DEPTH
113 -e 's|$(at)prefix$(at)|$(prefix)|' \
114 -e 's|$(at)exec_prefix$(at)|$(exec_prefix)|' \
115 -e 's|$(at)includedir$(at)|$(includedir)|' \
116 -e 's|$(at)libdir$(at)|$(libdir)|' \
117 -e 's|$(at)MOZILLA_VERSION$(at)|$(MOZILLA_VERSION)|' \
118 -e 's|$(at)LIBRARY_NAME$(at)|$(LIBRARY_NAME)|' \
119 -e 's|$(at)NSPR_CFLAGS$(at)|$(NSPR_CFLAGS)|' \
120 -e 's|$(at)JS_CONFIG_LIBS$(at)|$(JS_CONFIG_LIBS)|' \
121 - -e 's|$(at)MOZ_JS_LIBS$(at)|$(MOZ_JS_LIBS)|' \
122 + -e 's|$(at)MOZ_JS_LIBS$(at)|$(JS_CONFIG_MOZ_JS_LIBS)|' \
123 && mv js-config.tmp $@ && chmod +x $@
126 SDK_BINARY = js-config
128 +pkg_config_files = \
132 +GARBAGE += $(pkg_config_files)
134 +%.pc: $(srcdir)/%.pc.in Makefile
136 + -e "s|%prefix%|$(prefix)|" \
137 + -e "s|%includedir%|$(includedir)|" \
138 + -e "s|%libdir%|$(libdir)|" \
139 + -e 's|%MOZILLA_VERSION%|$(MOZILLA_VERSION)|' \
140 + > $@ && chmod 644 $@
142 +install:: $(pkg_config_files)
143 + @echo pkg_config_file: $(pkg_config_files)
144 + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig
146 install:: $(INSTALLED_HEADERS)
147 $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)
150 $(SYSINSTALL) $^ $(DESTDIR)$(bindir)
152 +ifeq (,$(HOST_BIN_SUFFIX))
153 +ifeq (.dylib,$(DLL_SUFFIX))
155 +SHLIB_ANY_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
156 +SHLIB_ABI_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY:$(DLL_SUFFIX)=.$(SRCREL_ABI_VERSION)$(DLL_SUFFIX))
157 +SHLIB_EXACT_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY:$(DLL_SUFFIX)=.$(SRCREL_VERSION)$(DLL_SUFFIX))
158 +$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -install_name $(SHLIB_ABI_VER)
159 +$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -current_version $(SRCREL_VERSION)
160 +$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -compatibility_version $(SRCREL_ABI_VERSION)
162 +# Generic Unix / Linux
163 +SHLIB_ANY_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
164 +SHLIB_ABI_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).$(SRCREL_ABI_VERSION)
165 +SHLIB_EXACT_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).$(SRCREL_VERSION)
166 +$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -Wl,-soname,$(notdir $(SHLIB_ABI_VER))
170 install:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
172 $(SYSINSTALL) $(LIBRARY) $(DESTDIR)$(libdir)
173 + mv -f $(DESTDIR)$(libdir)/$(LIBRARY) $(subst $(STATIC_LIBRARY_NAME),mozjs185-$(SRCREL_ABI_VERSION),$(DESTDIR)$(libdir)/$(LIBRARY))
175 ifneq (,$(SHARED_LIBRARY))
176 +ifeq (,$(HOST_BIN_SUFFIX))
177 + @[ ! -h $(SHLIB_ANY_VER) ] || rm -f $(SHLIB_ANY_VER)
179 $(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
180 +ifeq (,$(HOST_BIN_SUFFIX))
181 + mv -f $(SHLIB_ANY_VER) $(SHLIB_EXACT_VER)
182 + @[ ! -h $(SHLIB_ABI_VER) ] || rm -f $(SHLIB_ABI_VER)
183 + ln -s $(SHLIB_EXACT_VER) $(SHLIB_ABI_VER)
184 + ln -s $(SHLIB_ABI_VER) $(SHLIB_ANY_VER)
187 ifneq (,$(IMPORT_LIBRARY))
188 $(SYSINSTALL) $(IMPORT_LIBRARY) $(DESTDIR)$(libdir)
191 # Extra dependancies and rules for auto-generated headers
192 host_jskwgen.$(OBJ_SUFFIX): jsversion.h jskeyword.tbl
194 diff --git a/js/src/mozjs185.pc.in b/js/src/mozjs185.pc.in
197 +++ b/js/src/mozjs185.pc.in
201 +includedir=%includedir%
203 +Name: SpiderMonkey 1.8.5
204 +Description: The Mozilla library for JavaScript 1.8.5
205 +Version: %MOZILLA_VERSION%
206 +Requires: nspr >= 4.7
207 +Libs: -L${libdir} -lmozjs185
208 +Cflags: -I${includedir}/js