Anonymous avatar Anonymous committed e5248c7

Make this build on 10.6

I had to do some hackery to get this building on 10.6 with Homebrew. I
mostly hacked together a fake nspr.pc and dropped it in [1] so that
the pkgconfig stuff in would work. There's a copy of this
file in the "extra" directory in this repo. I also added a patch
for the va_copy like MacPorts does.

If anyone would like to tear out the embedded copy of Spidermonkey
that this package ships with and update the build system to use
either what Homebrew installs or is found in the xulrunner package
on Ubuntu, that would be awesome.

[1] /usr/local/lib/pkgconfig/nspr.c

Comments (0)

Files changed (3)

+Name: nspr
+Description: nspr library
+Version: 4.8.6
+Libs: -L${libdir} -lplds4 -lplc4 -lnspr4
+Cflags: -I${includedir}/nspr


 #ifdef HAVE_VA_COPY
 #define VARARGS_ASSIGN(foo, bar)        VA_COPY(foo,bar)
+#elif defined(va_copy)
+#define VARARGS_ASSIGN(foo, bar)        va_copy(foo,bar)
 #elif defined(HAVE_VA_LIST_AS_ARRAY)
 #define VARARGS_ASSIGN(foo, bar)        foo[0] = bar[0]


 import t
 import traceback
-ERROR = 'File "<JavaScript>", line 1, in ' \
-        'SyntaxError: missing ) after formal parameters'
 def test_syntax_error(cx):
-    try:
-        cx.execute("function(asdf;")
-        t.eq(1, 0)
-    except:
-        line = traceback.format_exc().split("\n")[-3].strip()
-        t.eq(line, ERROR)
+    t.raises(t.JSError, cx.execute, "function(asdf;")
 def test_invalid_octal(cx):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.