diff options
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r-- | net-libs/nodejs/Manifest | 6 | ||||
-rw-r--r-- | net-libs/nodejs/nodejs-10.17.0.ebuild | 2 | ||||
-rw-r--r-- | net-libs/nodejs/nodejs-13.1.0.ebuild | 205 | ||||
-rw-r--r-- | net-libs/nodejs/nodejs-99999999.ebuild | 11 |
4 files changed, 212 insertions, 12 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index 96ebdefb5d2c..9f2491af7d72 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -3,12 +3,14 @@ AUX nodejs-99999999-llhttp.patch 506 BLAKE2B eea449910b97dfc320247f20bf20467f6c5 DIST node-v10.17.0.tar.xz 21514260 BLAKE2B a37793d78e14d1d2ca861c39f27c5e1dbb47ad26f14aa97139fd9f9be039bd47e528f10c9977725f1ca4b5f4e31a1066715091ffaa488f764c67290bc1c84541 SHA512 4eec936fa8d848b7e261f83b6e25c1bfb06355a7146dcca91b0f64fc401ca32dd1b0758c127b81be7f0d1cc59c3b24b4ec2c17282b4bdb91c5bf71f42f2f7cbc DIST node-v12.13.0.tar.xz 22862096 BLAKE2B b0121f45b535bac7baa0103db538070b4beb4b40a6c871c217eebfb1abb5a7821d83d46946047b3385af182f901c0390eb85134c9201be2d03b5745b297271f8 SHA512 a7aa8b1f010ea1df122d9d7b88ee0a9d10e0d79ae2f3d18c706ac6ce36e2e2039c21ea6f3dba3a22a79ed3f6069850a8a3c463dbd64e1e8f4a9dbe8901a89cc8 DIST node-v13.0.1.tar.xz 31986844 BLAKE2B f30937878ef68fe94b69912b994b84c03d75fd92e243d77453cfa7d335e9e1a37ce4f18eb1cbba141ff9a017a777e31ae64261f46dbf17d1f6ff0d6d5c263a2a SHA512 a39a64761ef3867379f3a2ef230f65ddeb91fb93d8833c1ada7312588fd75d060f4d73df1a106f7d7cc08886ac7c5335d453e4d882c8cdde28a25a0a8cbcbfa6 +DIST node-v13.1.0.tar.xz 31981260 BLAKE2B a7c9a8d851b22f3cb24132adad0c0e971401c1555951fffc2bd69b3b8bcfc295fdebde6918a467203c30bd62f883f5997f6ec57c7197854187ef78a56e52a8e8 SHA512 fa05064980c47f58b6f3e3590ca94b45850184c86d79cc2f1e489222685cb38ca7c8e0e7bc7b9dceec1148256c2ae7bcf3ddc6468c6b366a4281d77c1c20b699 DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42 DIST node-v8.16.2.tar.xz 18531368 BLAKE2B aec2f6257ab9237097e590b70b2e8615b664576b3af2f176260f26460f4f50bb1e00c2aff477a32cdb9ebf83f8b4eadc3ccdc2df431e359904fe4375513fb6c1 SHA512 8b0d4a089a5c80869971ceeffbef3ca03f4de4f53452a9fd16cbd189e5d76c7fdef475c144848c8d657256b41e342c020e11f6acd1880dde92ed0d0e8cf9e600 -EBUILD nodejs-10.17.0.ebuild 6279 BLAKE2B 8eb86a20ee7b128cf6f367e6d1e0c4e3f59fa2920304b4715c98f2b93c2b3ef65df529f3be5dab0c84e41eb9197f42ef0931a832e6b2d8781f417c02af4ca572 SHA512 ee699e5805e2295ad1f06a022d7696b184d1e9ec504e4f7f468fcf04b8f003700f13cad2a1b6cda9be46debd4cc07c98379b7aec6cbb1f4a74be0cae37d98fcc +EBUILD nodejs-10.17.0.ebuild 6278 BLAKE2B df926c7b35183086ec1a51690071f91aa2790d9c85923a7d090067b7b572ca14c6f9458b213a4da0c977cc1e57c81cc4cc5cb8460958b136d4b9ec15ccdcb0e5 SHA512 96cf76a295ad2de4ec003d103cb484889ca1ab4efe829fa069424cf2dbcd9ce2e85c5e817fb188b00d7290f2a7bad388f3d21e91134dcdb8413ccc9715fbd982 EBUILD nodejs-12.13.0.ebuild 6402 BLAKE2B 2f90c426ffd9373534fb9ff5963b7a52735758695cb52e290affcddc95dd5963ad48c2cee68569976fe072ccfd2196fde6a7a6308c2bba231da2e46c3e6c99c8 SHA512 4192e1501436e59849ecd9ca126e351c2bcbc662f41aa8e2aa639e325f5c201ad41bc5128d7132d488c82a6506144b548ad03a0fcab9fa2375a92e50e90c8794 EBUILD nodejs-13.0.1.ebuild 6140 BLAKE2B 53b80f89d2189a92c455cfbd7f4652378feddaf693f9c33da0388b6e548214567e6c1a6ed494cb99d44b74c58ba508da194d266191eae670e7a3d53cfef990c5 SHA512 e3193d01c1c1b8c11b9b1245dd97c925b04eea96e46d61c44c6f1f624cda2b9ab4d1d0d4dc8e509a71c968fb121b25e7b5a63ca0ba9bfd8f326f227cfc1081ab +EBUILD nodejs-13.1.0.ebuild 6140 BLAKE2B 53b80f89d2189a92c455cfbd7f4652378feddaf693f9c33da0388b6e548214567e6c1a6ed494cb99d44b74c58ba508da194d266191eae670e7a3d53cfef990c5 SHA512 e3193d01c1c1b8c11b9b1245dd97c925b04eea96e46d61c44c6f1f624cda2b9ab4d1d0d4dc8e509a71c968fb121b25e7b5a63ca0ba9bfd8f326f227cfc1081ab EBUILD nodejs-8.12.0.ebuild 6368 BLAKE2B c45a61ee92c1949717c09ce2c9c08778d634563f3a5699f768f35ee90eccfd3d1076f1c4591efbb3527aabb996791a91f13f288b2b9467fd13482b5ceacb10c5 SHA512 19e79d4b318ecce2f05a736b6201144b3b9ba6186bb5176856c25eeecdd948ebc26246360a9cb2c05368303659668fe77d82ea5ba70e5f65474f3cb1faf06513 EBUILD nodejs-8.16.2.ebuild 6476 BLAKE2B 62c1c56423c4673f9eb40717c3636cd8262d8972a9ea8cc83d24bc3b7d6bf9a62c4273ff5e6103eae53def7079b3b46ef4c25fc0a6b920de1d8b5ec6c0732dbf SHA512 723231c6e64f60c9643358769fa0f6d55f1ec5405272f89a1ab7fbb1d9e8cafc7fc388505040395c2f040a8b344b0eff1a704454a459365d25a4e855f897983b -EBUILD nodejs-99999999.ebuild 6261 BLAKE2B 993b25d35bef4f54655c6bc9c8679b1ef667c2130add32a2bbff2c3a521bfe1ddde903b021fbec291af1fc205b1226fa1062fb722f57a39b34faf58211831f43 SHA512 cae49616d8151ab0cfa590080cfe0263666900a2bbf7b0cc278192b096cdd24b365943ead6aeb8b894a91b2dacc3377a82de9ec47bc1a5b94495f05b446731ca +EBUILD nodejs-99999999.ebuild 6029 BLAKE2B 0be5bdafa6ad7978d491f618d27d59e1b6b8c2a4ce02a6240d522707c0d1d744a1dc743fefa646639afb2cc31aafc7e0fa7fd5c47d54e4fb9220e42d6f032397 SHA512 ef9aa58e872621f77875a4b22bc1e33d599729c4c0fbb20d5f9d2076f32091506191d0277485f6e816ef756bb606fd9d479dbab8c253b7b0bda348ca2cbf8499 MISC metadata.xml 473 BLAKE2B c5c4f0ad6470bd70570d1f547d1355977be676a252416f3fe005733386fa84536aaac9b8e93fb70405fd76608ab2df281c586d80a2f9cc443acd5ca26dc8752a SHA512 f2911891d28329b3f6a21b56976f1507939bd51cb65581f73c2b5716c4610551cbc225450755be2e649e2070e1810ef41ca641d105155ceb1847e9a93ad2ee85 diff --git a/net-libs/nodejs/nodejs-10.17.0.ebuild b/net-libs/nodejs/nodejs-10.17.0.ebuild index 1b63a38abb43..e9ac2965862f 100644 --- a/net-libs/nodejs/nodejs-10.17.0.ebuild +++ b/net-libs/nodejs/nodejs-10.17.0.ebuild @@ -12,7 +12,7 @@ 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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos" IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" REQUIRED_USE=" inspector? ( icu ssl ) diff --git a/net-libs/nodejs/nodejs-13.1.0.ebuild b/net-libs/nodejs/nodejs-13.1.0.ebuild new file mode 100644 index 000000000000..64dd1ca4d151 --- /dev/null +++ b/net-libs/nodejs/nodejs-13.1.0.ebuild @@ -0,0 +1,205 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" +IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" +REQUIRED_USE=" + inspector? ( icu ssl ) + npm? ( ssl ) +" + +RDEPEND=" + >=dev-libs/libuv-1.33.1:= + >=net-dns/c-ares-1.15.0 + >=net-libs/nghttp2-1.39.2 + sys-libs/zlib + icu? ( >=dev-libs/icu-64.2:= ) + 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 +) +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 + + # make sure we use python2.* while using gyp + sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || 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-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+=( --with-snapshot ) + use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl ) + + 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" \ + "${PYTHON}" configure \ + --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 <command>" +} diff --git a/net-libs/nodejs/nodejs-99999999.ebuild b/net-libs/nodejs/nodejs-99999999.ebuild index 1b6515a23d40..e5e6f8a9d81c 100644 --- a/net-libs/nodejs/nodejs-99999999.ebuild +++ b/net-libs/nodejs/nodejs-99999999.ebuild @@ -3,7 +3,7 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -PYTHON_REQ_USE="threads" +PYTHON_REQ_USE="threads(+)" inherit bash-completion-r1 flag-o-matic git-r3 pax-utils python-any-r1 toolchain-funcs xdg-utils DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" @@ -22,7 +22,6 @@ REQUIRED_USE=" RDEPEND=" >=dev-libs/libuv-1.33.1:= >=net-dns/c-ares-1.15.0 - >=net-libs/http-parser-2.9.0:= >=net-libs/nghttp2-1.39.2 sys-libs/zlib icu? ( >=dev-libs/icu-64.2:= ) @@ -93,8 +92,7 @@ src_configure() { xdg_environment_reset local myconf=( - --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 - --shared-zlib + --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib ) use debug && myconf+=( --debug ) use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) @@ -144,11 +142,6 @@ src_install() { done if use doc; then - # Patch docs to make them offline readable - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do - sed -i '/fonts.googleapis.com/ d' $i; - done - # Install docs docinto html dodoc -r "${S}"/doc/* fi |