[Pkg-javascript-commits] [node-iconv] 07/10: Update glibc patch to remove tests for non-supported codepages

Jérémy Lal kapouer at moszumanska.debian.org
Sun Jun 14 19:35:20 UTC 2015


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

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

commit fe36c7f99804ca316b1a95fddfe774196cef6cc0
Author: Jérémy Lal <kapouer at melix.org>
Date:   Sun Jun 14 21:25:21 2015 +0200

    Update glibc patch to remove tests for non-supported codepages
---
 debian/patches/use-glibc-iconv.patch | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/debian/patches/use-glibc-iconv.patch b/debian/patches/use-glibc-iconv.patch
index aba925b..ab7830f 100644
--- a/debian/patches/use-glibc-iconv.patch
+++ b/debian/patches/use-glibc-iconv.patch
@@ -6,9 +6,10 @@ Description: use system iconv from glibc
     this is possible because C locale is portable (setlocale(3)),
     and transliteration need UTF-8 code-set to work the same as
     upstream's libiconv tested behavior.
+  * codepages CP858 CP853 CP943 are not available
 Forwarded: not-needed
 Author: Jérémy Lal <kapouer at melix.org>
-Last-Update: 2014-06-16
+Last-Update: 2015-06-14
 --- a/binding.gyp
 +++ b/binding.gyp
 @@ -2,7 +2,6 @@
@@ -108,13 +109,14 @@ Last-Update: 2014-06-16
  
 -  var conv = bindings.make(fixEncoding(fromEncoding),
 -                           fixEncoding(toEncoding));
+-  if (conv === null) throw new Error('Conversion not supported.');
 +  fromEncoding = fixEncoding(fromEncoding);
 +  toEncoding = fixEncoding(toEncoding);
-+
-+  var conv = bindings.make(fromEncoding, toEncoding);
-   if (conv === null) throw new Error('Conversion not supported.');
  
 -  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));
++
 +  var convert_ = convert.bind({ conv_: conv, from: fromEncoding, to: toEncoding });
    var context_ = { trailer: null };
  
@@ -130,3 +132,18 @@ Last-Update: 2014-06-16
        }
        else if (errno === EINVAL) {
          if (context === null || input === FLUSH) {
+--- a/test/test-basic.js
++++ b/test/test-basic.js
+@@ -119,10 +119,10 @@
+ assert.equal(iconv.convert('b2s=', 'base64').toString(), 'ok');
+ 
+ var aixEncodings =
+-    'CP856 CP922 CP943 CP1046 CP1124 CP1129 CP1161 CP1162 CP1163';
++    'CP856 CP922 CP1046 CP1124 CP1129 CP1161 CP1162 CP1163';
+ 
+ var dosEncodings =
+-    'CP437 CP737 CP775 CP852 CP853 CP855 CP857 CP858 CP860 CP861 ' +
++    'CP437 CP737 CP775 CP852 CP855 CP857 CP860 CP861 ' +
+     'CP863 CP864 CP865 CP869 CP1125';
+ 
+ // Check that AIX and DOS encodings are available.

-- 
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