diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-01-16 06:41:40 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-01-16 06:41:40 +0000 |
commit | cb2f73d10494730ba590096a1f24ebc6d0d61a9f (patch) | |
tree | 6b17212245a07479b72573fb8380352300de6b65 /dev-lang | |
parent | 8e26aeaca2a19592a9eea3917f3139bfde8641f0 (diff) |
gentoo auto-resync : 16:01:2025 - 06:41:40
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 22131 -> 22129 bytes | |||
-rw-r--r-- | dev-lang/ruby/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-3.3.7.ebuild | 298 | ||||
-rw-r--r-- | dev-lang/spidermonkey/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild | 473 |
5 files changed, 776 insertions, 0 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 6cdfdf31e815..647aff297b7a 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index a1957819710c..59622dcf3565 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -31,6 +31,7 @@ DIST ruby-3.2.6.tar.xz 15126888 BLAKE2B d59352e5543b96abe3de5f10b578c2b910a0f18f DIST ruby-3.3.4.tar.xz 16366580 BLAKE2B e10b81ad7838e3d443ce0b12b8372faebb001f00a32dc0fa1f5e37c46baae99ea714e7f2a8741f0294255312030e844f32fc5d1c3695545cf8303e85b3255f21 SHA512 b26461a13ff82a08a282f10108028bb2a2e4a28da6182a291062fc54089c6655d79c22cc69d59156f9b11cb10a17fe8c69d489343fbae123a45f03361b95c9eb DIST ruby-3.3.5.tar.xz 16403660 BLAKE2B 4fa242ceeaf0dbf0d048b3f116f149f299c1a0ccca500a47929344da523cd3c49365381777e56546fe94003ee90ccc1f2cc957697eb82cd8beb7311b0b00287c SHA512 dd5c6a7f74854e143e0ca46b9d7c0d1983fc4886f5f733cd108345dbf4b21f61ad978ad6806e05a57b7af28fd9216dd38d7145808188bbb3695a7f3a4eda3883 DIST ruby-3.3.6.tar.xz 16398228 BLAKE2B 7e2fb58ca1f5ee7ab9c2fd7b24fdbf9eef9805329cdf23c9926bac0268344f101475c2c7aacb26f73c4c5f73704727e19a9cc074c4587b9c53a115d6fb0a5e85 SHA512 c4b86188bf539fa737932e1ba5b746bc295e7c43b2f8cca2668eb7c88aa7228e2ce9032bbcd244a7d558a11bc842445b5fbeac3503ca7d223b63c53e08dba4ab +DIST ruby-3.3.7.tar.xz 16379504 BLAKE2B 33bd05d8462ec7e33872a31bcbfabcfc65a0245dc6519248e474085f3255dc3ad67210400ac314b291f16d3eb261459cadba180dfccc510a2b2c978035435347 SHA512 4082a7684c1b0d53a0ce493f79568e851d37a864f59c58b2e0c273b2659e0ca75318ddff939fdf5e9d0a3eeba1b6d8f03bf88afb49a5ffd77714f1c8a7dfdd55 DIST ruby-3.4.1.tar.xz 17222800 BLAKE2B 949cb57aeb6af4ca70d6638a2cd38ec9d067a3798ec27e02ee5934c902b74684b9f96d9fc00c1b22932de20b38b5bd3403a9a1a1bfe0c1caa380327d376d4c45 SHA512 8d2e34117696f9debf463ae1eed288fdbb5c1a12e32800e901b69218e3b7302a0066052077e2ebca851e3a635296199bd5a10437eea1d6f787f69a77bb865680 EBUILD ruby-3.1.4-r3.ebuild 8517 BLAKE2B d5d65a391f344b5bafbab680e9104ed214249c9a1af59bf42f0cd7326b5ea3a88510be23c22befc945715ea45fe2cc9be8beeaab9c59cb1e344b1bd54681172e SHA512 47cf354f9621f9ba2c68f7fe36c04979591fcc80124cf89d3d48b96bf1cc1ec242417f098676971e1060d37f1a20d9f4ae08133f925d45c81d60124fd118635d EBUILD ruby-3.1.5.ebuild 8842 BLAKE2B 31e5da6ecdb45602037d5a1bce209844060271528b39139a3f8c9421c3ffea747fb6602702ee989a12ff08f999586841b24d6e7f05e0fdd2b6ecb5860c866b2b SHA512 3b5deeb36ea66a58907a89c637f8f3a0354ea861a4bab159f211cedef3a48cf3b6f5609d441c9516ea81ab4f032111370ff3da37395f30ca28428aeb0286fffc @@ -44,5 +45,6 @@ EBUILD ruby-3.2.6-r3.ebuild 9402 BLAKE2B 1b3abb683a2012d32908bb0b9b65ea5eea3af0d EBUILD ruby-3.3.4-r2.ebuild 9342 BLAKE2B 1fb9189635dda8aeec17105c784b4fa5b4158853c2d4a51a02f640067b9d6b5ed9e268a99df931f197bb877c6c38b5eea7975775235d3b19909a74ab36339844 SHA512 019a14c2ba878385d12ef1fcfa00c4dcb09c504c5d36817822989b883eb76eca17558cd78548c3777b740346c0db570c1b8c1cc77c593d557685ff1f60fbf19a EBUILD ruby-3.3.5-r1.ebuild 9342 BLAKE2B 1fb9189635dda8aeec17105c784b4fa5b4158853c2d4a51a02f640067b9d6b5ed9e268a99df931f197bb877c6c38b5eea7975775235d3b19909a74ab36339844 SHA512 019a14c2ba878385d12ef1fcfa00c4dcb09c504c5d36817822989b883eb76eca17558cd78548c3777b740346c0db570c1b8c1cc77c593d557685ff1f60fbf19a EBUILD ruby-3.3.6-r1.ebuild 9538 BLAKE2B 3033453c764967229bc140d0851881a471c6fb02a8366657787b4b9cb139777443ca9fd50392ffca90b3ff1b91f51ba526bd1a58d4fcd2b471c297fe201ea252 SHA512 d979cd2df7949b4fe22bb5ca28c9a39e6256df024dab2c906d9abb1dec7e843b2c0150d875b27ac07936239a9583cb0b8429105a3436be8f4858a6fecd6789cd +EBUILD ruby-3.3.7.ebuild 9545 BLAKE2B 5b39ee480f314d821f2de3af5992db6a9b313f396804d9d9af26602cd135cd731a0a3536ff37c0e500e80eba32ef7659826c88584b683a27cb5b8f127260e132 SHA512 eec3947cbce0bf57c2aa140c2a19c1a13c68e0befe872321c00fbe9e32665da059a23f3c6db4e48b6ac68cd62a143ab1220feec3d7729c0fa4835b50e22b8680 EBUILD ruby-3.4.1.ebuild 10235 BLAKE2B 29946e6df5b2a6b7f981399d0c49e81fc212cd19a67c2ea59b355c4a52a016ab3e2a244592ad5766e8846407f925e62a23124aedef53e5c01ec66116a760736d SHA512 191b74008848bb2b46e008448d093b92ce1a0b98d2bab8b4eba7856b7f5f226806f2c20a022b6dea9b7bd76928fb1f39ff7171141605aa276e69b2bfc2d7bbde MISC metadata.xml 504 BLAKE2B 49be2bb1dba034b23a8294cca0e5419099b487973a43db31c0edc4b9a2a08eb1b54437b0c7e6a9e6d8a5c0145cd73464f830ec04ca62540416c32b2d094cdd63 SHA512 e9991c588874e36f6a0abb12125bcd3f2b1e787df62d9f7089053959286b56676a9f35c7e82116274f169bfa22359be8df59fca6454be559e7669d2e78dc4c22 diff --git a/dev-lang/ruby/ruby-3.3.7.ebuild b/dev-lang/ruby/ruby-3.3.7.ebuild new file mode 100644 index 000000000000..14dadbad7b4e --- /dev/null +++ b/dev-lang/ruby/ruby-3.3.7.ebuild @@ -0,0 +1,298 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +RUST_OPTIONAL="yes" + +inherit autotools flag-o-matic multiprocessing rust + +MY_P="${PN}-$(ver_cut 1-3)" + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="https://cache.ruby-lang.org/pub/ruby/$(ver_cut 1-2)/${MY_P}.tar.xz" +S=${WORKDIR}/${MY_P} + +LICENSE="|| ( Ruby-BSD BSD-2 )" +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="berkdb debug doc examples gdbm jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc:= ) + jit? ( ${RUST_DEPEND} ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-debug/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20231226 +" + +DEPEND=" + ${RDEPEND} + valgrind? ( dev-debug/valgrind ) +" + +BUNDLED_GEMS=" + >=dev-ruby/debug-1.9.2[ruby_targets_ruby33(-)] + >=dev-ruby/irb-1.11.0[ruby_targets_ruby33(-)] + >=dev-ruby/matrix-0.4.2[ruby_targets_ruby33(-)] + >=dev-ruby/minitest-5.20.0[ruby_targets_ruby33(-)] + >=dev-ruby/net-ftp-0.3.4[ruby_targets_ruby33(-)] + >=dev-ruby/net-imap-0.4.9.1[ruby_targets_ruby33(-)] + >=dev-ruby/net-pop-0.1.2[ruby_targets_ruby33(-)] + >=dev-ruby/net-smtp-0.4.0.1[ruby_targets_ruby33(-)] + >=dev-ruby/power_assert-2.0.3[ruby_targets_ruby33(-)] + >=dev-ruby/prime-0.1.2[ruby_targets_ruby33(-)] + >=dev-ruby/racc-1.7.3[ruby_targets_ruby33(-)] + >=dev-ruby/rake-13.1.0[ruby_targets_ruby33(-)] + >=dev-ruby/rbs-3.4.0[ruby_targets_ruby33(-)] + >=dev-ruby/rexml-3.3.9[ruby_targets_ruby33(-)] + >=dev-ruby/rss-0.3.1[ruby_targets_ruby33(-)] + >=dev-ruby/test-unit-3.6.1[ruby_targets_ruby33(-)] + >=dev-ruby/typeprof-0.21.9[ruby_targets_ruby33(-)] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby33(-)] + >=dev-ruby/bundler-2.5.11[ruby_targets_ruby33(-)] + >=dev-ruby/did_you_mean-1.6.3[ruby_targets_ruby33(-)] + >=dev-ruby/json-2.7.2[ruby_targets_ruby33(-)] + >=dev-ruby/rdoc-6.6.2[ruby_targets_ruby33(-)] + xemacs? ( app-xemacs/ruby-modes ) +" + +pkg_setup() { + use jit && rust_pkg_setup +} + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + eapply "${FILESDIR}"/"${SLOT}"/013*.patch + eapply "${FILESDIR}"/"${SLOT}"/902*.patch + + if use elibc_musl ; then + eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch + fi + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. + rm -fr gems/* || die + touch gems/bundled_gems || die + + # Avoid the irb default gemspec since we will install the normal gem + # instead. This avoids a file collision with dev-ruby/irb. + rm lib/irb/irb.gemspec || die + + # Remove tests that are known to fail or require a network connection + rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die + rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb \ + spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die + + # Remove webrick tests because setting LD_LIBRARY_PATH does not work for them. + rm -rf tool/test/webrick || die + + # Avoid test using the system ruby + sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die + + # Avoid testing against hard-coded blockdev devices that most likely are not available + sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die + + # Avoid tests that require gem downloads + sed -e '/^\(test-syntax-suggest\|PREPARE_SYNTAX_SUGGEST\)/ s/\$(TEST_RUNNABLE)/no/' \ + -i common.mk + + # Avoid test that fails intermittently + sed -e '/test_gem_exec_gem_uninstall/aomit "Fails intermittently"' \ + -i test/rubygems/test_gem_commands_exec_command.rb || die + + # Avoid test fragile for git command output not matching on whitespace + sed -e '/test_pretty_print/aomit "Fragile for output differences"' \ + -i test/rubygems/test_gem_source_git.rb || die + + if use prefix ; then + # Fix hardcoded SHELL var in mkmf library + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules="win32,win32ole" myconf= + + # Ruby's build system does interesting things with MAKEOPTS and doesn't + # handle MAKEOPTS="-Oline" or similar well. Just filter it all out + # and use -j/-l parsed out from the original MAKEOPTS, then use that. + # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing + # is set by the user in MAKEOPTS. See bug #900929 and bug #728424. + local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)" + unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS + export MAKEOPTS="${makeopts_tmp}" + + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Fix co-routine selection for x32, bug 933070 + [[ ${CHOST} == *gnux32 ]] && myconf="${myconf} --with-coroutine=amd64" + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + # except on Darwin, where we really need LIBPATHENV to set the right + # DYLD_ stuff during the invocation of miniruby for it to work + [[ ${CHOST} == *-darwin* ]] || export LIBPATHENV="" + INSTALL="${EPREFIX}/usr/bin/install -c" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --without-baseruby \ + --with-compress-debug-sections=no \ + --enable-mkmf-verbose \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support) \ + $(use_enable jit yjit) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + $(use_with valgrind) \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 check +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + + # Create directory for the default gems + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" + + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc + fi + + if use examples; then + dodoc -r sample + fi + + dodoc ChangeLog NEWS.md README* + dodoc -r doc +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(30|31|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest index bd546116d1b9..9c620eda2afb 100644 --- a/dev-lang/spidermonkey/Manifest +++ b/dev-lang/spidermonkey/Manifest @@ -7,7 +7,9 @@ DIST firefox-115.16.0esr.source.tar.xz 515133700 BLAKE2B 9501b617b346d56f6de975f DIST firefox-115esr-patches-13.tar.xz 51360 BLAKE2B a048bfadba989ebbd4c6e3df97d303d6853844e66ed92f5f5f322acf18866218b91d52dbbece63827de283eef855c932d67e329c8d93200aa83f11268a5d1b2f SHA512 186ec72323e621362dcef1bc67c476716aff97dfad701faa9220a7302e798d3cb4ed90d5ea59e3e92f016be29875bb5219787635db99a8848b7c76e4e2e09e90 DIST firefox-128.4.0esr.source.tar.xz 558619512 BLAKE2B 1f0528c8806bb034af623f2022740bb5056ea11817b9cb7154a60b87f04051ba5ae06b0daf55e6b03b7531c369deb871d3d3579a86f3ca19f3ab71ccb45243f9 SHA512 e720b1f993926d73f5a5727648f753176ac2fd093fb0b71393946bbc5919ce5fc7b88b82960bd1aa427b5663c7f659828dc6702485fc0c1e7a6961571c67faa3 DIST firefox-128.5.0esr.source.tar.xz 567200548 BLAKE2B b524796854d4f622e90c219e4e302e5665f3f1e3ffb7935ba58244903dbcf1c2b9a13731e9af5507ffc25dda621d4ea13650aae842ed0317843182da55d1d652 SHA512 ff20f18f92c5e9cd1d9eaf7c38cec61bcab2dca8dd2817519b712bc1f760b5c6e290212acf3289152764e5130e01626950b7ecd9327b2c587b24a246591afd67 +DIST firefox-128.6.0esr.source.tar.xz 563259116 BLAKE2B 401c54e4c3e81dd1d4aa9fed072e5266a7549d9ac05e03f9755d3da192c9c46d2bc636e8bf0a7fad2269074615789ab274b897c8bd75fd524f4a5f138c3aa1d5 SHA512 49bce966e062766861712bd65cca46a438b339fe31598f69e4fe64da78ef6f8b4581c1d502341ef1c032aafaab2f4f88e69cb93a0b845ba7173fec277ae695b5 DIST firefox-128esr-patches-07.tar.xz 18856 BLAKE2B 44d0ddf11518c7eef0a96de4f475a6ae1535e43e5bf89b8f61dc95330f28d6a053d08e6a183cf71432107256c83cd6ee6f742b235ca82babe4dd83698bf80d07 SHA512 60b4f18f5d91fc25f86cceccd561b55f167299908fbf2f9d7d69a8ce299c643f0b538d613d4348e42dd17c3812e4fa315e15004614af1f40fbe2adda417a1a81 +DIST firefox-128esr-patches-08.tar.xz 17564 BLAKE2B d904b74fdae2e76866ded11de5377a7b6883d35996b358ae3419ffb7da53b04b2c7d4bb10d48998a8318a84e8221de39955289cb33a8f278c131b4af2006be62 SHA512 344a2d04dec679cd8ed714dcecc9dd5b56696803cee9267e7c0c45c439d78728e7eae674bb5f0a64f2e5802dc59c1ec25f1703885024d88bda8a02e2b3e0d69e DIST spidermonkey-102-patches-05j.tar.xz 4596 BLAKE2B 215b770bbdf17973d7b3fd1df6cee9647459d2b02b0be5bdb289d457e5dbdb06ceac7a3082fc2f5836e991a4ac4486d73330b0276a466b5c528dab226a27829c SHA512 d2b8e32dac87d60a00fd93479dc34d8adab4feec24a38591cebeb4cf271aa2fd964f4dc26e67ebfb127a47bc8f684d50b32b2cff18ed5286701a04a289058185 DIST spidermonkey-115-patches-02.tar.xz 4896 BLAKE2B f78d9804c1427b45d6fda496b4991ec6f672dec9ce031ed57a2920fa1968c942a235f46e40166c8ab8d731a1963f322d34bb2f6984133179175e6f7376d27d13 SHA512 11fd01152d1e7b8ca89bf628076e1f4fb4f1ba6c9dc0f9dd544252495c580c04e4d5ffc238d5587f9e993aa91a47828333564ca55f60e008bd370089cd07d2e6 DIST spidermonkey-128-patches-02.tar.xz 3916 BLAKE2B b6640860ea091b22c61b2a78da5004816a08ab9fb39fda04ae76fe48a3a8061770d6d6e451e5f34951aa3f63473dd77d3dde8b60aec80b4c31f1b29064ce68ee SHA512 3f2d272a36ca2ac831de9108769c68e380be4e8bba7071d02686699702acac6a9325e4256d9c5c2441c3742552179031b0898d3f96f08477857fd6e989596ee6 @@ -15,4 +17,5 @@ EBUILD spidermonkey-102.15.0-r1.ebuild 15100 BLAKE2B 2f7d493ef27869b28de30fea5f4 EBUILD spidermonkey-115.16.0-r1.ebuild 13395 BLAKE2B b6c7c5a512fe9e46374868e53b86c39b7271ec435ed20a892c7864d4cb308ee790dc530af7b234ef78bab5f7393ddf0e7857b38df6fe1f3be773444d0b49f78e SHA512 6890cadb3b96f6557f0e3a51d6cbf099a7118c0e4927b0d8796c89d987463a840cc67cefe77248cbda529e252e4e15771d999c30f21336ea946d60eb8843cd7c EBUILD spidermonkey-128.4.0-r1.ebuild 13747 BLAKE2B 91cec6c9062aa43824a389e2020cfac6dc24be106b923cdb036d4b9c14b0b71b2c2e07a298c43ecc77fbb9b89e7cad61c7eec1a0f21dfe6e79c4ea078a36eaea SHA512 5889eb2bb3b14f4d72b8bf50469b6b7fda0b60baa1fd9b27e36a421552e94549436c3afbe7d46d0246ea46888c56a8791c2c0050fc51e5a6845adfe8290d1f85 EBUILD spidermonkey-128.5.0.ebuild 13758 BLAKE2B 8e8313dac06e0c355fefbbc23a842e755d057b9902411813d42e56917cfd1396916005bc2371c3410b14b681ce3012abcba7ecda6536ac46e3f2a2127fe369ec SHA512 a5a04bb01deecce3dcfefa3c78f98b2faf481bb63820a21652d6c7c14c3f0822065a4e07211aefb3feea81eeb5a60e43ede28f905d1bf5ef121ece56fd10acfb +EBUILD spidermonkey-128.6.0.ebuild 12829 BLAKE2B 2c603b698773db903c6d56ea22d6d8fd774d0645d2291da6d70a7a360703c5263466883a2c2d10d46399d6681a07a28b673146c01c2b7ab283b5a4133ce63def SHA512 ce7760113b7ca8c2b12c4a481e831dc89d85abfcfad1a0becf56f0f0b53a72323141d50fd4b98044baccd9e366dd9619a10ad537513f7a62fe4a79daf9c68d8d MISC metadata.xml 513 BLAKE2B 58ffd474492f03c16bda95e48511fb6281e03067d2ad77e994f8117345ecece5da9591dccedafe75b037d98e06851a3759caa4b993adc2910dbb76e1c01a7fa3 SHA512 1ee02bff37e2dabbd72b7f719463b12299270c7960b4cf5a92afab17c954c50e6acb826d4a91db4954fb4a7b0f8669988f2cdb5be991df90e3a605c6b35fdbfb diff --git a/dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild b/dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild new file mode 100644 index 000000000000..1f1a17198baf --- /dev/null +++ b/dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild @@ -0,0 +1,473 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +FIREFOX_PATCHSET="firefox-128esr-patches-08.tar.xz" +SPIDERMONKEY_PATCHSET="spidermonkey-128-patches-02.tar.xz" + +LLVM_COMPAT=( 17 18 19 ) +RUST_NEEDS_LLVM=1 + +PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_REQ_USE="ncurses,ssl,xml(+)" + +WANT_AUTOCONF="2.1" + +inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing python-any-r1 rust toolchain-funcs + +MY_PN="mozjs" +MY_PV="${PV/_pre*}" + +MY_MAJOR=$(ver_cut 1) + +MOZ_ESR=yes + +MOZ_PV=${PV} +MOZ_PV_SUFFIX= +if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then + MOZ_PV_SUFFIX=${BASH_REMATCH[1]} + + # Convert the ebuild version to the upstream Mozilla version + MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI + MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI + MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI +fi + +if [[ -n ${MOZ_ESR} ]] ; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +MOZ_PN="firefox" +MOZ_P="${MOZ_PN}-${MOZ_PV}" +MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" +MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" + +MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" + +if [[ ${PV} == *_rc* ]] ; then + MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}" +fi + +PATCH_URIS=( + https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} + https://dev.gentoo.org/~juippis/mozilla/patchsets/${SPIDERMONKEY_PATCHSET} +) + +DESCRIPTION="Mozilla's JavaScript engine written in C and C++" +HOMEPAGE="https://spidermonkey.dev https://firefox-source-docs.mozilla.org/js/index.html" +SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz + ${PATCH_URIS[@]}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86" + +LICENSE="MPL-2.0" +SLOT="$(ver_cut 1)" +IUSE="clang cpu_flags_arm_neon debug +jit test" + +#RESTRICT="test" +RESTRICT="!test? ( test )" + +BDEPEND="${PYTHON_DEPS} + $(llvm_gen_dep ' + clang? ( + llvm-core/clang:${LLVM_SLOT} + llvm-core/lld:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ) + ') + >=dev-util/cbindgen-0.26.0 + virtual/pkgconfig + test? ( + $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]') + )" +DEPEND=">=dev-libs/icu-73.1:= + dev-libs/nspr + sys-libs/readline:0= + sys-libs/zlib" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/firefox-${PV%_*}" + +llvm_check_deps() { + if use clang ; then + if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then + einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + + if ! has_version -b "llvm-core/llvm:${LLVM_SLOT}" ; then + einfo "llvm-core/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + + if ! tc-ld-is-mold ; then + if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then + einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + fi + fi + + einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 +} + +mozconfig_add_options_ac() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 2 ]] ; then + die "${FUNCNAME} requires at least two arguments" + fi + + local reason=${1} + shift + + local option + for option in ${@} ; do + echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG} + done +} + +mozconfig_add_options_mk() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 2 ]] ; then + die "${FUNCNAME} requires at least two arguments" + fi + + local reason=${1} + shift + + local option + for option in ${@} ; do + echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG} + done +} + +mozconfig_use_enable() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 1 ]] ; then + die "${FUNCNAME} requires at least one arguments" + fi + + local flag=$(use_enable "${@}") + mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" +} + +python_check_deps() { + if use test ; then + python_has_version "dev-python/six[${PYTHON_USEDEP}]" + fi +} + +pkg_pretend() { + if use test ; then + CHECKREQS_DISK_BUILD="4400M" + else + CHECKREQS_DISK_BUILD="4300M" + fi + + check-reqs_pkg_pretend +} + +pkg_setup() { + # Get LTO from environment; export after this phase for use in src_configure (etc) + use_lto=no + + if [[ ${MERGE_TYPE} != binary ]] ; then + if tc-is-lto; then + use_lto=yes + # LTO is handled via configure + filter-lto + fi + + if [[ ${use_lto} = yes ]]; then + # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, + # bmo#1516758, bgo#942288 + filter-flags -Werror=lto-type-mismatch -Werror=odr + fi + + if use test ; then + CHECKREQS_DISK_BUILD="4400M" + else + CHECKREQS_DISK_BUILD="4300M" + fi + + check-reqs_pkg_setup + llvm-r1_pkg_setup + rust_pkg_setup + python-any-r1_pkg_setup + + # Build system is using /proc/self/oom_score_adj, bug #604394 + addpredict /proc/self/oom_score_adj + + if ! mountpoint -q /dev/shm ; then + # If /dev/shm is not available, configure is known to fail with + # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py + ewarn "/dev/shm is not mounted -- expect build failures!" + fi + + # Ensure we use C locale when building, bug #746215 + export LC_ALL=C + fi + + export use_lto +} + +src_prepare() { + if [[ ${use_lto} == "yes" ]]; then + rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die + fi + + # Workaround for bgo #915651,915651,929013 on musl + if use elibc_glibc ; then + rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die + fi + + eapply "${WORKDIR}"/firefox-patches + eapply "${WORKDIR}"/spidermonkey-patches + + default + + # Make cargo respect MAKEOPTS + export CARGO_BUILD_JOBS="$(makeopts_jobs)" + + # Workaround for bgo #915651,915651,929013 on musl + if ! use elibc_glibc ; then + if use amd64 ; then + export RUST_TARGET="x86_64-unknown-linux-musl" + elif use x86 ; then + export RUST_TARGET="i686-unknown-linux-musl" + elif use arm64 ; then + export RUST_TARGET="aarch64-unknown-linux-musl" + elif use ppc64 ; then + export RUST_TARGET="powerpc64le-unknown-linux-musl" + else + die "Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651" + fi + fi + + # sed-in toolchain prefix + sed -i \ + -e "s/objdump/${CHOST}-objdump/" \ + python/mozbuild/mozbuild/configure/check_debug_ranges.py || + die "sed failed to set toolchain prefix" + + einfo "Removing pre-built binaries ..." + find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die + + # Create build dir + BUILD_DIR="${WORKDIR}/${PN}_build" + mkdir -p "${BUILD_DIR}" || die +} + +src_configure() { + # Show flags set at the beginning + einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" + einfo "Current CFLAGS: ${CFLAGS}" + einfo "Current CXXFLAGS: ${CXXFLAGS}" + einfo "Current LDFLAGS: ${LDFLAGS}" + einfo "Current RUSTFLAGS: ${RUSTFLAGS}" + + local have_switched_compiler= + if use clang ; then + # Force clang + einfo "Enforcing the use of clang due to USE=clang ..." + + local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }') + [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}") + [[ -z ${version_clang} ]] && die "Failed to read clang version!" + + if tc-is-gcc; then + have_switched_compiler=yes + fi + + AR=llvm-ar + CC=${CHOST}-clang-${version_clang} + CXX=${CHOST}-clang++-${version_clang} + NM=llvm-nm + RANLIB=llvm-ranlib + READELF=llvm-readelf + OBJDUMP=llvm-objdump + + elif ! use clang && ! tc-is-gcc ; then + # Force gcc + have_switched_compiler=yes + einfo "Enforcing the use of gcc due to USE=-clang ..." + AR=gcc-ar + CC=${CHOST}-gcc + CXX=${CHOST}-g++ + NM=gcc-nm + RANLIB=gcc-ranlib + READELF=readelf + OBJDUMP=objdump + fi + + if [[ -n "${have_switched_compiler}" ]] ; then + # Because we switched active compiler we have to ensure + # that no unsupported flags are set + strip-unsupported-flags + fi + + # Ensure we use correct toolchain, + # AS is used in a non-standard way by upstream, #bmo1654031 + export HOST_CC="$(tc-getBUILD_CC)" + export HOST_CXX="$(tc-getBUILD_CXX)" + export AS="$(tc-getCC) -c" + + tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG + + # Pass the correct toolchain paths through cbindgen + if tc-is-cross-compiler ; then + export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} --target=${CHOST} ${BINDGEN_CFLAGS-}" + fi + + # ../python/mach/mach/mixin/process.py fails to detect SHELL + export SHELL="${EPREFIX}/bin/bash" + + # Set state path + export MOZBUILD_STATE_PATH="${BUILD_DIR}" + + # Set MOZCONFIG + export MOZCONFIG="${S}/.mozconfig" + + # Initialize MOZCONFIG + mozconfig_add_options_ac '' --enable-project=js + + mozconfig_add_options_ac 'Gentoo default' \ + --host="${CBUILD:-${CHOST}}" \ + --target="${CHOST}" \ + --disable-ctype \ + --disable-jemalloc \ + --disable-smoosh \ + --disable-strip \ + --enable-readline \ + --enable-release \ + --enable-shared-js \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --prefix="${EPREFIX}/usr" \ + --with-intl-api \ + --with-system-icu \ + --with-system-nspr \ + --with-system-zlib \ + --with-toolchain-prefix="${CHOST}-" \ + --x-includes="${ESYSROOT}/usr/include" \ + --x-libraries="${ESYSROOT}/usr/$(get_libdir)" + + mozconfig_use_enable debug + mozconfig_use_enable jit + mozconfig_use_enable test tests + + if use debug ; then + mozconfig_add_options_ac '+debug' --disable-optimize + mozconfig_add_options_ac '+debug' --enable-debug-symbols + mozconfig_add_options_ac '+debug' --enable-real-time-tracing + else + mozconfig_add_options_ac '-debug' --enable-optimize + mozconfig_add_options_ac '-debug' --disable-debug-symbols + mozconfig_add_options_ac '-debug' --disable-real-time-tracing + fi + + # We always end up disabling this at some point due to newer rust versions. bgo#933372 + mozconfig_add_options_ac '--disable-rust-simd' --disable-rust-simd + + # Modifications to better support ARM, bug 717344 + if use cpu_flags_arm_neon ; then + mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon + + if ! tc-is-clang ; then + # thumb options aren't supported when using clang, bug 666966 + mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-thumb=yes + mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-thumb-interwork=no + fi + fi + + # Tell build system that we want to use LTO + if [[ ${use_lto} == "yes" ]] ; then + if use clang ; then + if tc-ld-is-mold ; then + mozconfig_add_options_ac '+lto' --enable-linker=mold + else + mozconfig_add_options_ac '+lto' --enable-linker=lld + fi + mozconfig_add_options_ac '+lto' --enable-lto=cross + + else + mozconfig_add_options_ac '+lto' --enable-linker=bfd + mozconfig_add_options_ac '+lto' --enable-lto=full + fi + fi + + # LTO flag was handled via configure + filter-lto + + # Pass MAKEOPTS to build system + export MOZ_MAKE_FLAGS="${MAKEOPTS}" + + # Use system's Python environment + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" + export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach + + # Disable notification when build system has finished + export MOZ_NOSPAM=1 + + # Portage sets XARGS environment variable to "xargs -r" by default which + # breaks build system's check_prog() function which doesn't support arguments + mozconfig_add_options_ac 'Gentoo default' "XARGS=${EPREFIX}/usr/bin/xargs" + + # Set build dir + mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}" + + # Show flags we will use + einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" + einfo "Build CFLAGS: ${CFLAGS}" + einfo "Build CXXFLAGS: ${CXXFLAGS}" + einfo "Build LDFLAGS: ${LDFLAGS}" + einfo "Build RUSTFLAGS: ${RUSTFLAGS}" + + ./mach configure || die +} + +src_compile() { + ./mach build --verbose || die +} + +src_test() { + if "${BUILD_DIR}/js/src/js" -e 'print("Hello world!")'; then + einfo "Smoke-test successful, continuing with full test suite" + else + die "Smoke-test failed: did interpreter initialization fail?" + fi + + cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_test_failures.list || die + + if use x86 ; then + echo "non262/Intl/DateTimeFormat/timeZone_version.js" >> "${T}"/known_test_failures.list + echo "test262/intl402/Locale/constructor-non-iana-canon.js" >> "${T}"/known_test_failures.list + fi + + ./mach jstests --exclude-file="${T}"/known_test_failures.list || die +} + +src_install() { + cd "${BUILD_DIR}" || die + default + + # fix soname links + pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die + mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die + ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die + ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die + popd &>/dev/null || die + + # remove unneeded files + rm \ + "${ED}"/usr/bin/js${MY_MAJOR}-config \ + "${ED}"/usr/$(get_libdir)/libjs_static.ajs || die + + # fix permissions + chmod -x \ + "${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \ + "${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h || die +} |