Description: Remove rpath from buildscripts/hacks_ubuntu.py
 With the xulwrapper change, rpath has been removed from all aspects 
 and buildscripts/hacks_ubuntu.py has been changed to make the tests
 work in a similar manner to the xulwrapper script.
Author: Clint Byrum <clint@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/557024

---

--- mongodb-1.6.3.orig/buildscripts/hacks_ubuntu.py
+++ mongodb-1.6.3/buildscripts/hacks_ubuntu.py
@@ -36,7 +36,6 @@ def foundxulrunner( env , options ):
         return False
     
     env.Prepend( LIBPATH=[ libroot ] )
-    env.Prepend( RPATH=[ libroot ] )
 
     env.Prepend( CPPPATH=[ incroot + "stable/" , 
                            incroot + "unstable/" ,
@@ -44,6 +43,13 @@ def foundxulrunner( env , options ):
     env.Prepend( CPPPATH=[ "/usr/include/nspr/" ] )
     
     env.Append( CPPDEFINES=[ "XULRUNNER" , "OLDJS" ] )
+
+    # Needed to run tests
+    env.AppendENVPath('LD_LIBRARY_PATH', libroot)
+
+    # Needed to run tests
+    env.AppendENVPath('LD_LIBRARY_PATH', libroot)
+
     if best.find( "1.9.0" ) >= 0 or best.endswith("1.9"):
         if best.endswith( "1.9.1.9" ):
             pass
