From f516638b7fe9592837389826a6152a7e1b251c54 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 30 May 2020 11:44:06 +0100 Subject: gentoo resync : 30.05.2020 --- net-libs/nodejs/Manifest | 16 +-- net-libs/nodejs/nodejs-12.17.0.ebuild | 213 +++++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-13.13.0.ebuild | 209 -------------------------------- net-libs/nodejs/nodejs-13.14.0.ebuild | 209 -------------------------------- net-libs/nodejs/nodejs-14.0.0.ebuild | 209 -------------------------------- net-libs/nodejs/nodejs-14.1.0.ebuild | 209 -------------------------------- net-libs/nodejs/nodejs-14.2.0.ebuild | 11 +- net-libs/nodejs/nodejs-14.3.0.ebuild | 200 +++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-99999999.ebuild | 9 -- 9 files changed, 420 insertions(+), 865 deletions(-) create mode 100644 net-libs/nodejs/nodejs-12.17.0.ebuild delete mode 100644 net-libs/nodejs/nodejs-13.13.0.ebuild delete mode 100644 net-libs/nodejs/nodejs-13.14.0.ebuild delete mode 100644 net-libs/nodejs/nodejs-14.0.0.ebuild delete mode 100644 net-libs/nodejs/nodejs-14.1.0.ebuild create mode 100644 net-libs/nodejs/nodejs-14.3.0.ebuild (limited to 'net-libs/nodejs') diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index c258cbe30f0f..2541dff0552a 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -7,22 +7,18 @@ DIST node-v10.20.1.tar.xz 21947588 BLAKE2B 6078e29a125fc1020de7b62c97174d82273af DIST node-v12.16.1.tar.xz 23481768 BLAKE2B 29371b952c14907778c064269108f1da5e3818c32773e73090c61edcd07190c418189db6a505987ca71f99bb868880e297de5d2181b9a880774eaaf515985f26 SHA512 fe1e9fabb6fe52e3bc4275b33e6c5e4a761550b04964c0ae7dbef7172f5d415207bb2985751d068e357ce45a0ba414b07c0abd1531ef839b9463e98eeae8f9a4 DIST node-v12.16.2.tar.xz 23654020 BLAKE2B aa4bb764a8731e32ce07d03d96d573632bbf9af79b127c2acec48fcf335c01ea0ea99532670a46befac42e2e1ce5a4dbd2e4cf0d068bac05749d87af59bb80fa SHA512 81688468bc6e20d83f7f58f0c15f9291a801eb2acc8ba7279e65d81f3eb4ea95e3b6cee0d09738c0d0fa35226ae3d52f2bad5da63a20a3edc9129197d42d000d DIST node-v12.16.3.tar.xz 23682432 BLAKE2B 91b97c0de9c76f33d080f3f12a42a15140be6e3f4d42022a55305dc2afc04de6a2b8364b9fc5df0dd71c9ec249eb9e4da8ff23f53be43a1f306d2a6fbc6d6bce SHA512 e5d2d1960972f19ef5acc667efb702d534eb436212dea9e0bfd817328c927b55734406f232b32bba366f05c2691e5085e3a6f8c1e2d959398745e60719e731b3 -DIST node-v13.13.0.tar.xz 32862040 BLAKE2B de2802543421049d225b9eab5f1edd3f3d483cf50839fd646cc5756f272b42baaf56c58c3c31c498cb79abf8ed678cd5dbe6c5622b6dd4564ed22dbde11ce1ae SHA512 344d364fd39c9497ff7d2829b271b572f3f997fc3eb01744c9ba533b4ba1e8a1fbd08ad28909e74504f4bf84de95d0197a0b5e8b9cf07180a1457fdd2e95775e -DIST node-v13.14.0.tar.xz 32862504 BLAKE2B 2e74e1d8afd508aade66db2e4c251be18308932502db5c3f556a233ce863faaa5279b5fa758c9b4aa76b7fa0469b9440b696695787ca58092ad8fc0389b8a029 SHA512 c0da3e7742dddbead71c321157fdd5790de688a98c0c6016e06e6a26babea7347595d74cc8b9ac7e033daf8bd23d0306316e41f138e7b9220ce25b05403602d2 -DIST node-v14.0.0.tar.xz 32850900 BLAKE2B ef24e6559246f64d9a54d1e6c9ac390bb416af2ac494547f4171db014e2213cd0b11a482ab611865ca3f61a60a9d793207c53f1779d687a7ba7a32fc4d9f29cc SHA512 030dff2bc46594e5e86e0383185030980ae486bbdab2fd2cf65e591c80a9426cf4e6f16c384d36e6094b8a58e8511d7019bef379c44650507d1352a680505710 -DIST node-v14.1.0.tar.xz 32861052 BLAKE2B 34727e0c615b08941edf29da6cc88cfb039f25321b25ea2e544dc6b844520e9174572b5ada5719d73fdb55dbacc156726fdfb7a552defd02f2bfebd3a2cc3835 SHA512 90c981ea198dca59aa1e2b8e528d6e7ea0bf13066ae0d9ffdd9018d8923496e029f0e3ddc0bbf8e0eb67e1087a26a41e16101c83297e086b904a4a92865e7101 +DIST node-v12.17.0.tar.xz 23702040 BLAKE2B 4b35c6f7a3c16a7b737bc5b71f075fe6c66c9c4a5cd3ee240a0c1af9cfd4e10c61520d0489169a74354734083b7f7c68b97eefaa6f40e3320ec5b0126d36169f SHA512 0fc8483c6ae8994ff4f4b2465f1b8b1d3c620c90222fb270fe3d317d967294cc9e6bdcc50277fbe0ab28cb3ce9e73ec122c19adf8a686ecc95de3268b82ca4f7 DIST node-v14.2.0.tar.xz 32884616 BLAKE2B 7bcb07cb7623c5e08c20267c320cdf23ad110f124c5ad1f2447ef8b76ab8dc44ed50dab7c5651424d9d3a36f7eeecdf3292b07c02cb2e22c3fbe4ed633c4b842 SHA512 47e5ec0b7a207082d43419a7e0a6ea9242ec43b4d7c2217eb66d0b45e2f4d5cb561b3f6fe35fdc41a8be95c182dc122ba262f696ebd12833596d71b372ec85d2 +DIST node-v14.3.0.tar.xz 32985344 BLAKE2B 32ee357e109484422c3b22423ab9a593cd5d4611073c820f90c196dae4df2860573cdd06170879f675b738b01885eb2fe0f25c2328841838bf9367324cc981a7 SHA512 3afcc430bad57150baa8d1c0e5ef0f64691ef6549a052be654a86313fe28f31e7fdfeea4d2b3993798a7141bc6d7b1642747d1bc2636139e2f2fd79441580148 DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42 EBUILD nodejs-10.19.0.ebuild 6357 BLAKE2B b44a9661af496c8ba80b1ee680b2c511b3b6c2f7702d23710ff2876312e1f20016e579a36531083699a9881001e65150565c3b1fe6f5875b667aa9b79e87a665 SHA512 b290ea8a99c36e16fc0dcae001a3466a094c7ab6953c04f04a86ee0cef14b8ba861e86ad44e0a2b882636b16e95de6975afe40bb5d5e090791322bad6c276b8c EBUILD nodejs-10.20.1.ebuild 6361 BLAKE2B 347a4d538848e42a071ecab801743002b1a2c979dfbf67be153024541b53ab7ad9814d25bdeb31ee13a659a24470c6a73fefcecd7b1175836506bb25681ff4cf SHA512 6858af544698d7b343bc41b0c6a57956cdff1602d0018b00662d0ceb4b619e821fd14dcef67573b96c680e1584714745e007088dbeda9f5f410937892260186e EBUILD nodejs-12.16.1.ebuild 6199 BLAKE2B 401807f39cc6cb178a532cb99f73558c47916f766a45184ce63cd0260605d2977a164cafa8a1197b7177da6b8198ba3224e2ca96733b47e8ea104fe1d6465a4c SHA512 7ce5fd34dc047875994da88d022c693e599b379bd9bcd98ecaecd99dd8eb45e7bfafc303f4d328e5cd241e5486a015a29197df0a905bb67e84c6b943930e229c EBUILD nodejs-12.16.2.ebuild 6203 BLAKE2B 013443da57ae66e7a58247e7ab3599d72fbfcb1a62f9bf6d06b4412a5bae1372eefd7e8cbc68aed2d97b72734c60ce3a38effb34b6961872c946bfa4c5bba4b6 SHA512 9b56e373305402bd499d09b04f748f555f6e1966bbc5c112ddb0e1a372615c89b58850bc802b86f9e0b06942d6707095f156a05b15ad9c01b55c4c23c1301d53 EBUILD nodejs-12.16.3.ebuild 6203 BLAKE2B 244b4c61b0f6272b26e5664ddfbd67eb6bb8637af78b1e57b5a077d7ee978499875e7d4a8dacb29d93cfe6e589415c969fe52012b41d5dc718c78a25bc1d913f SHA512 19b19f7c108ae641833c1c8e1351de8ed511bf04b53a5003d5d6225b5aa59933857368ba8415afb88b2278d1daac8f4de9d57f3b755a3a27fa33b04a3f470a9e -EBUILD nodejs-13.13.0.ebuild 6226 BLAKE2B 4877dfa461a9a820b9c6b3fe220c79feebceb83f38c0f3ebd2b2332321d1f9c25687c9b070fc193848240dfa7daf6e51bb6e70c5db3a32d321afbfdb15397ed8 SHA512 e217a858839e4e9230b386c6801d19fe92dcddeb400a7251c9349580a1288eb4d28d49f30bf37f5d7d1726d10e12561c268278b2f38e3916400532496f157d42 -EBUILD nodejs-13.14.0.ebuild 6226 BLAKE2B 21b75409b778d341aaf1774f28604ba07a1d417f0a5912c0f8e9f3d95d827754b123cdafd00e019f3fe4bdeab725b48e2cf8878ec3d8eca65f4a8b255aa06cbb SHA512 4a0f6a8fdd3070f3e7e93709a44b3252ab9314886b3a41e507aa41e982d0a26bd2a5d2435a9c040939c1f3ccfe32c5289a318c2c7a81d3a24c1b9ef4785244ac -EBUILD nodejs-14.0.0.ebuild 6224 BLAKE2B 8ecb32a184e5235191b97e3d202ccc90d453ca6a9d4ca3f9f876ab999d71dae29df3f052468b48873aa94667ef357157511db4d92bc4bef4b59cd4223eaf0ce0 SHA512 4ee2d93280948622c2b8fe928e59701bda91da51f3c080b4ee9921d8985854b00316844fb270a937b2459ce008bbc9dc896ce6f901b752bfdd8852e3aa01a299 -EBUILD nodejs-14.1.0.ebuild 6224 BLAKE2B 8ecb32a184e5235191b97e3d202ccc90d453ca6a9d4ca3f9f876ab999d71dae29df3f052468b48873aa94667ef357157511db4d92bc4bef4b59cd4223eaf0ce0 SHA512 4ee2d93280948622c2b8fe928e59701bda91da51f3c080b4ee9921d8985854b00316844fb270a937b2459ce008bbc9dc896ce6f901b752bfdd8852e3aa01a299 -EBUILD nodejs-14.2.0.ebuild 6224 BLAKE2B 8ecb32a184e5235191b97e3d202ccc90d453ca6a9d4ca3f9f876ab999d71dae29df3f052468b48873aa94667ef357157511db4d92bc4bef4b59cd4223eaf0ce0 SHA512 4ee2d93280948622c2b8fe928e59701bda91da51f3c080b4ee9921d8985854b00316844fb270a937b2459ce008bbc9dc896ce6f901b752bfdd8852e3aa01a299 +EBUILD nodejs-12.17.0.ebuild 6203 BLAKE2B 79828e49fec7611daefdaf87a5153b97feb88495fdbf666c4c7dd61abc6189d98dd978bdc19f1bfb4049fbb6a4dcea29d4ced7feda206a5f2b58c2b3e568c469 SHA512 3f73c09dc1e215985423e217276478b7ac160d85e2aea53feee017fb03a81358382725972e4c039887c50674521f2c37927ceca3c23412bdc415ebd7c4e25cc0 +EBUILD nodejs-14.2.0.ebuild 5858 BLAKE2B a55c2d19e5aae5b1bccf69df37ed387465bb3adb10bfd7c0660f4a72cd3de20d1d5237c6c5bdc1332a7c983a77b923abbcc90c3c38cec6877910652af196f8d2 SHA512 9a220c64ff886b46f45a726b6c92049cc0eacb8fbc546a305c8d6292b6aed77f9bdbd13be7cb703cf17e5ff6ed095baf90f2249519f32fdd394b0663c2b0c273 +EBUILD nodejs-14.3.0.ebuild 5860 BLAKE2B f06c5967350ba2a80010fd7fbdde840cd1357e3c0144bc56120dc8a97db85950d27b1739e13da8cf9352d425a69bf5a583897e777f3506b324248882a0636106 SHA512 f62d937f362a16c3025ccc81c95e1f85d1a85bda1df86b1778faa1bc8da85f69f02f6cd80acd92bd670781690f66ae43c00bfa21f04dd74c3b161839ae367134 EBUILD nodejs-8.12.0.ebuild 6352 BLAKE2B 15a9b98d89d83fb5959b3b2582cea6a430e9dad5ac6033d7ea32647122ed8cf6a093f7dd90abb93f8585c7c1506d2c801bd439651a447b366fbe75a43259fa55 SHA512 df0848a3e96a62d6191ff0dbcf7ce55eb8da34913c39960e8eb02eb2b3c6d6f6d2202e884c77612b93048c85e6079cc95469c17e8357690936ea92eba400ba7c -EBUILD nodejs-99999999.ebuild 6142 BLAKE2B 41273a7cb4e6a77242201d3fcebfed64ce7720555502fafb5df7a0de16f13598f94dad73669180c778e3013876c5c9f9f61001ee03d23fb3cc32ffeb5c12a53a SHA512 3fdd9d6c46061a1bf9b7f149f20ec07f8ce30b3669efcc439bb778f0fd34dfa2a7e1c53799c162454127479e2a912a4b5dad9174903803cf079aa0c82598518e +EBUILD nodejs-99999999.ebuild 5778 BLAKE2B 9b07315384b4d725acb2839907378a4354bce227f3f920147b295f0d49541da3bb92dc20a2d179d97c9f14e7217db1ee16005af17de09cb31a2744b278cc0cb3 SHA512 5d576f85135cf1ec0ca2c4f7723e9e0d349f5df8ae69b4dbb4183924ee6987c9da91764716e7ed287aa9d73e7d41fb0ce4ddd2e03fb6276c6628e50ec443afd3 MISC metadata.xml 628 BLAKE2B 0276a9cc8a0c7a08efb17e5635f561b50dec54e41ee239d96c026bc9609826a8f544faa43eb1b7244cffbdc052ca969b51b0540c08cc8276142dc8305eab2d00 SHA512 619954806c55cb873fd460bcf2f1edb4e4c2064dc60286cfb3292f3a583f5ca8d1d65d9fe0575ef3ed4148d73da817ee589750daf4b5a0147d276240db39ce87 diff --git a/net-libs/nodejs/nodejs-12.17.0.ebuild b/net-libs/nodejs/nodejs-12.17.0.ebuild new file mode 100644 index 000000000000..8b860166ed51 --- /dev/null +++ b/net-libs/nodejs/nodejs-12.17.0.ebuild @@ -0,0 +1,213 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_REQ_USE="threads(+)" +inherit bash-completion-r1 eutils 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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~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=" + >=dev-libs/libuv-1.37.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} + 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-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="$(emktemp)" + "${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-13.13.0.ebuild b/net-libs/nodejs/nodejs-13.13.0.ebuild deleted file mode 100644 index fa8994789329..000000000000 --- a/net-libs/nodejs/nodejs-13.13.0.ebuild +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -PYTHON_REQ_USE="threads(+)" -inherit bash-completion-r1 eutils 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" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" -REQUIRED_USE=" - inspector? ( icu ssl ) - npm? ( ssl ) - system-ssl? ( ssl ) -" - -RDEPEND=" - >=dev-libs/libuv-1.35.0:= - >=net-dns/c-ares-1.16.0 - >=net-libs/nghttp2-1.40.0 - sys-libs/zlib - icu? ( >=dev-libs/icu-66.1:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) -" -BDEPEND=" - ${PYTHON_DEPS} - 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 -) -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 - - # 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-cares --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 -} - -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="$(emktemp)" - "${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 -} - -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-13.14.0.ebuild b/net-libs/nodejs/nodejs-13.14.0.ebuild deleted file mode 100644 index 625eb14589d5..000000000000 --- a/net-libs/nodejs/nodejs-13.14.0.ebuild +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -PYTHON_REQ_USE="threads(+)" -inherit bash-completion-r1 eutils 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" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" -REQUIRED_USE=" - inspector? ( icu ssl ) - npm? ( ssl ) - system-ssl? ( ssl ) -" - -RDEPEND=" - >=dev-libs/libuv-1.37.0:= - >=net-dns/c-ares-1.16.0 - >=net-libs/nghttp2-1.40.0 - sys-libs/zlib - icu? ( >=dev-libs/icu-64.1:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) -" -BDEPEND=" - ${PYTHON_DEPS} - 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 -) -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 - - # 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-cares --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 -} - -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="$(emktemp)" - "${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 -} - -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.0.0.ebuild b/net-libs/nodejs/nodejs-14.0.0.ebuild deleted file mode 100644 index ddd7391838eb..000000000000 --- a/net-libs/nodejs/nodejs-14.0.0.ebuild +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -PYTHON_REQ_USE="threads(+)" -inherit bash-completion-r1 eutils 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" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" -REQUIRED_USE=" - inspector? ( icu ssl ) - npm? ( ssl ) - system-ssl? ( ssl ) -" - -RDEPEND=" - >=dev-libs/libuv-1.37.0:= - >=net-dns/c-ares-1.16.0 - >=net-libs/nghttp2-1.40.0 - sys-libs/zlib - icu? ( >=dev-libs/icu-65:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) -" -BDEPEND=" - ${PYTHON_DEPS} - 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 -) -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 - - # 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-cares --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 -} - -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="$(emktemp)" - "${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 -} - -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.1.0.ebuild b/net-libs/nodejs/nodejs-14.1.0.ebuild deleted file mode 100644 index ddd7391838eb..000000000000 --- a/net-libs/nodejs/nodejs-14.1.0.ebuild +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -PYTHON_REQ_USE="threads(+)" -inherit bash-completion-r1 eutils 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" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" -REQUIRED_USE=" - inspector? ( icu ssl ) - npm? ( ssl ) - system-ssl? ( ssl ) -" - -RDEPEND=" - >=dev-libs/libuv-1.37.0:= - >=net-dns/c-ares-1.16.0 - >=net-libs/nghttp2-1.40.0 - sys-libs/zlib - icu? ( >=dev-libs/icu-65:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) -" -BDEPEND=" - ${PYTHON_DEPS} - 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 -) -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 - - # 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-cares --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 -} - -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="$(emktemp)" - "${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 -} - -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.2.0.ebuild b/net-libs/nodejs/nodejs-14.2.0.ebuild index ddd7391838eb..c671beff662a 100644 --- a/net-libs/nodejs/nodejs-14.2.0.ebuild +++ b/net-libs/nodejs/nodejs-14.2.0.ebuild @@ -14,7 +14,7 @@ SRC_URI=" LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" REQUIRED_USE=" inspector? ( icu ssl ) @@ -198,12 +198,3 @@ src_test() { out/${BUILDTYPE}/cctest || die "${EPYTHON}" 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.3.0.ebuild b/net-libs/nodejs/nodejs-14.3.0.ebuild new file mode 100644 index 000000000000..b1523bbc10df --- /dev/null +++ b/net-libs/nodejs/nodejs-14.3.0.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_REQ_USE="threads(+)" +inherit bash-completion-r1 eutils 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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" +IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" +REQUIRED_USE=" + inspector? ( icu ssl ) + npm? ( ssl ) + system-ssl? ( ssl ) +" + +RDEPEND=" + >=dev-libs/libuv-1.37.0:= + >=net-dns/c-ares-1.16.0 + >=net-libs/nghttp2-1.40.0 + sys-libs/zlib + icu? ( >=dev-libs/icu-65:= ) + system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) +" +BDEPEND=" + ${PYTHON_DEPS} + 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 +) +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 + + # 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-cares --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 +} + +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="$(emktemp)" + "${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-99999999.ebuild b/net-libs/nodejs/nodejs-99999999.ebuild index e7be7ae9d90d..4f9bf8953720 100644 --- a/net-libs/nodejs/nodejs-99999999.ebuild +++ b/net-libs/nodejs/nodejs-99999999.ebuild @@ -195,12 +195,3 @@ src_test() { out/${BUILDTYPE}/cctest || die "${EPYTHON}" 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 " -} -- cgit v1.2.3