title: Corrupt patch error nodejs
body: <p>I try to compile nodejs for armv7 and before to do <code>~/cross-compiler-shell.sh and ./configure &amp;&amp; make install</code> , i must patch this script but <code>git apply wscript</code> returns me the error </p>
  
  <blockquote>
    <p>fatal: corrupt patch at line 49</p>
  </blockquote>
  
  <p>Here is my patch:</p>
  
  <pre><code>--- a/deps/libev/wscript
  +++ b/deps/libev/wscript
  @@ -41,6 +41,7 @@ def configure(conf):
   conf.check_cc(header_name="sys/eventfd.h", function_name="eventfd")
  
  
  +  ''' Can't run cross-binary code
  code = """
     #include &lt;syscall.h&gt;
     #include &lt;time.h&gt;
  @@ -54,6 +55,8 @@ def configure(conf):
  """
  conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True,
               msg="Checking for SYS_clock_gettime")
  +  '''
  +  conf.define('HAVE_CLOCK_SYSCALL', 1)
  
  have_librt = conf.check(lib='rt', uselib_store='RT')
  if have_librt:
  
  
  vim wscript
  
  --- a/wscript
  +++ b/wscript
  @@ -319,11 +319,15 @@ def v8_cmd(bld, variant):
  if bld.env['DEST_CPU'] == 'x86_64':
   arch = "arch=x64"
  
  + cross_arch = False
  + # TODO would use -1 != str.find('linux-gnueabi'), but this is sometimes a string and other times an array
  + # if bld.env['AR'] == 'arm-angstrom-linux-gnueabi-ar':
  + #   arch = "arch=arm"
  + #   cross_arch = True
  + # 
  + arch = "arch=arm"
  + cross_arch = True
  
  if variant == "default":
   mode = "release"
  else:
   mode = "debug"
  
  +  snapshot = 'snapshot=on'
  +  if cross_arch:
  +    snapshot = ''
  -  cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static snapshot=on'
  +  cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static ' + snapshot
  </code></pre>
  
  <p>I've tried to put a blank line at the end but error stays here.</p>
  
  <p>Thanks for your help</p>