From 24fd814c326e282c4321965c31f341dad77e270d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 8 Jan 2021 11:28:34 +0000 Subject: gentoo resync : 08.01.2021 --- net-libs/nodejs/Manifest | 12 +- net-libs/nodejs/nodejs-12.20.0.ebuild | 218 ---------------------------------- net-libs/nodejs/nodejs-12.20.1.ebuild | 218 ++++++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-14.15.4.ebuild | 208 ++++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-15.2.1.ebuild | 202 ------------------------------- net-libs/nodejs/nodejs-15.3.0.ebuild | 202 ------------------------------- net-libs/nodejs/nodejs-15.5.1.ebuild | 202 +++++++++++++++++++++++++++++++ 7 files changed, 634 insertions(+), 628 deletions(-) delete mode 100644 net-libs/nodejs/nodejs-12.20.0.ebuild create mode 100644 net-libs/nodejs/nodejs-12.20.1.ebuild create mode 100644 net-libs/nodejs/nodejs-14.15.4.ebuild delete mode 100644 net-libs/nodejs/nodejs-15.2.1.ebuild delete mode 100644 net-libs/nodejs/nodejs-15.3.0.ebuild create mode 100644 net-libs/nodejs/nodejs-15.5.1.ebuild (limited to 'net-libs/nodejs') diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index f6794d839551..c2023f724048 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -5,16 +5,16 @@ AUX nodejs-14.15.0-fix_ppc64_crashes.patch 1633 BLAKE2B cded0eba081ff80f02ebc019 AUX nodejs-15.2.0-global-npm-config.patch 582 BLAKE2B ee05b2b54a0d2f0b7d6d2a1215321315a9a7f2a7b83544fbc4c7c08920d82eccf2ea45530b24aba734b27d82457cd7cf2ef8f780f309f4411ab973738fa3cbfd SHA512 e5dff5f8007716e2c3d6ea5829b2ed42ff9e458b751d06772c51b77a36b188f167c1d637a74ae7cf5c2b97c28436213f02374b0dbef5440607ce4e1c3e586e86 AUX nodejs-99999999-llhttp.patch 506 BLAKE2B eea449910b97dfc320247f20bf20467f6c5bfe46f7acc95761270928b3413ffaa04ee948d8dece9a8ba47288804144c75ebda1009af17169b36bcd5b39aa0c33 SHA512 13cdbaf73696b4feef1fec48ac43f6a6d80f59096a81308c746655e2cffa0b0ef78850facff103f27062fd25192d8abd7bc200b36bd25df7bd4b800f80da0c5c DIST node-v12.19.1.tar.xz 23829692 BLAKE2B 244ca8ef29e315ce027638d9d5c66469ac8cd69abec47d5bf6370b990da0d9d2a7af812963530e5187d273d3f20638be0d23ccb1c0409fbbd678677740939f4f SHA512 7c628ca214d3b17b34658aae32e335ce863d90853c92f1cd4119e9a82b7097ddf47d0d4cc7c9bbdbfdd4b403811aa6ee08e844078a947f31a3adc78f569b931a -DIST node-v12.20.0.tar.xz 23868796 BLAKE2B 80df641bebb3f89002ce260874adfbbd60c92eda50d28396441d7429b7bc0474fd141393c9756cd8d49c7904ea47048740c1e21071d07d083490c1b3755f27f7 SHA512 b0eb66ad64f727c8f3a0b34cadebb904afeb04709de20b2808c6a91980e079402f17e1fc8fa9ed870262508788f78e0eb5891e99aac57a9c41b92c70384bd7e0 +DIST node-v12.20.1.tar.xz 23641412 BLAKE2B 1c1d828a46c7d3ba3a8995d65902f20ff4d3e3c992a90e4cd0d0e985d5537a8251a1b789cac106caccca9050e5e74ca2e15b27100f715ef453d194fa07271a7a SHA512 a8948cfa64cc5222a975294a6403c1fb0c2443552ad739a049f7e50beed542c22e0004a456f1a225af847cfd06fcb4101d8f70e3f932750e74be86b14402af4d DIST node-v14.15.0.tar.xz 33440584 BLAKE2B dda9fb44f163b2268db126dfcda34e80064eba24921e4f8e6c14c212deb9170c79f31f7b2be272c8fa7ca992d14540df490c6cad078833514bd348825934ad95 SHA512 2a0cd1b9d95e0ac228a90aca82cb04b9f4fc4d08ab86f0286eed7a519ca6e756081b37375ad5d14d7f0e09affdd27bad658c3e364237eb3c212fe5b5e27af96e DIST node-v14.15.1.tar.xz 33437304 BLAKE2B f08251d2a76e4030433001fd7f062c71193de190036d1147ade0ea36350df0d65df9e1b749fbac77837dd090cbeda6c133ff88099691c932bc29e75b7bfa2acc SHA512 cbab757e370a09b73c29a9bcb310b4122e4424d6baeaeaf1b10919ed6b348bc6ddbfc0e0eaff99d8ebb4d3d74f0206f575e2656245151eda564dd2cd33ff823a -DIST node-v15.2.1.tar.xz 33172472 BLAKE2B d63dbc138ec161253f996fb61c9f40db2eabb5a598804eca7f2446b654ae8a11164820d46ea3c2b41b6a891bb0a3f15fe67712988ed67c1344ab72e2e4749fac SHA512 b05663131d6bb458fe49cf610a7296cdd169b6e957df3e5117ad5553de9891ed4cb71c7d3dc0dbb7774153c884cf245f49faecfa308736086fe6f041f83c8a57 -DIST node-v15.3.0.tar.xz 33198460 BLAKE2B e88db9556e13b0df8f8e78a9b2673c9f1cd9445ea9d71b6cb9e674bfcdddad0ddd564d3c1323dff51e68c47f16eda3dc78cb303a3a7f6da341d0c51081bb965f SHA512 77408b49385cbf1cf168409b1eaf1d12caa97ad6c1106e99abc05e2665ea3ca6447552cfabe0cf43e90db80ecadf14ff4d9923ef34b854e70976a6fd0130d6b7 +DIST node-v14.15.4.tar.xz 33296076 BLAKE2B a707dc15bdb670cdb239560d9b7a10541b793cad2339d02dafac2974df38dbe57d141b60d934f8b91cd65961f3a2df4ce92bcccf8b4359c7041f5f5531f1b704 SHA512 0d497a5d51de52412d09dd0fbcb936dbf0cba810f84d598be8f02c876d55f614e00c1ea0b25a00838e7b9f9c73a7882e3de0e9507d1c6ee45270a62d3438ab41 +DIST node-v15.5.1.tar.xz 33380504 BLAKE2B 508ba56370fd2ebd32f917da1dfc5fc5f46929397ce92826d73d1c4e7bd76a14ca712ebfe55f7e2c60d44a1abc15a05dae01de3f574b3e181e0a1e107049c9d4 SHA512 ca27dcc541287bc4d2f661d793ead02390b844cc70bfce7f3affe79618426201eff40d430e3b68a2194b6269c32d150b15b617169bd063576308fab9714cb7a2 EBUILD nodejs-12.19.1.ebuild 6297 BLAKE2B 253ee1f6fc802aeaf3b7963a743f6d5fd3655770794926bdb4d10ae088a6c0a13d61040516d2db3e3d53bcc3bb86c700a9af5790a15d0d1f9fc350be14022880 SHA512 eff8bcf765348fdd3b6a820c1a07f839a248e75e78c691caf969b42d1b92ca231ded21c41a22a56455b384c74e49c15494b8fe7c5e5d3f57258133ad147d6477 -EBUILD nodejs-12.20.0.ebuild 6301 BLAKE2B 8c00d439d226b3b5238c46fb96b92543c13fb320419e5d72a54deb3c36f921d451ca7909af877c90a238e6f61178db0b53cec83a5b61527a979393011d0f2dc4 SHA512 1503bb062d31347bff777f9b8685bd21a1416ce0bfc27e0dcf2db1c6c71f3d5cd22de1ec7d2a191895bbfcaf83f4002ce70b1ec0e551f97850d7df07f777bb50 +EBUILD nodejs-12.20.1.ebuild 6297 BLAKE2B adacd0d838f9c3104b2a49d38dcb0c4396353551e09b9e477314c778b0508df29046077c53b2d13b0dd97b5dca536f053695396a4d1b54cc289dd595535f569b SHA512 25632a69565b4ef51d359d23951bf0d9908448f8aea6a971f5eb18f0681968f1c8bd6c9d48518d56b8ab14d201e6e80d823eedaa5aad125bf9ef9b8df2118068 EBUILD nodejs-14.15.0.ebuild 5810 BLAKE2B 6690886bb45d826a0cd2c5a972fffd2d068aa6be081a46d3071835079cc9f48d9bc6d2c3d79a63d054debca9923c373aed99fe2cf1bdf95415db4602b44f5f75 SHA512 e7a34cae3c0058164d12853b95b912972f890ad24507164237ab54731cac04c3579240b1307716a70e0cbbda667b23342b58466152d577e99bae6d803899a12b EBUILD nodejs-14.15.1.ebuild 6047 BLAKE2B 29004ae6fb9ed1a35084812e8b0b0470b6aa9a8bf77e2d64f55634b657c935530eca2439386d9b31db1e5771df1cba12edf71ba82a6b4f5ef74f77438da8ff9c SHA512 699a8ce157eaefdbcc7080416cee5d699b1cfd619ee6c45582335eaa1f180c89fd9e881dfc1cbcb816e5f08f54b7522b1c674d90117742f88a3fea0186ffb37b -EBUILD nodejs-15.2.1.ebuild 5676 BLAKE2B ee5597bff165760d91ed4abaf1ac46b2e4fa736fda747488f7f5cbd40761a1a78a78f07071451f4e749928ef09cc9e958e677c20b9c7b7b7108615b0d7002866 SHA512 4e3fb131d552e8e3fe67999d819b89a2f594534da85cd006bc832f0ab5ba7a5cb05a8b4c0ddeba757aff894f3842d4048be5044a550d982427c711881e4d8419 -EBUILD nodejs-15.3.0.ebuild 5676 BLAKE2B ee5597bff165760d91ed4abaf1ac46b2e4fa736fda747488f7f5cbd40761a1a78a78f07071451f4e749928ef09cc9e958e677c20b9c7b7b7108615b0d7002866 SHA512 4e3fb131d552e8e3fe67999d819b89a2f594534da85cd006bc832f0ab5ba7a5cb05a8b4c0ddeba757aff894f3842d4048be5044a550d982427c711881e4d8419 +EBUILD nodejs-14.15.4.ebuild 6047 BLAKE2B d793f876cd1afd61d5757c6928209598b5165007b48680b5f88a3588765b2c25fe7e2a9d4fc443832aed0ea68343f2472fc2f0314ac8cda6870ab84285962a59 SHA512 58ac3246f664b9f98c13227662c07eb34e10cdfa231b2dec70441e3c2c77d43a70118d31f07b199a98da406b782eecc6e2bb41aa113c8ed4748ea8926af4400c +EBUILD nodejs-15.5.1.ebuild 5676 BLAKE2B ee5597bff165760d91ed4abaf1ac46b2e4fa736fda747488f7f5cbd40761a1a78a78f07071451f4e749928ef09cc9e958e677c20b9c7b7b7108615b0d7002866 SHA512 4e3fb131d552e8e3fe67999d819b89a2f594534da85cd006bc832f0ab5ba7a5cb05a8b4c0ddeba757aff894f3842d4048be5044a550d982427c711881e4d8419 EBUILD nodejs-99999999.ebuild 5811 BLAKE2B fa5f65bf9b29b39fab93459a01774b5237e185af99af95f0e0c51e6b282d158ee01701e216eafecd74849f991ebc4858cf527405d1e39fea1da69f19e68ac2ba SHA512 0d7f317b4fa2ecc450dd2c12ccad524be2a20ca255953b64eb012e46333b940baa3dc652353825fc7444834d8be17a33681c7d63f1d1f008fa0ab5d99f95c501 MISC metadata.xml 940 BLAKE2B c1a7dbc678f50529afe12abaa96e87bd065d1bdb88e6ca4d7d58373b282a5d6c6920e43623ce71bc83affb54cc323e6d24df8841dce8001e1cb598dd96b0d4a4 SHA512 87c823b94b22026cbf333671f6d28928de66c5aee29fbe0d9773c4c35415ffc3f7e31559530cfda4f4f2a0a9dcb4964e0c3304c002182c4c17de785e842c0fee diff --git a/net-libs/nodejs/nodejs-12.20.0.ebuild b/net-libs/nodejs/nodejs-12.20.0.ebuild deleted file mode 100644 index 794aecb45c5a..000000000000 --- a/net-libs/nodejs/nodejs-12.20.0.ebuild +++ /dev/null @@ -1,218 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6..8} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -SRC_URI=" - https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz -" - -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" -SLOT="0/$(ver_cut 1)" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl +system-ssl systemtap test" -REQUIRED_USE=" - inspector? ( icu ssl ) - npm? ( ssl ) - system-ssl? ( ssl ) -" - -RDEPEND=" - >=app-arch/brotli-1.0.9 - >=dev-libs/libuv-1.39.0:= - >=net-dns/c-ares-1.16.0 - >=net-libs/http-parser-2.9.3:= - >=net-libs/nghttp2-1.40.0 - sys-libs/zlib - icu? ( >=dev-libs/icu-64.2:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) -" -BDEPEND=" - ${PYTHON_DEPS} - sys-apps/coreutils - systemtap? ( dev-util/systemtap ) - test? ( net-misc/curl ) -" -DEPEND=" - ${RDEPEND} -" -PATCHES=( - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch - "${FILESDIR}"/${PN}-99999999-llhttp.patch -) -RESTRICT="test" -S="${WORKDIR}/node-v${PV}" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." - - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." -} - -src_prepare() { - tc-export CC CXX PKG_CONFIG - export V=1 - export BUILDTYPE=Release - - # fix compilation on Darwin - # https://code.google.com/p/gyp/issues/detail?id=260 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die - - # less verbose install output (stating the same as portage, basically) - sed -i -e "/print/d" tools/install.py || die - - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 - local LIBDIR=$(get_libdir) - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die - - # Avoid writing a depfile, not useful - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die - - sed -i -e "/'-O3'/d" common.gypi node.gypi || die - - # Avoid a test that I've only been able to reproduce from emerge. It doesnt - # seem sandbox related either (invoking it from a sandbox works fine). - # The issue is that no stdin handle is openened when asked for one. - # It doesn't really belong upstream , so it'll just be removed until someone - # with more gentoo-knowledge than me (jbergstroem) figures it out. - rm test/parallel/test-stdout-close-unref.js || die - - # debug builds. change install path, remove optimisations and override buildtype - if use debug; then - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die - BUILDTYPE=Debug - fi - - default -} - -src_configure() { - xdg_environment_reset - - local myconf=( - --shared-brotli - --shared-cares - --shared-http-parser - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) - use inspector || myconf+=( --without-inspector ) - use npm || myconf+=( --without-npm ) - use snapshot || myconf+=( --without-node-snapshot ) - if use ssl; then - use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) - else - myconf+=( --without-ssl ) - fi - - local myarch="" - case ${ABI} in - amd64) myarch="x64";; - arm) myarch="arm";; - arm64) myarch="arm64";; - ppc64) myarch="ppc64";; - x32) myarch="x32";; - x86) myarch="ia32";; - *) myarch="${ABI}";; - esac - - GYP_DEFINES="linux_use_gold_flags=0 - linux_use_bundled_binutils=0 - linux_use_bundled_gold=0" \ - "${EPYTHON}" configure.py \ - --prefix="${EPREFIX}"/usr \ - --dest-cpu=${myarch} \ - $(use_with systemtap dtrace) \ - "${myconf[@]}" || die -} - -src_compile() { - emake -C out mksnapshot - pax-mark m "out/${BUILDTYPE}/mksnapshot" - emake -C out -} - -src_install() { - local LIBDIR="${ED}/usr/$(get_libdir)" - default - - pax-mark -m "${ED}"/usr/bin/node - - # set up a symlink structure that node-gyp expects.. - dodir /usr/include/node/deps/{v8,uv} - dosym . /usr/include/node/src - for var in deps/{uv,v8}/include; do - dosym ../.. /usr/include/node/${var} - done - - if use doc; then - docinto html - dodoc -r "${S}"/doc/* - fi - - if use npm; then - dodir /etc/npm - - # Install bash completion for `npm` - # We need to temporarily replace default config path since - # npm otherwise tries to write outside of the sandbox - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die - local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" - newbashcomp "${tmp_npm_completion_file}" npm - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die - - # Move man pages - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* - - # Clean up - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die - - local find_exp="-or -name" - local find_name=() - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ - "*.md" "*.markdown" "*.bat" "*.cmd"; do - find_name+=( ${find_exp} "${match}" ) - done - - # Remove various development and/or inappropriate files and - # useless docs of dependend packages. - find "${LIBDIR}"/node_modules \ - \( -type d -name examples \) -or \( -type f \( \ - -iname "LICEN?E*" \ - "${find_name[@]}" \ - \) \) -exec rm -rf "{}" \; - fi - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - out/${BUILDTYPE}/cctest || die - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die -} - -pkg_postinst() { - elog "The global npm config lives in /etc/npm. This deviates slightly" - elog "from upstream which otherwise would have it live in /usr/etc/." - elog "" - elog "Protip: When using node-gyp to install native modules, you can" - elog "avoid having to download extras by doing the following:" - elog "$ node-gyp --nodedir /usr/include/node " -} diff --git a/net-libs/nodejs/nodejs-12.20.1.ebuild b/net-libs/nodejs/nodejs-12.20.1.ebuild new file mode 100644 index 000000000000..87b53e063d27 --- /dev/null +++ b/net-libs/nodejs/nodejs-12.20.1.ebuild @@ -0,0 +1,218 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..8} ) +PYTHON_REQ_USE="threads(+)" + +inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils + +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE="https://nodejs.org/" +SRC_URI=" + https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz +" + +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" +SLOT="0/$(ver_cut 1)" +KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-linux ~x64-macos" +IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl +system-ssl systemtap test" +REQUIRED_USE=" + inspector? ( icu ssl ) + npm? ( ssl ) + system-ssl? ( ssl ) +" + +RDEPEND=" + >=app-arch/brotli-1.0.9 + >=dev-libs/libuv-1.39.0:= + >=net-dns/c-ares-1.16.0 + >=net-libs/http-parser-2.9.3:= + >=net-libs/nghttp2-1.40.0 + sys-libs/zlib + icu? ( >=dev-libs/icu-64.2:= ) + system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) +" +BDEPEND=" + ${PYTHON_DEPS} + sys-apps/coreutils + systemtap? ( dev-util/systemtap ) + test? ( net-misc/curl ) +" +DEPEND=" + ${RDEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch + "${FILESDIR}"/${PN}-99999999-llhttp.patch +) +RESTRICT="test" +S="${WORKDIR}/node-v${PV}" + +pkg_pretend() { + (use x86 && ! use cpu_flags_x86_sse2) && \ + die "Your CPU doesn't support the required SSE2 instruction." + + ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ + die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." +} + +src_prepare() { + tc-export CC CXX PKG_CONFIG + export V=1 + export BUILDTYPE=Release + + # fix compilation on Darwin + # https://code.google.com/p/gyp/issues/detail?id=260 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die + + # less verbose install output (stating the same as portage, basically) + sed -i -e "/print/d" tools/install.py || die + + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 + local LIBDIR=$(get_libdir) + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die + sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die + + # Avoid writing a depfile, not useful + sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die + + sed -i -e "/'-O3'/d" common.gypi node.gypi || die + + # Avoid a test that I've only been able to reproduce from emerge. It doesnt + # seem sandbox related either (invoking it from a sandbox works fine). + # The issue is that no stdin handle is openened when asked for one. + # It doesn't really belong upstream , so it'll just be removed until someone + # with more gentoo-knowledge than me (jbergstroem) figures it out. + rm test/parallel/test-stdout-close-unref.js || die + + # debug builds. change install path, remove optimisations and override buildtype + if use debug; then + sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die + BUILDTYPE=Debug + fi + + default +} + +src_configure() { + xdg_environment_reset + + local myconf=( + --shared-brotli + --shared-cares + --shared-http-parser + --shared-libuv + --shared-nghttp2 + --shared-zlib + ) + use debug && myconf+=( --debug ) + use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) + use inspector || myconf+=( --without-inspector ) + use npm || myconf+=( --without-npm ) + use snapshot || myconf+=( --without-node-snapshot ) + if use ssl; then + use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) + else + myconf+=( --without-ssl ) + fi + + local myarch="" + case ${ABI} in + amd64) myarch="x64";; + arm) myarch="arm";; + arm64) myarch="arm64";; + ppc64) myarch="ppc64";; + x32) myarch="x32";; + x86) myarch="ia32";; + *) myarch="${ABI}";; + esac + + GYP_DEFINES="linux_use_gold_flags=0 + linux_use_bundled_binutils=0 + linux_use_bundled_gold=0" \ + "${EPYTHON}" configure.py \ + --prefix="${EPREFIX}"/usr \ + --dest-cpu=${myarch} \ + $(use_with systemtap dtrace) \ + "${myconf[@]}" || die +} + +src_compile() { + emake -C out mksnapshot + pax-mark m "out/${BUILDTYPE}/mksnapshot" + emake -C out +} + +src_install() { + local LIBDIR="${ED}/usr/$(get_libdir)" + default + + pax-mark -m "${ED}"/usr/bin/node + + # set up a symlink structure that node-gyp expects.. + dodir /usr/include/node/deps/{v8,uv} + dosym . /usr/include/node/src + for var in deps/{uv,v8}/include; do + dosym ../.. /usr/include/node/${var} + done + + if use doc; then + docinto html + dodoc -r "${S}"/doc/* + fi + + if use npm; then + dodir /etc/npm + + # Install bash completion for `npm` + # We need to temporarily replace default config path since + # npm otherwise tries to write outside of the sandbox + local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" + sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die + local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" + "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" + newbashcomp "${tmp_npm_completion_file}" npm + sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die + + # Move man pages + doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* + + # Clean up + rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die + + local find_exp="-or -name" + local find_name=() + for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ + ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ + "*.md" "*.markdown" "*.bat" "*.cmd"; do + find_name+=( ${find_exp} "${match}" ) + done + + # Remove various development and/or inappropriate files and + # useless docs of dependend packages. + find "${LIBDIR}"/node_modules \ + \( -type d -name examples \) -or \( -type f \( \ + -iname "LICEN?E*" \ + "${find_name[@]}" \ + \) \) -exec rm -rf "{}" \; + fi + + mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die +} + +src_test() { + out/${BUILDTYPE}/cctest || die + "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die +} + +pkg_postinst() { + elog "The global npm config lives in /etc/npm. This deviates slightly" + elog "from upstream which otherwise would have it live in /usr/etc/." + elog "" + elog "Protip: When using node-gyp to install native modules, you can" + elog "avoid having to download extras by doing the following:" + elog "$ node-gyp --nodedir /usr/include/node " +} diff --git a/net-libs/nodejs/nodejs-14.15.4.ebuild b/net-libs/nodejs/nodejs-14.15.4.ebuild new file mode 100644 index 000000000000..526772a08fda --- /dev/null +++ b/net-libs/nodejs/nodejs-14.15.4.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_REQ_USE="threads(+)" + +inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils + +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE="https://nodejs.org/" +SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" + +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" +SLOT="0/$(ver_cut 1)" +KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-linux ~x64-macos" + +IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl system-icu +system-ssl systemtap test" +REQUIRED_USE="inspector? ( icu ssl ) + npm? ( ssl ) + system-icu? ( icu ) + system-ssl? ( ssl )" + +# FIXME: test-fs-mkdir fails with "no such file or directory". Investigate. +RESTRICT="test" + +RDEPEND=">=app-arch/brotli-1.0.9 + >=dev-libs/libuv-1.40.0:= + >=net-dns/c-ares-1.16.1 + >=net-libs/nghttp2-1.41.0 + sys-libs/zlib + system-icu? ( >=dev-libs/icu-67:= ) + system-ssl? ( >=dev-libs/openssl-1.1.1:0= )" +BDEPEND="${PYTHON_DEPS} + sys-apps/coreutils + systemtap? ( dev-util/systemtap ) + test? ( net-misc/curl ) + pax_kernel? ( sys-apps/elfix )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch + "${FILESDIR}"/${PN}-14.15.0-fix_ppc64_crashes.patch +) + +S="${WORKDIR}/node-v${PV}" + +pkg_pretend() { + (use x86 && ! use cpu_flags_x86_sse2) && \ + die "Your CPU doesn't support the required SSE2 instruction." +} + +src_prepare() { + tc-export AR CC CXX PKG_CONFIG + export V=1 + export BUILDTYPE=Release + + # fix compilation on Darwin + # https://code.google.com/p/gyp/issues/detail?id=260 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die + + # less verbose install output (stating the same as portage, basically) + sed -i -e "/print/d" tools/install.py || die + + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 + local LIBDIR=$(get_libdir) + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die + sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die + + # Avoid writing a depfile, not useful + sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die + + sed -i -e "/'-O3'/d" common.gypi node.gypi || die + + # Avoid a test that I've only been able to reproduce from emerge. It doesnt + # seem sandbox related either (invoking it from a sandbox works fine). + # The issue is that no stdin handle is openened when asked for one. + # It doesn't really belong upstream , so it'll just be removed until someone + # with more gentoo-knowledge than me (jbergstroem) figures it out. + rm test/parallel/test-stdout-close-unref.js || die + + # debug builds. change install path, remove optimisations and override buildtype + if use debug; then + sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die + BUILDTYPE=Debug + fi + + # We need to disable mprotect on two files when it builds Bug 694100. + use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) + + default +} + +src_configure() { + xdg_environment_reset + + local myconf=( + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-zlib + ) + use debug && myconf+=( --debug ) + if use system-icu; then + myconf+=( --with-intl=system-icu ) + elif use icu; then + myconf+=( --with-intl=full-icu ) + else + myconf+=( --with-intl=none ) + fi + use inspector || myconf+=( --without-inspector ) + use npm || myconf+=( --without-npm ) + use snapshot || myconf+=( --without-node-snapshot ) + if use ssl; then + use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) + else + myconf+=( --without-ssl ) + fi + + local myarch="" + case ${ABI} in + amd64) myarch="x64";; + arm) myarch="arm";; + arm64) myarch="arm64";; + ppc64) myarch="ppc64";; + x32) myarch="x32";; + x86) myarch="ia32";; + *) myarch="${ABI}";; + esac + + GYP_DEFINES="linux_use_gold_flags=0 + linux_use_bundled_binutils=0 + linux_use_bundled_gold=0" \ + "${EPYTHON}" configure.py \ + --prefix="${EPREFIX}"/usr \ + --dest-cpu=${myarch} \ + $(use_with systemtap dtrace) \ + "${myconf[@]}" || die +} + +src_compile() { + emake -C out +} + +src_install() { + local LIBDIR="${ED}/usr/$(get_libdir)" + default + + pax-mark -m "${ED}"/usr/bin/node + + # set up a symlink structure that node-gyp expects.. + dodir /usr/include/node/deps/{v8,uv} + dosym . /usr/include/node/src + for var in deps/{uv,v8}/include; do + dosym ../.. /usr/include/node/${var} + done + + if use doc; then + docinto html + dodoc -r "${S}"/doc/* + fi + + if use npm; then + dodir /etc/npm + + # Install bash completion for `npm` + # We need to temporarily replace default config path since + # npm otherwise tries to write outside of the sandbox + local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" + sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die + local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" + "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" + newbashcomp "${tmp_npm_completion_file}" npm + sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die + + # Move man pages + doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* + + # Clean up + rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die + + local find_exp="-or -name" + local find_name=() + for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ + ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ + "*.md" "*.markdown" "*.bat" "*.cmd"; do + find_name+=( ${find_exp} "${match}" ) + done + + # Remove various development and/or inappropriate files and + # useless docs of dependend packages. + find "${LIBDIR}"/node_modules \ + \( -type d -name examples \) -or \( -type f \( \ + -iname "LICEN?E*" \ + "${find_name[@]}" \ + \) \) -exec rm -rf "{}" \; + fi + + mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die +} + +src_test() { + out/${BUILDTYPE}/cctest || die + "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die +} diff --git a/net-libs/nodejs/nodejs-15.2.1.ebuild b/net-libs/nodejs/nodejs-15.2.1.ebuild deleted file mode 100644 index b8481a2f946c..000000000000 --- a/net-libs/nodejs/nodejs-15.2.1.ebuild +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" -SLOT="0/$(ver_cut 1)" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" - -IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl system-icu +system-ssl systemtap test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl )" - -# FIXME: test-fs-mkdir fails with "no such file or directory". Investigate. -RESTRICT="test" - -RDEPEND=">=app-arch/brotli-1.0.9 - >=dev-libs/libuv-1.40.0:= - >=net-dns/c-ares-1.17.0 - >=net-libs/nghttp2-1.41.0 - sys-libs/zlib - system-icu? ( >=dev-libs/icu-67:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= )" -BDEPEND="${PYTHON_DEPS} - sys-apps/coreutils - systemtap? ( dev-util/systemtap ) - test? ( net-misc/curl ) - pax_kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch -) - -S="${WORKDIR}/node-v${PV}" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." -} - -src_prepare() { - tc-export AR CC CXX PKG_CONFIG - export V=1 - export BUILDTYPE=Release - - # fix compilation on Darwin - # https://code.google.com/p/gyp/issues/detail?id=260 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die - - # less verbose install output (stating the same as portage, basically) - sed -i -e "/print/d" tools/install.py || die - - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 - local LIBDIR=$(get_libdir) - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die - - # Avoid writing a depfile, not useful - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die - - sed -i -e "/'-O3'/d" common.gypi node.gypi || die - - # Avoid a test that I've only been able to reproduce from emerge. It doesnt - # seem sandbox related either (invoking it from a sandbox works fine). - # The issue is that no stdin handle is openened when asked for one. - # It doesn't really belong upstream , so it'll just be removed until someone - # with more gentoo-knowledge than me (jbergstroem) figures it out. - rm test/parallel/test-stdout-close-unref.js || die - - # debug builds. change install path, remove optimisations and override buildtype - if use debug; then - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die - BUILDTYPE=Debug - fi - - # We need to disable mprotect on two files when it builds Bug 694100. - use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - local myconf=( - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - if use system-icu; then - myconf+=( --with-intl=system-icu ) - elif use icu; then - myconf+=( --with-intl=full-icu ) - else - myconf+=( --with-intl=none ) - fi - use inspector || myconf+=( --without-inspector ) - use npm || myconf+=( --without-npm ) - use snapshot || myconf+=( --without-node-snapshot ) - if use ssl; then - use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) - else - myconf+=( --without-ssl ) - fi - - local myarch="" - case ${ABI} in - amd64) myarch="x64";; - arm) myarch="arm";; - arm64) myarch="arm64";; - ppc64) myarch="ppc64";; - x32) myarch="x32";; - x86) myarch="ia32";; - *) myarch="${ABI}";; - esac - - GYP_DEFINES="linux_use_gold_flags=0 - linux_use_bundled_binutils=0 - linux_use_bundled_gold=0" \ - "${EPYTHON}" configure.py \ - --prefix="${EPREFIX}"/usr \ - --dest-cpu=${myarch} \ - $(use_with systemtap dtrace) \ - "${myconf[@]}" || die -} - -src_compile() { - emake -C out -} - -src_install() { - local LIBDIR="${ED}/usr/$(get_libdir)" - default - - pax-mark -m "${ED}"/usr/bin/node - - # set up a symlink structure that node-gyp expects.. - dodir /usr/include/node/deps/{v8,uv} - dosym . /usr/include/node/src - for var in deps/{uv,v8}/include; do - dosym ../.. /usr/include/node/${var} - done - - if use doc; then - docinto html - dodoc -r "${S}"/doc/* - fi - - if use npm; then - keepdir /etc/npm - - # Install bash completion for `npm` - local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" - newbashcomp "${tmp_npm_completion_file}" npm - - # Move man pages - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* - - # Clean up - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die - - local find_exp="-or -name" - local find_name=() - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ - "*.md" "*.markdown" "*.bat" "*.cmd"; do - find_name+=( ${find_exp} "${match}" ) - done - - # Remove various development and/or inappropriate files and - # useless docs of dependend packages. - find "${LIBDIR}"/node_modules \ - \( -type d -name examples \) -or \( -type f \( \ - -iname "LICEN?E*" \ - "${find_name[@]}" \ - \) \) -exec rm -rf "{}" \; - fi - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die -} diff --git a/net-libs/nodejs/nodejs-15.3.0.ebuild b/net-libs/nodejs/nodejs-15.3.0.ebuild deleted file mode 100644 index b8481a2f946c..000000000000 --- a/net-libs/nodejs/nodejs-15.3.0.ebuild +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" -SLOT="0/$(ver_cut 1)" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" - -IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl system-icu +system-ssl systemtap test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl )" - -# FIXME: test-fs-mkdir fails with "no such file or directory". Investigate. -RESTRICT="test" - -RDEPEND=">=app-arch/brotli-1.0.9 - >=dev-libs/libuv-1.40.0:= - >=net-dns/c-ares-1.17.0 - >=net-libs/nghttp2-1.41.0 - sys-libs/zlib - system-icu? ( >=dev-libs/icu-67:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= )" -BDEPEND="${PYTHON_DEPS} - sys-apps/coreutils - systemtap? ( dev-util/systemtap ) - test? ( net-misc/curl ) - pax_kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch -) - -S="${WORKDIR}/node-v${PV}" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." -} - -src_prepare() { - tc-export AR CC CXX PKG_CONFIG - export V=1 - export BUILDTYPE=Release - - # fix compilation on Darwin - # https://code.google.com/p/gyp/issues/detail?id=260 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die - - # less verbose install output (stating the same as portage, basically) - sed -i -e "/print/d" tools/install.py || die - - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 - local LIBDIR=$(get_libdir) - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die - - # Avoid writing a depfile, not useful - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die - - sed -i -e "/'-O3'/d" common.gypi node.gypi || die - - # Avoid a test that I've only been able to reproduce from emerge. It doesnt - # seem sandbox related either (invoking it from a sandbox works fine). - # The issue is that no stdin handle is openened when asked for one. - # It doesn't really belong upstream , so it'll just be removed until someone - # with more gentoo-knowledge than me (jbergstroem) figures it out. - rm test/parallel/test-stdout-close-unref.js || die - - # debug builds. change install path, remove optimisations and override buildtype - if use debug; then - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die - BUILDTYPE=Debug - fi - - # We need to disable mprotect on two files when it builds Bug 694100. - use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - local myconf=( - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - if use system-icu; then - myconf+=( --with-intl=system-icu ) - elif use icu; then - myconf+=( --with-intl=full-icu ) - else - myconf+=( --with-intl=none ) - fi - use inspector || myconf+=( --without-inspector ) - use npm || myconf+=( --without-npm ) - use snapshot || myconf+=( --without-node-snapshot ) - if use ssl; then - use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) - else - myconf+=( --without-ssl ) - fi - - local myarch="" - case ${ABI} in - amd64) myarch="x64";; - arm) myarch="arm";; - arm64) myarch="arm64";; - ppc64) myarch="ppc64";; - x32) myarch="x32";; - x86) myarch="ia32";; - *) myarch="${ABI}";; - esac - - GYP_DEFINES="linux_use_gold_flags=0 - linux_use_bundled_binutils=0 - linux_use_bundled_gold=0" \ - "${EPYTHON}" configure.py \ - --prefix="${EPREFIX}"/usr \ - --dest-cpu=${myarch} \ - $(use_with systemtap dtrace) \ - "${myconf[@]}" || die -} - -src_compile() { - emake -C out -} - -src_install() { - local LIBDIR="${ED}/usr/$(get_libdir)" - default - - pax-mark -m "${ED}"/usr/bin/node - - # set up a symlink structure that node-gyp expects.. - dodir /usr/include/node/deps/{v8,uv} - dosym . /usr/include/node/src - for var in deps/{uv,v8}/include; do - dosym ../.. /usr/include/node/${var} - done - - if use doc; then - docinto html - dodoc -r "${S}"/doc/* - fi - - if use npm; then - keepdir /etc/npm - - # Install bash completion for `npm` - local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" - newbashcomp "${tmp_npm_completion_file}" npm - - # Move man pages - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* - - # Clean up - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die - - local find_exp="-or -name" - local find_name=() - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ - "*.md" "*.markdown" "*.bat" "*.cmd"; do - find_name+=( ${find_exp} "${match}" ) - done - - # Remove various development and/or inappropriate files and - # useless docs of dependend packages. - find "${LIBDIR}"/node_modules \ - \( -type d -name examples \) -or \( -type f \( \ - -iname "LICEN?E*" \ - "${find_name[@]}" \ - \) \) -exec rm -rf "{}" \; - fi - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die -} diff --git a/net-libs/nodejs/nodejs-15.5.1.ebuild b/net-libs/nodejs/nodejs-15.5.1.ebuild new file mode 100644 index 000000000000..b8481a2f946c --- /dev/null +++ b/net-libs/nodejs/nodejs-15.5.1.ebuild @@ -0,0 +1,202 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_REQ_USE="threads(+)" + +inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils + +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE="https://nodejs.org/" +SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" + +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" +SLOT="0/$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" + +IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl system-icu +system-ssl systemtap test" +REQUIRED_USE="inspector? ( icu ssl ) + npm? ( ssl ) + system-icu? ( icu ) + system-ssl? ( ssl )" + +# FIXME: test-fs-mkdir fails with "no such file or directory". Investigate. +RESTRICT="test" + +RDEPEND=">=app-arch/brotli-1.0.9 + >=dev-libs/libuv-1.40.0:= + >=net-dns/c-ares-1.17.0 + >=net-libs/nghttp2-1.41.0 + sys-libs/zlib + system-icu? ( >=dev-libs/icu-67:= ) + system-ssl? ( >=dev-libs/openssl-1.1.1:0= )" +BDEPEND="${PYTHON_DEPS} + sys-apps/coreutils + systemtap? ( dev-util/systemtap ) + test? ( net-misc/curl ) + pax_kernel? ( sys-apps/elfix )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch +) + +S="${WORKDIR}/node-v${PV}" + +pkg_pretend() { + (use x86 && ! use cpu_flags_x86_sse2) && \ + die "Your CPU doesn't support the required SSE2 instruction." +} + +src_prepare() { + tc-export AR CC CXX PKG_CONFIG + export V=1 + export BUILDTYPE=Release + + # fix compilation on Darwin + # https://code.google.com/p/gyp/issues/detail?id=260 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die + + # less verbose install output (stating the same as portage, basically) + sed -i -e "/print/d" tools/install.py || die + + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 + local LIBDIR=$(get_libdir) + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die + sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die + + # Avoid writing a depfile, not useful + sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die + + sed -i -e "/'-O3'/d" common.gypi node.gypi || die + + # Avoid a test that I've only been able to reproduce from emerge. It doesnt + # seem sandbox related either (invoking it from a sandbox works fine). + # The issue is that no stdin handle is openened when asked for one. + # It doesn't really belong upstream , so it'll just be removed until someone + # with more gentoo-knowledge than me (jbergstroem) figures it out. + rm test/parallel/test-stdout-close-unref.js || die + + # debug builds. change install path, remove optimisations and override buildtype + if use debug; then + sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die + BUILDTYPE=Debug + fi + + # We need to disable mprotect on two files when it builds Bug 694100. + use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) + + default +} + +src_configure() { + xdg_environment_reset + + local myconf=( + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-zlib + ) + use debug && myconf+=( --debug ) + if use system-icu; then + myconf+=( --with-intl=system-icu ) + elif use icu; then + myconf+=( --with-intl=full-icu ) + else + myconf+=( --with-intl=none ) + fi + use inspector || myconf+=( --without-inspector ) + use npm || myconf+=( --without-npm ) + use snapshot || myconf+=( --without-node-snapshot ) + if use ssl; then + use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) + else + myconf+=( --without-ssl ) + fi + + local myarch="" + case ${ABI} in + amd64) myarch="x64";; + arm) myarch="arm";; + arm64) myarch="arm64";; + ppc64) myarch="ppc64";; + x32) myarch="x32";; + x86) myarch="ia32";; + *) myarch="${ABI}";; + esac + + GYP_DEFINES="linux_use_gold_flags=0 + linux_use_bundled_binutils=0 + linux_use_bundled_gold=0" \ + "${EPYTHON}" configure.py \ + --prefix="${EPREFIX}"/usr \ + --dest-cpu=${myarch} \ + $(use_with systemtap dtrace) \ + "${myconf[@]}" || die +} + +src_compile() { + emake -C out +} + +src_install() { + local LIBDIR="${ED}/usr/$(get_libdir)" + default + + pax-mark -m "${ED}"/usr/bin/node + + # set up a symlink structure that node-gyp expects.. + dodir /usr/include/node/deps/{v8,uv} + dosym . /usr/include/node/src + for var in deps/{uv,v8}/include; do + dosym ../.. /usr/include/node/${var} + done + + if use doc; then + docinto html + dodoc -r "${S}"/doc/* + fi + + if use npm; then + keepdir /etc/npm + + # Install bash completion for `npm` + local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" + "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" + newbashcomp "${tmp_npm_completion_file}" npm + + # Move man pages + doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* + + # Clean up + rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die + + local find_exp="-or -name" + local find_name=() + for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ + ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ + "*.md" "*.markdown" "*.bat" "*.cmd"; do + find_name+=( ${find_exp} "${match}" ) + done + + # Remove various development and/or inappropriate files and + # useless docs of dependend packages. + find "${LIBDIR}"/node_modules \ + \( -type d -name examples \) -or \( -type f \( \ + -iname "LICEN?E*" \ + "${find_name[@]}" \ + \) \) -exec rm -rf "{}" \; + fi + + mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die +} + +src_test() { + out/${BUILDTYPE}/cctest || die + "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die +} -- cgit v1.2.3