You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
3.2 KiB

Index: node_modules/node-libcurl/binding.gyp
--- node_modules/node-libcurl/binding.gyp.orig 2016-05-11 15:59:07.000000000 +0200
+++ node_modules/node-libcurl/binding.gyp 2016-05-20 22:45:07.032395003 +0200
@@ -64,6 +64,9 @@
'CURL_STATICLIB'
]
}, { # OS != "win"
+ 'cflags': [
+ '<!@(node "<(module_root_dir)/tools/curl-config-cflags.js")'
+ ],
'libraries': [
'<!@(node "<(module_root_dir)/tools/curl-config.js")'
],
Index: node_modules/node-libcurl/package.json
--- node_modules/node-libcurl/package.json.orig 2016-05-20 22:15:24.000000000 +0200
+++ node_modules/node-libcurl/package.json 2016-05-20 22:45:07.032395003 +0200
@@ -109,7 +109,7 @@
},
"scripts": {
"docs": "jsdoc2md lib/*.js > api.md",
- "install": "node-pre-gyp install --fallback-to-build",
+ "install": "node-pre-gyp install --build-from-source",
"pregyp": "node-pre-gyp",
"test": "mocha test --reporter spec"
},
Index: node_modules/node-libcurl/src/Easy.cc
--- node_modules/node-libcurl/src/Easy.cc.orig 2016-05-16 16:33:54.000000000 +0200
+++ node_modules/node-libcurl/src/Easy.cc 2016-05-20 22:45:07.032395003 +0200
@@ -30,6 +30,14 @@
#include "make_unique.h"
#include "string_format.h"
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
namespace NodeLibcurl {
class Easy::ToFree {
@@ -1324,7 +1332,7 @@
if ( code != CURLE_OK ) {
- std::string str = std::to_string( static_cast<int>( code ) );
+ std::string str = my_to_string( static_cast<int>( code ) );
Nan::ThrowError( str.c_str() );
}
@@ -1443,7 +1451,7 @@
Nan::Utf8String msg( tryCatch.Message()->Get() );
std::string errCode = std::string( *msg );
- code = static_cast<CURLcode>( std::stoi( errCode ) );
+ code = static_cast<CURLcode>( atoi(errCode.c_str()) );
}
v8::Local<v8::Object> ret = Nan::New<v8::Object>();
Index: node_modules/node-libcurl/src/string_format.cc
--- node_modules/node-libcurl/src/string_format.cc.orig 2015-10-24 22:11:40.000000000 +0200
+++ node_modules/node-libcurl/src/string_format.cc 2016-05-20 22:46:12.242369316 +0200
@@ -1,5 +1,6 @@
#include "string_format.h"
+#include <stdio.h>
#include <string.h>
#include <stdarg.h> // for va_start, etc
#include <memory> // for std::unique_ptr
Index: node_modules/node-libcurl/tools/curl-config-cflags.js
--- node_modules/node-libcurl/tools/curl-config-cflags.js.orig 2016-05-20 22:45:07.032395003 +0200
+++ node_modules/node-libcurl/tools/curl-config-cflags.js 2016-05-20 22:45:07.032395003 +0200
@@ -0,0 +1,14 @@
+var exec = require( 'child_process' ).exec;
+
+
+exec( 'curl-config --cflags', function( error, stdout, stderr ) {
+
+ if ( error != null ) {
+ console.error( 'Could not run curl-config, please make sure libcurl dev package is installed.' );
+ console.error( 'Output: ' + stderr );
+ process.exit( 1 );
+ }
+
+ console.log( stdout );
+ process.exit( 0 );
+});