From b92911550490e2da121ec4b02d3cf60a2d31a17d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 16 Apr 2024 12:04:26 +0100 Subject: gentoo auto-resync : 16:04:2024 - 12:04:26 --- net-libs/nodejs/Manifest | 19 +-- net-libs/nodejs/nodejs-18.18.0.ebuild | 258 ------------------------------- net-libs/nodejs/nodejs-18.18.2.ebuild | 257 ------------------------------- net-libs/nodejs/nodejs-18.19.1.ebuild | 259 ------------------------------- net-libs/nodejs/nodejs-18.20.1.ebuild | 256 ++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-20.11.1.ebuild | 265 -------------------------------- net-libs/nodejs/nodejs-20.12.1.ebuild | 262 +++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-20.7.0.ebuild | 262 ------------------------------- net-libs/nodejs/nodejs-20.8.1-r1.ebuild | 262 ------------------------------- net-libs/nodejs/nodejs-20.8.1.ebuild | 261 ------------------------------- net-libs/nodejs/nodejs-20.9.0.ebuild | 261 ------------------------------- 11 files changed, 522 insertions(+), 2100 deletions(-) delete mode 100644 net-libs/nodejs/nodejs-18.18.0.ebuild delete mode 100644 net-libs/nodejs/nodejs-18.18.2.ebuild delete mode 100644 net-libs/nodejs/nodejs-18.19.1.ebuild create mode 100644 net-libs/nodejs/nodejs-18.20.1.ebuild delete mode 100644 net-libs/nodejs/nodejs-20.11.1.ebuild create mode 100644 net-libs/nodejs/nodejs-20.12.1.ebuild delete mode 100644 net-libs/nodejs/nodejs-20.7.0.ebuild delete mode 100644 net-libs/nodejs/nodejs-20.8.1-r1.ebuild delete mode 100644 net-libs/nodejs/nodejs-20.8.1.ebuild delete mode 100644 net-libs/nodejs/nodejs-20.9.0.ebuild (limited to 'net-libs/nodejs') diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index 78797e07df3e..f501abb68157 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -4,27 +4,16 @@ AUX nodejs-20.3.0-gcc14.patch 1119 BLAKE2B 6be4d981ce94f618aa4a07766e8fa1c99e382 AUX nodejs-20.6.0-paxmarking.patch 3143 BLAKE2B 34b93f63481177f1b70d26bdbdb27674533016dd5cefe4161cfa49c3defc6316cbbf22df024d28e9d42687be78fb0a6ce6e95334cad386d6371ff1f7fd9063ee SHA512 6604a1c8041e28bea0ea8c4dd168d44fb4ae7d25b15db4e20c220bcf3697d08de5205dde502dda4d061ace36e3f8f3511f646b00acc0382c2c8dff64cf1bf8b8 AUX nodejs-20.8.1-gcc14.patch 797 BLAKE2B a9b6bc3eddf5473d5263f4f87e76f43ed236a995b3a9c486871be2bbf9b487973faa8764ec3283af279e23b06619dae9fd7d1284be6724cf7c2015ca111ad49f SHA512 6f1b6219c65c343907d691603ed762986c0302d30c9fb9f285bc03016c0c65885a9a4ffcc253f683fb566b33b3d5160b9400af16852550069fb6d59961688089 DIST node-v18.17.1.tar.xz 40788836 BLAKE2B 50e0dc0eecd68620ffa7457319e71124bbba302f6acff79286a30cf97442fb09a96cf8781456bafd5c2e497ba88cf392c141f0e221683da421b87f653b1ad7ca SHA512 fd6f586447ecd44ac6738da1cf7d54e74bd33ffd1ee1acc2e0e1bdaf0031bcaef85751d3dd590bb278eb502daf9c77f0763b5a181a30ee4cf537aef254629622 -DIST node-v18.18.0.tar.xz 40813264 BLAKE2B 6cea11a663e5df730faef9125a80e730da83fdccebf8c4f454435ee622207803d59132b5d8e112741702103a6814a491b29bb9f22ddec60fba204236a763b95e SHA512 c10fb40902fc290cc069e86659ff4c7768215f80a7016402915cae7731bfd69aa901b7dc813d480f86fc39a850960f600ddde342d67b9bb570a3d2424b04f733 -DIST node-v18.18.2.tar.xz 40834428 BLAKE2B b2fcedd79fc8ca6a5b9236614874b9840d4df5f37f5ecfa5599a177b237543788eb985e8828f7a028f5fbca17aa0c4879393b956d08dce13bd04ec9e253aa48e SHA512 00af3c737d735a320481d764f1c23b1348c0454f2b9700cadb10e087feb47c75e7e9344277bb3149305c3e08ff69d9b17b0da81b1b9d9e978fd830c67858ce92 DIST node-v18.19.0.tar.xz 41248748 BLAKE2B 24f9c99737a6d455ad83a7c55d0c668190570b5947bb3a6b2f321a25ff1e30b2913a4e144821ddf794a975cd9765582426252933235ce033623ccf3ecce816a4 SHA512 db2f1342f028e5cd2ab0a3719b4c822e22439aa097b59df768fb7f6aa581394f81af6f51f7764b99d119ea2c849b55c02897af8caafab7c0f9d0112608a8867f -DIST node-v18.19.1.tar.xz 41250068 BLAKE2B e7a96f30ba1c2a5eb4c93e20474b6ace3824c38476ab4170a7e60b0d6812fa83e5bac980e4af8b6948be7cbc516ee4bda43d551991f89f4dcdb6dab5fe7ccb97 SHA512 2ce39b2fccc05c8d5f255b88f07f58b164d84d27d88a337f93a8c13b0f3d692dada28e96df74a0a340310cf1a3d95bd0729f25752e6eaf2f7a1af7ed5a88c22b +DIST node-v18.20.1.tar.xz 40434200 BLAKE2B 560e04d5da8c2f3f4ef82e67b483f2c5d9a59b0646108a1dfc0bd80b410b60b15ee517be7d720834232fc49ed5d94785ebd64282c9abd3c10bdcb883a6960a38 SHA512 08864a164cfde08e369653abd17f6fe549db014697bd36abd07233d5ae746417ef18ea80e3d3f3630503a21110bb5e0ebd0073b4f2885b00c2d46e6f31c386a3 DIST node-v20.11.0.tar.xz 42162348 BLAKE2B c090a3b118c9f3b497450ea2572b08a7a0df0834f280b212d6f068e5fb75a0a095cc41fe5d530c51dd7c2ae4815cedce1c52642fdc5aa07345fb546c2ea3b396 SHA512 405cbd53f75d94b9c31536a638c6508215b34a77505471319c46f66eb87ac907cb6796b25efa27162da53cb6a013aaf9ad1a5690eb7ed793969055a648d1d53c -DIST node-v20.11.1.tar.xz 42159296 BLAKE2B ab8b8de9b4639077033afd43532208672e5a5611df424edc18ab3ee9a9d8789a552ca10538e45ef4522f5883968a2933eb0d221a7154beb110fdd638cb9e022c SHA512 b3a3ab3cdeccb54eb38a5b95eece5d180077393e7c1766bc591bbdc0445d78fdd4e19d2d3a3325cb6788a19cef83f48172ff7a6ec152eb1c352b3862dd955596 +DIST node-v20.12.1.tar.xz 41743360 BLAKE2B 1e2819724051720321a429bb18967a12608e8f93ef1760c520a40c9130e6138f95ab4e87f1acbaa72142bdd801ec3050bc42d7e4fae8d6a62192c3511b922e0a SHA512 c51c4aa37cc80f3fe34381f2cdf431053124ec6b83fc8490573502adfab48601c382448132c9962ab135bebaffc257a9d5b63334ba8ff480db57b5706bbfed67 DIST node-v20.6.1.tar.xz 41791920 BLAKE2B c131aa9dd2a155eb24dda80e4997895aab7d935e46d1f21e9e176aa15021aa68be41f49cc43557f0b2c962baf3b2da4ea0ba044efd5016ea58bf2dc0b76c4edd SHA512 8a6d998ae9b52872ff8cdcd44261f644161f31bcb565329ae05e68945c8da939eabcb76d2e0f628c8eb634de37d7b16334823f64122e4483c390117d8aa511bf -DIST node-v20.7.0.tar.xz 41824232 BLAKE2B ac13e5fea6af99309c5a5e77de79eebe42f894e6182daa13d0d287bed07eb0fbed1e6103c3600216da7bbcbc572900a2a44c622095ff37e0af40a49d0213a866 SHA512 5d95079d8ebe3992d5e34fac607ebb9601f33645874be0e81093a376a57ea23e3a1b74a06dfede1c9289258d40273fa23140bf1954e5d04eed4ec6beafcbc67c -DIST node-v20.8.1.tar.xz 41863408 BLAKE2B 84bd93d9d49f54e655a78194050e91a91ede2d6d415f929e2b942955a3b082d902601b40fdc9eb16a5e16fe46627110d1f43d94ab464d812f165915cf1aa598b SHA512 d76245a8ec35fdb481e898efc457d3804d425a0d8e2da9175cdcc41036c57b5a6c23a5c2e84b7b417d3f48be631bff86708b2cae9e65ca3a22908caa3190ed1b -DIST node-v20.9.0.tar.xz 41857572 BLAKE2B 0f4acc579e27b61bc3aa4179abcd9d137e9343427da138bf0114cb2a030b46848d4ec5b5bdca15fafc5afa1ae35200b8d98586f85444c73a5f78d70135260b73 SHA512 2b9453723149e0a94e759131460699a6fdf8656f0c1b7243307442cabef606a4e1d40781b80eaf632874952cb2468fa1e766ababdaa103d5dab623e0ca2f85de EBUILD nodejs-18.17.1.ebuild 7482 BLAKE2B 9ac4dc8d50e1f26df146f4159e34a1cc636eef2375daa10919e5ccb5b7c505f285872f8427c51c7640fd049b9f1a5ffe29c68b3bf7b07f6677f68565e7a61164 SHA512 6cef7adedd4a409c322abf44b0e1c0f53ea32ff9f3206b8d71e1626196860744c5fa7a4fca08815ec40af2de891027d7fad591bb2a725556c59c5152fe12313e -EBUILD nodejs-18.18.0.ebuild 7487 BLAKE2B dbdecd3edc11f7910623c7eab586391d353ab2dc766ce676b0f5f334f1feea7161c2aca56835f446c118e401e65a739e126b451da9cdb4cf1115cb0226fc855d SHA512 b645b298659f381a2a1d9a72c340016a645f6bac5024e9433eef77471f1194cedcf33d2ce9ce15caa4eb2dcae852ec6f764dfcb5a9f08b4b9eef36d2e7cf2880 -EBUILD nodejs-18.18.2.ebuild 7467 BLAKE2B 0b8161b3f648e319d60f498d48401ca92d3d6d31fbe2154e21bf01eb5b8cdd606df97fc8e57e5e9c3902c451522e9818f4b4f392b11b9590374c32eb607f23f2 SHA512 2cada98a3d3c507ed2a63f7d7d597e8a13c13c8767986c79472001179f2df149e3fccd25aa0e5f1104bc288c0bdb82366520ff42e0f6620d31c44b71d34cc207 EBUILD nodejs-18.19.0.ebuild 7555 BLAKE2B 5ed5167442f3ba68281f5e2634604f4108bab34931e2967ca37da66dac9917b125f4069bd85ce7426a50d7d6d9ae57f43409c412eeee52890e753d0a44591a70 SHA512 cb2aa8ad51c7fb4d01d747681df3a39435127aa227504c4d6570e9bb1b35438743b87afa3ef96dc0a1d13f06884149fd0ff151f746ebd19bd185764c0007d49a -EBUILD nodejs-18.19.1.ebuild 7557 BLAKE2B 0b64631db15217f0085385db8f43fc1d7302235b391f65f371a78bad3023356e6c5651f726a95862a243af49162522a3cff582a055f2277e9ba6537feb14d59e SHA512 f28ca3e1f52cd0f34d8b03fbb57f0f592f3bc98cb6908d30028ce38455111fe86e3eba5fc4721f0dadaa7be23157b3fe86d8984037ca4ff373b164f341f3fec8 +EBUILD nodejs-18.20.1.ebuild 7438 BLAKE2B 156d9ca41a4c966d641cd6ba0b4a1d56634dc0a55c1797917a67d078f3c6e9a54eca3a89fb19b36f6200a9a7006628ba76b56ea7df7c499bf570a577c6db458b SHA512 02d95f400c38efdee04993d10be04ec0e3cd88f42f5fbf8852db5591a49fdbf1ae652eb057d17cce86fcc6d4f48142a01c1691e33119f1fdd3263a5ee8bf6af3 EBUILD nodejs-20.11.0.ebuild 7545 BLAKE2B c8279df6be74f1d4b57870b2385932ad9a4d738845f84276bb152d8ecfcc96df2a330b645a2ca40c6803ddb97b65512739c4468e17b57956b8695b9c7e6bd9fb SHA512 a680797d1d59eef6ab1a285877bb5e52739ffdc43f5e43f1c78b124343aaf60cb2c5d5ff78f91f50e10db04e068f4e73937947e8f44b7db70f7444a984699b5b -EBUILD nodejs-20.11.1.ebuild 7723 BLAKE2B de2ed4b496f4247856f7716b296e082b0fe8ceec41d139d3d019be998caf7539b9c1f79032efadc94da62bff8016672aaf1135129c5ea17915c7018e44125f9c SHA512 bc7b2004ea691c0791646ae3256ff55909262854fb53c72b3eae7975493fd3a70febd6f285ba904524c58ac0d8d8d0337c9c77225e30aad5167e2b521e2196fd +EBUILD nodejs-20.12.1.ebuild 7604 BLAKE2B 1ae2e6d76c9c9f07671005cfbd902ee4370454711787ef0ee38807c15e773445fd8ff02bb0c63d3638d7fd7fa923da97f5297345fd95aa9e49be66fbb517ab87 SHA512 c58c31fe143f8b82e72539109e58eb95d164f30d882966013100cb032c12d612aabc6eb89ebb9e6bf3d0a647a0cf6a7cd3aad617615e4f11370181dc468bf9ca EBUILD nodejs-20.6.1.ebuild 7495 BLAKE2B 83f47c14b57b63d72cd940388adbda2c3c4e70e63b2123d2bc4651585cbe2ed8f07851805a78edaae0bb6959e2bf15eb378f9a95aecdbc4956a3377e07255130 SHA512 6d83a4e45aa952dcae536493fd7f13d4ea2c5f101355f574490a112663437bf6a95152dc6297b1359ba7f3a2a4583ccbcefe29d4abff41cccb9cb3069f07008b -EBUILD nodejs-20.7.0.ebuild 7500 BLAKE2B 28e8e849c4b42b850d49896ce0f08d2350bf03bb76ce184b7148c4f62b3055fd370ba052ea94eddbbc9ee1142b0887fa7a1be3be4e36a5a1d60278cf7e595647 SHA512 0b560ef73b84a35c90da24469a0a80b83a7a52cef5c86ecd806529094fafbfa186685c55aa499f73689c0281d568df1c5f43252c86e68824b7836edbc1a86e58 -EBUILD nodejs-20.8.1-r1.ebuild 7522 BLAKE2B e17abf191f070bdbbeca6e71055b700808d7c3588af641c695a39d31fd352d029d1ebf28c3093364043f743a24b4bdaeb4cd01605d77ecd171e2230724fe7b37 SHA512 5a4092631bd64ed85b9bfce7e3f8180112d458771b41532e7e6f58df0b80677008a7acc2da1c22e92547b96dde740a56c54d617eae72fa23a3e46bf9882c4016 -EBUILD nodejs-20.8.1.ebuild 7480 BLAKE2B 2891f91e3e02e674f140ced1f85a96cfa01714254aaae68cb6f516221d3f3f4ea5c3a2df9d9f4e74eb089684f825a7e8b6e4263960b54a92364983011220dcbb SHA512 402f4a0c27f471df9c57d657ada4afd404ed9acda5ab3569a47a83921b06a2c260b8cec7714ccfcd64b4f827e16990b01d374296402c9d8c2c259016e8a4d614 -EBUILD nodejs-20.9.0.ebuild 7480 BLAKE2B a376a4f31b92e392877db69072269933d6e24534d6f5b20e375d37f4c0b90dacd16991526d845cbbdafd68e8800299b4157ade2fbebcf8241935a5d3545e6e2d SHA512 5a2e46b0bd68b7eb1d7586f8e72e3cb2c2de2df647439e359c6b4846dc32c4cef8f29bfb8e3cece1da51592fec57358b282c0a52ccfc67d89dcbdcf1d8904c9e EBUILD nodejs-99999999.ebuild 7406 BLAKE2B 71b0f9acf3a3cdf3181c7f1dc3ca2a290c5fefce6be6ab017483750a31f7bf3c996984b91f03e1144b2b6bf3cb852529b9f620974ab0484928d6a390890cf2dc SHA512 bc0b7c5171f11b9b2d29915e03614272653baba609d505885e4aaf5d51ed40291e82c5970bb7e914e41604dcb3788ecb85a0d5e8a9770aea73f77136f6915d1e MISC metadata.xml 983 BLAKE2B 7e455047a955185d1e53797b2b0592c5242b7eb849617cf39366acbab41e4fd066d36d723dbc32760f591c933f068e643475fc1b58a2873a2f1221e1c5d44b71 SHA512 5e08a76e2704000aa83a2c63f6e821e83c302939c1a729c4ac73774cc85189da4eccc1a19b700babfe87c8f07327865171526550ddf16a4fc25fed834f4bf7a6 diff --git a/net-libs/nodejs/nodejs-18.18.0.ebuild b/net-libs/nodejs/nodejs-18.18.0.ebuild deleted file mode 100644 index fac44fe419aa..000000000000 --- a/net-libs/nodejs/nodejs-18.18.0.ebuild +++ /dev/null @@ -1,258 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" -REQUIRED_USE="corepack? ( !npm ) - inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.44.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-67:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - sys-apps/coreutils - virtual/pkgconfig - systemtap? ( dev-debug/systemtap ) - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." - - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-18.16.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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 -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-18.18.2.ebuild b/net-libs/nodejs/nodejs-18.18.2.ebuild deleted file mode 100644 index 62eaeead10d5..000000000000 --- a/net-libs/nodejs/nodejs-18.18.2.ebuild +++ /dev/null @@ -1,257 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.44.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-67:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - sys-apps/coreutils - virtual/pkgconfig - systemtap? ( dev-debug/systemtap ) - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." - - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-18.16.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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 -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-18.19.1.ebuild b/net-libs/nodejs/nodejs-18.19.1.ebuild deleted file mode 100644 index be605c7bba0e..000000000000 --- a/net-libs/nodejs/nodejs-18.19.1.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.44.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-67:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - sys-apps/coreutils - virtual/pkgconfig - systemtap? ( dev-debug/systemtap ) - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." - - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-18.16.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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 -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-dns-resolveany.js - test/parallel/test-dns-resolveany-bad-ancount.js - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-18.20.1.ebuild b/net-libs/nodejs/nodejs-18.20.1.ebuild new file mode 100644 index 000000000000..00566b9e3f4c --- /dev/null +++ b/net-libs/nodejs/nodejs-18.20.1.ebuild @@ -0,0 +1,256 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CONFIG_CHECK="~ADVISE_SYSCALLS" +PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_REQ_USE="threads(+)" + +inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils + +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE="https://nodejs.org/" +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/nodejs/node" + SLOT="0" +else + SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" + SLOT="0/$(ver_cut 1)" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" + S="${WORKDIR}/node-v${PV}" +fi + +IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" +REQUIRED_USE="inspector? ( icu ssl ) + npm? ( ssl ) + system-icu? ( icu ) + system-ssl? ( ssl )" + +RESTRICT="!test? ( test )" + +RDEPEND=">=app-arch/brotli-1.0.9:= + >=dev-libs/libuv-1.44.0:= + >=net-dns/c-ares-1.18.1:= + >=net-libs/nghttp2-1.41.0:= + sys-libs/zlib + corepack? ( !sys-apps/yarn ) + system-icu? ( >=dev-libs/icu-67:= ) + system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) + sys-devel/gcc:*" +BDEPEND="${PYTHON_DEPS} + sys-apps/coreutils + virtual/pkgconfig + systemtap? ( dev-debug/systemtap ) + test? ( net-misc/curl ) + pax-kernel? ( sys-apps/elfix )" +DEPEND="${RDEPEND}" + +# These are measured on a loong machine with -ggdb on, and only checked +# if debugging flags are present in CFLAGS. +# +# The final link consumed a little more than 7GiB alone, so 8GiB is the lower +# limit for memory usage. Disk usage was 19.1GiB for the build directory and +# 1.2GiB for the installed image, so we leave some room for architectures with +# fatter binaries and set the disk requirement to 22GiB. +CHECKREQS_MEMORY="8G" +CHECKREQS_DISK_BUILD="22G" + +pkg_pretend() { + (use x86 && ! use cpu_flags_x86_sse2) && \ + die "Your CPU doesn't support the required SSE2 instruction." + + if [[ ${MERGE_TYPE} != "binary" ]]; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + fi +} + +pkg_setup() { + python-any-r1_pkg_setup + linux-info_pkg_setup +} + +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 + + # 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 + + # 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}-18.16.0-paxmarking.patch ) + + default +} + +src_configure() { + xdg_environment_reset + + # LTO compiler flags are handled by configure.py itself + filter-lto + # nodejs unconditionally links to libatomic #869992 + # specifically it requires __atomic_is_lock_free which + # is not yet implemented by sys-libs/compiler-rt (see + # https://reviews.llvm.org/D85044?id=287068), therefore + # we depend on gcc and force using libgcc as the support lib + tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" + + local myconf=( + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-zlib + ) + use debug && myconf+=( --debug ) + use lto && myconf+=( --enable-lto ) + 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 corepack || myconf+=( --without-corepack ) + 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 "${ARCH}:${ABI}" in + *:amd64) myarch="x64";; + *:arm) myarch="arm";; + *:arm64) myarch="arm64";; + loong:lp64*) myarch="loong64";; + riscv:lp64*) myarch="riscv64";; + *: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 -Onone +} + +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 + echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm + doenvd "${T}"/50npm + + # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} + + 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 + + use corepack && + "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin + + mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die +} + +src_test() { + local drop_tests=( + test/parallel/test-dns-resolveany.js + test/parallel/test-dns-resolveany-bad-ancount.js + test/parallel/test-dns-setserver-when-querying.js + test/parallel/test-fs-mkdir.js + test/parallel/test-fs-utimes-y2K38.js + test/parallel/test-release-npm.js + test/parallel/test-socket-write-after-fin-error.js + test/parallel/test-strace-openat-openssl.js + test/sequential/test-util-debug.js + ) + rm -f "${drop_tests[@]}" || die "disabling tests failed" + + out/${BUILDTYPE}/cctest || die + "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die +} + +pkg_postinst() { + if use npm; then + ewarn "remember to run: source /etc/profile if you plan to use nodejs" + ewarn " in your current shell" + fi +} diff --git a/net-libs/nodejs/nodejs-20.11.1.ebuild b/net-libs/nodejs/nodejs-20.11.1.ebuild deleted file mode 100644 index fbfccfb9b764..000000000000 --- a/net-libs/nodejs/nodejs-20.11.1.ebuild +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{9..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl ) - x86? ( cpu_flags_x86_sse2 )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.46.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-71:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - app-alternatives/ninja - sys-apps/coreutils - virtual/pkgconfig - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-20.6.0-paxmarking.patch ) - - # bug 922725 - use riscv && PATCHES+=( "${FILESDIR}"/${PN}-20.11.0-riscv.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --ninja - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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} \ - "${myconf[@]}" || die -} - -src_compile() { - emake -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-dns-resolveany-bad-ancount.js - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-read-stream.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-fs-watch-recursive-add-file.js - test/parallel/test-process-euid-egid.js - test/parallel/test-process-initgroups.js - test/parallel/test-process-setgroups.js - test/parallel/test-process-uid-gid.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-20.12.1.ebuild b/net-libs/nodejs/nodejs-20.12.1.ebuild new file mode 100644 index 000000000000..f3934ba03efe --- /dev/null +++ b/net-libs/nodejs/nodejs-20.12.1.ebuild @@ -0,0 +1,262 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CONFIG_CHECK="~ADVISE_SYSCALLS" +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" + +inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils + +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE="https://nodejs.org/" +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/nodejs/node" + SLOT="0" +else + SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" + SLOT="0/$(ver_cut 1)" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" + S="${WORKDIR}/node-v${PV}" +fi + +IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test" +REQUIRED_USE="inspector? ( icu ssl ) + npm? ( ssl ) + system-icu? ( icu ) + system-ssl? ( ssl ) + x86? ( cpu_flags_x86_sse2 )" + +RESTRICT="!test? ( test )" + +RDEPEND=">=app-arch/brotli-1.0.9:= + >=dev-libs/libuv-1.46.0:= + >=net-dns/c-ares-1.18.1:= + >=net-libs/nghttp2-1.41.0:= + sys-libs/zlib + corepack? ( !sys-apps/yarn ) + system-icu? ( >=dev-libs/icu-71:= ) + system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) + sys-devel/gcc:*" +BDEPEND="${PYTHON_DEPS} + app-alternatives/ninja + sys-apps/coreutils + virtual/pkgconfig + test? ( net-misc/curl ) + pax-kernel? ( sys-apps/elfix )" +DEPEND="${RDEPEND}" + +# These are measured on a loong machine with -ggdb on, and only checked +# if debugging flags are present in CFLAGS. +# +# The final link consumed a little more than 7GiB alone, so 8GiB is the lower +# limit for memory usage. Disk usage was 19.1GiB for the build directory and +# 1.2GiB for the installed image, so we leave some room for architectures with +# fatter binaries and set the disk requirement to 22GiB. +CHECKREQS_MEMORY="8G" +CHECKREQS_DISK_BUILD="22G" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + fi +} + +pkg_setup() { + python-any-r1_pkg_setup + linux-info_pkg_setup +} + +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 + + # 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 + + # 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}-20.6.0-paxmarking.patch ) + + # bug 922725 + use riscv && PATCHES+=( "${FILESDIR}"/${PN}-20.11.0-riscv.patch ) + + default +} + +src_configure() { + xdg_environment_reset + + # LTO compiler flags are handled by configure.py itself + filter-lto + # nodejs unconditionally links to libatomic #869992 + # specifically it requires __atomic_is_lock_free which + # is not yet implemented by sys-libs/compiler-rt (see + # https://reviews.llvm.org/D85044?id=287068), therefore + # we depend on gcc and force using libgcc as the support lib + tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" + + local myconf=( + --ninja + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-zlib + ) + use debug && myconf+=( --debug ) + use lto && myconf+=( --enable-lto ) + 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 corepack || myconf+=( --without-corepack ) + 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 "${ARCH}:${ABI}" in + *:amd64) myarch="x64";; + *:arm) myarch="arm";; + *:arm64) myarch="arm64";; + loong:lp64*) myarch="loong64";; + riscv:lp64*) myarch="riscv64";; + *: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} \ + "${myconf[@]}" || die +} + +src_compile() { + emake -Onone +} + +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 + echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm + doenvd "${T}"/50npm + + # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} + + 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 + + use corepack && + "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin + + mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die +} + +src_test() { + local drop_tests=( + test/parallel/test-dns-resolveany-bad-ancount.js + test/parallel/test-dns-setserver-when-querying.js + test/parallel/test-fs-mkdir.js + test/parallel/test-fs-read-stream.js + test/parallel/test-fs-utimes-y2K38.js + test/parallel/test-fs-watch-recursive-add-file.js + test/parallel/test-process-euid-egid.js + test/parallel/test-process-initgroups.js + test/parallel/test-process-setgroups.js + test/parallel/test-process-uid-gid.js + test/parallel/test-release-npm.js + test/parallel/test-socket-write-after-fin-error.js + test/parallel/test-strace-openat-openssl.js + test/sequential/test-util-debug.js + ) + rm -f "${drop_tests[@]}" || die "disabling tests failed" + + out/${BUILDTYPE}/cctest || die + "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die +} + +pkg_postinst() { + if use npm; then + ewarn "remember to run: source /etc/profile if you plan to use nodejs" + ewarn " in your current shell" + fi +} diff --git a/net-libs/nodejs/nodejs-20.7.0.ebuild b/net-libs/nodejs/nodejs-20.7.0.ebuild deleted file mode 100644 index fb330cf9f26d..000000000000 --- a/net-libs/nodejs/nodejs-20.7.0.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{9..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test" -REQUIRED_USE="corepack? ( !npm ) - inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl ) - x86? ( cpu_flags_x86_sse2 )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.44.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-71:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - app-alternatives/ninja - sys-apps/coreutils - virtual/pkgconfig - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -PATCHES=( - "${FILESDIR}"/"${PN}"-20.3.0-gcc14.patch - ) - -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-20.6.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --ninja - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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} \ - "${myconf[@]}" || die -} - -src_compile() { - emake -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-fs-read-stream.js - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-fs-watch-recursive-add-file.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-20.8.1-r1.ebuild b/net-libs/nodejs/nodejs-20.8.1-r1.ebuild deleted file mode 100644 index 169da58c7b8a..000000000000 --- a/net-libs/nodejs/nodejs-20.8.1-r1.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{9..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl ) - x86? ( cpu_flags_x86_sse2 )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.46.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-71:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - app-alternatives/ninja - sys-apps/coreutils - virtual/pkgconfig - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -PATCHES=( - "${FILESDIR}"/"${PN}"-20.3.0-gcc14.patch - "${FILESDIR}"/"${PN}"-20.8.1-gcc14.patch - ) - -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-20.6.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --ninja - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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} \ - "${myconf[@]}" || die -} - -src_compile() { - emake -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-fs-read-stream.js - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-fs-watch-recursive-add-file.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-20.8.1.ebuild b/net-libs/nodejs/nodejs-20.8.1.ebuild deleted file mode 100644 index ba84f6871313..000000000000 --- a/net-libs/nodejs/nodejs-20.8.1.ebuild +++ /dev/null @@ -1,261 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{9..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl ) - x86? ( cpu_flags_x86_sse2 )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.44.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-71:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - app-alternatives/ninja - sys-apps/coreutils - virtual/pkgconfig - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -PATCHES=( - "${FILESDIR}"/"${PN}"-20.3.0-gcc14.patch - ) - -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-20.6.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --ninja - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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} \ - "${myconf[@]}" || die -} - -src_compile() { - emake -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-fs-read-stream.js - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-fs-watch-recursive-add-file.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} diff --git a/net-libs/nodejs/nodejs-20.9.0.ebuild b/net-libs/nodejs/nodejs-20.9.0.ebuild deleted file mode 100644 index c7403a92d7a1..000000000000 --- a/net-libs/nodejs/nodejs-20.9.0.ebuild +++ /dev/null @@ -1,261 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CONFIG_CHECK="~ADVISE_SYSCALLS" -PYTHON_COMPAT=( python3_{9..11} ) -PYTHON_REQ_USE="threads(+)" - -inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/nodejs/node" - SLOT="0" -else - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - SLOT="0/$(ver_cut 1)" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" - S="${WORKDIR}/node-v${PV}" -fi - -IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test" -REQUIRED_USE="inspector? ( icu ssl ) - npm? ( ssl ) - system-icu? ( icu ) - system-ssl? ( ssl ) - x86? ( cpu_flags_x86_sse2 )" - -RESTRICT="!test? ( test )" - -RDEPEND=">=app-arch/brotli-1.0.9:= - >=dev-libs/libuv-1.46.0:= - >=net-dns/c-ares-1.18.1:= - >=net-libs/nghttp2-1.41.0:= - sys-libs/zlib - corepack? ( !sys-apps/yarn ) - system-icu? ( >=dev-libs/icu-71:= ) - system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) - sys-devel/gcc:*" -BDEPEND="${PYTHON_DEPS} - app-alternatives/ninja - sys-apps/coreutils - virtual/pkgconfig - test? ( net-misc/curl ) - pax-kernel? ( sys-apps/elfix )" -DEPEND="${RDEPEND}" - -# These are measured on a loong machine with -ggdb on, and only checked -# if debugging flags are present in CFLAGS. -# -# The final link consumed a little more than 7GiB alone, so 8GiB is the lower -# limit for memory usage. Disk usage was 19.1GiB for the build directory and -# 1.2GiB for the installed image, so we leave some room for architectures with -# fatter binaries and set the disk requirement to 22GiB. -CHECKREQS_MEMORY="8G" -CHECKREQS_DISK_BUILD="22G" - -PATCHES=( - "${FILESDIR}"/"${PN}"-20.8.1-gcc14.patch - ) - -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]]; then - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" - check-reqs_pkg_pretend - fi - fi -} - -pkg_setup() { - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -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 - - # 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}-20.6.0-paxmarking.patch ) - - default -} - -src_configure() { - xdg_environment_reset - - # LTO compiler flags are handled by configure.py itself - filter-lto - # nodejs unconditionally links to libatomic #869992 - # specifically it requires __atomic_is_lock_free which - # is not yet implemented by sys-libs/compiler-rt (see - # https://reviews.llvm.org/D85044?id=287068), therefore - # we depend on gcc and force using libgcc as the support lib - tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" - - local myconf=( - --ninja - --shared-brotli - --shared-cares - --shared-libuv - --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use lto && myconf+=( --enable-lto ) - 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 corepack || myconf+=( --without-corepack ) - 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 "${ARCH}:${ABI}" in - *:amd64) myarch="x64";; - *:arm) myarch="arm";; - *:arm64) myarch="arm64";; - loong:lp64*) myarch="loong64";; - riscv:lp64*) myarch="riscv64";; - *: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} \ - "${myconf[@]}" || die -} - -src_compile() { - emake -Onone -} - -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 - echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm - doenvd "${T}"/50npm - - # 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 -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} - - 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 - - use corepack && - "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - local drop_tests=( - test/parallel/test-fs-read-stream.js - test/parallel/test-dns-setserver-when-querying.js - test/parallel/test-fs-mkdir.js - test/parallel/test-fs-utimes-y2K38.js - test/parallel/test-fs-watch-recursive-add-file.js - test/parallel/test-release-npm.js - test/parallel/test-socket-write-after-fin-error.js - test/parallel/test-strace-openat-openssl.js - test/sequential/test-util-debug.js - ) - rm -f "${drop_tests[@]}" || die "disabling tests failed" - - out/${BUILDTYPE}/cctest || die - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die -} - -pkg_postinst() { - if use npm; then - ewarn "remember to run: source /etc/profile if you plan to use nodejs" - ewarn " in your current shell" - fi -} -- cgit v1.2.3