archlinux maintainer here,
It would be nice to have this get more priority.
1.8.5 has been released more then a month ago, and we're currently looking into moving to (spidermonkey) js 1.8.5 soon
edit: Applying the above patch still fails for me:
g++ -o scripting/engine_spidermonkey.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -DXP_UNIX -DHAVE_COMPARTMENTS -DHAVE_JS_GET_STRING_CHARS_AND_LENGTH -DJS_NEW_REG_EXP_OBJECT_NO_STATISTICS -I. scripting/engine_spidermonkey.cpp
In file included from /usr/include/js/jsobj.h:63:0,
/usr/include/js/jslock.h:47:21: fatal error: pratom.h: No such file or directory
The patch is incomplete.
mandriva patches their mongodb sconstruct file to read CPPFLAGS from the environment and they add export CPPFLAGS="`pkg-config --cflags mozjs185`" to the spec file.
This needs to get fixed in the upstream mongodb sconstruct file!