[Pkg-javascript-commits] [node-iconv] 05/08: Refresh patches

Jérémy Lal kapouer at moszumanska.debian.org
Sat Sep 10 08:55:44 UTC 2016


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

kapouer pushed a commit to branch master
in repository node-iconv.

commit 060e713dbcc45fbe5e43c14c52b218ba2ef5b825
Author: Jérémy Lal <kapouer at melix.org>
Date:   Sat Sep 10 10:48:53 2016 +0200

    Refresh patches
---
 debian/patches/gyp-call-nodejs.patch |  4 +-
 debian/patches/use-glibc-iconv.patch | 88 ++++++------------------------------
 2 files changed, 17 insertions(+), 75 deletions(-)

diff --git a/debian/patches/gyp-call-nodejs.patch b/debian/patches/gyp-call-nodejs.patch
index 2df552e..8820ee5 100644
--- a/debian/patches/gyp-call-nodejs.patch
+++ b/debian/patches/gyp-call-nodejs.patch
@@ -3,12 +3,12 @@ Forwarded: not-needed
 Author: Matthew Pideil <matthewp_debian at teledetection.fr>
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -2,7 +2,7 @@
+@@ -6,7 +6,7 @@
    'targets': [
      {
        'target_name': 'iconv',
 -      'include_dirs': ['<!(node -e "require(\'nan\')")'],
 +      'include_dirs': ['<!(nodejs -e "require(\'nan\')")'],
        'sources': ['src/binding.cc'],
-       'cflags': [
+       'ccflags': [
          '-Wall',
diff --git a/debian/patches/use-glibc-iconv.patch b/debian/patches/use-glibc-iconv.patch
index b48a97a..a154fab 100644
--- a/debian/patches/use-glibc-iconv.patch
+++ b/debian/patches/use-glibc-iconv.patch
@@ -9,64 +9,7 @@ Description: use system iconv from glibc
   * codepages CP858 CP853 CP943 are not available
 Forwarded: not-needed
 Author: Jérémy Lal <kapouer at melix.org>
-Last-Update: 2015-09-09
---- a/binding.gyp
-+++ b/binding.gyp
-@@ -2,7 +2,6 @@
-   'targets': [
-     {
-       'target_name': 'iconv',
--      'dependencies': ['libiconv'],
-       'include_dirs': ['<!(node -e "require(\'nan\')")'],
-       'sources': ['src/binding.cc'],
-       'cflags': [
-@@ -18,46 +17,6 @@
-         'GCC_ENABLE_CPP_RTTI': 'NO',
-         'WARNING_CFLAGS': ['-Wall', '-Wextra', '-Wno-unused-parameter'],
-       },
--    },
--
--    {
--      'target_name': 'libiconv',
--      'type': 'static_library',
--      'direct_dependent_settings': {
--        'include_dirs':  ['support'],
--      },
--      'defines': ['ICONV_CONST=const', 'ENABLE_EXTRA=1'],
--      'include_dirs': [
--        'deps/libiconv/srclib',
--        'support',
--      ],
--      'sources': ['deps/libiconv/lib/iconv.c'],
--      'conditions': [
--        ['OS == "win"', {
--          'defines': ['WIN32_NATIVE=1'],
--        }, {
--          'defines': ['HAVE_WORKING_O_NOFOLLOW=1'],
--          'cflags!': ['-W', '-Wall', '-Wextra'],
--        }],
--      ],
--      'msvs_settings': {
--        'VCCLCompilerTool': {
--          'DisableSpecificWarnings': [
--            '4018',  # Signed/unsigned comparison.
--            '4090',  # Const/non-const mismatch.
--            '4244',  # Narrowing cast.
--            '4267',  # Narrowing cast.
--          ],
--        },
--      },
--      'xcode_settings': {
--        'WARNING_CFLAGS!': ['-W', '-Wall', '-Wextra'],
--        'WARNING_CFLAGS': [
--          '-Wno-parentheses-equality',
--          '-Wno-static-in-inline',
--          '-Wno-tautological-compare',
--        ],
--      },
-     }
-   ]
- }
+Last-Update: 2016-09-10
 --- a/src/binding.cc
 +++ b/src/binding.cc
 @@ -14,13 +14,14 @@
@@ -85,9 +28,9 @@ Last-Update: 2015-09-09
  #include <stdint.h>
 +#include <locale.h>
  
- namespace
- {
-@@ -94,10 +95,11 @@
+ #ifndef ICONV_CONST
+ #define ICONV_CONST
+@@ -98,6 +99,7 @@
  
    static NAN_METHOD(Convert)
    {
@@ -95,32 +38,31 @@ Last-Update: 2015-09-09
      Iconv* iv = static_cast<Iconv*>(
          Nan::GetInternalFieldPointer(info[0].As<Object>(), 0));
      const bool is_flush = info[8]->BooleanValue();
--    const char* input_buf =
-+    char* input_buf =
-         is_flush ? NULL : node::Buffer::Data(info[1].As<Object>());
-     size_t input_start = info[2]->Uint32Value();
-     size_t input_size = info[3]->Uint32Value();
 --- a/lib/iconv.js
 +++ b/lib/iconv.js
-@@ -45,11 +45,13 @@
+@@ -45,15 +45,18 @@
    stream.Stream.call(this);
    this.writable = true;
  
 -  var conv = bindings.make(fixEncoding(fromEncoding),
 -                           fixEncoding(toEncoding));
--  if (conv === null) throw new Error('Conversion not supported.');
 +  fromEncoding = fixEncoding(fromEncoding);
 +  toEncoding = fixEncoding(toEncoding);
- 
--  var convert_ = convert.bind({ conv_: conv });
++
 +  var conv = bindings.make(fromEncoding, toEncoding);
-+  if (conv === null) throw new Error(util.format('Conversion not supported from %s to %s.', fromEncoding, toEncoding));
 +
+   if (conv === null) {
+     throw new Error('Conversion from ' +
+                     fromEncoding + ' to ' +
+                     toEncoding + ' is not supported.');
+   }
+ 
+-  var convert_ = convert.bind({ conv_: conv });
 +  var convert_ = convert.bind({ conv_: conv, from: fromEncoding, to: toEncoding });
    var context_ = { trailer: null };
  
    this.convert = function(input, encoding) {
-@@ -138,7 +140,9 @@
+@@ -143,7 +146,9 @@
          continue;
        }
        else if (errno === EILSEQ) {
@@ -133,7 +75,7 @@ Last-Update: 2015-09-09
          if (context === null || input === FLUSH) {
 --- a/test/test-basic.js
 +++ b/test/test-basic.js
-@@ -119,10 +119,10 @@
+@@ -142,10 +142,10 @@
  assert.equal(iconv.convert('b2s=', 'base64').toString(), 'ok');
  
  var aixEncodings =

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



More information about the Pkg-javascript-commits mailing list