[Pkg-javascript-commits] [node-leveldown] 15/492: mac build, linux flags

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit febbc328560076421d0b3f33de33dfe099a242fc
Author: Rod Vagg <rod at vagg.org>
Date:   Tue Aug 14 12:30:12 2012 +1000

    mac build, linux flags
---
 deps/leveldb/leveldb.gyp | 19 +++++++++++++++++++
 package.json             |  2 +-
 src/async.cc             |  2 +-
 src/async.h              |  2 +-
 src/batch.cc             |  2 +-
 src/batch.h              |  2 +-
 src/database.cc          |  2 +-
 src/database.h           |  2 +-
 src/database_async.cc    |  2 +-
 src/database_async.h     |  2 +-
 src/iterator.cc          |  2 +-
 src/iterator.h           |  2 +-
 src/iterator_async.cc    |  2 +-
 src/iterator_async.h     |  2 +-
 src/levelup.cc           |  2 +-
 src/levelup.h            |  2 +-
 test/common.js           | 14 ++++++++------
 17 files changed, 42 insertions(+), 21 deletions(-)

diff --git a/deps/leveldb/leveldb.gyp b/deps/leveldb/leveldb.gyp
index eabe01d..e87f9bd 100644
--- a/deps/leveldb/leveldb.gyp
+++ b/deps/leveldb/leveldb.gyp
@@ -20,6 +20,25 @@
           'leveldb-1.5.0/port/win',
         ],
       }],
+      ['OS == "linux"', {
+        'defines': [
+          'OS_LINUX=1',
+        ],
+        'CCFLAGS': [
+          '-fno-builtin-memcmp',
+          '-pthread',
+          '-fPIC',
+        ],
+      }],
+      ['OS == "mac"', {
+        'defines': [
+          'OS_MACOSX=1',
+        ],
+        'CCFLAGS': [
+          '-fno-builtin-memcmp',
+          '-fPIC',
+        ],
+      }],
     ],
   },
   'targets': [
diff --git a/package.json b/package.json
index bce386e..d411e8e 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
   , "version"         : "0.0.0"
   , "main"            : "lib/levelup.js"
   , "dependencies"    : {
-        "errno"         : "*"
+        "errno"         : ">=0.0.2"
       , "inherits"      : "~1.0.0"
       , "bindings"      : "~1.0.0"
     }
diff --git a/src/async.cc b/src/async.cc
index a298100..bbb9642 100644
--- a/src/async.cc
+++ b/src/async.cc
@@ -60,4 +60,4 @@ void AsyncExecuteComplete (uv_work_t* req) {
 
 void AsyncQueueWorker (AsyncWorker* worker) {
   uv_queue_work(uv_default_loop(), &worker->request, AsyncExecute, AsyncExecuteComplete);
-}
\ No newline at end of file
+}
diff --git a/src/async.h b/src/async.h
index e01e995..e660781 100644
--- a/src/async.h
+++ b/src/async.h
@@ -39,4 +39,4 @@ void AsyncExecute (uv_work_t* req);
 void AsyncExecuteComplete (uv_work_t* req);
 void AsyncQueueWorker (AsyncWorker* worker);
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/batch.cc b/src/batch.cc
index dbd91d0..26b4057 100644
--- a/src/batch.cc
+++ b/src/batch.cc
@@ -24,4 +24,4 @@ BatchWrite::~BatchWrite () {
 
 void BatchWrite::Execute (WriteBatch* batch) {
   batch->Put(key, value);
-}
\ No newline at end of file
+}
diff --git a/src/batch.h b/src/batch.h
index e6cf1ff..50f791e 100644
--- a/src/batch.h
+++ b/src/batch.h
@@ -51,4 +51,4 @@ private:
   Persistent<Object> valuePtr;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/database.cc b/src/database.cc
index 40d12c0..09f1055 100644
--- a/src/database.cc
+++ b/src/database.cc
@@ -289,4 +289,4 @@ Handle<Value> Database::Iterator (const Arguments& args) {
 Handle<Value> CreateDatabase (const Arguments& args) {
   HandleScope scope;
   return scope.Close(Database::NewInstance(args));
-}
\ No newline at end of file
+}
diff --git a/src/database.h b/src/database.h
index b6cf642..a16cc9f 100644
--- a/src/database.h
+++ b/src/database.h
@@ -50,4 +50,4 @@ private:
 //  LU_V8_METHOD( Iterator )
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/database_async.cc b/src/database_async.cc
index c5ed6a3..5076929 100644
--- a/src/database_async.cc
+++ b/src/database_async.cc
@@ -150,4 +150,4 @@ void IteratorWorker::Execute () {
 cout<< "IT execute" << endl;
   status = database->Iterator(options, start, end, this, &dataCallbackProxy);
 }
-*/
\ No newline at end of file
+*/
diff --git a/src/database_async.h b/src/database_async.h
index 17fcfc7..da17e17 100644
--- a/src/database_async.h
+++ b/src/database_async.h
@@ -165,4 +165,4 @@ private:
   vector<BatchOp*>     operations;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/iterator.cc b/src/iterator.cc
index d684a3c..4be1f28 100644
--- a/src/iterator.cc
+++ b/src/iterator.cc
@@ -117,4 +117,4 @@ Handle<Value> levelup::Iterator::New (const Arguments& args) {
 Handle<Value> levelup::CreateIterator (const Arguments& args) {
   HandleScope scope;
   return scope.Close(levelup::Iterator::NewInstance(args));
-}
\ No newline at end of file
+}
diff --git a/src/iterator.h b/src/iterator.h
index afa0fdd..0b4f4ad 100644
--- a/src/iterator.h
+++ b/src/iterator.h
@@ -63,4 +63,4 @@ private:
 
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/iterator_async.cc b/src/iterator_async.cc
index aec76b4..34a645d 100644
--- a/src/iterator_async.cc
+++ b/src/iterator_async.cc
@@ -38,4 +38,4 @@ void NextWorker::HandleOKCallback () {
 
 void EndWorker::Execute () {
   iterator->IteratorEnd();
-}
\ No newline at end of file
+}
diff --git a/src/iterator_async.h b/src/iterator_async.h
index 6c6b437..3d265b5 100644
--- a/src/iterator_async.h
+++ b/src/iterator_async.h
@@ -56,4 +56,4 @@ private:
   levelup::Iterator*   iterator;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/levelup.cc b/src/levelup.cc
index 30616ea..e9e27d6 100644
--- a/src/levelup.cc
+++ b/src/levelup.cc
@@ -27,4 +27,4 @@ const char* ToCString(const v8::String::Utf8Value& value) {
 }
 const char* ToCString(const v8::String::AsciiValue& value) {
   return *value ? *value : "<string conversion failed>";
-}
\ No newline at end of file
+}
diff --git a/src/levelup.h b/src/levelup.h
index 9be2139..dc7aeb3 100644
--- a/src/levelup.h
+++ b/src/levelup.h
@@ -12,4 +12,4 @@
 const char* ToCString(const v8::String::Utf8Value& value);
 const char* ToCString(const v8::String::AsciiValue& value);
 
-#endif
\ No newline at end of file
+#endif
diff --git a/test/common.js b/test/common.js
index a7f9b52..f3768af 100644
--- a/test/common.js
+++ b/test/common.js
@@ -67,12 +67,14 @@ global.checkBinaryTestData = function (testData, callback) {
   var fname = '__tst.dat.' + Math.random()
   fs.writeFile(fname, testData, function (err) {
     refute(err)
-    child_process.exec('md5sum ' + fname, function (err, stdout, stderr) {
-      refute(err)
-      refute(stderr)
-      var md5Sum = stdout.split(' ')[0]
-      assert.equals(md5Sum, global.binaryTestDataMD5Sum)
-      fs.unlink(fname, callback)
+    child_process.exec('which md5sum', function (err, stdout, stderr) {
+      child_process.exec((stdout !== '' ? 'md5sum ' : 'md5 -r ') + fname, function (err, stdout, stderr) {
+        refute(err)
+        refute(stderr)
+        var md5Sum = stdout.split(' ')[0]
+        assert.equals(md5Sum, global.binaryTestDataMD5Sum)
+        fs.unlink(fname, callback)
+      })
     })
   })
 }
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list