[mongodb/f15] Fix the js 1.8.5 patch to work properly
Chris Lalancette
clalance at fedoraproject.org
Fri Jul 29 11:54:43 UTC 2011
commit 117d484dd1819fc2978f0d8bfab455ae4a03d307
Author: Chris Lalancette <clalance at redhat.com>
Date: Fri Jul 29 06:51:52 2011 -0400
Fix the js 1.8.5 patch to work properly
Signed-off-by: Chris Lalancette <clalance at redhat.com>
mongodb-no-term.patch | 12 +++++++
mongodb-src-r1.8.0-js.patch | 78 ++++++++++++++++++++++++++++++++++---------
mongodb.spec | 7 +++-
3 files changed, 80 insertions(+), 17 deletions(-)
---
diff --git a/mongodb-no-term.patch b/mongodb-no-term.patch
new file mode 100644
index 0000000..681912b
--- /dev/null
+++ b/mongodb-no-term.patch
@@ -0,0 +1,12 @@
+diff -urp mongodb-src-r1.8.0.orig/SConstruct mongodb-src-r1.8.0/SConstruct
+--- mongodb-src-r1.8.0.orig/SConstruct 2011-03-16 11:33:30.000000000 -0400
++++ mongodb-src-r1.8.0/SConstruct 2011-07-01 11:29:41.966707723 -0400
+@@ -679,7 +679,7 @@ if nix:
+
+ #make scons colorgcc friendly
+ env['ENV']['HOME'] = os.environ['HOME']
+- env['ENV']['TERM'] = os.environ['TERM']
++ #env['ENV']['TERM'] = os.environ['TERM']
+
+ if linux and has_option( "sharedclient" ):
+ env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
diff --git a/mongodb-src-r1.8.0-js.patch b/mongodb-src-r1.8.0-js.patch
index f8872ac..e22e867 100644
--- a/mongodb-src-r1.8.0-js.patch
+++ b/mongodb-src-r1.8.0-js.patch
@@ -1,6 +1,6 @@
-diff -up mongodb-src-r1.8.0/SConstruct.js185 mongodb-src-r1.8.0/SConstruct
---- mongodb-src-r1.8.0/SConstruct.js185 2011-03-16 16:33:30.000000000 +0100
-+++ mongodb-src-r1.8.0/SConstruct 2011-04-28 18:04:57.790238020 +0200
+diff -urp mongodb-src-r1.8.0.orig/SConstruct mongodb-src-r1.8.0/SConstruct
+--- mongodb-src-r1.8.0.orig/SConstruct 2011-03-16 11:33:30.000000000 -0400
++++ mongodb-src-r1.8.0/SConstruct 2011-07-29 07:40:22.058221021 -0400
@@ -668,10 +668,9 @@ if nix:
if has_option( "distcc" ):
env["CXX"] = "distcc " + env["CXX"]
@@ -22,9 +22,18 @@ diff -up mongodb-src-r1.8.0/SConstruct.js185 mongodb-src-r1.8.0/SConstruct
#env.Append( CPPFLAGS=" -fprofile-generate" )
#env.Append( LINKFLAGS=" -fprofile-generate" )
# then:
-diff -up mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp.js185 mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp
---- mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp.js185 2011-03-16 16:33:30.000000000 +0100
-+++ mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp 2011-04-28 18:04:57.744239178 +0200
+@@ -917,6 +916,8 @@ def doConfigure( myenv , needPcre=True ,
+ if not conf.CheckHeader( mozHeader + "/jsapi.h" ):
+ if conf.CheckHeader( "jsapi.h" ):
+ myenv.Append( CPPDEFINES=[ "OLDJS" ] )
++ elif conf.CheckHeader( "js/jsapi.h" ):
++ pass
+ else:
+ print( "no spider monkey headers!" )
+ Exit(1)
+diff -urp mongodb-src-r1.8.0.orig/scripting/engine_spidermonkey.cpp mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp
+--- mongodb-src-r1.8.0.orig/scripting/engine_spidermonkey.cpp 2011-03-16 11:33:30.000000000 -0400
++++ mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp 2011-07-29 07:39:41.404804311 -0400
@@ -192,35 +192,18 @@ namespace mongo {
}
@@ -102,6 +111,33 @@ diff -up mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp.js185 mongodb-src-
case MinKey:
return OBJECT_TO_JSVAL( JS_NewObject( _context , &minkey_class , 0 , 0 ) );
+@@ -782,7 +769,7 @@ namespace mongo {
+ *statep = PRIVATE_TO_JSVAL( it );
+ }
+ else {
+- *statep = 0;
++ *statep = PRIVATE_TO_JSVAL( NULL );
+ }
+ if ( idp )
+ *idp = JSVAL_ZERO;
+@@ -791,7 +778,7 @@ namespace mongo {
+
+ BSONFieldIterator * it = (BSONFieldIterator*)JSVAL_TO_PRIVATE( *statep );
+ if ( ! it ) {
+- *statep = 0;
++ *statep = JSVAL_NULL;
+ return JS_TRUE;
+ }
+
+@@ -803,7 +790,7 @@ namespace mongo {
+ }
+ else {
+ delete it;
+- *statep = 0;
++ *statep = JSVAL_NULL;
+ }
+ return JS_TRUE;
+ }
@@ -818,7 +805,7 @@ namespace mongo {
return JS_FALSE;
}
@@ -436,10 +472,10 @@ diff -up mongodb-src-r1.8.0/scripting/engine_spidermonkey.cpp.js185 mongodb-src-
}
-diff -up mongodb-src-r1.8.0/scripting/engine_spidermonkey.h.js185 mongodb-src-r1.8.0/scripting/engine_spidermonkey.h
---- mongodb-src-r1.8.0/scripting/engine_spidermonkey.h.js185 2011-03-16 16:33:30.000000000 +0100
-+++ mongodb-src-r1.8.0/scripting/engine_spidermonkey.h 2011-04-28 18:04:57.745239153 +0200
-@@ -42,9 +42,9 @@
+diff -urp mongodb-src-r1.8.0.orig/scripting/engine_spidermonkey.h mongodb-src-r1.8.0/scripting/engine_spidermonkey.h
+--- mongodb-src-r1.8.0.orig/scripting/engine_spidermonkey.h 2011-03-16 11:33:30.000000000 -0400
++++ mongodb-src-r1.8.0/scripting/engine_spidermonkey.h 2011-07-29 07:40:38.525581158 -0400
+@@ -42,16 +42,16 @@
#endif
#include "jsapi.h"
@@ -452,6 +488,16 @@ diff -up mongodb-src-r1.8.0/scripting/engine_spidermonkey.h.js185 mongodb-src-r1
#else
+ #include "js/jsapi.h"
+-#include "js/jsobj.h"
+-#include "js/jsdate.h"
+-#include "js/jsregexp.h"
++//#include "js/jsobj.h"
++//#include "js/jsdate.h"
++//#include "js/jsregexp.h"
+
+ #endif
+
@@ -104,7 +104,7 @@ namespace mongo {
extern boost::thread_specific_ptr<SMScope> currentScope;
@@ -461,9 +507,9 @@ diff -up mongodb-src-r1.8.0/scripting/engine_spidermonkey.h.js185 mongodb-src-r1
// mongo
-diff -up mongodb-src-r1.8.0/scripting/sm_db.cpp.js185 mongodb-src-r1.8.0/scripting/sm_db.cpp
---- mongodb-src-r1.8.0/scripting/sm_db.cpp.js185 2011-03-16 16:33:30.000000000 +0100
-+++ mongodb-src-r1.8.0/scripting/sm_db.cpp 2011-04-28 18:11:33.533699599 +0200
+diff -urp mongodb-src-r1.8.0.orig/scripting/sm_db.cpp mongodb-src-r1.8.0/scripting/sm_db.cpp
+--- mongodb-src-r1.8.0.orig/scripting/sm_db.cpp 2011-03-16 11:33:30.000000000 -0400
++++ mongodb-src-r1.8.0/scripting/sm_db.cpp 2011-07-29 07:39:41.433803178 -0400
@@ -22,6 +22,9 @@
#include "../util/text.h"
#include "../util/hex.h"
@@ -1160,9 +1206,9 @@ diff -up mongodb-src-r1.8.0/scripting/sm_db.cpp.js185 mongodb-src-r1.8.0/scripti
#endif
}
-diff -up mongodb-src-r1.8.0/shell/mongo_vstudio.cpp.js185 mongodb-src-r1.8.0/shell/mongo_vstudio.cpp
---- mongodb-src-r1.8.0/shell/mongo_vstudio.cpp.js185 2011-03-16 16:33:30.000000000 +0100
-+++ mongodb-src-r1.8.0/shell/mongo_vstudio.cpp 2011-04-28 18:05:13.034854805 +0200
+diff -urp mongodb-src-r1.8.0.orig/shell/mongo_vstudio.cpp mongodb-src-r1.8.0/shell/mongo_vstudio.cpp
+--- mongodb-src-r1.8.0.orig/shell/mongo_vstudio.cpp 2011-03-16 11:33:30.000000000 -0400
++++ mongodb-src-r1.8.0/shell/mongo_vstudio.cpp 2011-07-29 07:39:41.487801073 -0400
@@ -2253,8 +2253,8 @@ const StringData _jscode_raw_db =
"}\n"
"}\n"
diff --git a/mongodb.spec b/mongodb.spec
index 6a12382..026e3df 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -4,7 +4,7 @@
%global daemon mongod
Name: mongodb
Version: 1.8.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: High-performance, schema-free document-oriented database
Group: Applications/Databases
License: AGPLv3 and zlib and ASL 2.0
@@ -20,6 +20,7 @@ Source3: %{name}.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: mongodb-src-r1.8.0-js.patch
+Patch1: mongodb-no-term.patch
BuildRequires: python-devel
BuildRequires: scons
@@ -91,6 +92,7 @@ software, default configuration files, and init scripts.
%prep
%setup -q -n mongodb-src-r%{version}
%patch0 -p1 -b .js185
+%patch1 -p1
# spurious permissions
chmod -x README
@@ -210,6 +212,9 @@ fi
%{_includedir}/mongo
%changelog
+* Fri Jul 29 2011 Chris Lalancette <clalance at redhat.com> - 1.8.0-4
+- Fix the js 1.8.5 patch to work properly
+
* Thu Apr 28 2011 Martin Stransky <stransky at redhat.com> - 1.8.0-3
- Build with js 1.8.5
More information about the scm-commits
mailing list