2017-11-15 03:04:37 +00:00
|
|
|
# $Id$
|
2014-09-28 13:07:04 +00:00
|
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
# Contributor Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
|
|
|
# Contributor: Thomas Dziedzic < gostrc at gmail >
|
2012-01-27 02:19:01 +00:00
|
|
|
# Contributor: James Campos <james.r.campos@gmail.com>
|
|
|
|
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
|
|
|
|
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
|
|
|
|
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
|
|
|
|
# Contributor: TIanyi Cui <tianyicui@gmail.com>
|
2017-11-15 03:04:37 +00:00
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - set config and gyp flags
|
|
|
|
|
|
|
|
buildarch=28
|
2012-01-27 02:19:01 +00:00
|
|
|
|
|
|
|
pkgname=nodejs
|
2018-03-21 22:58:24 +00:00
|
|
|
pkgver=9.9.0
|
2018-03-23 18:07:09 +00:00
|
|
|
pkgrel=2
|
2012-01-27 02:19:01 +00:00
|
|
|
pkgdesc='Evented I/O for V8 javascript'
|
2017-11-17 23:43:21 +00:00
|
|
|
arch=('x86_64')
|
2012-01-27 02:19:01 +00:00
|
|
|
url='http://nodejs.org/'
|
|
|
|
license=('MIT')
|
2018-03-23 18:07:09 +00:00
|
|
|
depends=('openssl-1.0' 'zlib' 'icu' 'libuv' 'http-parser' 'c-ares' 'libnghttp2') # 'v8')
|
2017-04-24 19:11:39 +00:00
|
|
|
makedepends=('python2' 'procps-ng')
|
2015-05-08 12:43:59 +00:00
|
|
|
optdepends=('npm: nodejs package manager')
|
2017-11-15 03:04:37 +00:00
|
|
|
source=("nodejs-$pkgver.tar.gz::https://github.com/nodejs/node/archive/v$pkgver.tar.gz")
|
2018-03-21 22:58:24 +00:00
|
|
|
sha512sums=('9ee32ae56041cf6c3dd95423e24a0a17d08a2cf253c23ec14262e8ee129a3c4f7f5556fedd6d55a71ab78e0cc5d3b55ab00c28913dc30bc115433e6b26550358')
|
2013-02-20 15:12:21 +00:00
|
|
|
|
2013-05-15 14:33:50 +00:00
|
|
|
prepare() {
|
2017-04-24 19:11:39 +00:00
|
|
|
cd node-$pkgver
|
2012-01-27 02:19:01 +00:00
|
|
|
|
2015-09-16 18:41:44 +00:00
|
|
|
msg 'Fixing for python2 name'
|
|
|
|
find -type f -exec sed \
|
|
|
|
-e 's_^#!/usr/bin/env python$_&2_' \
|
|
|
|
-e 's_^\(#!/usr/bin/python2\).[45]$_\1_' \
|
|
|
|
-e 's_^#!/usr/bin/python$_&2_' \
|
|
|
|
-e 's_^\( *exec \+\)python\( \+.*\)$_\1python2\2_'\
|
|
|
|
-e 's_^\(.*\)python\( \+-c \+.*\)$_\1python2\2_'\
|
|
|
|
-e "s_'python'_'python2'_" -i {} \;
|
|
|
|
find test/ -type f -exec sed 's_python _python2 _' -i {} \;
|
2013-05-15 14:33:50 +00:00
|
|
|
}
|
2015-04-04 04:39:00 +00:00
|
|
|
|
2013-05-15 14:33:50 +00:00
|
|
|
build() {
|
2017-04-24 19:11:39 +00:00
|
|
|
cd node-$pkgver
|
2012-01-27 02:19:01 +00:00
|
|
|
|
2018-03-23 18:07:09 +00:00
|
|
|
export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig
|
2012-01-27 02:19:01 +00:00
|
|
|
export PYTHON=python2
|
2012-08-07 02:07:49 +00:00
|
|
|
|
2017-11-15 03:04:37 +00:00
|
|
|
[[ "$CARCH" == "armv6h" ]] && export CONFIG="--with-arm-float-abi=hard --with-arm-fpu=vfp" && export GYPFLAGS="-Darm_thumb -Darm_float_abi=hard -Darm_version=6 -Darm_fpu=vfpv2"
|
|
|
|
[[ "$CARCH" == "armv7h" ]] && export CONFIG="--with-arm-float-abi=hard --with-arm-fpu=vfpv3-d16" && export GYPFLAGS="-Darm_thumb -Darm_float_abi=hard -Darm_version=7 -Darm_fpu=vfpv3-d16"
|
2012-02-05 02:06:11 +00:00
|
|
|
|
2012-01-27 02:19:01 +00:00
|
|
|
./configure \
|
2012-02-06 01:32:05 +00:00
|
|
|
--prefix=/usr \
|
2015-05-08 12:43:59 +00:00
|
|
|
--with-intl=system-icu \
|
|
|
|
--without-npm \
|
2015-02-15 19:15:29 +00:00
|
|
|
--shared-openssl \
|
2015-09-17 01:10:51 +00:00
|
|
|
--shared-zlib \
|
2015-10-13 12:11:28 +00:00
|
|
|
--shared-libuv \
|
|
|
|
--shared-http-parser \
|
2016-11-09 13:31:30 +00:00
|
|
|
--shared-cares \
|
2018-03-13 00:02:36 +00:00
|
|
|
--shared-nghttp2 \
|
2015-09-17 01:10:51 +00:00
|
|
|
${CONFIG}
|
2017-11-15 03:04:37 +00:00
|
|
|
# --shared-v8
|
2012-01-27 02:19:01 +00:00
|
|
|
|
2015-04-04 04:39:00 +00:00
|
|
|
make
|
2012-01-27 02:19:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2017-04-24 19:11:39 +00:00
|
|
|
cd node-$pkgver
|
2017-03-02 13:19:02 +00:00
|
|
|
# Expected failure: https://github.com/nodejs/node/issues/11627
|
|
|
|
make test || warning "Tests failed"
|
2012-01-27 02:19:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2017-04-24 19:11:39 +00:00
|
|
|
cd node-$pkgver
|
2012-01-27 02:19:01 +00:00
|
|
|
|
2017-11-15 03:04:37 +00:00
|
|
|
make DESTDIR="$pkgdir" install
|
2012-01-27 02:19:01 +00:00
|
|
|
|
|
|
|
install -D -m644 LICENSE \
|
2017-11-15 03:04:37 +00:00
|
|
|
"$pkgdir"/usr/share/licenses/nodejs/LICENSE
|
2012-01-27 02:19:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|