[arch-commits] Commit in nodejs/trunk (6.8.0-build-fix.patch PKGBUILD)

Felix Yan felixonmars at archlinux.org
Thu Oct 13 09:09:06 UTC 2016


    Date: Thursday, October 13, 2016 @ 09:09:05
  Author: felixonmars
Revision: 192154

upgpkg: nodejs 6.8.0-1

Added:
  nodejs/trunk/6.8.0-build-fix.patch
Modified:
  nodejs/trunk/PKGBUILD

-----------------------+
 6.8.0-build-fix.patch |   30 ++++++++++++++++++++++++++++++
 PKGBUILD              |   13 +++++++++----
 2 files changed, 39 insertions(+), 4 deletions(-)

Added: 6.8.0-build-fix.patch
===================================================================
--- 6.8.0-build-fix.patch	                        (rev 0)
+++ 6.8.0-build-fix.patch	2016-10-13 09:09:05 UTC (rev 192154)
@@ -0,0 +1,30 @@
+From fc164acbbb700fd50ab9c04b47fc1b2687e9c0f4 Mon Sep 17 00:00:00 2001
+From: "Bradley T. Hughes" <bradleythughes at fastmail.fm>
+Date: Thu, 13 Oct 2016 07:38:38 +0000
+Subject: [PATCH] build: add -DZLIB_CONST when building with --shared-zlib
+
+Commit 782620f added the define only when building with the bundled
+zlib. Using a shared zlib results in build breakage:
+
+../src/inspector_agent.cc:179:16: error: assigning to 'Bytef *' (aka 'unsigned char *') from incompatible type
+      'const uint8_t *' (aka 'const unsigned char *')
+  strm.next_in = PROTOCOL_JSON + 3;
+               ^ ~~~~~~~~~~~~~~~~~
+1 error generated.
+---
+ node.gyp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/node.gyp b/node.gyp
+index fa98547..d799ba1 100644
+--- a/node.gyp
++++ b/node.gyp
+@@ -480,6 +480,8 @@
+         }],
+         [ 'node_shared_zlib=="false"', {
+           'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
++        }, {
++          'defines': [ 'ZLIB_CONST' ],
+         }],
+ 
+         [ 'node_shared_http_parser=="false"', {

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-10-13 09:08:13 UTC (rev 192153)
+++ PKGBUILD	2016-10-13 09:09:05 UTC (rev 192154)
@@ -9,7 +9,7 @@
 # Contributor: TIanyi Cui <tianyicui at gmail.com>
 
 pkgname=nodejs
-pkgver=6.7.0
+pkgver=6.8.0
 pkgrel=1
 pkgdesc='Evented I/O for V8 javascript'
 arch=('i686' 'x86_64')
@@ -18,12 +18,17 @@
 depends=('openssl' 'zlib' 'icu' 'libuv' 'http-parser') # 'v8')
 makedepends=('python2' 'procps-ng' 'git')
 optdepends=('npm: nodejs package manager')
-source=("nodejs::git+https://github.com/nodejs/node.git#tag=v$pkgver")
-sha256sums=('SKIP')
+source=("nodejs::git+https://github.com/nodejs/node.git#tag=v$pkgver"
+        6.8.0-build-fix.patch)
+sha256sums=('SKIP'
+            'bc9c4c1fcef55e6163daf7c4ee882d8a23973e16e28fea508ee72478cb9941fa')
 
 prepare() {
   cd nodejs
 
+  # https://github.com/nodejs/node/issues/9076
+  patch -p1 -i ../6.8.0-build-fix.patch
+
   msg 'Fixing for python2 name'
   find -type f -exec sed \
     -e 's_^#!/usr/bin/env python$_&2_' \
@@ -54,7 +59,7 @@
 
 check() {
   cd nodejs
-  make test || warning "Tests failed"
+  make test
 }
 
 package() {



More information about the arch-commits mailing list