From 4e995247a9a9d45f0b265ab9120c6d31c0a1f0d9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 14 Apr 2025 08:45:05 +0100 Subject: gentoo auto-resync : 14:04:2025 - 08:45:05 --- dev-lang/Manifest.gz | Bin 22625 -> 22619 bytes dev-lang/oorexx/Manifest | 2 +- dev-lang/oorexx/oorexx-5.1.0_beta12932.ebuild | 2 +- dev-lang/perl/Manifest | 2 + dev-lang/perl/perl-5.40.2.ebuild | 868 +++++++++++++++++++++ dev-lang/python/Manifest | 18 +- dev-lang/python/python-3.10.17.ebuild | 2 +- dev-lang/python/python-3.11.12.ebuild | 7 +- dev-lang/python/python-3.12.10.ebuild | 7 +- dev-lang/python/python-3.13.3-r100.ebuild | 5 + dev-lang/python/python-3.13.3.ebuild | 7 +- dev-lang/python/python-3.14.0_alpha7-r100.ebuild | 5 + dev-lang/python/python-3.14.0_alpha7.ebuild | 5 + dev-lang/python/python-3.8.20_p7.ebuild | 2 +- dev-lang/python/python-3.9.22.ebuild | 2 +- dev-lang/rust-bin/Manifest | 2 +- dev-lang/rust-bin/rust-bin-1.86.0-r1.ebuild | 318 ++++++++ dev-lang/rust-bin/rust-bin-1.86.0.ebuild | 318 -------- dev-lang/rust/Manifest | 2 +- dev-lang/rust/rust-1.86.0-r1.ebuild | 808 +++++++++++++++++++ dev-lang/rust/rust-1.86.0.ebuild | 809 ------------------- dev-lang/spidermonkey/Manifest | 9 - .../spidermonkey/spidermonkey-128.4.0-r1.ebuild | 478 ------------ dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild | 473 ----------- dev-lang/spidermonkey/spidermonkey-128.7.0.ebuild | 473 ----------- 25 files changed, 2045 insertions(+), 2579 deletions(-) create mode 100644 dev-lang/perl/perl-5.40.2.ebuild create mode 100644 dev-lang/rust-bin/rust-bin-1.86.0-r1.ebuild delete mode 100644 dev-lang/rust-bin/rust-bin-1.86.0.ebuild create mode 100644 dev-lang/rust/rust-1.86.0-r1.ebuild delete mode 100644 dev-lang/rust/rust-1.86.0.ebuild delete mode 100644 dev-lang/spidermonkey/spidermonkey-128.4.0-r1.ebuild delete mode 100644 dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild delete mode 100644 dev-lang/spidermonkey/spidermonkey-128.7.0.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index fcd10113df89..34e38dbc2ada 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/oorexx/Manifest b/dev-lang/oorexx/Manifest index 0d43d651300f..2e67c50fbc0d 100644 --- a/dev-lang/oorexx/Manifest +++ b/dev-lang/oorexx/Manifest @@ -2,5 +2,5 @@ AUX oorexx-5.0.0-man.patch 1080 BLAKE2B 17e105f80a5efd4fa28312c1cc81050b57c39357 DIST oorexx-5.0.0-12583.tar.gz 6398458 BLAKE2B 3df1eb024eae75f9c29bd46a7c9e0c8fffecf54545e5926f872b6757f0cba56530c4b457e94ec44debbd98e514e1043ba751384dc0f1dabb4812aa52da4381e0 SHA512 141af22e0a99731d50492940d5db55cc59099e5a7fa8acba918d1ae82bcd6e2983fb0ca71bbbf044cc4fc89e740c8a0ac81237eea5812d7a570f825bba5d08b9 DIST oorexx-5.1.0-12932.tar.gz 6439361 BLAKE2B 5b9d98de50f345b5ebdcda01ef85a0e251f6ed079b9be659ba176b4f66b665099e223fd5292c274366bc4b7bad00a389fe25c1de8f987eb80a6446e8d30f3ce2 SHA512 9016c36ae98d937de4303988dd5f587372d07623938f2534021823a1bd4abf49cefae786e9a155aa239bd71d6aa2494539bcbe185587f5976f37f07477e98cb4 EBUILD oorexx-5.0.0.ebuild 1049 BLAKE2B 239791fc8ec124769c5cde2f70c480f9b498bbd5bf570a8732f266ffb3c54d5e2516962378f28b31955e8703f52a4a79a2379427595cd6d4298227d72f044ba5 SHA512 5713f524867901633aaaa52e15102137c87f1edb5958b3cb0615fc17e92f02cb5c177e4a254a40fe9dc770fdea1d575ea2242e998885e208452338ce37534ad1 -EBUILD oorexx-5.1.0_beta12932.ebuild 855 BLAKE2B 127180e12b49f2b0e279ea5f71bfe122646a58f93bfe37d5ee4f3076274cd8e6e807ecd9b93c342b00d615b1d3af29d654db0c96ee0c17bb39df29dbe59be1e0 SHA512 d6d205de451170ea1bef36309fbfd00f76a3e4b991b7a1a9e8634af3ceee175cba3b64d5d5506134e8b7d578794b07cfb1ce14a57ccc4bc9cdcb7944295310bd +EBUILD oorexx-5.1.0_beta12932.ebuild 854 BLAKE2B 5c8ff5c8084cb3ea68a79b48e0405a8965261d137737c591da6b8eae8fd2c52f6477a8e2a6d3ab4ed9be87c187dbc72a36c4d6ecc2d92843f5c6112ce2ba4f10 SHA512 a59aa7d1172c130668170a359a2a676843a45a9ee8edcfa430276eb05c1a54634f5c8557a1a9d36384846d520cbaa833f983beb3c8a80fb2890b953c8109632a MISC metadata.xml 791 BLAKE2B 5e8ab7a5472b3864c1f1c66559518072fa4364276afbdb1939b8a81a3fcb8279bfb07c3f929edfc49faf1768d14171a870825e23ffee6e1f8fbf151879c95f8d SHA512 1e7a42ad84daee790eb4bb400365645432c895940fb4a380d575123782b77251d8be4efc108239f5587865434bef3b3f4cb90761e0e7f4425d5387f4f7e31cdc diff --git a/dev-lang/oorexx/oorexx-5.1.0_beta12932.ebuild b/dev-lang/oorexx/oorexx-5.1.0_beta12932.ebuild index 6bde96a5933a..593de50677cf 100644 --- a/dev-lang/oorexx/oorexx-5.1.0_beta12932.ebuild +++ b/dev-lang/oorexx/oorexx-5.1.0_beta12932.ebuild @@ -23,7 +23,7 @@ S="${WORKDIR}/${APP_P}" LICENSE="CPL-1.0" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ppc64 ~riscv ~x86" RDEPEND=" !dev-lang/regina-rexx diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest index 76e5ad08dff3..d6d05b05f0cd 100644 --- a/dev-lang/perl/Manifest +++ b/dev-lang/perl/Manifest @@ -4,8 +4,10 @@ AUX perl-5.40.0-fix-compilation-in-eprefix-bug-939014.patch 2169 BLAKE2B 9734b4b DIST perl-5.40.0-patches-2.tar.xz 17072 BLAKE2B 7cc1085a0a701f72cf1fce2b7f18ac949eb03a9e40716c37082396483045df577ef13bbca58ef06f20868e52e9c78e18fa5b8a3434ceea272ff49832a086a1f5 SHA512 d31a25894e3b34c8e80f439ebd423dd8f28eac056ce42d69376882c1655b1f7289ef22f8aa8d30147eaebbe6693f4d86d1570e153b55d58d7b30e5832e7bea60 DIST perl-5.40.0.tar.xz 13804184 BLAKE2B cf191c3ccaf6f395c0c7d08c2ad3456c1dd622d4fe78e7fb3a74c741e9a84f1d39a55f5bc6adbea54c9520b1b387e72e957f9a7544ab8f24968d233cd5b959ae SHA512 a2fb1a24c6367b4043f4e929b2d74fc3bad1415e53b791ed1f219f1701064ae21b2bd3164ba95fcf24eaf458bd54433024ccae43725c0bb82a1ec6a98dc7052d DIST perl-5.40.1.tar.xz 13930924 BLAKE2B 2f421a9eb6c68e2f12b95e6ac70ede3819c0d31c6f25ec5e45337faa053eaf21911413573624e3e84d82e4d863ed21799dbf471865c7e04519dcb81eac9c5c36 SHA512 3ff16b3462ce43ff38dab21b3dfc20f81772b8c9eac19ab96ba2d5e6cbb390e2302fa76c4879f915249357cd11c7ec0d548bcbf3ab2c156df1b9fca95da3f545 +DIST perl-5.40.2.tar.xz 13923524 BLAKE2B e37d0a71fcf91c065f7d6a75077be257c679eb1b8f167a569e4cfd532baa7af621ff887691293a3ec39cd35b960aa3de59f826f3351938994d77d00b44501bca SHA512 1324b119e4370bbeb47a343d152f46c637addb0373ff07f0e214aa9d5912c03cd2bd23987a6e86d43453166412d3a03a52e780201941f679ef4186df16590e41 DIST perl-cross-1.6.1.tar.gz 124122 BLAKE2B b1b78b30f2cf8c5ba12e3df6177b7d102033c8eaceeea9f12a1aeb2bfdf97edda83842e32de797b7ffa3ef6bc66dfba6ccbbacc25367b6f7bc2d137ce58aca93 SHA512 35a4f7966f1f94ef0b6bfe7a82e8a50e0daf6e5e0c1ed99c7c4767aa4f0708db05e8cc01a883257f970703991f617a189609cd57eec63767e2e73de3d6155bdf DIST perl-cross-1.6.tar.gz 121973 BLAKE2B b3a17d92dd7621a3bc253a6c4e56eccd3adec2c2b52e606c956a08f48d786a16a3ac5beb056a732ba3df92227f210193b0f516fd9d73cac362a04ec52efab029 SHA512 980af804513ec126e40eb9d8200ca54ba805bbb13b38d20a45daaf8d98d6b257e2eebc1ecad56cd47f60e235fa1141f6df9518d748db4f18d5219180750ca615 EBUILD perl-5.40.0-r1.ebuild 28140 BLAKE2B 0fe725b50c12baf09bb56ed009316269421c9e37b4127ce6ade37ab7a2909ecc6cfc30a0e525535f6e2196cf90cdd7c03981488f6f0ab7f54773c21c20bebc51 SHA512 162e4a7321adfc50fc83c32159e9847e15eae6eff2fa0fc265920ef8e2ec9d3fe83709f9d3ee50440cc851c4836504faa11c68b155f72ac6adbb366bf88a1182 EBUILD perl-5.40.1.ebuild 28032 BLAKE2B 24b9fd45eadc5863a68515b6d0879f87ec270ddbcbf09d0b8e4804d6f57b06a59be357d1f18402aee12e84863832316376e9ddf81942d6af027d70d20897b7f0 SHA512 1a00604815ac105de19091a1443e2e92d4cd5e76fe30af1f002a94e4ff0f921fa7a5714bc0a69838f573d151695a14b7e6871e4d1e3b00edd8b8bd88a109af93 +EBUILD perl-5.40.2.ebuild 28032 BLAKE2B c3555693bc016cfb7a43177c03140c37cfc18c0401584cbc2d4960eb87a4eb3c6ac57e97df10ce6a5e526f6aa02d01fa7698c8ba5e3b796ea78dcb1db303ffe7 SHA512 f65aaa44da557f1b3c4d05f45afb31d37b5cfeeeaad47b9c453c35e818d4045fdea9f7f3f22af8421eb80c7881c806b4b8b168a6612b042b5c33d548e3bc7809 MISC metadata.xml 435 BLAKE2B 9a9dfd2dc8274c402dde0c3be13053b28361603c4fd230d841b169843e397bd6e16537034495178dfd443246c1621b34d849455147e8556a12806d973293a855 SHA512 1cb3197cf3c6f3031bdbc95c2686fcd2585f6e457d0661ed986cf7fa91b4ca564f793c2f141bfe5b9b8c54d2b05dd200c3e32bf073061872e08bd7c501bedc83 diff --git a/dev-lang/perl/perl-5.40.2.ebuild b/dev-lang/perl/perl-5.40.2.ebuild new file mode 100644 index 000000000000..027d04d2604a --- /dev/null +++ b/dev-lang/perl/perl-5.40.2.ebuild @@ -0,0 +1,868 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing + +PATCH_VER=2 +CROSS_VER=1.6.1 +PATCH_BASE="perl-5.40.0-patches-${PATCH_VER}" +PATCH_DEV=dilfridge + +DIST_AUTHOR=SHAY + +# Greatest first, don't include yourself +# Devel point-releases are not ABI-intercompatible, but stable point releases are +# BIN_OLDVERSEN contains only C-ABI-intercompatible versions +PERL_BIN_OLDVERSEN="" + +if [[ "${PV##*.}" == "9999" ]]; then + DIST_VERSION=5.40.0 +else + DIST_VERSION="${PV/_rc/-RC}" +fi +SHORT_PV="${DIST_VERSION%.*}" + +# Even numbered major versions are ABI intercompatible +# Odd numbered major versions are not +if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then + SUBSLOT="${DIST_VERSION%-RC*}" +else + SUBSLOT="${DIST_VERSION%.*}" +fi + +# Used only in tar paths +MY_P="perl-${DIST_VERSION}" +# Used in library paths +MY_PV="${DIST_VERSION%-RC*}" + +DESCRIPTION="Larry Wall's Practical Extraction and Report Language" + +HOMEPAGE="https://www.perl.org/" + +SRC_URI=" + mirror://cpan/src/5.0/${MY_P}.tar.xz + mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz + https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz +" + +S="${WORKDIR}/${MY_P}" + +LICENSE="|| ( Artistic GPL-1+ )" + +SLOT="0/${SUBSLOT}" + +if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +IUSE="berkdb perl_features_debug doc gdbm perl_features_ithreads minimal perl_features_quadmath" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( >=sys-libs/gdbm-1.8.3:= ) + app-arch/bzip2 + >=sys-libs/zlib-1.2.12 + virtual/libcrypt:= +" +DEPEND="${RDEPEND}" +BDEPEND="${RDEPEND}" +PDEPEND=" + !minimal? ( + >=app-admin/perl-cleaner-2.31 + >=virtual/perl-CPAN-2.290.0 + >=virtual/perl-Encode-3.120.0 + >=virtual/perl-File-Temp-0.230.400-r2 + >=virtual/perl-Data-Dumper-2.154.0 + >=virtual/perl-Math-BigInt-1.999.842 + virtual/perl-Test-Harness + ) +" + +# bug 390719, bug 523624 +# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker + +dual_scripts() { + src_remove_dual perl-core/Archive-Tar 3.20.10_rc ptar ptardiff ptargrep + src_remove_dual perl-core/CPAN 2.360.0 cpan + src_remove_dual perl-core/Digest-SHA 6.40.0 shasum + src_remove_dual perl-core/Encode 3.210.0 enc2xs piconv + src_remove_dual perl-core/ExtUtils-MakeMaker 7.700.0 instmodsh + src_remove_dual perl-core/ExtUtils-ParseXS 3.510.0 xsubpp + src_remove_dual perl-core/IO-Compress 2.212.0 zipdetails + src_remove_dual perl-core/JSON-PP 4.160.0 json_pp + src_remove_dual perl-core/Module-CoreList 5.202.504.134_rc corelist + src_remove_dual perl-core/Pod-Checker 1.770.0 podchecker + src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc + src_remove_dual perl-core/Pod-Usage 2.30.0 pod2usage + src_remove_dual perl-core/Test-Harness 3.480.0 prove + src_remove_dual perl-core/podlators 5.10.200_rc pod2man pod2text + src_remove_dual_man perl-core/podlators 5.10.200_rc /usr/share/man/man1/perlpodstyle.1 +} + +check_rebuild() { + # Fresh install + if [[ -z ${REPLACING_VERSIONS} ]]; then + return 0 + fi + + # Major Upgrade + local v + for v in ${REPLACING_VERSIONS}; do + [[ ${v%.*} == "${SHORT_PV}" ]] && continue + echo "" + ewarn "UPDATE THE PERL MODULES:" + ewarn "After updating dev-lang/perl the installed Perl modules" + ewarn "have to be re-installed. In most cases, this is done automatically" + ewarn "by the package manager, but subsequent steps are still recommended" + ewarn "to ensure system consistency." + ewarn + ewarn "You should start with a depclean to remove any unused perl dependencies" + ewarn "that may confuse portage in future. Regular depcleans are also encouraged" + ewarn "as part of your regular update cycle, as that will keep perl upgrades working." + ewarn "Recommended: emerge --depclean -va" + ewarn + ewarn "You should then call perl-cleaner to clean up any old files and trigger any" + ewarn "remaining rebuilds portage may have missed." + ewarn "Use: perl-cleaner --all" + return 0 + done + + # Reinstall w/ USE Change + if + ( use perl_features_ithreads && ( has_version '=dev-lang/perl-5.38.2-r3[-perl_features_ithreads]' ) ) || \ + ( ! use perl_features_ithreads && ( has_version '=dev-lang/perl-5.38.2-r3[perl_features_ithreads]' ) ) || \ + ( use perl_features_quadmath && ( has_version '=dev-lang/perl-5.38.2-r3[-perl_features_quadmath]' ) ) || \ + ( ! use perl_features_quadmath && ( has_version '=dev-lang/perl-5.38.2-r3[perl_features_quadmath]' ) ) || \ + ( use perl_features_debug && ( has_version '=dev-lang/perl-5.38.2-r3[-perl_features_debug]' ) ) || \ + ( ! use perl_features_debug && ( has_version '=dev-lang/perl-5.38.2-r3[perl_features_debug]' ) ) ; then + echo "" + ewarn "TOGGLED PERL FEATURES WARNING:" + ewarn "You changed one of the PERL_FEATURES flags ithreads, quadmath, or debug." + ewarn "You must rebuild all perl-modules installed. Mostly this should be done automatically" + ewarn "via the flag changes of the packages. If the rebuild fails, use perl-cleaner." + ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl" + ewarn + ewarn "NOTE: Previous to perl-5.38.2-r3, these flags were useflags for dev-lang/perl." + ewarn "If you just upgraded and do not intend to change anything, carry the same settings over" + ewarn "into a global PERL_FEATURES variable set in make.conf. E.g., " + ewarn "dev-lang/perl[ithreads,quadmath] becomes PERL_FEATURES=\"ithreads quadmath\"" + fi +} + +pkg_pretend() { + if \ + ( use perl_features_ithreads && has_version ' "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc" + fi + if [[ $# -gt 0 ]]; then + # Note: when $@ is more than one element, this emits a + # line for each element + printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs" + fi +} + +# Remove a patch using a glob expr +# eg: +# rm_patch *-darwin-Use-CC* +# +rm_patch() { + local patchdir="${WORKDIR}/patches" + local expr="$1" + local patch="$( cd "${patchdir}"; echo $expr )" + einfo "Removing $patch ($expr) from patch bundle" + if [[ -e "${patchdir}/${patch}" ]]; then + rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )" + else + ewarn "No ${expr} found in ${patchdir} to remove" + fi +} + +# Yes, this is a reasonable amount of code for something seemingly simple +# but this is far easier to debug when things go wrong, and things went wrong +# multiple times while I was getting the exact number of slashes right, which +# requires circumnavigating both bash and sed escape mechanisms. +c_escape_string() { + local slash dquote + slash='\' + dquote='"' + re_slash="${slash}${slash}" + re_dquote="${slash}${dquote}" + + # Convert \ to \\, + # " to \" + echo "$1" |\ + sed "s|${re_slash}|${re_slash}${re_slash}|g" |\ + sed "s|${re_dquote}|${re_slash}${re_dquote}|g" +} +c_escape_file() { + c_escape_string "$(cat "$1")" +} + +apply_patchdir() { + local patchdir="${WORKDIR}/patches" + local infodir="${WORKDIR}/patch-info" + local patchoutput="patchlevel-gentoo.h" + + # Inject Patch-Level info into description for patchlevel.h patch + # to show in -V + local patch_expr="*List-packaged-patches*" + local patch="$( cd "${patchdir}"; echo $patch_expr )"; + einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )" + + if [[ -e "${patchdir}/${patch}" ]]; then + printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\ + >"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc" + else + eerror "No $patch_expr found in ${patchdir}" + fi + + # Compute patch list to apply + # different name other than PATCHES to stop default + # reapplying it + # Single depth is currently only supported, as artifacts can reside + # from the old layout being multiple-directories, as well as it grossly + # simplifying the patchlevel_gentoo.h generation. + local PERL_PATCHES=($( + find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\ + grep -E '[.](diff|patch)$' |\ + sort -n + )) + + for patch in "${PERL_PATCHES[@]}"; do + eapply "${WORKDIR}"/patches/${patch} + done + + einfo "Generating $patchoutput" + + # This code creates a header file, each iteration + # creates one-or-more-lines for each entry found in PERL_PATCHES + # and STDOUT is redirected to the .h file + for patch in "${PERL_PATCHES[@]}"; do + local desc_f="${infodir}/${patch}.desc" + local bugs_f="${infodir}/${patch}.bugs" + + printf ',"%s"\n' "${patch}" + if [[ ! -e "${desc_f}" ]]; then + ewarn "No description provided for ${patch} (expected: ${desc_f} )" + else + local desc="$(c_escape_file "${desc_f}")" + printf ',"- %s"\n' "${desc}" + fi + if [[ -e "${bugs_f}" ]]; then + while read -d $'\n' -r line; do + local esc_line="$(c_escape_string "${line}")" + printf ',"- Bug: %s"\n' "${esc_line}" + done <"${bugs_f}" + fi + done > "${S}/${patchoutput}" + printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST" + +} + +src_prepare() { + + local patchdir="${WORKDIR}/patches" + + # mv -v "${WORKDIR}/perl-patchset-${PATCH_BASE}/patches" "${WORKDIR}/patches" || die + # mv -v "${WORKDIR}/perl-patchset-${PATCH_BASE}/patch-info" "${WORKDIR}/patch-info" || die + + # Prepare Patch dir with additional patches / remove unwanted patches + # Inject bug/desc entries for perl -V + # Old example: + # add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\ + # "Fix broken miniperl on hppa"\ + # "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162" + + if [[ ${CHOST} == *-solaris* ]] ; then + # do NOT mess with nsl, on Solaris this is always necessary, + # when -lsocket is used e.g. to get h_errno + rm_patch "*-nsl-and-cl*" + fi + + apply_patchdir + + tc-is-cross-compiler && src_prepare_perlcross + + tc-is-static-only || src_prepare_dynamic + + if use gdbm; then + sed -i "s:INC => .*:INC => \"-I${ESYSROOT}/usr/include/gdbm\":g" \ + ext/NDBM_File/Makefile.PL || die + fi + + # Use errno.h from prefix rather than from host system, bug #645804 + if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then + sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + # set a soname, fix linking against just built libperl + sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die + fi + + if [[ ${CHOST} == *-darwin* ]] ; then + # fix install_name (soname) not to reference $D + sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die + + # fix environ linkage absence (only a real issue on Darwin9) + if [[ ${CHOST##*-darwin} -le 9 ]] ; then + sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \ + Makefile.SH || die + fi + fi + + default +} + +myconf() { + # the myconf array is declared in src_configure + myconf=( "${myconf[@]}" "$@" ) +} + +# Outputs a list of versions which have been seen in any of the +# primary perl @INC prefix paths, such as: +# /usr/lib64/perl5/ +# /usr/local/lib64/perl5/ +# /usr/lib64/perl5/vendor_perl/ +# +# All values of NUMBER must be like "5.x.y" or like "5.x" +# +find_candidate_inc_versions() { + local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$' + local dirs=( + "${EROOT}${PRIV_BASE}" + "${EROOT}${SITE_BASE}" + "${EROOT}${VENDOR_BASE}" + ) + for dir in "${dirs[@]}"; do + if [[ ! -e "${dir}" ]]; then + continue + fi + # Without access to readdir() on these dirs, find will not be able + # to reveal any @INC directories inside them, and will subsequently prune + # them from the built perl's @INC support, breaking our compatiblity options + # entirely. + if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then + eerror "Bad permissions on ${dir}, this will probably break things" + eerror "Ensure ${dir} is +rx for at least uid=$EUID" + eerror "Recommended permission is +rx for all" + eerror "> chmod o+rx ${dir}" + fi + done + einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}" + find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null +} + +# Sort versions passed versiony-ly, remove self-version if present +# dedup. Takes each version as an argument +sanitize_inc_versions() { + local vexclude="${SUBSLOT}" + einfo "Normalizing/Sorting candidate list: $*" + einfo " to remove '${vexclude}'" + # Note, general numeric sort has to be used + # for the last component, or unique will convert + # 5.30.0 + 5.30 into just 5.30 + printf "%s\n" "$@" |\ + grep -vxF "${vexclude}" |\ + sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg +} + +versions_to_inclist() { + local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}" + + for v; do + has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ "; + echo -n "${v}/ "; + done +} + +versions_to_gentoolibdirs() { + local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}" + local root + local v + for v; do + for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do + local fullpath="${EROOT}${root}/${v}" + if [[ -e "${fullpath}" ]]; then + has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}"; + printf "%s:" "${fullpath}" + fi + done + done +} + +src_configure() { + declare -a myconf + + export LC_ALL="C" + [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091 + + # Perl has problems compiling with -Os in your flags with glibc + replace-flags "-Os" "-O2" + + # xlocale.h is going away in glibc-2.26, so it's counterproductive + # if we use it and include it in CORE/perl.h ... Perl builds just + # fine with glibc and locale.h only. + # However, the darwin prefix people have no locale.h ... + use elibc_glibc && myconf -Ui_xlocale + + # Perl relies on -fwrapv semantics + filter-flags -ftrapv + + # This flag makes compiling crash in interesting ways + filter-flags "-malign-double" + + # On musl we dont want to use largefile *64 types, since 1) normal + # types are 64bit / largefile anyway and 2) the *64 types are going + # away in 1.2.4... bug #911233 + use elibc_musl && myconf -Ud_off64_t + + use sparc && myconf -Ud_longdbl + + # This urgently needs debugging - on m68k, miniperl crashes during + # build otherwise.. + use m68k && append-ldflags -Wl,-z,norelro + + export BUILD_BZIP2=0 + export BZIP2_INCLUDE=${ESYSROOT}/usr/include + export BZIP2_LIB=${ESYSROOT}/usr/$(get_libdir) + + export BUILD_ZLIB=False + export ZLIB_INCLUDE=${ESYSROOT}/usr/include + export ZLIB_LIB=${ESYSROOT}/usr/$(get_libdir) + + # allow either gdbm to provide ndbm (in ) or db1 + myndbm='U' + mygdbm='U' + mydb='U' + if use gdbm ; then + mygdbm='D' + if use berkdb ; then + myndbm='D' + fi + fi + if use berkdb ; then + mydb='D' + has_version '=sys-libs/db-1*' && myndbm='D' + fi + + myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db" + + if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then + ewarn "Perl will not be built with berkdb support, use gcc if you need it..." + myconf -Ui_db -Ui_ndbm + fi + + use perl_features_ithreads && myconf -Dusethreads + + use perl_features_quadmath && myconf -Dusequadmath + + if use perl_features_debug ; then + append-cflags "-g" + myconf -DDEBUGGING + elif [[ ${CFLAGS} == *-g* ]] ; then + myconf -DDEBUGGING=-g + else + myconf -DDEBUGGING=none + fi + + # modifying 'optimize' prevents cross configure script from appending required flags + if tc-is-cross-compiler; then + append-cflags "-fwrapv" + tc-export_build_env + + # Needed for the CHOST build too (bug #932385) + export CFLAGS="${CFLAGS} -D_GNU_SOURCE" + + # bug #913171 + export \ + HOSTCC=$(tc-getBUILD_CC) \ + HOSTCFLAGS="${CFLAGS_FOR_BUILD} -D_GNU_SOURCE" \ + HOSTLDFLAGS="${LDFLAGS_FOR_BUILD}" + fi + + # bug #877659, bug #821577 + append-cflags -fno-strict-aliasing + + # Autodiscover all old version directories, some of them will even be newer + # if you downgrade + if [[ -z ${PERL_OLDVERSEN} ]]; then + PERL_OLDVERSEN="$( find_candidate_inc_versions )" + fi + + # Fixup versions, removing self match, fixing order and dupes + PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )" + + # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string + if [[ -n "${PERL_OLDVERSEN// }" ]]; then + local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )" + einfo "This version of perl may partially support modules previously" + einfo "installed in any of the following paths:" + for incpath in ${inclist}; do + [[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}" + [[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}" + [[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}" + done + einfo "This is a temporary measure and you should aim to cleanup these paths" + einfo "via world updates and perl-cleaner" + # myconf -Dinc_version_list="${inclist}" + myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )" + fi + + [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a" + + # Make sure we can do the final link #523730, need to set deployment + # target to override hardcoded 10.3 which breaks on modern OSX + [[ ${CHOST} == *-darwin* ]] && \ + myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)" + + # Older macOS with non-Apple GCC chokes on inline in system headers + # using c89 mode as injected by cflags.SH, in addition, we override + # cflags, so we loose PERL_DARWIN which enables compat code that + # apparently on more recent macOS releases is no longer necessary + [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \ + append-cflags -Dinline=__inline__ -DPERL_DARWIN + + # Prefix: the host system needs not to follow Gentoo multilib stuff, and in + # Prefix itself we don't do multilib either, so make sure perl can find + # something compatible. + if use prefix ; then + # Set a hook to check for each detected library whether it actually works. + export libscheck=" + ( echo 'int main(){}' > '${T}'/conftest.c && + $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null + ) || xxx=/dev/null" + + # Use all host paths that might contain useful stuff, the hook above will filter out bad choices. + local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib" + myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}" + elif [[ $(get_libdir) != "lib" ]] ; then + # We need to use " and not ', as the written config.sh use ' ... + myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)" + fi + + # don't try building ODBM, bug #354453 + disabled_extensions="ODBM_File" + + if ! use gdbm ; then + # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm" + disabled_extensions="${disabled_extensions} GDBM_File NDBM_File" + fi + + myconf -Dnoextensions="${disabled_extensions}" + + [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly + + [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF} + # allow fiddling via EXTRA_ECONF, bug 558070 + eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})" + + myconf \ + -Duseshrplib \ + -Darchname="${myarch}" \ + -Dar="$(tc-getAR)" \ + -Dcc="$(tc-getCC)" \ + -Dcpp="$(tc-getCPP)" \ + -Dld="$(tc-getCC)" \ + -Dnm="$(tc-getNM)" \ + -Dranlib="$(tc-getRANLIB)" \ + -Accflags="${CFLAGS} -DNO_PERL_RAND_SEED" \ + -Doptimize="${CFLAGS}" \ + -Dldflags="${LDFLAGS}" \ + -Dprefix="${EPREFIX}"'/usr' \ + -Dsiteprefix="${EPREFIX}"'/usr/local' \ + -Dvendorprefix="${EPREFIX}"'/usr' \ + -Dscriptdir="${EPREFIX}"'/usr/bin' \ + -Dprivlib="${EPREFIX}${PRIV_LIB}" \ + -Darchlib="${EPREFIX}${ARCH_LIB}" \ + -Dsitelib="${EPREFIX}${SITE_LIB}" \ + -Dsitearch="${EPREFIX}${SITE_ARCH}" \ + -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \ + -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \ + -Dman1dir="${EPREFIX}"/usr/share/man/man1 \ + -Dman3dir="${EPREFIX}"/usr/share/man/man3 \ + -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \ + -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \ + -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \ + -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \ + -Dman1ext='1' \ + -Dman3ext='3pm' \ + -Dlibperl="${LIBPERL}" \ + -Dlocincpth="${EPREFIX}"'/usr/include ' \ + -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \ + -Duselargefiles \ + -Dd_semctl_semun \ + -Dcf_by='Gentoo' \ + -Dmyhostname='localhost' \ + -Dperladmin='root@localhost' \ + -Ud_csh \ + -Dsh="${BROOT}"/bin/sh \ + -Dtargetsh="${EPREFIX}"/bin/sh \ + -Uusenm \ + "${EXTRA_ECONF[@]}" + + if tc-is-cross-compiler; then + ./configure \ + --target="${CHOST}" \ + --build="${CBUILD}" \ + -Dinstallprefix='' \ + -Dinstallusrbinperl='undef' \ + -Dusevendorprefix='define' \ + "${myconf[@]}" \ + || die "Unable to configure" + else + sh Configure \ + -des \ + -Dinstallprefix="${EPREFIX}"'/usr' \ + -Dinstallusrbinperl='n' \ + "${myconf[@]}" \ + || die "Unable to configure" + fi +} + +src_test() { + export NO_GENTOO_NETWORK_TESTS=1; + export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}" + export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}" + if [[ ${EUID} == 0 ]] ; then + ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..." + return 0 + fi + TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed" +} + +src_install() { + local i + local coredir="${ARCH_LIB}/CORE" + + emake DESTDIR="${D}" install + + rm -f "${ED}/usr/bin/perl${MY_PV}" + ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die + + if ! tc-is-static-only ; then + dolib.so "${ED}"${coredir}/${LIBPERL} + rm -f "${ED}"${coredir}/${LIBPERL} + ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die + ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die + + ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die + ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die + ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die + fi + + rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages" + + # This removes ${D} from Config.pm + for i in $(find "${D}" -iname "Config.pm" ) ; do + einfo "Removing ${D} from ${i}..." + sed -i -e "s:${D}::" "${i}" || die "Sed failed" + done + + dodoc Changes* README AUTHORS + + if use doc ; then + # HTML Documentation + # We expect errors, warnings, and such with the following. + + dodir /usr/share/doc/${PF}/html + LD_LIBRARY_PATH=. ./perl installhtml \ + --podroot='.' \ + --podpath='lib:ext:pod:vms' \ + --recurse \ + --htmldir="${ED}/usr/share/doc/${PF}/html" + fi + + [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local + + dual_scripts +} + +pkg_preinst() { + check_rebuild +} + +pkg_postinst() { + dual_scripts + + if [[ -z "${ROOT}" ]] ; then + local INC DIR file + INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }') + einfo "Removing old .ph files" + for DIR in ${INC} ; do + if [[ -d "${DIR}" ]] ; then + for file in $(find "${DIR}" -name "*.ph" -type f ) ; do + rm -f "${file}" + einfo "<< ${file}" + done + fi + done + # Silently remove the now empty dirs + for DIR in ${INC} ; do + if [[ -d "${DIR}" ]] ; then + find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null + fi + done + + fi +} + +pkg_postrm() { + dual_scripts +} diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 76b44fda7d8b..8503b7e8212f 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -45,21 +45,21 @@ DIST python-gentoo-patches-3.9.21_p1.tar.xz 35404 BLAKE2B 7b5ac27e814b06791fa5f0 DIST python-gentoo-patches-3.9.22.tar.xz 35388 BLAKE2B b6acfa681bdb589f74094ea04bd053bfc122ef9f36b3413c33c352cfae4e101027b0348770b47b9fee769eaba8109406acb6418c1cb8c431fbc7cf1c69124dcb SHA512 335c32d696f9660c957dec0c9a54e2f04e34003d2dbb438e6c9e74ce0a6352b5849e8626397939e3ffa7dc3172ac88cfa2168dd0d120be306e8c898dc7b6b3dc EBUILD python-2.7.18_p16-r2.ebuild 8505 BLAKE2B feb4cf270dd478f2f7f16f969c9c8a28cf8121f3cc32f11407622afe0a1db79247d045cb6324b9b5f4939a6028164c655116fff98e2378eea7e23fe0b8ce1dda SHA512 cc3d964e6fd8577de2176cbf5832d8587e090158317e52fc42615b7494861b0a955983e0f8153401b6af44b1ba227cac87ae901cda524358518d2778fcd162f2 EBUILD python-3.10.16_p2.ebuild 15531 BLAKE2B cec70438eef3917846e6d26035f33bf2a0e90515a916c4283c286744deaea86f26b33e0fe96f9fba34552bd5917750abac8ec9726cb12937140291cfab689c9f SHA512 edf67f6b68442b860d209a2216b5c72151c242972329bd62463ef9e29d172f64a7bd4d8eb708f8b6830eaaed35336ddda5343c1f30dc3199abe859d97ba4c948 -EBUILD python-3.10.17.ebuild 15532 BLAKE2B 58a941c50c21b527c049b843919d690a07bbbc98e3d566bb544c473087019a7944474e710079d062c0ddf203b0e79279a5bcdaf54fb3fde2731d77f79405bbb1 SHA512 e6ec9e5b459feb3aafab58be91d387d08921de1ccd1a4bc7a3356b012bf47332dc7d15b1fda25646a031d38da361062ae34c5e0fb9fdccc2f17619676a14dad5 +EBUILD python-3.10.17.ebuild 15531 BLAKE2B cec70438eef3917846e6d26035f33bf2a0e90515a916c4283c286744deaea86f26b33e0fe96f9fba34552bd5917750abac8ec9726cb12937140291cfab689c9f SHA512 edf67f6b68442b860d209a2216b5c72151c242972329bd62463ef9e29d172f64a7bd4d8eb708f8b6830eaaed35336ddda5343c1f30dc3199abe859d97ba4c948 EBUILD python-3.11.11_p2.ebuild 16699 BLAKE2B 5797ee3ec52e380d7f95373fde3130854506f13db4e4dadb07d7159dd290a7c41add2687ea51d79dc1afbee5cc700251ee8799a43440885803e82796407077a9 SHA512 44d5ba374441fd55830c89501cc00f9a9faab36f7a5c9c7dbd0bd2f65a633e0a93cb5aa57f3b5e57788d103a109f08e68a9f1a68bf65a6f97b7ffeb6f1f8a7e4 -EBUILD python-3.11.12.ebuild 16703 BLAKE2B decb98de111d6f70b02c47c522724cc1bc0af4c3e6e5aa053ab3d94fd9f69dd916586b094285c9b136be50947e17edf30ebf0f273e18eec5b5a78725b9471e61 SHA512 07f7f385a482b339454f793fb1d1e953dc88d73465f4048eb0e9a586b01b68a538726d15ab42cd925fd00a81859f87376008b76f134232ce63db132f7c8bc9f7 -EBUILD python-3.12.10.ebuild 15673 BLAKE2B 8ac7372319b2614cf7f0e2601888ffce877f5b260f0b6de1f99556d1b531e2af6c3f36d709a6aad504a8d2b6e7b89163e0542d10de4838ea72886f2286899fb6 SHA512 4e1eaa2cb32f3c894a460fafdd16549eb0d0512c8bbd3ce6ce0276b00559de4423d4f4906bc1982876b5a3500d088ca780e5c2c4bbfc9a48960d432341217b83 +EBUILD python-3.11.12.ebuild 16761 BLAKE2B afcaaa2fc618e6a250db4d7ab244fba7c7aeb2b247c9154729c6c65d6f8aed39f22de105dce4d508b3cabb1519d7fda8b6150de70cc1f9835354911a350b2eb7 SHA512 12a71e9f80fc1bd86281433a8ab023de5a4051c581f0e4279d2fc120a73870b24f7b68488aedb53eceb1211b2e5989abeebfcaa4f2f032ea7cebc5a42f13e9af +EBUILD python-3.12.10.ebuild 15731 BLAKE2B 096aa2d340e6238868ccd0ab6437e50ae26dfbf589f6a43919719a73fa5c299d763e3fffc7cd205703226bf5f85baf1b6bd5d263404d184ed20b64033eaf7d92 SHA512 4e7fd26a95de33268b3add0ee40f2b0c978d539d6c9b946d32b35c99f6049e809da7fc140b3a6ade90566ec3080c7b9db7757cc24cc46b58f6e3c8f64c80f3db EBUILD python-3.12.9.ebuild 15671 BLAKE2B 7b4dbd1c4b60b57c12ca33c2523230a3d52f9d5ec6ef56b922e34c369476d07f31fc9aa93b6b3346c092dfefa6631c86d2f498c4f69fc88cc1e4b42dc0698435 SHA512 c53dabbaf74fe6e19525865b42b43b4754171df43c6295183debf108ee43365fd409b302ec6febc90c10e7ef3b42564d11084df746cf37824f437d1ed3e58311 EBUILD python-3.13.2-r100.ebuild 16678 BLAKE2B f70e5c4541719979f5588c97e9b19b5be0f2566783fdfdac558820bd94dcc5f34ec15485db5836587f28dd93c09af046aad91ff1be2855ebde82e518a1e337fe SHA512 e73f5893d2fef16bd668124f918c50ef58ad50307182800598824f782a95928788aa57e18db9f550427c5e8bb958024151cc7bf4c18556d84c8359241b7304c2 EBUILD python-3.13.2.ebuild 16361 BLAKE2B 139a6204daab762327d366d6dc9806a81e1e31c28510b6460883233c488cdd82a06019dca27bde975e63ff68fd011e8fcc77d295b86a5173dd213d3119de1b76 SHA512 a850739e65cfe3d283b94e7b28d190ec026c2f30477368d157daf430530276975ec5c26bec22e3774ee0c380a55a427af08fdf9842e8c1327550aaf6146fe0b3 -EBUILD python-3.13.3-r100.ebuild 16678 BLAKE2B f70e5c4541719979f5588c97e9b19b5be0f2566783fdfdac558820bd94dcc5f34ec15485db5836587f28dd93c09af046aad91ff1be2855ebde82e518a1e337fe SHA512 e73f5893d2fef16bd668124f918c50ef58ad50307182800598824f782a95928788aa57e18db9f550427c5e8bb958024151cc7bf4c18556d84c8359241b7304c2 -EBUILD python-3.13.3.ebuild 16363 BLAKE2B 0d4182c46655d36e6b20a05c4976d3c6044a12e8ef07c9299dc72c9be18e4265b01a06f7b3c3b324c278b5df7611a2139f3804d826370f632c867f8db76f33fb SHA512 edc5ddd1c4c2c6fdc5c64d87b2c10b5c40fbbce32101250753d53a9c25b2d55e911b51b79ecd67aec8a3a9dc14e244615708a3714e0e1e4b0b19849739ff5cd7 +EBUILD python-3.13.3-r100.ebuild 16737 BLAKE2B cb56ad4f537e2564a52dec51b785f1e7274261544713821dd254808d5e6493f04badc08e146f35827b4a23196aec173cd846d045b6b43dc76302cd06336c3cbe SHA512 6d631db3ee38e7c6ce0596c4e2d5ddcac417053852e2f20d7a997f5010cd2398523d2ebc47d494351a3b08bcd9d9aa3c5e75fce6c58ee69a8caaaba2d6b860a7 +EBUILD python-3.13.3.ebuild 16421 BLAKE2B 43c0d894c880010956f4e94709c84c22c436d387b1d4995c9cbd42167eaf181e9ffa9e0a0ac622d025a46084a839f11e033be5a67939e39a0bbcc057052c1162 SHA512 b6dbc3447b95f6e1581c407f8c60926fd0b055bc4e4bac22358a15fc95f8041155634af588d5b06c1f51d2dc0d4d1d295f99d69cc299f489394ddcd58e69753a EBUILD python-3.14.0_alpha6-r100.ebuild 16695 BLAKE2B 2be26e8dd417df40d72e1361709a16d48add9e5262b09bd04191867f2b0f75b8e71fc8dee98b7f7976e925e54cd18e10e478f6ea06fa34164ce0f1f499738f1b SHA512 dfa892d823a07a7b9356b50a40c066e310ecd8a5e9cc674423a09e390a9115244a46af53df57667b3752103a9ac5bc0e0b9f7a57cec22875499f1edf14895d31 EBUILD python-3.14.0_alpha6.ebuild 16388 BLAKE2B 7cb2e9c39471f0ccfb2c436c4327469cb6e709f55d38016276876d318042afe59d7df2dea8e829fc21017a87bbd1fa1e3dcad33eb39fb673761d8b9a364f101a SHA512 cc12477ef0388b47441b06f76fc4fc35258753f121735a2ee1648740c9894025b0e426d5bebf922dec17f8c9c10569ee0c62b538cd31b924bdb21ecf4a25b933 -EBUILD python-3.14.0_alpha7-r100.ebuild 16695 BLAKE2B 2be26e8dd417df40d72e1361709a16d48add9e5262b09bd04191867f2b0f75b8e71fc8dee98b7f7976e925e54cd18e10e478f6ea06fa34164ce0f1f499738f1b SHA512 dfa892d823a07a7b9356b50a40c066e310ecd8a5e9cc674423a09e390a9115244a46af53df57667b3752103a9ac5bc0e0b9f7a57cec22875499f1edf14895d31 -EBUILD python-3.14.0_alpha7.ebuild 16388 BLAKE2B 7cb2e9c39471f0ccfb2c436c4327469cb6e709f55d38016276876d318042afe59d7df2dea8e829fc21017a87bbd1fa1e3dcad33eb39fb673761d8b9a364f101a SHA512 cc12477ef0388b47441b06f76fc4fc35258753f121735a2ee1648740c9894025b0e426d5bebf922dec17f8c9c10569ee0c62b538cd31b924bdb21ecf4a25b933 +EBUILD python-3.14.0_alpha7-r100.ebuild 16754 BLAKE2B 7e7bbd245ed46790942a247f1a163ea7b95f214e14fa455c4987af2ed76ba83b14a50974bd22da1559fc00716ab3d8fe30f1c6335d0f31c35be9875e9bf49e14 SHA512 3fd6465defdfb184f276825c4a5c9e2238c7cc90c30bde20cb94191b047d06354352473953d86d9cf8bd484e442e3278edc5c77050c680c9fe1a5c9ac89f73da +EBUILD python-3.14.0_alpha7.ebuild 16447 BLAKE2B 770ac5ffcf810cbdb76a28a44f6a44fed590139e1c604f6c9d22ef1a927c756700b69017972b0608e3e5b570e011408e23646fc810e92951d9dabed6c3b1c23f SHA512 54e0c202facfd92d6dfc45ac923a50e18104cf9f78c4cfb6de8c74c1b7c31410ba957e70d34babebad090fb98716c628ceaf8a564386988bbe21c0732fd37eb9 EBUILD python-3.8.20_p6.ebuild 13329 BLAKE2B 632fc0c922e18895efadeb33b8963a087f1951bb329c03f3d802fbda81ccf1b7c1e22f03c516d07819d1df66e8e1d7de0a8300ec308c8a56042b51dd86a51d01 SHA512 77e07e26f674bb245cc2d2c519c7a1b9e72a6eadcb4ea0631062189a3bf50e78a160a87d108b6867db9b9c3fdab22e85a290d73059a6859f052d83c7dda20014 -EBUILD python-3.8.20_p7.ebuild 13330 BLAKE2B 52bb1e08771cdd6e251750a2accc4131b1e6a0910aded8a5587f78500331344e73dacb2f2be3c2eeb363f309af88d82052ec88d30c78868218478de72d0b7a9b SHA512 c1eba6bc54f9a890f99466309522c919b096b4ac27d39067cd277d82b76ac5ee7adb21585feb9d4b93152a92617df430a102d403fe1e4cf5060e3a4e286f905a +EBUILD python-3.8.20_p7.ebuild 13329 BLAKE2B 632fc0c922e18895efadeb33b8963a087f1951bb329c03f3d802fbda81ccf1b7c1e22f03c516d07819d1df66e8e1d7de0a8300ec308c8a56042b51dd86a51d01 SHA512 77e07e26f674bb245cc2d2c519c7a1b9e72a6eadcb4ea0631062189a3bf50e78a160a87d108b6867db9b9c3fdab22e85a290d73059a6859f052d83c7dda20014 EBUILD python-3.9.21_p1.ebuild 15382 BLAKE2B 81df703cc940b016b2e48627dda25da8ea151b26d667da26faf9b1aff340c4003bde7444dcd635f6a7c9264e99c7c9676ae3ad576881c4ca09ffb78466d39446 SHA512 9d0c96e1f56b5d30baff55b16c18be637d410ba4d6c0c28f14bf9ef1b84981858f3bf90e44db3b908c06aaffd21320fab01303f0d9fb22acb178e9c785a87723 -EBUILD python-3.9.22.ebuild 15383 BLAKE2B c52d5318c8fe345e861a927885f4ebd5ee4e653f67906237435afb8d226a72535eddb3bdece49536c99c9f84fbead5867524ae4411de5e487e2b57c756bd3089 SHA512 3e0b33bcb67bedf4c1889033c5a2498a704f57cfeb9e5600f2d855dcb1a9281a2b22b6532d90ece2eea7394c26361c53976c2252bfe623a1603aa5ca10d85ab1 +EBUILD python-3.9.22.ebuild 15382 BLAKE2B 81df703cc940b016b2e48627dda25da8ea151b26d667da26faf9b1aff340c4003bde7444dcd635f6a7c9264e99c7c9676ae3ad576881c4ca09ffb78466d39446 SHA512 9d0c96e1f56b5d30baff55b16c18be637d410ba4d6c0c28f14bf9ef1b84981858f3bf90e44db3b908c06aaffd21320fab01303f0d9fb22acb178e9c785a87723 MISC metadata.xml 1437 BLAKE2B 22f737ad283774c5ffc55173878bf07b6f89d91b0ebd9cf41c11e518b35461ebc9ecfc8017a519673698869450c1ebe55b5dc2577a8b03ea716d30b99ce21d3e SHA512 9f684412c916a3909bb7c2bbfeeb93c66e1de22d4313d657370162ab8b7438e6397bc7d31641d0bbb06d3373966fbbf7578dc0a30ed44558cb1b8a3bb5bfecec diff --git a/dev-lang/python/python-3.10.17.ebuild b/dev-lang/python/python-3.10.17.ebuild index 678a928ecbe6..2e9d941cb3d9 100644 --- a/dev-lang/python/python-3.10.17.ebuild +++ b/dev-lang/python/python-3.10.17.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind diff --git a/dev-lang/python/python-3.11.12.ebuild b/dev-lang/python/python-3.11.12.ebuild index af5f15c4a00a..ff6ee57dda6f 100644 --- a/dev-lang/python/python-3.11.12.ebuild +++ b/dev-lang/python/python-3.11.12.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc ~x86" IUSE=" bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind @@ -245,6 +245,11 @@ src_configure() { -x test_strtod ) ;; + arm*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; mips*) COMMON_TEST_SKIPS+=( -x test_ctypes diff --git a/dev-lang/python/python-3.12.10.ebuild b/dev-lang/python/python-3.12.10.ebuild index 67bd154d442b..f4a9569ac1ec 100644 --- a/dev-lang/python/python-3.12.10.ebuild +++ b/dev-lang/python/python-3.12.10.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm ~arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind @@ -248,6 +248,11 @@ src_configure() { -x test_strtod ) ;; + arm*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; mips*) COMMON_TEST_SKIPS+=( -x test_ctypes diff --git a/dev-lang/python/python-3.13.3-r100.ebuild b/dev-lang/python/python-3.13.3-r100.ebuild index f2f4b2b6ff30..a02ac6833e59 100644 --- a/dev-lang/python/python-3.13.3-r100.ebuild +++ b/dev-lang/python/python-3.13.3-r100.ebuild @@ -283,6 +283,11 @@ src_configure() { -x test_strtod ) ;; + arm*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; hppa*) COMMON_TEST_SKIPS+=( -x test_gdb diff --git a/dev-lang/python/python-3.13.3.ebuild b/dev-lang/python/python-3.13.3.ebuild index 77efc9e367d4..fc5eb4346c67 100644 --- a/dev-lang/python/python-3.13.3.ebuild +++ b/dev-lang/python/python-3.13.3.ebuild @@ -32,7 +32,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm ~arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind @@ -285,6 +285,11 @@ src_configure() { -x test_strtod ) ;; + arm*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; hppa*) COMMON_TEST_SKIPS+=( -x test_gdb diff --git a/dev-lang/python/python-3.14.0_alpha7-r100.ebuild b/dev-lang/python/python-3.14.0_alpha7-r100.ebuild index 2abe01749d3a..eff6e9f28d12 100644 --- a/dev-lang/python/python-3.14.0_alpha7-r100.ebuild +++ b/dev-lang/python/python-3.14.0_alpha7-r100.ebuild @@ -284,6 +284,11 @@ src_configure() { -x test_strtod ) ;; + arm*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; hppa*) COMMON_TEST_SKIPS+=( -x test_gdb diff --git a/dev-lang/python/python-3.14.0_alpha7.ebuild b/dev-lang/python/python-3.14.0_alpha7.ebuild index f4da576cf95f..53ffce4948b0 100644 --- a/dev-lang/python/python-3.14.0_alpha7.ebuild +++ b/dev-lang/python/python-3.14.0_alpha7.ebuild @@ -286,6 +286,11 @@ src_configure() { -x test_strtod ) ;; + arm*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; hppa*) COMMON_TEST_SKIPS+=( -x test_gdb diff --git a/dev-lang/python/python-3.8.20_p7.ebuild b/dev-lang/python/python-3.8.20_p7.ebuild index 660298094121..c6e038ea7cda 100644 --- a/dev-lang/python/python-3.8.20_p7.ebuild +++ b/dev-lang/python/python-3.8.20_p7.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build debug +ensurepip examples gdbm +ncurses pgo +readline +sqlite +ssl test tk valgrind diff --git a/dev-lang/python/python-3.9.22.ebuild b/dev-lang/python/python-3.9.22.ebuild index 393ad5d74b86..e8160fe107b8 100644 --- a/dev-lang/python/python-3.9.22.ebuild +++ b/dev-lang/python/python-3.9.22.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build debug +ensurepip examples gdbm +ncurses pgo +readline +sqlite +ssl test tk valgrind diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index b4152bc6b89a..e9ee153524cb 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -584,6 +584,6 @@ EBUILD rust-bin-1.84.0-r2.ebuild 7586 BLAKE2B 1bb79a16c888c18c0f7df1eba195a23567 EBUILD rust-bin-1.84.1-r2.ebuild 7579 BLAKE2B 835feb0e183fecaa2c029f531152a40ca3a91bff3dae93b0dbc26551e591217595db972e3523163d3086f99e5a456478b2a7ea089638883e4be688968b437790 SHA512 deb5aa07dc5de17c274fb207b631cc32973fb894d2387b27ada3eb5846deb37c4589755f90d746dbc6cae799108d2517c06ccca5580df0d6e472a5d114c834fc EBUILD rust-bin-1.85.0-r1.ebuild 10656 BLAKE2B 633a942647b42dceae3603acde09e66f548170aeb8ab66b39e62211dfdef5b03b66029d8770bdfa4f62f78721da35e5ef8fcc058f2e127664ad62435117b6a26 SHA512 78de1b55beb14d95116f8a1b1aa641ffcfb64abe9911af2e0e7602ebef791ba0be13a44baf786c1f4e09f3168b24e72a6d26fb7a3019fa1e037e7aac18a43dfb EBUILD rust-bin-1.85.1.ebuild 10656 BLAKE2B 6002184d345419e1605117b488134ad5294fbc252f2675966f06d5b5982705a0cf4a0107389503049ef4ecc407af5dac04449d8826622252c5335ceaf10bfdda SHA512 43e01d4a5483d3155695a3093e1d985445efe3bd141f1c38ff3fb85e9dcefd63982e14e2816c47eb780eb60bcc70e9cbb184501afa810f832bb168eb4f56cbf3 -EBUILD rust-bin-1.86.0.ebuild 10595 BLAKE2B 80dfede0e0eeacc39b5f84df2c8d801747139f4411117157ab0f4d2f1eeadc1ffa57306f19c5e9eb7da310126331b0e606bcf5c135a0173d0027c13aa4915f70 SHA512 4f461a933f610a159af8cb2597303a311e53e04ec97e8d9a6ad2dccd725c8a34a5fb2ff746bb8a8c3d6ec90fa08d70094464da0bf96dd9a5fd189f11df375e28 +EBUILD rust-bin-1.86.0-r1.ebuild 10656 BLAKE2B 181ac41500718c77a3a4dd08966abcfcb1525466c583ec8dedb6a4766991b6403f77174a05bff9360bde37ad1d99dfcf92512384cb3f21bfdca189e5febae54e SHA512 862a7951533f2a5aa625948f71d427ceac80b392e7d3bcf9ef6213d0d4081792056dac5d644ed268ea97e02412a4bded8118f92e2ec76a68a611d96346b77305 EBUILD rust-bin-9999.ebuild 10632 BLAKE2B 755fbd47c1fdf0fa57c9cb53790da15ab72ac175e8cabe010857571f855b1a20f68a079e21c65d6c87e1743faacb36706b94847e1a4855c315961a8c1e57f818 SHA512 ab46e7d53ff18b717524e29f70c34468e55bb82b69c1f4b9a130150f51061b99337976155140efe83f2360ec11d6c19e76c7498e71c157ef97451397c3db0387 MISC metadata.xml 1123 BLAKE2B 8beee99782782c58cb0c43f9fc5548bd8eec40d305ce8b916be2b78b65899eaaeda625225ff0c9724a93b2a350510c97171def95001059943501a6af9248310a SHA512 e944a0c04416ca40de6956d2d7a950e3c4be9f1b1754f0b46263fbdd2ace292b959bfb6a264ab479c0576a05835b4e44ed62260c181ce5590cb859e1dcdc0e41 diff --git a/dev-lang/rust-bin/rust-bin-1.86.0-r1.ebuild b/dev-lang/rust-bin/rust-bin-1.86.0-r1.ebuild new file mode 100644 index 000000000000..d4f1a5db1a71 --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.86.0-r1.ebuild @@ -0,0 +1,318 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL="yes" + +inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature + +if [[ ${PV} == *9999* ]]; then + # We need to fetch a tarball in src_unpack + PROPERTIES+=" live" +elif [[ ${PV} == *beta* ]]; then + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src" + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/ + SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV}) + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz ) + " +else + # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src" + SRC_URI="$(rust_all_arch_uris "rust-${PV}") + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-04-03/rust-src-${PV}.tar.xz ) + ppc64? ( elibc_musl? ( !big-endian? ( + $(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV}) + ) ) ) + " + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then + GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PV}" # omit trailing slash + MY_P=rust-${PV} + # Keep this separate to allow easy commenting out if not yet built + SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " + SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) + )" + SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) + )" + SRC_URI+=" ppc64? ( big-endian? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) + ) )" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + sys-apps/lsb-release + || ( + llvm-runtimes/libgcc + sys-devel/gcc:* + ) + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" +[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +# stripping rust may break it (at least on x86_64) +# https://github.com/rust-lang/rust/issues/112286 +RESTRICT="strip" + +QA_PREBUILT=" + opt/rust-bin-${SLOT}/bin/.* + opt/rust-bin-${SLOT}/lib/.*.so* + opt/rust-bin-${SLOT}/libexec/.* + opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.* + opt/rust-bin-${SLOT}/lib/rustlib/.*/lib/.* +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + # We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch + local rust_bin_url rustc_src_url + # Cut down on webrequests by fetching the nightly toml once + curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" || + die "Failed to fetch nightly revision info" + rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + einfo "Using nightly Rust from: ${rust_bin_url}" + + if use rust-src; then + einfo "Using nightly Rust-src from: ${rustc_src_url}" + # We need to fetch the rust-src tarball + einfo "Fetching nightly rust-src tarball ..." + curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" || + die "Failed to fetch nightly rust-src tarball." + # no verify-sig here, just unpack it + tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball" + fi + + einfo "Fetching nightly Rust tarball ..." + curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball" + if use verify-sig; then + einfo "Fetching nightly signature ..." + curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature" + verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \ + "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc" + fi + tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball" + else + # sadly rust-src tarball does not have corresponding .asc file + # so do partial verification + if use verify-sig; then + for f in ${A}; do + if [[ -f ${DISTDIR}/${f}.asc ]]; then + verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc" + fi + done + fi + + default_src_unpack + + fi + case ${PV} in + *9999*) + mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die + ;; + *beta*) + mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die + ;; + *) + mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die + ;; + esac +} + +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + +rust_native_abi_install() { + pushd "${S}" >/dev/null || die + local std="$(grep 'std' ./components || die "std not found in components")" + local components=( "rustc" "cargo" "${std}" ) + use doc && components+=( "rust-docs" ) + use clippy && components+=( "clippy-preview" ) + use rustfmt && components+=( "rustfmt-preview" ) + if use rust-analyzer; then + local analysis="$(grep 'analysis' ./components || die "analysis not found in components")" + components+=( "rust-analyzer-preview" "${analysis}" ) + fi + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + case ${PV} in + *9999*) + mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die + ;; + *beta*) + mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die + ;; + *) + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + ;; + esac + echo rust-src >> ./components || die + components+=( "rust-src" ) + fi + edo ./install.sh \ + --components="$(IFS=,; echo "${components[*]}")" \ + --disable-verify \ + --prefix="${ED}/opt/rust-bin-${SLOT}" \ + --mandir="${ED}/opt/rust-bin-${SLOT}/man" \ + --disable-ldconfig + + docompress /opt/${P}/man/ + + if use prefix; then + local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin" + find "${ED}/opt/${SLOT}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + use rust-analyzer && symlinks+=( rust-analyzer ) + + einfo "installing eselect-rust symlinks and paths" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /opt/rust-bin-/bin/rustc- + local ver_i="${i}-bin-${SLOT}" + ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die + dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}" + $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"") + _EOF_ + doenvd "${T}/50${P}" + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${PN}-${SLOT}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${PN}-${SLOT}" + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi; then + rust_native_abi_install + else + local rust_target + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + dodir "/opt/${P}/lib/rustlib" + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + fi + + # BUG: installs x86_64 binary on other arches + rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die +} + +pkg_postinst() { + eselect rust update + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust-bin/rust-bin-1.86.0.ebuild b/dev-lang/rust-bin/rust-bin-1.86.0.ebuild deleted file mode 100644 index 9f30d1dcc234..000000000000 --- a/dev-lang/rust-bin/rust-bin-1.86.0.ebuild +++ /dev/null @@ -1,318 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LLVM_COMPAT=( 19 ) -LLVM_OPTIONAL="yes" - -inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature - -if [[ ${PV} == *9999* ]]; then - # We need to fetch a tarball in src_unpack - PROPERTIES+=" live" -elif [[ ${PV} == *beta* ]]; then - # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src" - betaver=${PV//*beta} - BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" - RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/ - SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV}) - rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz ) - " -else - # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src" - SRC_URI="$(rust_all_arch_uris "rust-${PV}") - rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-04-03/rust-src-${PV}.tar.xz ) - ppc64? ( elibc_musl? ( !big-endian? ( - $(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV}) - ) ) ) - " - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -fi - -DESCRIPTION="Systems programming language from Mozilla" -HOMEPAGE="https://www.rust-lang.org/" - -if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then - GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PV}" # omit trailing slash - MY_P=rust-${PV} - # Keep this separate to allow easy commenting out if not yet built - SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " - SRC_URI+=" mips? ( - abi_mips_o32? ( - big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) - !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) - ) - abi_mips_n64? ( - big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) - !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) - ) - )" - SRC_URI+=" riscv? ( - elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) - )" - SRC_URI+=" ppc64? ( big-endian? ( - elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) - ) )" -fi - -LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" -SLOT="$(ver_cut 1-2)" -IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" - -RDEPEND=" - >=app-eselect/eselect-rust-20190311 - dev-libs/openssl - sys-apps/lsb-release - || ( - llvm-runtimes/libgcc - sys-devel/gcc:* - ) - !dev-lang/rust:stable - !dev-lang/rust-bin:stable -" -BDEPEND=" - prefix? ( dev-util/patchelf ) - verify-sig? ( sec-keys/openpgp-keys-rust ) -" -[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl" - -REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" - -# stripping rust may break it (at least on x86_64) -# https://github.com/rust-lang/rust/issues/112286 -RESTRICT="strip" - -QA_PREBUILT=" - opt/rust-bin-${SLOT}/bin/.* - opt/rust-bin-${SLOT}/lib/.*.so* - opt/rust-bin-${SLOT}/libexec/.* - opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.* - opt/rust-bin-${SLOT}/lib/rustlib/.*/lib/.* -" - -# An rmeta file is custom binary format that contains the metadata for the crate. -# rmeta files do not support linking, since they do not contain compiled object files. -# so we can safely silence the warning for this QA check. -QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" - -VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc" - -src_unpack() { - if [[ ${PV} == *9999* ]]; then - # We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch - local rust_bin_url rustc_src_url - # Cut down on webrequests by fetching the nightly toml once - curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" || - die "Failed to fetch nightly revision info" - rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) - rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) - einfo "Using nightly Rust from: ${rust_bin_url}" - - if use rust-src; then - einfo "Using nightly Rust-src from: ${rustc_src_url}" - # We need to fetch the rust-src tarball - einfo "Fetching nightly rust-src tarball ..." - curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" || - die "Failed to fetch nightly rust-src tarball." - # no verify-sig here, just unpack it - tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball" - fi - - einfo "Fetching nightly Rust tarball ..." - curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball" - if use verify-sig; then - einfo "Fetching nightly signature ..." - curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature" - verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \ - "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc" - fi - tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball" - else - # sadly rust-src tarball does not have corresponding .asc file - # so do partial verification - if use verify-sig; then - for f in ${A}; do - if [[ -f ${DISTDIR}/${f}.asc ]]; then - verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc" - fi - done - fi - - default_src_unpack - - fi - case ${PV} in - *9999*) - mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die - ;; - *beta*) - mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die - ;; - *) - mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die - ;; - esac -} - -patchelf_for_bin() { - local filetype=$(file -b ${1}) - if [[ ${filetype} == *ELF*interpreter* ]]; then - einfo "${1}'s interpreter changed" - patchelf ${1} --set-interpreter ${2} || die - elif [[ ${filetype} == *script* ]]; then - hprefixify ${1} - fi -} - -rust_native_abi_install() { - pushd "${S}" >/dev/null || die - local std="$(grep 'std' ./components || die "std not found in components")" - local components=( "rustc" "cargo" "${std}" ) - use doc && components+=( "rust-docs" ) - use clippy && components+=( "clippy-preview" ) - use rustfmt && components+=( "rustfmt-preview" ) - if use rust-analyzer; then - local analysis="$(grep 'analysis' ./components || die "analysis not found in components")" - components+=( "rust-analyzer-preview" "${analysis}" ) - fi - # Rust component 'rust-src' is extracted from separate archive - if use rust-src; then - einfo "Combining rust and rust-src installers" - case ${PV} in - *9999*) - mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die - ;; - *beta*) - mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die - ;; - *) - mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die - ;; - esac - echo rust-src >> ./components || die - components+=( "rust-src" ) - fi - edo ./install.sh \ - --components="$(IFS=,; echo "${components[*]}")" \ - --disable-verify \ - --prefix="${ED}/opt/rust-bin-${SLOT}" \ - --mandir="${ED}/opt/rust-bin-${SLOT}/man" \ - --disable-ldconfig - - docompress /opt/${P}/man/ - - if use prefix; then - local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash) - ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin" - find "${ED}/opt/${SLOT}/bin" -type f -print0 | \ - while IFS= read -r -d '' filename; do - patchelf_for_bin ${filename} ${interpreter} \; || die - done - eend $? - fi - - local symlinks=( - cargo - rustc - rustdoc - rust-gdb - rust-gdbgui - rust-lldb - ) - - use clippy && symlinks+=( clippy-driver cargo-clippy ) - use rustfmt && symlinks+=( rustfmt cargo-fmt ) - use rust-analyzer && symlinks+=( rust-analyzer ) - - einfo "installing eselect-rust symlinks and paths" - local i - for i in "${symlinks[@]}"; do - # we need realpath on /usr/bin/* symlink return version-appended binary path. - # so /usr/bin/rustc should point to /opt/rust-bin-/bin/rustc- - local ver_i="${i}-bin-${SLOT}" - ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die - dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" - done - - # symlinks to switch components to active rust in eselect - dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}" - dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}" - dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}" - dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}" - - # make all capital underscored variable - local CARGO_TRIPLET="$(rust_abi)" - CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" - CARGO_TRIPLET="${CARGO_TRIPLET^^}" - cat <<-_EOF_ > "${T}/50${P}" - MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}" - $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"") - _EOF_ - doenvd "${T}/50${P}" - - # note: eselect-rust adds EROOT to all paths below - cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}" - /usr/bin/cargo - /usr/bin/rustdoc - /usr/bin/rust-gdb - /usr/bin/rust-gdbgui - /usr/bin/rust-lldb - /usr/lib/rustlib - /usr/lib/rust/lib - /usr/lib/rust/man - /usr/share/doc/rust - _EOF_ - - if use clippy; then - echo /usr/bin/clippy-driver >> "${T}/provider-${PN}-${SLOT}" - echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}" - fi - if use rustfmt; then - echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}" - echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}" - fi - if use rust-analyzer; then - echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}" - fi - - insinto /etc/env.d/rust - doins "${T}/provider-${PN}-${SLOT}" - popd >/dev/null || die -} - -multilib_src_install() { - if multilib_is_native_abi; then - rust_native_abi_install - else - local rust_target - rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" - dodir "/opt/${P}/lib/rustlib" - cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ - "${ED}/opt/${P}/lib/rustlib" || die - fi - - # BUG: installs x86_64 binary on other arches - rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die -} - -pkg_postinst() { - eselect rust update - - if has_version dev-debug/gdb || has_version llvm-core/lldb; then - elog "Rust installs helper scripts for calling GDB and LLDB," - elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." - fi - - if has_version app-editors/emacs; then - optfeature "emacs support for rust" app-emacs/rust-mode - fi - - if has_version app-editors/gvim || has_version app-editors/vim; then - optfeature "vim support for rust" app-vim/rust-vim - fi -} - -pkg_postrm() { - eselect rust cleanup -} diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 4310d2180369..ca03ff99050e 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -68,6 +68,6 @@ EBUILD rust-1.84.1-r1.ebuild 22470 BLAKE2B a025e47e6cd9ef3e697324c91d6bddc171f04 EBUILD rust-1.85.0-r1.ebuild 25603 BLAKE2B ff93bf2c53c5c49517129d9d98060b5e9622f7d9fcd741a7f00e36b64821886a54dc7dbd4dcd3788c50dc870ec87fcff2d0c1d2729764b91a1fbbfc503560262 SHA512 826de51b3999bed6f8932b5411dcf90c37921124337ceb0b6ce9ced5dca301dbd928f5717302e453e350814739a46300c3d5a68446a516d9ba58a3b958567bf7 EBUILD rust-1.85.0.ebuild 25554 BLAKE2B a65966e8268197a3f16ec2b9a3276eff72f9e690116a83c8c5ad5ff9ff7f60d2c8067cab1db6fe6a52ca096849c3fc398df3b1c3b4eda9802af79d66ebf895a9 SHA512 6470370db2420f82e8c5aa8ba6cdd40c369153813916a39ec12224bec7a70f02856a550f45baa064293d7d29e5205d9101ab47cf62acc52ade1e9360c7eaedfa EBUILD rust-1.85.1.ebuild 25603 BLAKE2B ff93bf2c53c5c49517129d9d98060b5e9622f7d9fcd741a7f00e36b64821886a54dc7dbd4dcd3788c50dc870ec87fcff2d0c1d2729764b91a1fbbfc503560262 SHA512 826de51b3999bed6f8932b5411dcf90c37921124337ceb0b6ce9ced5dca301dbd928f5717302e453e350814739a46300c3d5a68446a516d9ba58a3b958567bf7 -EBUILD rust-1.86.0.ebuild 25611 BLAKE2B 3e5ddd84337af632a64605fcf789576d2986abd598b0f2e38664e419fb95f294db65f15ba75abd18c0fd79c82e208102e01530cdab203b2ef677033738b5b748 SHA512 8c250c470956a144adfdbd0985b6a95c09acd861b9541c52927e9224a6ebc4b876787eedbce98571567c4ab332671ce17f0b0b397668c7c713253a780f403906 +EBUILD rust-1.86.0-r1.ebuild 25604 BLAKE2B 60fb6b621eb2fe6a7ca312d6490e86cfb08c2956aa4bb499edfc996d184120815e5c63618d6273fab02077d68c51901188300a0c75253f823ef0f3515edbe033 SHA512 2b63c27d9a622b40ecb0784c8b40698bed49c08758ce234ae21bf70fbf801a7d82e3dd97714bfb1e11cb8970b5f8bddee525b8bc043e035296f01f106207c26b EBUILD rust-9999.ebuild 25627 BLAKE2B 186d10a4c875ad0cb5e6754fd0d6918090d5b1b46df37967c19f2eb871a6999696fc4e0cef790634ed4204ae38a43b469bfd45653f1562b9b51a97a2b7db3e10 SHA512 0a4a5c6a83def3a7ccef12105cdfb316e332394b21e8ded0017163da0ee01954917899a862726ec8bd729b569b9678cc6027dd654cf66fe4136721e4d87fdace MISC metadata.xml 1841 BLAKE2B 48a8167ae44a7f4892b917895298627ac920af6c488180980e65bdeec53b650455fc6d7dddad0a7a8257d473080082377fb6b6df6a834b294b6e6485e6784a1e SHA512 1f5fd792b65ccac89a61233004980d9f7cbaecea5d05f35f9cc2dc9cab4e3ccfcd46828e88770a1b8ba5ca23064b6a75eea72a0b32bcce52bb399b85ac95f755 diff --git a/dev-lang/rust/rust-1.86.0-r1.ebuild b/dev-lang/rust/rust-1.86.0-r1.ebuild new file mode 100644 index 000000000000..a5a82e00ca6a --- /dev/null +++ b/dev-lang/rust/rust-1.86.0-r1.ebuild @@ -0,0 +1,808 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +PYTHON_COMPAT=( python3_{10..13} ) + +RUST_MAX_VER=${PV%%_*} +if [[ ${PV} == *9999* ]]; then + RUST_MIN_VER="1.85.0" # Update this as new `beta` releases come out. +elif [[ ${PV} == *beta* ]]; then + # Enforce that `beta` is built from `stable`. + # While uncommon it is possible for feature changes within `beta` to result + # in an older snapshot being unable to build a newer one without modifying the sources. + # 'stable' releases should always be able to build a beta snapshot so just use those. + RUST_MAX_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).1" + RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" +else + RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" +fi + +inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \ + multilib multilib-build python-any-r1 rust rust-toolchain toolchain-funcs verify-sig + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/rust-lang/rust.git" + EGIT_SUBMODULES=( + "*" + "-src/gcc" + ) +elif [[ ${PV} == *beta* ]]; then + # Identify the snapshot date of the beta release: + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + MY_P="rustc-beta" + SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz + verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc + -> rustc-${PV}-src.tar.xz.asc ) + " + S="${WORKDIR}/${MY_P}-src" +else + MY_P="rustc-${PV}" + SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz + verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc ) + " + S="${WORKDIR}/${MY_P}-src" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +DESCRIPTION="Systems programming language originally developed by Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +# keep in sync with llvm ebuild of the same version as bundled one. +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai + LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE + WebAssembly X86 XCore Xtensa ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} + +# https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt +_ALL_RUST_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) +declare -A ALL_RUST_EXPERIMENTAL_TARGETS +for _x in "${_ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do + ALL_RUST_EXPERIMENTAL_TARGETS["llvm_targets_${_x}"]=0 +done + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable + +IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto rustfmt rust-analyzer rust-src +system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" + +if [[ ${PV} = *9999* ]]; then + # These USE flags require nightly rust + IUSE+=" miri" +fi + +LLVM_DEPEND=() +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation +for _x in "${ALL_LLVM_TARGETS[@]}"; do + LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "llvm-core/llvm:\${LLVM_SLOT}[${_x}]") )" ) + if [[ -v ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"] ]] ; then + ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"]=1 + fi +done +LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" ) +LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" ) + +BDEPEND="${PYTHON_DEPS} + app-eselect/eselect-rust + || ( + >=sys-devel/gcc-4.7[cxx] + >=llvm-core/clang-3.5 + ) + lto? ( system-llvm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') ) ) + !system-llvm? ( + >=dev-build/cmake-3.13.4 + app-alternatives/ninja + ) + test? ( dev-debug/gdb ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +DEPEND=" + >=app-arch/xz-utils-5.2 + net-misc/curl:=[http2,ssl] + sys-libs/zlib:= + dev-libs/openssl:0= + system-llvm? ( + ${LLVM_DEPEND[*]} + llvm-libunwind? ( llvm-runtimes/libunwind:= ) + ) + !system-llvm? ( + !llvm-libunwind? ( + elibc_musl? ( sys-libs/libunwind:= ) + ) + ) +" + +RDEPEND="${DEPEND} + app-eselect/eselect-rust + dev-lang/rust-common + sys-apps/lsb-release + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" + +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) + rust-analyzer? ( rust-src ) + test? ( ${ALL_LLVM_TARGETS[*]} ) + wasm? ( llvm_targets_WebAssembly ) + x86? ( cpu_flags_x86_sse2 ) +" + +# we don't use cmake.eclass, but can get a warning +CMAKE_WARN_UNUSED_CLI=no + +QA_FLAGS_IGNORED=" + usr/lib/${PN}/${SLOT}/bin/.* + usr/lib/${PN}/${SLOT}/libexec/.* + usr/lib/${PN}/${SLOT}/lib/lib.*.so + usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/.* + usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so +" + +QA_SONAME=" + usr/lib/${PN}/${SLOT}/lib/lib.*.so.* + usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so +" + +QA_PRESTRIPPED=" + usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/rust-llvm-dwp + usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/self-contained/crtn.o +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="usr/lib/${PN}/${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +# causes double bootstrap +RESTRICT="test" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc + +PATCHES=( + "${FILESDIR}"/1.85.0-cross-compile-libz.patch + "${FILESDIR}"/1.85.0-musl-dynamic-linking.patch + "${FILESDIR}"/1.67.0-doc-wasm.patch +) + +clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die +} + +toml_usex() { + usex "${1}" true false +} + +src_unpack() { + if [[ ${PV} = *9999* ]]; then + git-r3_src_unpack + mkdir "${S}/.cargo" || die # The vendor script has a check for .cargo/config{,.toml} + touch "${S}/.cargo/config.toml" || die + local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" + local rust_build="" + local rust_host="" + # Configure vendor to use the portage-provided toolchain. This prevents it from + # attempting to fetch a `beta` toolchain from the internet. + cat <<- _EOF_ > "${T}/vendor-config.toml" + [build] + build = "$(rust_abi "${CBUILD}")" + host = ["$(rust_abi "${CHOST}")"] + target = ["$(rust_abi "${CHOST}")"] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + rustfmt = "${rust_stage0_root}/bin/rustfmt" + _EOF_ + # We're using git sources so we need to run the Vendor script + # to ensure that all dependencies are present and up-to-date + mkdir "${S}/vendor" || die + # This also compiles the 'build helper', there's no way to avoid this. + ${EPYTHON} "${S}"/x.py vendor -vvv --config="${T}"/vendor-config.toml -j$(makeopts_jobs) || + die "Failed to vendor dependencies" + # TODO: This has to be generated somehow, this is from a 1.84.x tarball I had lying around. + cat <<- _EOF_ > "${S}/.cargo/config.toml" + [source.crates-io] + replace-with = "vendored-sources" + + [source."git+https://github.com/rust-lang/team"] + git = "https://github.com/rust-lang/team" + replace-with = "vendored-sources" + + [source.vendored-sources] + directory = "vendor" + _EOF_ + else + verify-sig_src_unpack + fi +} + +pre_build_checks() { + local M=9216 + # multiply requirements by 1.3 if we are doing x86-multilib + if use amd64; then + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) + fi + M=$(( $(usex clippy 128 0) + ${M} )) + if [[ ${PV} == *9999* ]]; then + M=$(( $(usex miri 128 0) + ${M} )) + fi + M=$(( $(usex rustfmt 256 0) + ${M} )) + # add 2G if we compile llvm and 256M per llvm_target + if ! use system-llvm; then + M=$(( 2048 + ${M} )) + local ltarget + for ltarget in ${ALL_LLVM_TARGETS[@]}; do + M=$(( $(usex ${ltarget} 256 0) + ${M} )) + done + fi + M=$(( $(usex wasm 256 0) + ${M} )) + M=$(( $(usex debug 2 1) * ${M} )) + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + M=$(( 15 * ${M} / 10 )) + fi + eshopts_pop + M=$(( $(usex doc 256 0) + ${M} )) + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +llvm_check_deps() { + has_version -r "llvm-core/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" +} + +# Is LLVM being linked against libc++? +is_libcxx_linked() { + local code='#include +#if defined(_LIBCPP_VERSION) + HAVE_LIBCXX +#endif +' + local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 + [[ ${out} == *HAVE_LIBCXX* ]] +} + +pkg_pretend() { + pre_build_checks +} + +pkg_setup() { + pre_build_checks + python-any-r1_pkg_setup + + export LIBGIT2_NO_PKG_CONFIG=1 #749381 + if tc-is-cross-compiler; then + use system-llvm && die "USE=system-llvm not allowed when cross-compiling" + local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")" + use "llvm_targets_${cross_llvm_target}" || \ + die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling" + fi + + rust_pkg_setup + + if use system-llvm; then + llvm-r1_pkg_setup + + local llvm_config="$(get_llvm_prefix)/bin/llvm-config" + export LLVM_LINK_SHARED=1 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" + fi +} + +src_prepare() { + if [[ ${PV} = *9999* ]]; then + # We need to update / generate lockfiles for the workspace + ${CARGO} generate-lockfile --offline + + fi + # Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set. + if use x86; then + if ! use cpu_flags_x86_sse2; then + eapply "${FILESDIR}/1.82.0-i586-baseline.patch" + #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed -i 's/march=i686/-march=i586/g' || die + fi + fi + + if use lto && tc-is-clang && ! tc-ld-is-lld; then + export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld" + fi + + default +} + +src_configure() { + if tc-is-cross-compiler; then + export PKG_CONFIG_ALLOW_CROSS=1 + export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig" + export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include" + export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)" + fi + + filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231 + + local rust_target="" rust_targets="" arch_cflags + + # Collect rust target names to compile standard libs for all ABIs. + for v in $(multilib_get_enabled_abi_pairs); do + rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" + done + if use wasm; then + rust_targets+=",\"wasm32-unknown-unknown\"" + if use system-llvm; then + # un-hardcode rust-lld linker for this target + # https://bugs.gentoo.org/715348 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die + fi + fi + rust_targets="${rust_targets#,}" + + # cargo and rustdoc are mandatory and should always be included + local tools='"cargo","rustdoc"' + use clippy && tools+=',"clippy"' + use rustfmt && tools+=',"rustfmt"' + use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"' + use rust-src && tools+=',"src"' + + if [[ ${PV} == *9999* ]]; then + use miri && tools+=',"miri"' + fi + + local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" + # in case of prefix it will be already prefixed, as --print sysroot returns full path + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" + + rust_target="$(rust_abi)" + rust_build="$(rust_abi "${CBUILD}")" + rust_host="$(rust_abi "${CHOST}")" + + RUST_EXPERIMENTAL_TARGETS=() + for _x in "${!ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do + if [[ ${ALL_RUST_EXPERIMENTAL_TARGETS[${_x}]} == 1 ]] && use ${_x} ; then + RUST_EXPERIMENTAL_TARGETS+=( ${_x#llvm_targets_} ) + fi + done + RUST_EXPERIMENTAL_TARGETS=${RUST_EXPERIMENTAL_TARGETS[@]} + + local cm_btype="$(usex debug DEBUG RELEASE)" + local build_channel + local build_miri="false" + case "${PV}" in + *9999*) + build_channel="nightly" + ;; + *beta*) + build_channel="beta" + ;; + *) + build_channel="stable" + ;; + esac + cat <<- _EOF_ > "${S}"/config.toml + # https://github.com/rust-lang/rust/issues/135358 (bug #947897) + profile = "dist" + [llvm] + download-ci-llvm = false + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + ninja = true + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "${RUST_EXPERIMENTAL_TARGETS// /;}" + link-shared = $(toml_usex system-llvm) + $(if is_libcxx_linked; then + # https://bugs.gentoo.org/732632 + echo "use-libcxx = true" + echo "static-libstdcpp = false" + fi) + $(case "${rust_target}" in + i586-*-linux-*) + # https://github.com/rust-lang/rust/issues/93059 + echo 'cflags = "-fcf-protection=none"' + echo 'cxxflags = "-fcf-protection=none"' + echo 'ldflags = "-fcf-protection=none"' + ;; + *) + ;; + esac) + enable-warnings = false + [llvm.build-config] + CMAKE_VERBOSE_MAKEFILE = "ON" + $(if ! tc-is-cross-compiler; then + # When cross-compiling, LLVM is compiled twice, once for host and + # once for target. Unfortunately, this build configuration applies + # to both, which means any flags applicable to one target but not + # the other will break. Conditionally disable respecting user + # flags when cross-compiling. + echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\"" + echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\"" + echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\"" + fi) + [build] + build-stage = 2 + test-stage = 2 + build = "${rust_build}" + host = ["${rust_host}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + rustfmt = "${rust_stage0_root}/bin/rustfmt" + docs = $(toml_usex doc) + compiler-docs = false + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + tools = [${tools}] + verbose = 2 + sanitizers = false + profiler = true + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${SLOT}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debug-assertions-std = $(toml_usex debug) + debuginfo-level = $(usex debug 2 0) + debuginfo-level-rustc = $(usex debug 2 0) + debuginfo-level-std = $(usex debug 2 0) + debuginfo-level-tools = $(usex debug 2 0) + debuginfo-level-tests = 0 + backtrace = true + incremental = false + $(if ! tc-is-cross-compiler; then + echo "default-linker = \"${CHOST}-cc\"" + fi) + channel = "${build_channel}" + description = "gentoo" + rpath = true + verbose-tests = true + optimize-tests = $(toml_usex !debug) + codegen-tests = true + dist-src = false + remap-debuginfo = true + lld = $(usex system-llvm false $(toml_usex wasm)) + $(if use lto && tc-is-clang ; then + echo "use-lld = true" + fi) + # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it + # https://github.com/rust-lang/rust/issues/74976 + # https://github.com/rust-lang/rust/issues/76526 + deny-warnings = $(usex wasm $(usex doc false true) true) + backtrace-on-ice = true + jemalloc = false + # See https://github.com/rust-lang/rust/issues/121124 + lto = "$(usex lto thin off)" + [dist] + src-tarball = false + compression-formats = ["xz"] + compression-profile = "balanced" + _EOF_ + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + export CFLAGS_${rust_target//-/_}="${arch_cflags}" + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${rust_target}] + ar = "$(tc-getAR)" + cc = "$(tc-getCC)" + cxx = "$(tc-getCXX)" + linker = "$(tc-getCC)" + ranlib = "$(tc-getRANLIB)" + llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix)/bin/llvm-config" + _EOF_ + fi + # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; + # but we patch it and set to false here as well + if use elibc_musl; then + cat <<- _EOF_ >> "${S}"/config.toml + crt-static = false + musl-root = "$($(tc-getCC) -print-sysroot)/usr" + _EOF_ + fi + done + if use wasm; then + wasm_target="wasm32-unknown-unknown" + export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")" + cat <<- _EOF_ >> "${S}"/config.toml + [target.wasm32-unknown-unknown] + linker = "$(usex system-llvm lld rust-lld)" + # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483 + profiler = false + _EOF_ + fi + + if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below + # experimental cross support + # discussion: https://bugs.gentoo.org/679878 + # TODO: c*flags, clang, system-llvm, cargo.eclass target support + # it would be much better if we could split out stdlib + # complilation to separate ebuild and abuse CATEGORY to + # just install to /usr/lib/rustlib/ + + # extra targets defined as a bash array + # spec format: :: + # best place would be /etc/portage/env/dev-lang/rust + # Example: + # RUST_CROSS_TARGETS=( + # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" + # ) + # no extra hand holding is done, no target transformations, all + # values are passed as-is with just basic checks, so it's up to user to supply correct values + # valid rust targets can be obtained with + # rustc --print target-list + # matching cross toolchain has to be installed + # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) + # only gcc toolchains installed with crossdev are checked for now. + + # BUG: we can't pass host flags to cross compiler, so just filter for now + # BUG: this should be more fine-grained. + filter-flags '-mcpu=*' '-march=*' '-mtune=*' + + local cross_target_spec + for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do + # extracts first element form :: + local cross_llvm_target="${cross_target_spec%%:*}" + # extracts toolchain triples, : + local cross_triples="${cross_target_spec#*:}" + # extracts first element after before : separator + local cross_rust_target="${cross_triples%%:*}" + # extracts last element after : separator + local cross_toolchain="${cross_triples##*:}" + use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" + command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${cross_rust_target}] + ar = "${cross_toolchain}-ar" + cc = "${cross_toolchain}-gcc" + cxx = "${cross_toolchain}-g++" + linker = "${cross_toolchain}-gcc" + ranlib = "${cross_toolchain}-ranlib" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix)/bin/llvm-config" + _EOF_ + fi + if [[ "${cross_toolchain}" == *-musl* ]]; then + cat <<- _EOF_ >> "${S}"/config.toml + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" + _EOF_ + fi + + # append cross target to "normal" target list + # example 'target = ["powerpc64le-unknown-linux-gnu"]' + # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' + + rust_targets="${rust_targets},\"${cross_rust_target}\"" + sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die + + ewarn + ewarn "Enabled ${cross_rust_target} rust target" + ewarn "Using ${cross_toolchain} cross toolchain" + ewarn + if ! has_version -b 'sys-devel/binutils[multitarget]' ; then + ewarn "'sys-devel/binutils[multitarget]' is not installed" + ewarn "'strip' will be unable to strip cross libraries" + ewarn "cross targets will be installed with full debug information" + ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" + ewarn + ewarn "Alternatively llvm-strip can be used, it supports stripping any target" + ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" + ewarn + fi + done + fi # I_KNOW_WHAT_I_AM_DOING_CROSS + + einfo "Rust configured with the following flags:" + echo + echo RUSTFLAGS="\"${RUSTFLAGS}\"" + echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\"" + echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\"" + echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\"" + env | grep "CARGO_TARGET_.*_RUSTFLAGS=" + env | grep "CFLAGS_.*" + echo + einfo "config.toml contents:" + cat "${S}"/config.toml || die + echo +} + +src_compile() { + RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die +} + +src_test() { + # https://rustc-dev-guide.rust-lang.org/tests/intro.html + + # those are basic and codegen tests. + local tests=( + codegen + codegen-units + compile-fail + incremental + mir-opt + pretty + run-make + ) + + # fails if llvm is not built with ALL targets. + # and known to fail with system llvm sometimes. + use system-llvm || tests+=( assembly ) + + # fragile/expensive/less important tests + # or tests that require extra builds + # TODO: instead of skipping, just make some nonfatal. + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then + tests+=( + rustdoc + rustdoc-js + rustdoc-js-std + rustdoc-ui + run-make-fulldeps + ui + ui-fulldeps + ) + fi + + local i failed=() + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" + for i in "${tests[@]}"; do + local t="src/test/${i}" + einfo "rust_src_test: running ${t}" + if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ + -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" + then + failed+=( "${t}" ) + eerror "rust_src_test: ${t} failed" + fi + done + + if [[ ${#failed[@]} -ne 0 ]]; then + eerror "rust_src_test: failure summary: ${failed[@]}" + die "aborting due to test failures" + fi +} + +src_install() { + DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + + docompress /usr/lib/${PN}/${SLOT}/share/man/ + + # bug #689562, #689160 + rm -v "${ED}/usr/lib/${PN}/${SLOT}/etc/bash_completion.d/cargo" || die + rmdir -v "${ED}/usr/lib/${PN}/${SLOT}"/etc{/bash_completion.d,} || die + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + if [[ ${PV} = *9999* ]]; then + use miri && symlinks+=( miri cargo-miri ) + fi + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + use rust-analyzer && symlinks+=( rust-analyzer ) + + einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /usr/lib/rust//bin/rustc- + # need to fix eselect-rust to remove this hack. + local ver_i="${i}-${PV%%_*}" + if [[ -f "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" ]]; then + einfo "Installing ${i} symlink" + ln -v "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" "${ED}/usr/lib/${PN}/${SLOT}/bin/${ver_i}" || die + else + ewarn "${i} symlink requested, but source file not found" + ewarn "please report this" + fi + dosym "../lib/${PN}/${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "${SLOT}/lib" "/usr/lib/${PN}/lib-${SLOT}" + use rust-analyzer && dosym "${SLOT}/libexec" "/usr/lib/${PN}/libexec-${SLOT}" + dosym "${SLOT}/share/man" "/usr/lib/${PN}/man-${SLOT}" + dosym "rust/${SLOT}/lib/rustlib" "/usr/lib/rustlib-${SLOT}" + dosym "../../lib/${PN}/${SLOT}/share/doc/rust" "/usr/share/doc/${P}" + + newenvd - "50${P}" <<-_EOF_ + MANPATH="${EPREFIX}/usr/lib/rust/man-${SLOT}" + _EOF_ + + rm -rf "${ED}/usr/lib/${PN}/${SLOT}"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${SLOT}/bin"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${SLOT}/doc"/*.old || die + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if [[ ${SLOT} == *9999* ]] && use miri; then + echo /usr/bin/miri >> "${T}/provider-${P}" + echo /usr/bin/cargo-miri >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + if use rust-analyzer; then + echo /usr/lib/rust/libexec >> "${T}/provider-${P}" + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${PN}-${SLOT}" + + if use dist; then + "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + insinto "/usr/lib/${PN}/${SLOT}/dist" + doins -r "${S}/build/dist/." + fi +} + +pkg_postinst() { + + eselect rust update + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust/rust-1.86.0.ebuild b/dev-lang/rust/rust-1.86.0.ebuild deleted file mode 100644 index 084e4f9e03f5..000000000000 --- a/dev-lang/rust/rust-1.86.0.ebuild +++ /dev/null @@ -1,809 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LLVM_COMPAT=( 19 ) -PYTHON_COMPAT=( python3_{10..13} ) - -RUST_MAX_VER=${PV%%_*} -if [[ ${PV} == *9999* ]]; then - RUST_MIN_VER="1.85.0" # Update this as new `beta` releases come out. -elif [[ ${PV} == *beta* ]]; then - # Enforce that `beta` is built from `stable`. - # While uncommon it is possible for feature changes within `beta` to result - # in an older snapshot being unable to build a newer one without modifying the sources. - # 'stable' releases should always be able to build a beta snapshot so just use those. - RUST_MAX_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).1" - RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" -else - RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" -fi - -inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \ - multilib multilib-build python-any-r1 rust rust-toolchain toolchain-funcs verify-sig - -if [[ ${PV} = *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/rust-lang/rust.git" - EGIT_SUBMODULES=( - "*" - "-src/gcc" - ) -elif [[ ${PV} == *beta* ]]; then - # Identify the snapshot date of the beta release: - # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz - betaver=${PV//*beta} - BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" - MY_P="rustc-beta" - SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz - verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc - -> rustc-${PV}-src.tar.xz.asc ) - " - S="${WORKDIR}/${MY_P}-src" -else - MY_P="rustc-${PV}" - SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz - verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc ) - " - S="${WORKDIR}/${MY_P}-src" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -DESCRIPTION="Systems programming language originally developed by Mozilla" -HOMEPAGE="https://www.rust-lang.org/" - -# keep in sync with llvm ebuild of the same version as bundled one. -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai - LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE - WebAssembly X86 XCore Xtensa ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) -LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} - -# https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt -_ALL_RUST_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) -declare -A ALL_RUST_EXPERIMENTAL_TARGETS -for _x in "${_ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do - ALL_RUST_EXPERIMENTAL_TARGETS["llvm_targets_${_x}"]=0 -done - -LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" -SLOT="$(ver_cut 1-2)" - -IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto rustfmt rust-analyzer rust-src +system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" - -if [[ ${PV} = *9999* ]]; then - # These USE flags require nightly rust - IUSE+=" miri" -fi - -LLVM_DEPEND=() -# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation -for _x in "${ALL_LLVM_TARGETS[@]}"; do - LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "llvm-core/llvm:\${LLVM_SLOT}[${_x}]") )" ) - if [[ -v ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"] ]] ; then - ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"]=1 - fi -done -LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" ) -LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" ) - -BDEPEND="${PYTHON_DEPS} - app-eselect/eselect-rust - || ( - >=sys-devel/gcc-4.7[cxx] - >=llvm-core/clang-3.5 - ) - lto? ( system-llvm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') ) ) - !system-llvm? ( - >=dev-build/cmake-3.13.4 - app-alternatives/ninja - ) - test? ( dev-debug/gdb ) - verify-sig? ( sec-keys/openpgp-keys-rust ) -" - -DEPEND=" - >=app-arch/xz-utils-5.2 - net-misc/curl:=[http2,ssl] - sys-libs/zlib:= - dev-libs/openssl:0= - system-llvm? ( - ${LLVM_DEPEND[*]} - llvm-libunwind? ( llvm-runtimes/libunwind:= ) - ) - !system-llvm? ( - !llvm-libunwind? ( - elibc_musl? ( sys-libs/libunwind:= ) - ) - ) -" - -RDEPEND="${DEPEND} - app-eselect/eselect-rust - dev-lang/rust-common - sys-apps/lsb-release - !dev-lang/rust:stable - !dev-lang/rust-bin:stable -" - -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) - rust-analyzer? ( rust-src ) - test? ( ${ALL_LLVM_TARGETS[*]} ) - wasm? ( llvm_targets_WebAssembly ) - x86? ( cpu_flags_x86_sse2 ) -" - -# we don't use cmake.eclass, but can get a warning -CMAKE_WARN_UNUSED_CLI=no - -QA_FLAGS_IGNORED=" - usr/lib/${PN}/${SLOT}/bin/.* - usr/lib/${PN}/${SLOT}/libexec/.* - usr/lib/${PN}/${SLOT}/lib/lib.*.so - usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/.* - usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so -" - -QA_SONAME=" - usr/lib/${PN}/${SLOT}/lib/lib.*.so.* - usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so -" - -QA_PRESTRIPPED=" - usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/rust-llvm-dwp - usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/self-contained/crtn.o -" - -# An rmeta file is custom binary format that contains the metadata for the crate. -# rmeta files do not support linking, since they do not contain compiled object files. -# so we can safely silence the warning for this QA check. -QA_EXECSTACK="usr/lib/${PN}/${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta" - -# causes double bootstrap -RESTRICT="test" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc - -PATCHES=( - "${FILESDIR}"/1.85.0-cross-compile-libz.patch - "${FILESDIR}"/1.85.0-musl-dynamic-linking.patch - "${FILESDIR}"/1.67.0-doc-wasm.patch -) - -clear_vendor_checksums() { - sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die -} - -toml_usex() { - usex "${1}" true false -} - -src_unpack() { - if [[ ${PV} = *9999* ]]; then - git-r3_src_unpack - mkdir "${S}/.cargo" || die # The vendor script has a check for .cargo/config{,.toml} - touch "${S}/.cargo/config.toml" || die - local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" - local rust_build="" - local rust_host="" - # Configure vendor to use the portage-provided toolchain. This prevents it from - # attempting to fetch a `beta` toolchain from the internet. - cat <<- _EOF_ > "${T}/vendor-config.toml" - [build] - build = "$(rust_abi "${CBUILD}")" - host = ["$(rust_abi "${CHOST}")"] - target = ["$(rust_abi "${CHOST}")"] - cargo = "${rust_stage0_root}/bin/cargo" - rustc = "${rust_stage0_root}/bin/rustc" - rustfmt = "${rust_stage0_root}/bin/rustfmt" - _EOF_ - # We're using git sources so we need to run the Vendor script - # to ensure that all dependencies are present and up-to-date - mkdir "${S}/vendor" || die - # This also compiles the 'build helper', there's no way to avoid this. - ${EPYTHON} "${S}"/x.py vendor -vvv --config="${T}"/vendor-config.toml -j$(makeopts_jobs) || - die "Failed to vendor dependencies" - # TODO: This has to be generated somehow, this is from a 1.84.x tarball I had lying around. - cat <<- _EOF_ > "${S}/.cargo/config.toml" - [source.crates-io] - replace-with = "vendored-sources" - - [source."git+https://github.com/rust-lang/team"] - git = "https://github.com/rust-lang/team" - replace-with = "vendored-sources" - - [source.vendored-sources] - directory = "vendor" - _EOF_ - else - verify-sig_src_unpack - fi -} - -pre_build_checks() { - local M=9216 - # multiply requirements by 1.3 if we are doing x86-multilib - if use amd64; then - M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) - fi - M=$(( $(usex clippy 128 0) + ${M} )) - if [[ ${PV} == *9999* ]]; then - M=$(( $(usex miri 128 0) + ${M} )) - fi - M=$(( $(usex rustfmt 256 0) + ${M} )) - # add 2G if we compile llvm and 256M per llvm_target - if ! use system-llvm; then - M=$(( 2048 + ${M} )) - local ltarget - for ltarget in ${ALL_LLVM_TARGETS[@]}; do - M=$(( $(usex ${ltarget} 256 0) + ${M} )) - done - fi - M=$(( $(usex wasm 256 0) + ${M} )) - M=$(( $(usex debug 2 1) * ${M} )) - eshopts_push -s extglob - if is-flagq '-g?(gdb)?([1-9])'; then - M=$(( 15 * ${M} / 10 )) - fi - eshopts_pop - M=$(( $(usex doc 256 0) + ${M} )) - CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} -} - -llvm_check_deps() { - has_version -r "llvm-core/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" -} - -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - [[ ${out} == *HAVE_LIBCXX* ]] -} - -pkg_pretend() { - pre_build_checks -} - -pkg_setup() { - pre_build_checks - python-any-r1_pkg_setup - - export LIBGIT2_NO_PKG_CONFIG=1 #749381 - if tc-is-cross-compiler; then - use system-llvm && die "USE=system-llvm not allowed when cross-compiling" - local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")" - use "llvm_targets_${cross_llvm_target}" || \ - die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling" - fi - - rust_pkg_setup - - if use system-llvm; then - llvm-r1_pkg_setup - - local llvm_config="$(get_llvm_prefix)/bin/llvm-config" - export LLVM_LINK_SHARED=1 - export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" - fi -} - -src_prepare() { - if [[ ${PV} = *9999* ]]; then - # We need to update / generate lockfiles for the workspace - ${CARGO} generate-lockfile --offline - - fi - # Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set. - if use x86; then - if ! use cpu_flags_x86_sse2; then - eapply "${FILESDIR}/1.82.0-i586-baseline.patch" - #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed -i 's/march=i686/-march=i586/g' || die - fi - fi - - if use lto && tc-is-clang && ! tc-ld-is-lld; then - export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld" - fi - - default -} - -src_configure() { - if tc-is-cross-compiler; then - export PKG_CONFIG_ALLOW_CROSS=1 - export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig" - export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include" - export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)" - fi - - filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231 - - local rust_target="" rust_targets="" arch_cflags - - # Collect rust target names to compile standard libs for all ABIs. - for v in $(multilib_get_enabled_abi_pairs); do - rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" - done - if use wasm; then - rust_targets+=",\"wasm32-unknown-unknown\"" - if use system-llvm; then - # un-hardcode rust-lld linker for this target - # https://bugs.gentoo.org/715348 - sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die - fi - fi - rust_targets="${rust_targets#,}" - - # cargo and rustdoc are mandatory and should always be included - local tools='"cargo","rustdoc"' - use clippy && tools+=',"clippy"' - use rustfmt && tools+=',"rustfmt"' - use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"' - use rust-src && tools+=',"src"' - - if [[ ${PV} == *9999* ]]; then - use miri && tools+=',"miri"' - fi - - local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" - # in case of prefix it will be already prefixed, as --print sysroot returns full path - [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" - - rust_target="$(rust_abi)" - rust_build="$(rust_abi "${CBUILD}")" - rust_host="$(rust_abi "${CHOST}")" - - RUST_EXPERIMENTAL_TARGETS=() - for _x in "${!ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do - if [[ ${ALL_RUST_EXPERIMENTAL_TARGETS[${_x}]} == 1 ]] && use ${_x} ; then - RUST_EXPERIMENTAL_TARGETS+=( ${_x#llvm_targets_} ) - fi - done - RUST_EXPERIMENTAL_TARGETS=${RUST_EXPERIMENTAL_TARGETS[@]} - - local cm_btype="$(usex debug DEBUG RELEASE)" - local build_channel - local build_miri="false" - case "${PV}" in - *9999*) - build_channel="nightly" - ;; - *beta*) - build_channel="beta" - ;; - *) - build_channel="stable" - ;; - esac - cat <<- _EOF_ > "${S}"/config.toml - # https://github.com/rust-lang/rust/issues/135358 (bug #947897) - profile = "dist" - [llvm] - download-ci-llvm = false - optimize = $(toml_usex !debug) - release-debuginfo = $(toml_usex debug) - assertions = $(toml_usex debug) - ninja = true - targets = "${LLVM_TARGETS// /;}" - experimental-targets = "${RUST_EXPERIMENTAL_TARGETS// /;}" - link-shared = $(toml_usex system-llvm) - $(if is_libcxx_linked; then - # https://bugs.gentoo.org/732632 - echo "use-libcxx = true" - echo "static-libstdcpp = false" - fi) - $(case "${rust_target}" in - i586-*-linux-*) - # https://github.com/rust-lang/rust/issues/93059 - echo 'cflags = "-fcf-protection=none"' - echo 'cxxflags = "-fcf-protection=none"' - echo 'ldflags = "-fcf-protection=none"' - ;; - *) - ;; - esac) - enable-warnings = false - [llvm.build-config] - CMAKE_VERBOSE_MAKEFILE = "ON" - $(if ! tc-is-cross-compiler; then - # When cross-compiling, LLVM is compiled twice, once for host and - # once for target. Unfortunately, this build configuration applies - # to both, which means any flags applicable to one target but not - # the other will break. Conditionally disable respecting user - # flags when cross-compiling. - echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\"" - echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\"" - echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" - echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" - echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" - echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\"" - fi) - [build] - build-stage = 2 - test-stage = 2 - build = "${rust_build}" - host = ["${rust_host}"] - target = [${rust_targets}] - cargo = "${rust_stage0_root}/bin/cargo" - rustc = "${rust_stage0_root}/bin/rustc" - rustfmt = "${rust_stage0_root}/bin/rustfmt" - docs = $(toml_usex doc) - compiler-docs = false - submodules = false - python = "${EPYTHON}" - locked-deps = true - vendor = true - extended = true - tools = [${tools}] - verbose = 2 - sanitizers = false - profiler = true - cargo-native-static = false - [install] - prefix = "${EPREFIX}/usr/lib/${PN}/${SLOT}" - sysconfdir = "etc" - docdir = "share/doc/rust" - bindir = "bin" - libdir = "lib" - mandir = "share/man" - [rust] - # https://github.com/rust-lang/rust/issues/54872 - codegen-units-std = 1 - optimize = true - debug = $(toml_usex debug) - debug-assertions = $(toml_usex debug) - debug-assertions-std = $(toml_usex debug) - debuginfo-level = $(usex debug 2 0) - debuginfo-level-rustc = $(usex debug 2 0) - debuginfo-level-std = $(usex debug 2 0) - debuginfo-level-tools = $(usex debug 2 0) - debuginfo-level-tests = 0 - backtrace = true - incremental = false - $(if ! tc-is-cross-compiler; then - echo "default-linker = \"${CHOST}-cc\"" - fi) - channel = "${build_channel}" - description = "gentoo" - rpath = true - verbose-tests = true - optimize-tests = $(toml_usex !debug) - codegen-tests = true - dist-src = false - remap-debuginfo = true - lld = $(usex system-llvm false $(toml_usex wasm)) - $(if use lto && tc-is-clang ; then - echo "use-lld = true" - fi) - # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it - # https://github.com/rust-lang/rust/issues/74976 - # https://github.com/rust-lang/rust/issues/76526 - deny-warnings = $(usex wasm $(usex doc false true) true) - backtrace-on-ice = true - jemalloc = false - # See https://github.com/rust-lang/rust/issues/121124 - lto = "$(usex lto thin off)" - [dist] - src-tarball = false - compression-formats = ["xz"] - compression-profile = "balanced" - _EOF_ - - for v in $(multilib_get_enabled_abi_pairs); do - rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) - arch_cflags="$(get_abi_CFLAGS ${v##*.})" - - export CFLAGS_${rust_target//-/_}="${arch_cflags}" - - cat <<- _EOF_ >> "${S}"/config.toml - [target.${rust_target}] - ar = "$(tc-getAR)" - cc = "$(tc-getCC)" - cxx = "$(tc-getCXX)" - linker = "$(tc-getCC)" - ranlib = "$(tc-getRANLIB)" - llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)" - _EOF_ - if use system-llvm; then - cat <<- _EOF_ >> "${S}"/config.toml - llvm-config = "$(get_llvm_prefix)/bin/llvm-config" - _EOF_ - fi - # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; - # but we patch it and set to false here as well - if use elibc_musl; then - cat <<- _EOF_ >> "${S}"/config.toml - crt-static = false - musl-root = "$($(tc-getCC) -print-sysroot)/usr" - _EOF_ - fi - done - if use wasm; then - wasm_target="wasm32-unknown-unknown" - export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")" - cat <<- _EOF_ >> "${S}"/config.toml - [target.wasm32-unknown-unknown] - linker = "$(usex system-llvm lld rust-lld)" - # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483 - profiler = false - _EOF_ - fi - - if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below - # experimental cross support - # discussion: https://bugs.gentoo.org/679878 - # TODO: c*flags, clang, system-llvm, cargo.eclass target support - # it would be much better if we could split out stdlib - # complilation to separate ebuild and abuse CATEGORY to - # just install to /usr/lib/rustlib/ - - # extra targets defined as a bash array - # spec format: :: - # best place would be /etc/portage/env/dev-lang/rust - # Example: - # RUST_CROSS_TARGETS=( - # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" - # ) - # no extra hand holding is done, no target transformations, all - # values are passed as-is with just basic checks, so it's up to user to supply correct values - # valid rust targets can be obtained with - # rustc --print target-list - # matching cross toolchain has to be installed - # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) - # only gcc toolchains installed with crossdev are checked for now. - - # BUG: we can't pass host flags to cross compiler, so just filter for now - # BUG: this should be more fine-grained. - filter-flags '-mcpu=*' '-march=*' '-mtune=*' - - local cross_target_spec - for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do - # extracts first element form :: - local cross_llvm_target="${cross_target_spec%%:*}" - # extracts toolchain triples, : - local cross_triples="${cross_target_spec#*:}" - # extracts first element after before : separator - local cross_rust_target="${cross_triples%%:*}" - # extracts last element after : separator - local cross_toolchain="${cross_triples##*:}" - use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" - command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" - - cat <<- _EOF_ >> "${S}"/config.toml - [target.${cross_rust_target}] - ar = "${cross_toolchain}-ar" - cc = "${cross_toolchain}-gcc" - cxx = "${cross_toolchain}-g++" - linker = "${cross_toolchain}-gcc" - ranlib = "${cross_toolchain}-ranlib" - _EOF_ - if use system-llvm; then - cat <<- _EOF_ >> "${S}"/config.toml - llvm-config = "$(get_llvm_prefix)/bin/llvm-config" - _EOF_ - fi - if [[ "${cross_toolchain}" == *-musl* ]]; then - cat <<- _EOF_ >> "${S}"/config.toml - musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" - _EOF_ - fi - - # append cross target to "normal" target list - # example 'target = ["powerpc64le-unknown-linux-gnu"]' - # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' - - rust_targets="${rust_targets},\"${cross_rust_target}\"" - sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die - - ewarn - ewarn "Enabled ${cross_rust_target} rust target" - ewarn "Using ${cross_toolchain} cross toolchain" - ewarn - if ! has_version -b 'sys-devel/binutils[multitarget]' ; then - ewarn "'sys-devel/binutils[multitarget]' is not installed" - ewarn "'strip' will be unable to strip cross libraries" - ewarn "cross targets will be installed with full debug information" - ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" - ewarn - ewarn "Alternatively llvm-strip can be used, it supports stripping any target" - ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" - ewarn - fi - done - fi # I_KNOW_WHAT_I_AM_DOING_CROSS - - einfo "Rust configured with the following flags:" - echo - echo RUSTFLAGS="\"${RUSTFLAGS}\"" - echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\"" - echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\"" - echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\"" - env | grep "CARGO_TARGET_.*_RUSTFLAGS=" - env | grep "CFLAGS_.*" - echo - einfo "config.toml contents:" - cat "${S}"/config.toml || die - echo -} - -src_compile() { - RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die -} - -src_test() { - # https://rustc-dev-guide.rust-lang.org/tests/intro.html - - # those are basic and codegen tests. - local tests=( - codegen - codegen-units - compile-fail - incremental - mir-opt - pretty - run-make - ) - - # fails if llvm is not built with ALL targets. - # and known to fail with system llvm sometimes. - use system-llvm || tests+=( assembly ) - - # fragile/expensive/less important tests - # or tests that require extra builds - # TODO: instead of skipping, just make some nonfatal. - if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then - tests+=( - rustdoc - rustdoc-js - rustdoc-js-std - rustdoc-ui - run-make-fulldeps - ui - ui-fulldeps - ) - fi - - local i failed=() - einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" - for i in "${tests[@]}"; do - local t="src/test/${i}" - einfo "rust_src_test: running ${t}" - if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ - -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" - then - failed+=( "${t}" ) - eerror "rust_src_test: ${t} failed" - fi - done - - if [[ ${#failed[@]} -ne 0 ]]; then - eerror "rust_src_test: failure summary: ${failed[@]}" - die "aborting due to test failures" - fi -} - -src_install() { - DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die - - docompress /usr/lib/${PN}/${SLOT}/share/man/ - - # bug #689562, #689160 - rm -v "${ED}/usr/lib/${PN}/${SLOT}/etc/bash_completion.d/cargo" || die - rmdir -v "${ED}/usr/lib/${PN}/${SLOT}"/etc{/bash_completion.d,} || die - - local symlinks=( - cargo - rustc - rustdoc - rust-gdb - rust-gdbgui - rust-lldb - ) - - use clippy && symlinks+=( clippy-driver cargo-clippy ) - if [[ ${PV} = *9999* ]]; then - use miri && symlinks+=( miri cargo-miri ) - fi - use rustfmt && symlinks+=( rustfmt cargo-fmt ) - use rust-analyzer && symlinks+=( rust-analyzer ) - - einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" - local i - for i in "${symlinks[@]}"; do - # we need realpath on /usr/bin/* symlink return version-appended binary path. - # so /usr/bin/rustc should point to /usr/lib/rust//bin/rustc- - # need to fix eselect-rust to remove this hack. - local ver_i="${i}-${SLOT}" - if [[ -f "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" ]]; then - einfo "Installing ${i} symlink" - ln -v "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" "${ED}/usr/lib/${PN}/${SLOT}/bin/${ver_i}" || die - else - ewarn "${i} symlink requested, but source file not found" - ewarn "please report this" - fi - dosym "../lib/${PN}/${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" - dosym "../lib/${PN}/${SLOT}/bin/${ver_i}" "/usr/bin/${i}-${PV%%_*}" - done - - # symlinks to switch components to active rust in eselect - dosym "${SLOT}/lib" "/usr/lib/${PN}/lib-${SLOT}" - use rust-analyzer && dosym "${SLOT}/libexec" "/usr/lib/${PN}/libexec-${SLOT}" - dosym "${SLOT}/share/man" "/usr/lib/${PN}/man-${SLOT}" - dosym "rust/${SLOT}/lib/rustlib" "/usr/lib/rustlib-${SLOT}" - dosym "../../lib/${PN}/${SLOT}/share/doc/rust" "/usr/share/doc/${P}" - - newenvd - "50${P}" <<-_EOF_ - MANPATH="${EPREFIX}/usr/lib/rust/man-${SLOT}" - _EOF_ - - rm -rf "${ED}/usr/lib/${PN}/${SLOT}"/*.old || die - rm -rf "${ED}/usr/lib/${PN}/${SLOT}/bin"/*.old || die - rm -rf "${ED}/usr/lib/${PN}/${SLOT}/doc"/*.old || die - - # note: eselect-rust adds EROOT to all paths below - cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}" - /usr/bin/cargo - /usr/bin/rustdoc - /usr/bin/rust-gdb - /usr/bin/rust-gdbgui - /usr/bin/rust-lldb - /usr/lib/rustlib - /usr/lib/rust/lib - /usr/lib/rust/man - /usr/share/doc/rust - _EOF_ - - if use clippy; then - echo /usr/bin/clippy-driver >> "${T}/provider-${P}" - echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" - fi - if [[ ${SLOT} == *9999* ]] && use miri; then - echo /usr/bin/miri >> "${T}/provider-${P}" - echo /usr/bin/cargo-miri >> "${T}/provider-${P}" - fi - if use rustfmt; then - echo /usr/bin/rustfmt >> "${T}/provider-${P}" - echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" - fi - if use rust-analyzer; then - echo /usr/lib/rust/libexec >> "${T}/provider-${P}" - echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" - fi - - insinto /etc/env.d/rust - doins "${T}/provider-${PN}-${SLOT}" - - if use dist; then - "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die - insinto "/usr/lib/${PN}/${SLOT}/dist" - doins -r "${S}/build/dist/." - fi -} - -pkg_postinst() { - - eselect rust update - - if has_version dev-debug/gdb || has_version llvm-core/lldb; then - elog "Rust installs helper scripts for calling GDB and LLDB," - elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." - fi - - if has_version app-editors/emacs; then - optfeature "emacs support for rust" app-emacs/rust-mode - fi - - if has_version app-editors/gvim || has_version app-editors/vim; then - optfeature "vim support for rust" app-vim/rust-vim - fi -} - -pkg_postrm() { - eselect rust cleanup -} diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest index 48c1ed42d114..5999414e32c5 100644 --- a/dev-lang/spidermonkey/Manifest +++ b/dev-lang/spidermonkey/Manifest @@ -5,23 +5,14 @@ DIST firefox-102.15.0esr.source.tar.xz 486592324 BLAKE2B b70727fa91d0d270673374b DIST firefox-102esr-patches-13.tar.xz 22212 BLAKE2B 02e9edd071a99abbac02faa11ffce061d5d12d8baa9ce54b51d6bfdbf8160022a1565902d65ca30fe51b5670e509fa921b11a460989933cbb797fcd59d635125 SHA512 8b8b0f3789978447a1293fd9acb5c2db3d7e9f724357a0d762b54f7e34d28f11655997ffeafccfe8001a01dd595848d257f90cb983462c405d434cc794216520 DIST firefox-115.16.0esr.source.tar.xz 515133700 BLAKE2B 9501b617b346d56f6de975f88974be6fdc3d4a901b2a1b952b6bbf6cc46384084260078d23c52bedff83a65bec4ea5ec78c3bcaac86c78d0b44e796317534840 SHA512 b6f93ec3d6acac5df177253c65b833c017e65ed6e78e96ff029098443928d291f6f67164aedb83d80aa28ee9dee305086597798238d3330e35183030e53e3550 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.6.0esr.source.tar.xz 563259116 BLAKE2B 401c54e4c3e81dd1d4aa9fed072e5266a7549d9ac05e03f9755d3da192c9c46d2bc636e8bf0a7fad2269074615789ab274b897c8bd75fd524f4a5f138c3aa1d5 SHA512 49bce966e062766861712bd65cca46a438b339fe31598f69e4fe64da78ef6f8b4581c1d502341ef1c032aafaab2f4f88e69cb93a0b845ba7173fec277ae695b5 -DIST firefox-128.7.0esr.source.tar.xz 569300208 BLAKE2B 08bf5b571707b7a5acf1ebde12e370be5999e3ac8cac2e952fae635faa16e07ba4d9d0a00b304ba43b5a327c825cae04c1ccf8434456e27d4c396e5b09a4b6a7 SHA512 26f9661b395b85a44b42bd72ef1ad976c614216c68f6c2dd834d0ac8b84b9c9f398b8ac550a47396995d96e6bb5fa9a50064d7f2f526bddd45aed5039ef131b8 DIST firefox-128.8.0esr.source.tar.xz 563554116 BLAKE2B 3fdfa2539b42a6a659d05ef9ad60d3dd7a0097abf3c5038150316d775e3eb864056a56edc58ae4e49ca36b3ccf2f05d68a07f8493a7649388e340cd81640e584 SHA512 7c0ef22bc14d4fa248cbae14d629174c9c967f891f4525f609760595f5a108aedf7dd804d1b63b97ec268613fa98378f4742a9b6ab562454351cf21175fdb802 DIST firefox-128.9.0esr.source.tar.xz 562959584 BLAKE2B e49ac096a68cc450be909d3e5d325ae5d45acdad5a37afd6567f960d585d30f6ea3a03e9f9e976b430a60180ccd2baaa1679050f46e0a736a46c0cc6694f3797 SHA512 c0c8ac8374291cc93279064c73c17786c6f4fba7505ebc2cbd7a4ce7c82710620abdae7be15f60c43f9d10c3614fc9fd31f094e787105d528031c6f0510f7339 -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 firefox-128esr-patches-09.tar.xz 17976 BLAKE2B 78f64f5086951f7bf2b304c1148154647aef5c4e699257cba5e94a83d8d8c159a591d0b2a7a5f8bc0f8ec28d5eae66a0783b45f94b4ef713282a6f88e46c75be SHA512 159d8c94af0f90c10baf7446e573a37397b3be7103e7001fb6b38845a28a41793c21ad24c23e0b3cfc4daa2c3a6040ef701f612693c9f4dfff8534f82e7b18a1 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 DIST spidermonkey-128-patches-03.tar.xz 3636 BLAKE2B 99517642e255762c57a9e65f4c4c4107b8d6a1630dd2e68dea4527ac0e5d70fc435122e6b4068a8223c9b2a6e06503c242659d1895b9a2ff6d75212e9c917498 SHA512 71e059861318073f09f7892094e6d44ec04385385086b2e126de8e4f80cff99410bbfd352a10f325e950441c398f7ba0ac82c861ce417c10a37ab5ea063c6be2 EBUILD spidermonkey-102.15.0-r1.ebuild 15100 BLAKE2B 2f7d493ef27869b28de30fea5f47db8f3bfefbac0f3854458deae57ce695be929d071662f2a6a612e8b5d8187fc65c0c9d6b64609623a58c3c633f378b7c2a03 SHA512 0d4367ac4e15ef8852e21295ec0dbb58dbe2e4c7674b322ad214ff01baec2982e0009058e25157128d32dc780efc5763e24185d5584f2f580570bab4960d4bd1 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.6.0.ebuild 12829 BLAKE2B 2c603b698773db903c6d56ea22d6d8fd774d0645d2291da6d70a7a360703c5263466883a2c2d10d46399d6681a07a28b673146c01c2b7ab283b5a4133ce63def SHA512 ce7760113b7ca8c2b12c4a481e831dc89d85abfcfad1a0becf56f0f0b53a72323141d50fd4b98044baccd9e366dd9619a10ad537513f7a62fe4a79daf9c68d8d -EBUILD spidermonkey-128.7.0.ebuild 12829 BLAKE2B 2c603b698773db903c6d56ea22d6d8fd774d0645d2291da6d70a7a360703c5263466883a2c2d10d46399d6681a07a28b673146c01c2b7ab283b5a4133ce63def SHA512 ce7760113b7ca8c2b12c4a481e831dc89d85abfcfad1a0becf56f0f0b53a72323141d50fd4b98044baccd9e366dd9619a10ad537513f7a62fe4a79daf9c68d8d EBUILD spidermonkey-128.8.0.ebuild 13216 BLAKE2B 7afaabc2cec2eeac76a0b8129f74dcc6b6f33ec2e11b1da65576798725c98475789e4cd7042eca517e24f347b6b9c6015322d6306c42e8557c5fd70718f3935e SHA512 5c49f7280e34f5cf0865fb7f5920a58115500aaeb1da763da92ce9e35d8bc7affe1ddbeb9e7370d55b4fae1b99f34ccea0d5d6ddc3929944700fc80741760a87 EBUILD spidermonkey-128.9.0.ebuild 13222 BLAKE2B 43db0e2206ac543af5a0a751da5c04767adf2782e09b5dfcf7a8b2939a5c51a098a3d7017dbf42edf434e91a649d9c364a77ac3f178b5b8961cde8f1ca3227bc SHA512 e71f79eff3cf991f31c0d4360eea4d05513f7baa2157697baa755dbda9c8609ad2d73553196246f10f0770507c2725857b0f1edbfcacb507d6d2bab35cf1a7d2 MISC metadata.xml 513 BLAKE2B 58ffd474492f03c16bda95e48511fb6281e03067d2ad77e994f8117345ecece5da9591dccedafe75b037d98e06851a3759caa4b993adc2910dbb76e1c01a7fa3 SHA512 1ee02bff37e2dabbd72b7f719463b12299270c7960b4cf5a92afab17c954c50e6acb826d4a91db4954fb4a7b0f8669988f2cdb5be991df90e3a605c6b35fdbfb diff --git a/dev-lang/spidermonkey/spidermonkey-128.4.0-r1.ebuild b/dev-lang/spidermonkey/spidermonkey-128.4.0-r1.ebuild deleted file mode 100644 index 059cfdf2e321..000000000000 --- a/dev-lang/spidermonkey/spidermonkey-128.4.0-r1.ebuild +++ /dev/null @@ -1,478 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -FIREFOX_PATCHSET="firefox-128esr-patches-07.tar.xz" -SPIDERMONKEY_PATCHSET="spidermonkey-128-patches-02.tar.xz" - -LLVM_COMPAT=( 17 18 19 ) - -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 ~riscv x86" - -LICENSE="MPL-2.0" -SLOT="$(ver_cut 1)" -IUSE="clang cpu_flags_arm_neon debug +jit lto 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() { - if [[ ${MERGE_TYPE} != binary ]] ; then - 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 - - if use clang && use lto && tc-ld-is-lld ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" - fi - fi - - 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 -} - -src_prepare() { - if use lto ; 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 ; 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 -} diff --git a/dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild b/dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild deleted file mode 100644 index 1f1a17198baf..000000000000 --- a/dev-lang/spidermonkey/spidermonkey-128.6.0.ebuild +++ /dev/null @@ -1,473 +0,0 @@ -# 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 -} diff --git a/dev-lang/spidermonkey/spidermonkey-128.7.0.ebuild b/dev-lang/spidermonkey/spidermonkey-128.7.0.ebuild deleted file mode 100644 index 1f1a17198baf..000000000000 --- a/dev-lang/spidermonkey/spidermonkey-128.7.0.ebuild +++ /dev/null @@ -1,473 +0,0 @@ -# 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 -} -- cgit v1.2.3