### this file is sourced not run
PKGVER=18.16.1
PKGBUILD=1
PKGARCH=x86_64

### source: BLFS 11.3 updated BLFS SVN r890
TARBALL=node-v$PKGVER.tar.xz
MD5SUM=ab4dbb04d13f8b4cb14e610fef5f9760
SRC_URL=https://nodejs.org/dist/v$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='libicu libuv' # libc-ares build-time only
SLACKDESC="nodejs: nodejs $PKGVER (Javascript Runtime)
nodejs: 
nodejs: Node.js is a JavaScript runtime built on Chrome's V8 JavaScript 
nodejs: engine.
nodejs: 
nodejs: https://nodejs.org
nodejs: 
nodejs: 
nodejs: 
nodejs: 
nodejs: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/node*

	export ICU_DATA=/usr/share/icu/current/ # so ICU knows where its data is	
	./configure --prefix=/usr --libdir=/usr/$LIBDIR \
				--shared-cares         \
				--shared-libuv         \
				--shared-openssl       \
				--shared-zlib          \
				--with-intl=system-icu \
	&&
	# --shared-nghttp2     # don't have it
	# --shared-http-parser # don't have it
	# --without-npm        # build npm separately

	make $MAKEFLAGS &&
	make $MAKEINSTALLFLAGS install &&

	pkg_build_slackdesc
}

