[Pkg-javascript-commits] [node-ws] 08/10: update patches

Ximin Luo infinity0 at pwned.gg
Mon Mar 30 02:37:19 UTC 2015


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

infinity0-guest pushed a commit to branch master
in repository node-ws.

commit 0b68ba0e9aa37f9fa8ee598be7cbc52562292e86
Author: Ximin Luo <infinity0 at pwned.gg>
Date:   Mon Mar 30 04:10:14 2015 +0200

    update patches
---
 debian/patches/include_options             | 94 ------------------------------
 debian/patches/only-use-native             |  4 +-
 debian/patches/rm-redundant-legacy-include | 23 +++-----
 debian/patches/series                      |  1 -
 4 files changed, 11 insertions(+), 111 deletions(-)

diff --git a/debian/patches/include_options b/debian/patches/include_options
deleted file mode 100644
index 2867592..0000000
--- a/debian/patches/include_options
+++ /dev/null
@@ -1,94 +0,0 @@
-Description: include options module
- this module has been split out of node-ws, and is
- really only used by node-ws. It has the same upstream as node-ws.
-Origin: https://raw2.github.com/einaros/options.js/26806b42/lib/options.js
-Last-Update: 2014-01-09
---- /dev/null
-+++ b/node_modules/options/index.js
-@@ -0,0 +1,86 @@
-+/*!
-+ * Copyright(c) 2011 Einar Otto Stangvik <einaros at gmail.com>
-+ * MIT Licensed
-+ */
-+ 
-+var fs = require('fs');
-+
-+function Options(defaults) {
-+  var internalValues = {};
-+  var values = this.value = {};
-+  Object.keys(defaults).forEach(function(key) {
-+    internalValues[key] = defaults[key];
-+    Object.defineProperty(values, key, {
-+      get: function() { return internalValues[key]; },
-+      configurable: false,
-+      enumerable: true
-+    });
-+  });
-+  this.reset = function() {
-+    Object.keys(defaults).forEach(function(key) {
-+      internalValues[key] = defaults[key];
-+    });
-+    return this;
-+  };
-+  this.merge = function(options, required) {
-+    options = options || {};
-+    if (Object.prototype.toString.call(required) === '[object Array]') {
-+      var missing = [];
-+      for (var i = 0, l = required.length; i < l; ++i) {
-+        var key = required[i];
-+        if (!(key in options)) {
-+          missing.push(key);
-+        }
-+      }
-+      if (missing.length > 0) {
-+        if (missing.length > 1) {
-+          throw new Error('options ' +
-+            missing.slice(0, missing.length - 1).join(', ') + ' and ' +
-+            missing[missing.length - 1] + ' must be defined');
-+        }
-+        else throw new Error('option ' + missing[0] + ' must be defined');
-+      }
-+    }
-+    Object.keys(options).forEach(function(key) {
-+      if (key in internalValues) {
-+        internalValues[key] = options[key];
-+      }
-+    });
-+    return this;
-+  };
-+  this.copy = function(keys) {
-+    var obj = {};
-+    Object.keys(defaults).forEach(function(key) {
-+      if (keys.indexOf(key) !== -1) {
-+        obj[key] = values[key];
-+      }
-+    });
-+    return obj;
-+  };
-+  this.read = function(filename, cb) {
-+    if (typeof cb == 'function') {
-+      var self = this;
-+      fs.readFile(filename, function(error, data) {
-+        if (error) return cb(error);
-+        var conf = JSON.parse(data);
-+        self.merge(conf);
-+        cb();
-+      });
-+    }
-+    else {
-+      var conf = JSON.parse(fs.readFileSync(filename));
-+      this.merge(conf);
-+    }
-+    return this;
-+  };
-+  this.isDefined = function(key) {
-+    return typeof values[key] != 'undefined';
-+  };
-+  this.isDefinedAndNonNull = function(key) {
-+    return typeof values[key] != 'undefined' && values[key] !== null;
-+  };
-+  Object.freeze(values);
-+  Object.freeze(this);
-+}
-+
-+module.exports = Options;
diff --git a/debian/patches/only-use-native b/debian/patches/only-use-native
index 3a915e4..1f08614 100644
--- a/debian/patches/only-use-native
+++ b/debian/patches/only-use-native
@@ -6,7 +6,7 @@ Forwarded: not-needed
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/src/bufferutil.cc
 +++ b/src/bufferutil.cc
-@@ -113,5 +113,5 @@
+@@ -117,5 +117,5 @@
    BufferUtil::Initialize(target);
  }
  
@@ -15,7 +15,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
 --- a/src/validation.cc
 +++ b/src/validation.cc
-@@ -141,5 +141,5 @@
+@@ -144,5 +144,5 @@
    Validation::Initialize(target);
  }
  
diff --git a/debian/patches/rm-redundant-legacy-include b/debian/patches/rm-redundant-legacy-include
index 48767b0..0da941b 100644
--- a/debian/patches/rm-redundant-legacy-include
+++ b/debian/patches/rm-redundant-legacy-include
@@ -7,17 +7,12 @@ Forwarded: not-needed
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -2,13 +2,11 @@
-   'targets': [
-     {
-       'target_name': 'validation',
--      'include_dirs': ["<!(node -e \"require('nan')\")"],
-       'cflags': [ '-O3' ],
-       'sources': [ 'src/validation.cc' ]
-     },
-     {
-       'target_name': 'bufferutil',
--      'include_dirs': ["<!(node -e \"require('nan')\")"],
-       'cflags': [ '-O3' ],
-       'sources': [ 'src/bufferutil.cc' ]
-     }
+@@ -1,8 +1,6 @@
+ {'targets': [{'cflags': ['-O3'],
+-              'include_dirs': ['<!(node -e "require(\'nan\')")'],
+               'sources': ['src/bufferutil.cc'],
+               'target_name': 'bufferutil'},
+              {'cflags': ['-O3'],
+-              'include_dirs': ['<!(node -e "require(\'nan\')")'],
+               'sources': ['src/validation.cc'],
+               'target_name': 'validation'}]}
diff --git a/debian/patches/series b/debian/patches/series
index 8fd6fcc..b52c1cc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 nodejs-shebang
 rm-vcs-control
-include_options
 only-use-native
 rm-redundant-legacy-include

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



More information about the Pkg-javascript-commits mailing list