diff options
| author | Crucible <crucible@localhost> | 2026-10-19 21:49:31 -0500 |
|---|---|---|
| committer | Crucible <crucible@localhost> | 2026-10-19 21:49:31 -0500 |
| commit | 7381ef26a3e14a703da91508b2cc8606c34b804d (patch) | |
| tree | 1ded3c74a64f9591c982f01ed71ab968a8bfad24 /dev-lang | |
| parent | 3b4c7e627726016d50653b6dd2e06020a1915eac (diff) | |
| download | srcux-7381ef26a3e14a703da91508b2cc8606c34b804d.tar.gz srcux-7381ef26a3e14a703da91508b2cc8606c34b804d.tar.xz srcux-7381ef26a3e14a703da91508b2cc8606c34b804d.zip | |
Publish srcux candidate 0000000740-20261019-200200
Diffstat (limited to 'dev-lang')
19 files changed, 1478 insertions, 238 deletions
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20260909.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20260909.ebuild index c74c5fe90fac..64ab03163b49 100644 --- a/dev-lang/closure-compiler-bin/closure-compiler-bin-20260909.ebuild +++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20260909.ebuild @@ -21,7 +21,7 @@ S="${WORKDIR}" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 ~x86" RDEPEND=" >=virtual/jre-1.8:* diff --git a/dev-lang/kotlin-bin/kotlin-bin-2.4.20.ebuild b/dev-lang/kotlin-bin/kotlin-bin-2.4.20.ebuild index 17cc705ee7be..d379f57c4605 100644 --- a/dev-lang/kotlin-bin/kotlin-bin-2.4.20.ebuild +++ b/dev-lang/kotlin-bin/kotlin-bin-2.4.20.ebuild @@ -14,7 +14,7 @@ S="${WORKDIR}/kotlinc" LICENSE="Apache-2.0 BSD MIT NPL-1.1" SLOT="0/${PV}" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 ~x86" RDEPEND=" >=virtual/jre-1.8:* diff --git a/dev-lang/luau/Manifest b/dev-lang/luau/Manifest index 4e3a3c38dfa1..9499183cd8e2 100644 --- a/dev-lang/luau/Manifest +++ b/dev-lang/luau/Manifest @@ -1 +1,2 @@ DIST luau-0.707.gh.tar.gz 2154738 BLAKE2B 5d1df5dc5fd56207f7a19dd6338687533c951c7b1cd6ffbf275b507bf0cf43064939bfb121533df412172c12fb8ebaef6fd7777221d03a7e92bfd15459d677a9 SHA512 be65836e16430484281fdf8b3d47362fb3040a4508d8e86d2fef77c619a0307431d0e09f8c8ca1b05cda892e2760e942dee3b2ef1cc128e4c086d8aaf31d1631 +DIST luau-0.743.gh.tar.gz 3444533 BLAKE2B b761f518c9ac3d84e9913dcc2043abe834f9eedd0ec80a260da414f354e85ea3e3ea15143f7ba27c6e3320a48f9e91a6b33a69a4fee71c5345da2346ec26bcbf SHA512 76090342814935dc7debf807fd19563b0361b6b16fd08176409bffe2ca6cc04c9420cf84da359e92aa30f06a4fdac4d7ad34cb1a375e15eb4f35fb705981f526 diff --git a/dev-lang/luau/luau-0.743.ebuild b/dev-lang/luau/luau-0.743.ebuild new file mode 100644 index 000000000000..d971a5bb2188 --- /dev/null +++ b/dev-lang/luau/luau-0.743.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake edo + +DESCRIPTION="Gradually typed embeddable scripting language derived from Lua" +HOMEPAGE="https://luau.org/ + https://github.com/luau-lang/luau/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/luau-lang/${PN}" +else + SRC_URI="https://github.com/luau-lang/${PN}/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="static-libs test" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/luau-0.653-TypedAllocator-cpp.patch" + "${FILESDIR}/luau-0.669-cmake_minimum.patch" +) + +DOCS=( CONTRIBUTING.md README.md SECURITY.md ) + +src_configure() { + local -a mycmakeargs=( + -DLUAU_BUILD_TESTS="$(usex test)" + ) + cmake_src_configure +} + +src_test() { + edo "${BUILD_DIR}/Luau.UnitTest" --verbose + edo "${BUILD_DIR}/Luau.Conformance" --verbose +} + +src_install() { + exeinto /usr/bin + doexe "${BUILD_DIR}"/luau{,-analyze,-ast,-compile,-reduce} + + insinto /usr/include/Luau + doins ./CodeGen/include/luacodegen.h + doins ./Compiler/include/luacode.h + doins ./VM/include/*.h + doins ./{Analysis,Ast,CLI,CodeGen,Common,Compiler,Config,Require}/include/Luau/*.h + + if use static-libs ; then + dolib.a "${BUILD_DIR}"/libLuau.*.a + fi + + einstalldocs +} diff --git a/dev-lang/mrustc/Manifest b/dev-lang/mrustc/Manifest index e0a52fb53bbf..c8aaa0b2a5d0 100644 --- a/dev-lang/mrustc/Manifest +++ b/dev-lang/mrustc/Manifest @@ -1,4 +1,3 @@ -DIST mrustc-0.11.2.tar.gz 1364024 BLAKE2B e68178d952b3afef526f99dda24def646ebefbf661200e7b57a7ea054c511075a1455e6456f3fbb0e4c1042660f716f92bcee990054dbe7c1ebc4185ce0e3899 SHA512 9a39249c38eee109c4f60af051df89aa5ab1e3408761d67d3ee8ae05cded03b9e4fd36b554a470e35c77d214bf02d39f172ab04fdcb8b03fac068d8af268ebf5 DIST mrustc-0.12.0.tar.gz 1437209 BLAKE2B 056bf7a983d2b962062bf0e208665d1f3f6d4602fa13d0043b2085cb02e34d5d4e1a5c925bcd930e4ef4d04e88690cad96ae67b6d9c7d9734361bcedcd7f11d8 SHA512 0df0ad41e646b25664459c92419b88881b139967d36d0601d799d282afb063cb36a73c5476b796d6935e6d886a4709d8efe6442b496c27accf149d7b7b39af42 -DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d +DIST mrustc-0.12.0_p20261018.tar.gz 1458376 BLAKE2B dbe60bb9c87feb7acc171eb0368391d4020b8ac745c32a2a1fa44a56a6662022dd338f92355a888a099473bcd79bda8d866c68074d0e12d418048323ea931d83 SHA512 09e7754619a659da468e333baba070766a6c661f8ccb8eed27a0791159a05f7cd51b4e26445e8d5b74557c5aaff10390d5b0805e37c13ab07efe860fb94ff46c DIST rustc-1.90.0-src.tar.xz 272348992 BLAKE2B 82dbbe3b5fe79f623c74fb81a4c4372b14e7d765f0e9af3d76a6c4bde9899007c85c8af70dfd9facc06c37a9c8d03a4597ec87b2d053585ccbc2287332b27e70 SHA512 fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a diff --git a/dev-lang/mrustc/files/mrustc-0.10.1-git-be-gone.patch b/dev-lang/mrustc/files/mrustc-0.10.1-git-be-gone.patch deleted file mode 100644 index 3323b4c88b4c..000000000000 --- a/dev-lang/mrustc/files/mrustc-0.10.1-git-be-gone.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0615d38df2c47fa7dc3f64ca54fd35e70e75ee59 Mon Sep 17 00:00:00 2001 -From: Matt Jolly <kangie@gentoo.org> -Date: Thu, 5 Dec 2024 17:18:29 +1000 -Subject: [PATCH] git-be-gone - ---- a/Makefile -+++ b/Makefile -@@ -178,7 +178,7 @@ $(OBJDIR)%.o: src/%.cpp - $(OBJDIR)version.o: $(OBJDIR)%.o: src/%.cpp $(filter-out $(OBJDIR)version.o,$(OBJ)) Makefile - @+mkdir -p $(dir $@) - @echo [CXX] -o $@ -- $V$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF $@.dep -D VERSION_GIT_FULLHASH=\"$(shell git show --pretty=%H -s --no-show-signature)\" -D VERSION_GIT_BRANCH="\"$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)\"" -D VERSION_GIT_SHORTHASH=\"$(shell git show -s --pretty=%h --no-show-signature)\" -D VERSION_BUILDTIME="\"$(shell date -uR)\"" -D VERSION_GIT_ISDIRTY=$(shell git diff-index --quiet HEAD; echo $$?) -+ $V$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF $@.dep -D VERSION_GIT_FULLHASH=\"gentoo\" -D VERSION_GIT_BRANCH=\"gentoo\" -D VERSION_GIT_SHORTHASH=\"gentoo\" -D VERSION_BUILDTIME="\"$(shell date -uR)\"" -D VERSION_GIT_ISDIRTY="0" - - src/main.cpp: $(PCHS:%=src/%.gch) - -@@ -192,4 +192,3 @@ bin/common_lib.a: - -include $(OBJ:%=%.dep) - - # vim: noexpandtab ts=4 -- --- -2.47.0 diff --git a/dev-lang/mrustc/files/mrustc-0.11.0-default-to-rust-1_74.patch b/dev-lang/mrustc/files/mrustc-0.11.0-default-to-rust-1_74.patch deleted file mode 100644 index ed459819b301..000000000000 --- a/dev-lang/mrustc/files/mrustc-0.11.0-default-to-rust-1_74.patch +++ /dev/null @@ -1,19 +0,0 @@ -From f422e43cc314e4cfda059ddb63d31973c9e8b5b7 Mon Sep 17 00:00:00 2001 -From: Matt Jolly <kangie@gentoo.org> -Date: Tue, 17 Dec 2024 17:55:59 +1000 -Subject: [PATCH] default to Rust 1_74 - ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -39,7 +39,7 @@ - # undef max - #endif - --TargetVersion gTargetVersion = TargetVersion::Rustc1_29; -+TargetVersion gTargetVersion = TargetVersion::Rustc1_74; - - struct ProgramParams - { --- -2.47.1 - diff --git a/dev-lang/mrustc/files/mrustc-0.11.2-gcc15.patch b/dev-lang/mrustc/files/mrustc-0.11.2-gcc15.patch deleted file mode 100644 index fd2e8f307872..000000000000 --- a/dev-lang/mrustc/files/mrustc-0.11.2-gcc15.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3df8e7e14485c7f11da4d90dac02aa061f5e1f1a Mon Sep 17 00:00:00 2001 -From: Matt Jolly <kangie@gentoo.org> -Date: Sun, 19 Jan 2025 14:07:47 +1000 -Subject: [PATCH] gcc15 includes - ---- a/src/common.hpp -+++ b/src/common.hpp -@@ -13,6 +13,7 @@ - #include <map> - #include <set> - #include <cassert> -+#include <cstdint> - #include <sstream> - #include <memory> - ---- a/tools/minicargo/build.cpp -+++ b/tools/minicargo/build.cpp -@@ -20,6 +20,7 @@ - #include <fstream> - #include <cassert> - -+#include <cstdint> - #include <unordered_map> - #include <algorithm> // sort/find_if - --- -2.48.0 - diff --git a/dev-lang/mrustc/files/mrustc-0.11.2-no-glibcxx-assertions-workaround-more.patch b/dev-lang/mrustc/files/mrustc-0.11.2-no-glibcxx-assertions-workaround-more.patch deleted file mode 100644 index a9207f79472a..000000000000 --- a/dev-lang/mrustc/files/mrustc-0.11.2-no-glibcxx-assertions-workaround-more.patch +++ /dev/null @@ -1,79 +0,0 @@ -Pass -U_GLIBCXX_ASSERTIONS when building mrustc as a workaround (not yet -reported, sorry). ---- a/Makefile -+++ b/Makefile -@@ -47,7 +47,7 @@ CXXFLAGS := -g -Wall - CXXFLAGS += -std=c++14 - #CXXFLAGS += -Wextra - CXXFLAGS += -O2 --CXXFLAGS += $(CXXFLAGS_EXTRA) -+CXXFLAGS += $(CXXFLAGS_EXTRA) -U_GLIBCXX_ASSERTIONS - - CPPFLAGS := -I src/include/ -I src/ - CPPFLAGS += -I tools/common/ ---- a/tools/common/Makefile -+++ b/tools/common/Makefile -@@ -12,7 +12,7 @@ OBJS += jobserver.o - - CXXFLAGS := -Wall -std=c++14 -g -O2 - --CXXFLAGS += $(CXXFLAGS_EXTRA) -+CXXFLAGS += $(CXXFLAGS_EXTRA) -U_GLIBCXX_ASSERTIONS - - OBJS := $(OBJS:%=$(OBJDIR)%) - ---- a/tools/dump_hirfile/Makefile -+++ b/tools/dump_hirfile/Makefile -@@ -16,7 +16,7 @@ OBJS := main.o - - LINKFLAGS := -g -lpthread -lz - CXXFLAGS := -Wall -std=c++14 -g -O2 --CXXFLAGS += -I ../common -I ../../src -I ../../src/include -+CXXFLAGS += -I ../common -I ../../src -I ../../src/include -U_GLIBCXX_ASSERTIONS - - CXXFLAGS += $(CXXFLAGS_EXTRA) - LINKFLAGS += $(LINKFLAGS_EXTRA) ---- a/tools/minicargo/Makefile -+++ b/tools/minicargo/Makefile -@@ -23,7 +23,7 @@ OBJS += file_timestamp.o os.o - - LINKFLAGS := -g -lpthread - CXXFLAGS := -Wall -std=c++14 -g -O2 --CXXFLAGS += -I ../common -+CXXFLAGS += -I ../common -U_GLIBCXX_ASSERTIONS - - CXXFLAGS += $(CXXFLAGS_EXTRA) - LINKFLAGS += $(LINKFLAGS_EXTRA) ---- a/tools/mir_opt_test/Makefile -+++ b/tools/mir_opt_test/Makefile -@@ -16,7 +16,7 @@ LIBS := ../../bin/mrustc.a ../../bin/common_lib.a - - LINKFLAGS := -g -lpthread -lz - CXXFLAGS := -Wall -std=c++14 -g -O2 --CXXFLAGS += -I ../common -I ../../src/include -I ../../src -I . -+CXXFLAGS += -I ../common -I ../../src/include -I ../../src -I . -U_GLIBCXX_ASSERTIONS - CXXFLAGS += -Wno-misleading-indentation # Gets REALLY confused by the TU_ARM macro - - CXXFLAGS += $(CXXFLAGS_EXTRA) ---- a/tools/standalone_miri/Makefile -+++ b/tools/standalone_miri/Makefile -@@ -16,7 +16,7 @@ OBJS += miri.o miri_extern.o miri_intrinsic.o - - LINKFLAGS := -g -lpthread - CXXFLAGS := -Wall -std=c++14 -g -O2 --CXXFLAGS += -I ../common -I ../../src/include -I . -+CXXFLAGS += -I ../common -I ../../src/include -I . -U_GLIBCXX_ASSERTIONS - CXXFLAGS += -Wno-misleading-indentation # Gets REALLY confused by the TU_ARM macro - - CXXFLAGS += $(CXXFLAGS_EXTRA) ---- a/tools/testrunner/Makefile -+++ b/tools/testrunner/Makefile -@@ -8,7 +8,7 @@ OBJS := main.o path.o - LINKFLAGS := -g - CXXFLAGS := -Wall -std=c++14 -g -O2 - --CXXFLAGS += $(CXXFLAGS_EXTRA) -+CXXFLAGS += $(CXXFLAGS_EXTRA) -U_GLIBCXX_ASSERTIONS - LINKFLAGS += $(LINKFLAGS_EXTRA) - - OBJS := $(OBJS:%=$(OBJDIR)%) diff --git a/dev-lang/mrustc/files/mrustc-0.11.2-no-glibcxx-assertions-workaround.patch b/dev-lang/mrustc/files/mrustc-0.11.2-no-glibcxx-assertions-workaround.patch deleted file mode 100644 index 516bca4ac13c..000000000000 --- a/dev-lang/mrustc/files/mrustc-0.11.2-no-glibcxx-assertions-workaround.patch +++ /dev/null @@ -1,12 +0,0 @@ -We need this otherwise the built code will assert when building dev-lang/rust -later. Not yet reported upstream. ---- a/src/trans/codegen_c.cpp -+++ b/src/trans/codegen_c.cpp -@@ -1274,6 +1274,7 @@ namespace { - { - args.push_back( a.c_str() ); - } -+ args.push_back("-U_GLIBCXX_ASSERTIONS"); // TODO - args.push_back("-Wno-psabi"); // Suppress "note: the ABI for passing parameters with 128-byte alignment has changed in GCC 4.6" - switch(opt.opt_level) - { diff --git a/dev-lang/mrustc/files/mrustc-0.11.0-RUSTC_SRC_PROVIDED.patch b/dev-lang/mrustc/files/mrustc-20261018-build-with-provided-rust.patch index c72f4ae40950..e0d17b7c6615 100644 --- a/dev-lang/mrustc/files/mrustc-0.11.0-RUSTC_SRC_PROVIDED.patch +++ b/dev-lang/mrustc/files/mrustc-20261018-build-with-provided-rust.patch @@ -1,16 +1,7 @@ -From 3881d541d0934bd35f26ef7b74672e755061efef Mon Sep 17 00:00:00 2001 +From 9258e199e5839a1cb8a081498dc2395b76a8b05c Mon Sep 17 00:00:00 2001 From: Matt Jolly <kangie@gentoo.org> -Date: Mon, 9 Dec 2024 13:05:44 +1000 -Subject: [PATCH] Add `RUSTC_SRC_PROVIDED` for sandboxed installs - -Allows package managers to provide an extracted rustc -source to patch and build against. This effictively no-ops -the fetch and unpack steps of minicargo.mk entirely, and -adds some sanity checks to ensure that `RUSTCSRC` comes -from the environment and contains a `Cargo.toml`. - -we also add a `/` after every `$(RUSTCSRC)` path fragment -just in case the path from the environment does not have one. +Date: Sun, 18 Oct 2026 18:03:10 +1000 +Subject: [PATCH] Enable build with provided rust tarball Signed-off-by: Matt Jolly <kangie@gentoo.org> --- a/minicargo.mk @@ -25,7 +16,7 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> # OUTDIR_SUF : Output directory suffix ifeq ($(RUSTC_VERSION),$(RUSTC_VERSION_DEF)) OUTDIR_SUF_DEF := -@@ -91,18 +94,26 @@ else +@@ -92,18 +95,26 @@ else RUSTC_OUT_BIN := rustc_main endif @@ -56,9 +47,9 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> - VENDOR_DIR := $(RUSTCSRC)vendor + VENDOR_DIR := $(RUSTCSRC)/vendor MINICARGO_FLAGS += --manifest-overrides rustc-$(RUSTC_VERSION)-overrides.toml - endif - ifeq ($(RUSTC_VERSION),1.54.0) -@@ -132,12 +143,12 @@ ifeq ($(RUSTC_VERSION),1.74.0) + # Pass `-C panic=unwind` to mrustc for these rustc versions so the panic-unwind + # runtime (which uses mrustc's setjmp/longjmp _Unwind_RaiseException shim) is +@@ -144,15 +155,15 @@ ifeq ($(RUSTC_VERSION),1.90.0) SRCDIR_RUSTC_DRIVER := compiler/rustc_driver endif @@ -68,13 +59,17 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> -SRCDIR_RUST_TESTS := $(RUSTCSRC)tests/ +SRCDIR_RUST_TESTS := $(RUSTCSRC)/tests/ endif + ifeq ($(RUSTC_VERSION),1.90.0) +-SRCDIR_RUST_TESTS := $(RUSTCSRC)tests/ ++SRCDIR_RUST_TESTS := $(RUSTCSRC)/tests/ + endif -LLVM_CONFIG := $(RUSTCSRC)build/bin/llvm-config +LLVM_CONFIG := $(RUSTCSRC)/build/bin/llvm-config ifeq ($(shell uname -s || echo not),Darwin) # /usr/bin/uname because uname might call coreutils # which can make the arm64 uname called when -@@ -205,6 +216,7 @@ bin/testrunner$(EXESUF): +@@ -223,6 +234,7 @@ bin/testrunner$(EXESUF): # rustc (with std/cargo) source download # RUSTC_SRC_TARBALL := rustc-$(RUSTC_VERSION)-src.tar.gz @@ -82,23 +77,20 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> $(RUSTC_SRC_TARBALL): @echo [CURL] $@ @rm -f $@ -@@ -212,15 +224,23 @@ $(RUSTC_SRC_TARBALL): - rustc-$(RUSTC_VERSION)-src/extracted: $(RUSTC_SRC_TARBALL) - tar -xf $(RUSTC_SRC_TARBALL) - touch $@ --$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src/extracted rustc-$(RUSTC_VERSION)-src.patch -- cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch; +@@ -238,12 +250,22 @@ $(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src/extracted rustc-$(RUSTC_VERSION)-src + tar -xzf $(RUSTC_SRC_TARBALL) $$files && \ + ( cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch ) && \ + cp rustc-$(RUSTC_VERSION)-src.patch $@ +else +$(RUSTC_SRC_TARBALL): + @echo "RUSTC_SRC_PROVIDED is set, no need to fetch source" +rustc-$(RUSTC_VERSION)-src/extracted: $(RUSTC_SRC_TARBALL) + touch $(RUSTCSRC)/extracted -+endif -+ +$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src/extracted rustc-$(RUSTC_VERSION)-src.patch + PATCH_FILE=$(abspath rustc-$(RUSTC_VERSION)-src.patch); \ + cd $(RUSTCSRC) && patch -p0 < $$PATCH_FILE; - touch $@ ++ touch $@ ++endif # Standard library crates # - libstd, libpanic_unwind, libtest and libgetopts @@ -109,14 +101,14 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> @mkdir -p $(dir $@) @echo "#![no_core]" > $(dir $@)/lib.rs @echo "[package]" > $@ -@@ -232,23 +252,23 @@ $(RUSTCSRC)mrustc-stdlib/Cargo.toml: $(RUSTC_SRC_DL) minicargo.mk - @echo "std = { path = \"../$(RUST_LIB_PREFIX)std\" }" >> $@ - @echo "panic_unwind = { path = \"../$(RUST_LIB_PREFIX)panic_unwind\" }" >> $@ - @echo "test = { path = \"../$(RUST_LIB_PREFIX)test\" }" >> $@ +@@ -258,23 +280,23 @@ $(RUSTCSRC)mrustc-stdlib/Cargo.toml: $(RUSTC_SRC_DL) minicargo.mk + @echo "rustc-std-workspace-core = { path = \"../$(RUST_LIB_PREFIX)rustc-std-workspace-core\" }" >> $@ + @echo "rustc-std-workspace-alloc = { path = \"../$(RUST_LIB_PREFIX)rustc-std-workspace-alloc\" }" >> $@ + @echo "rustc-std-workspace-std = { path = \"../$(RUST_LIB_PREFIX)rustc-std-workspace-std\" }" >> $@ -LIBS: $(RUSTCSRC)mrustc-stdlib/Cargo.toml $(MRUSTC) $(MINICARGO) -- +$(MINICARGO) --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(OUTDIR) $(MINICARGO_FLAGS) $(RUSTCSRC)mrustc-stdlib/ +- +STD_ENV_ARCH=$(RUSTC_ARCH) $(MINICARGO) --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(OUTDIR) $(MINICARGO_FLAGS) $(RUSTCSRC)mrustc-stdlib/ +LIBS: $(RUSTCSRC)/mrustc-stdlib/Cargo.toml $(MRUSTC) $(MINICARGO) -+ +$(MINICARGO) --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(OUTDIR) $(MINICARGO_FLAGS) $(RUSTCSRC)/mrustc-stdlib/ ++ +STD_ENV_ARCH=$(RUSTC_ARCH) $(MINICARGO) --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(OUTDIR) $(MINICARGO_FLAGS) $(RUSTCSRC)/mrustc-stdlib/ +$(MINICARGO) --output-dir $(OUTDIR) $(MINICARGO_FLAGS) lib/libproc_macro else LIBS: $(MRUSTC) $(MINICARGO) $(RUSTC_SRC_DL) @@ -141,7 +133,7 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> test -e $@ RUSTC_ENV_VARS := CFG_COMPILER_HOST_TRIPLE=$(RUSTC_TARGET) -@@ -264,17 +284,17 @@ RUSTC_ENV_VARS += RUSTC_INSTALL_BINDIR=bin +@@ -291,17 +313,17 @@ RUSTC_ENV_VARS += RUSTC_BOOTSTRAP=1 $(OUTDIR)rustc: $(MRUSTC) $(MINICARGO) LIBS $(LLVM_CONFIG) mkdir -p $(OUTDIR)rustc-build @@ -163,7 +155,7 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> LLVM_CMAKE_OPTS := LLVM_TARGET_ARCH=$(firstword $(subst -, ,$(RUSTC_TARGET))) LLVM_DEFAULT_TARGET_TRIPLE=$(RUSTC_TARGET) LLVM_CMAKE_OPTS += LLVM_TARGETS_TO_BUILD="$(LLVM_TARGETS)" LLVM_CMAKE_OPTS += LLVM_ENABLE_ASSERTIONS=OFF -@@ -286,22 +306,22 @@ LLVM_CMAKE_OPTS += CMAKE_BUILD_TYPE=Release +@@ -313,22 +335,22 @@ LLVM_CMAKE_OPTS += CMAKE_BUILD_TYPE=Release LLVM_CMAKE_OPTS += $(LLVM_CMAKE_OPTS_EXTRA) @@ -194,7 +186,7 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> #$(OUTDIR)cargo-build/libserde-1_0_6.rlib: $(MRUSTC) LIBS # $(MINICARGO) $(VENDOR_DIR)/serde --vendor-dir $(VENDOR_DIR) --output-dir $(dir $@) -L $(OUTDIR) $(MINICARGO_FLAGS) $(OUTDIR)cargo-build/libgit2-0_6_6.rlib: $(MRUSTC) LIBS -@@ -349,9 +369,9 @@ $(OUTDIR)test/librust_test_helpers.a: $(OUTDIR)test/rust_test_helpers.o +@@ -369,9 +391,9 @@ $(OUTDIR)test/librust_test_helpers.a: $(OUTDIR)test/rust_test_helpers.o @mkdir -p $(dir $@) ar cur $@ $< ifeq ($(RUSTC_VERSION),1.19.0) @@ -206,17 +198,17 @@ Signed-off-by: Matt Jolly <kangie@gentoo.org> endif output$(OUTDIR_SUF)/test/rust_test_helpers.o: $(RUST_TEST_HELPERS_C) @mkdir -p $(dir $@) -@@ -424,8 +444,8 @@ RUNTIME_ARGS_$(OUTDIR)stdtest/collectionstests += --skip ::vec::overaligned_allo +@@ -444,8 +466,8 @@ RUNTIME_ARGS_$(OUTDIR)stdtest/collectionstests += --skip ::vec::overaligned_allo #ENV_$(OUTDIR)stdtest/rustc-test := #ENV_$(OUTDIR)stdtest/rustc-test += CFG_COMPILER_HOST_TRIPLE=$(RUSTC_TARGET) --$(OUTDIR)stdtest/%-test: $(RUSTCSRC)src/lib%/lib.rs LIBS -- +MRUSTC_LIBDIR=$(abspath $(OUTDIR)) $(MINICARGO) --test $(RUSTCSRC)src/lib$* --vendor-dir $(VENDOR_DIR) --output-dir $(dir $@) -L $(OUTDIR) -+$(OUTDIR)stdtest/%-test: $(RUSTCSRC)/src/lib%/lib.rs LIBS -+ +MRUSTC_LIBDIR=$(abspath $(OUTDIR)) $(MINICARGO) --test $(RUSTCSRC)/src/lib$* --vendor-dir $(VENDOR_DIR) --output-dir $(dir $@) -L $(OUTDIR) +-$(OUTDIR)stdtest/%-test: $(RUSTCSRC)$(RUST_LIB_PREFIX)/Cargo.toml LIBS +- +MRUSTC_LIBDIR=$(abspath $(OUTDIR)) $(MINICARGO) --test $(RUSTCSRC)$(RUST_LIB_PREFIX)$* --vendor-dir $(VENDOR_DIR) --output-dir $(dir $@) -L $(OUTDIR) ++$(OUTDIR)stdtest/%-test: $(RUSTCSRC)/$(RUST_LIB_PREFIX)/Cargo.toml LIBS ++ +MRUSTC_LIBDIR=$(abspath $(OUTDIR)) $(MINICARGO) --test $(RUSTCSRC)/$(RUST_LIB_PREFIX)$* --vendor-dir $(VENDOR_DIR) --output-dir $(dir $@) -L $(OUTDIR) $(OUTDIR)stdtest/collectionstests: $(OUTDIR)stdtest/alloc-test test -e $@ $(OUTDIR)collectionstest_out.txt: $(OUTDIR)% -- -2.47.1 +2.54.0 diff --git a/dev-lang/mrustc/mrustc-0.11.2-r1.ebuild b/dev-lang/mrustc/mrustc-0.12.0_p20261018.ebuild index 6676c8b54ad4..646c57628897 100644 --- a/dev-lang/mrustc/mrustc-0.11.2-r1.ebuild +++ b/dev-lang/mrustc/mrustc-0.12.0_p20261018.ebuild @@ -1,4 +1,4 @@ -# Copyright 2024-2025 Gentoo Authors +# Copyright 2024-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,9 +6,9 @@ EAPI=8 inherit edo multiprocessing rust-toolchain toolchain-funcs # The makefile needs to know the version of rust to build -RUST_VERSION=1.74.1 +RUST_VERSION=1.90.0 # We need to pretend to be this version of Rust for mrustc build and outputs -MRUSTC_RUST_VER=1.74.0 +MRUSTC_RUST_VER=1.90.0 DESCRIPTION="Mutabah's Rust Compiler" HOMEPAGE="https://github.com/thepowersgang/mrustc" @@ -16,11 +16,14 @@ HOMEPAGE="https://github.com/thepowersgang/mrustc" if [[ ${PV} == *"9999"* ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/thepowersgang/mrustc.git" + SRC_URI="https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz" else - SRC_URI="https://github.com/thepowersgang/mrustc/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + MY_COMMIT="d85e86b199e2522d74bee19efa6ebf3af596270f" + SRC_URI="https://github.com/thepowersgang/mrustc/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz " - KEYWORDS="amd64" + KEYWORDS="~amd64 ~arm64" + S="${WORKDIR}/${PN}-${MY_COMMIT}" fi LICENSE="MIT" @@ -35,21 +38,34 @@ RDEPEND=" BDEPEND="sys-devel/gcc:*" PATCHES=( - "${FILESDIR}/${PN}-0.11.2-gcc15.patch" "${FILESDIR}/${PN}-0.11.2-dont-strip-bins.patch" - "${FILESDIR}/${PN}-0.11.0-default-to-rust-1_74.patch" - "${FILESDIR}/${PN}-0.11.0-RUSTC_SRC_PROVIDED.patch" - "${FILESDIR}/${PN}-0.10.1-git-be-gone.patch" - "${FILESDIR}/${PN}-0.11.2-no-glibcxx-assertions-workaround.patch" - "${FILESDIR}/${PN}-0.11.2-no-glibcxx-assertions-workaround-more.patch" + "${FILESDIR}/${PN}-0.12.0-default-to-rust-1_90.patch" + "${FILESDIR}/${PN}-20261018-build-with-provided-rust.patch" + "${FILESDIR}/${PN}-0.12.0-no-glibcxx-assertions-workaround.patch" ) +if [[ ${PV} != *"9999"* ]]; then + PATCHES+=( + "${FILESDIR}/${PN}-0.12.0-git-be-gone.patch" + ) +fi + QA_FLAGS_IGNORED=" - usr/lib/rust/${P}/bin/mrustc - usr/lib/rust/${P}/bin/minicargo - usr/lib/rust/${P}/lib/rustlib/$(rust_abi)/lib/*.rlib + usr/lib/rust/${P/_p*/}/bin/mrustc + usr/lib/rust/${P/_p*/}/bin/minicargo + usr/lib/rust/${P/_p*/}/lib/rustlib/$(rust_abi)/lib/*.rlib " +src_unpack() { + if [[ ${PV} == *"9999"* ]]; then + default + git-r3_src_unpack + else + default + fi + +} + src_configure() { : } @@ -80,18 +96,19 @@ src_test() { emake -e -f minicargo.mk local_tests # build and run 'hello world' (this is called using 'test' in the makefile, but we can do it manually) edo "${S}"/bin/mrustc -L "${S}"/output-${MRUSTC_RUST_VER}/ \ - -g "${S}/../rustc-${RUST_VERSION}-src/tests/ui/hello_world/main.rs" -o "${T}"/hello + -g "${S}/../rustc-${RUST_VERSION}-src/tests/ui/parallel-rustc/hello_world.rs" -o "${T}"/hello "${T}"/hello || die "Failed to run hello_world built with mrustc" } src_install() { + local p=${P/_p*/} # If we're installing into /usr/lib/rust we may as well be consistent - into /usr/lib/rust/${P} + into "/usr/lib/rust/${p}" dobin bin/mrustc dobin bin/minicargo local lib patch local libs=( "${S}"/output-*/*.rlib* ) - insinto "/usr/lib/rust/${P}/lib/rustlib/$(rust_abi)/lib" + insinto "/usr/lib/rust/${p}/lib/rustlib/$(rust_abi)/lib" # If we ever want to support mrustc stdlib for multiple rusts we'll need to # do something more clever here. for lib in "${libs[@]}"; do @@ -101,9 +118,9 @@ src_install() { fi done # For convenience, install files required to build various rusts - insinto /usr/share/${P} + insinto "/usr/share/${p}" doins -r "${S}/script-overrides/" - insinto /usr/share/${P}/patches + insinto "/usr/share/${p}/patches" for patch in "${S}"/rustc-*.patch "${S}"/rustc-*-overrides.toml; do doins "${patch}" done diff --git a/dev-lang/mrustc/mrustc-9999.ebuild b/dev-lang/mrustc/mrustc-9999.ebuild index 8a4bba4af680..646c57628897 100644 --- a/dev-lang/mrustc/mrustc-9999.ebuild +++ b/dev-lang/mrustc/mrustc-9999.ebuild @@ -18,10 +18,12 @@ if [[ ${PV} == *"9999"* ]]; then EGIT_REPO_URI="https://github.com/thepowersgang/mrustc.git" SRC_URI="https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz" else - SRC_URI="https://github.com/thepowersgang/mrustc/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + MY_COMMIT="d85e86b199e2522d74bee19efa6ebf3af596270f" + SRC_URI="https://github.com/thepowersgang/mrustc/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz " - KEYWORDS="~amd64" + KEYWORDS="~amd64 ~arm64" + S="${WORKDIR}/${PN}-${MY_COMMIT}" fi LICENSE="MIT" @@ -38,7 +40,7 @@ BDEPEND="sys-devel/gcc:*" PATCHES=( "${FILESDIR}/${PN}-0.11.2-dont-strip-bins.patch" "${FILESDIR}/${PN}-0.12.0-default-to-rust-1_90.patch" - "${FILESDIR}/${PN}-0.12.0-build-with-provided-rust.patch" + "${FILESDIR}/${PN}-20261018-build-with-provided-rust.patch" "${FILESDIR}/${PN}-0.12.0-no-glibcxx-assertions-workaround.patch" ) @@ -49,9 +51,9 @@ if [[ ${PV} != *"9999"* ]]; then fi QA_FLAGS_IGNORED=" - usr/lib/rust/${P}/bin/mrustc - usr/lib/rust/${P}/bin/minicargo - usr/lib/rust/${P}/lib/rustlib/$(rust_abi)/lib/*.rlib + usr/lib/rust/${P/_p*/}/bin/mrustc + usr/lib/rust/${P/_p*/}/bin/minicargo + usr/lib/rust/${P/_p*/}/lib/rustlib/$(rust_abi)/lib/*.rlib " src_unpack() { @@ -99,13 +101,14 @@ src_test() { } src_install() { + local p=${P/_p*/} # If we're installing into /usr/lib/rust we may as well be consistent - into /usr/lib/rust/${P} + into "/usr/lib/rust/${p}" dobin bin/mrustc dobin bin/minicargo local lib patch local libs=( "${S}"/output-*/*.rlib* ) - insinto "/usr/lib/rust/${P}/lib/rustlib/$(rust_abi)/lib" + insinto "/usr/lib/rust/${p}/lib/rustlib/$(rust_abi)/lib" # If we ever want to support mrustc stdlib for multiple rusts we'll need to # do something more clever here. for lib in "${libs[@]}"; do @@ -115,9 +118,9 @@ src_install() { fi done # For convenience, install files required to build various rusts - insinto /usr/share/${P} + insinto "/usr/share/${p}" doins -r "${S}/script-overrides/" - insinto /usr/share/${P}/patches + insinto "/usr/share/${p}/patches" for patch in "${S}"/rustc-*.patch "${S}"/rustc-*-overrides.toml; do doins "${patch}" done diff --git a/dev-lang/nim/nim-2.2.12.ebuild b/dev-lang/nim/nim-2.2.12.ebuild index ea9bb37c25be..d4343665c93a 100644 --- a/dev-lang/nim/nim-2.2.12.ebuild +++ b/dev-lang/nim/nim-2.2.12.ebuild @@ -19,7 +19,7 @@ SRC_URI=" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~x86" +KEYWORDS="amd64 ~arm ~x86" IUSE="test-js test" RESTRICT="!test? ( test )" diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 945d80913b51..0436663de557 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -22,6 +22,8 @@ DIST Python-3.14.8.tar.xz 24130644 BLAKE2B c357ff7ad35ed9daac86cf8b9ba05c2735104 DIST Python-3.14.8.tar.xz.sigstore 7489 BLAKE2B 9815b29e63c481ecb5bdd37f2f8da2d1a363adb1fc138ac00fec37732ecd5dcb34e010c2aaed4dea3aa688543768870aad17cd7999006b8b7974ed05e125e4e2 SHA512 cc030677f2b22287ed42974cd5d2654d1eadec38d66080b04b4a5bf468e9055aeff127dbd5cce508d31c977a38d84a0e87eb3c6375b2b924e03f7883e1d602a9 DIST Python-3.15.0.tar.xz 35688820 BLAKE2B fd061cceb89dc512b0e68f32189ba6d89e5707b633d5606215bdfa173ed67918127c195cbde6c0d759cb1197ebbbb030129f0520ef59eec83554d5d810257983 SHA512 293cbdbb20076c8d9f1ddfb9b72796974b00802f96691843af3924e55e2a7cbd89c1cd85ebd8e35a474eda9e7a878b6622238178ef2de4427e4e34ef70d04265 DIST Python-3.15.0.tar.xz.sigstore 7310 BLAKE2B dc13104044018b770628b085b3baabba2e06decfb0f5d31573fc847c6ca0f933a5a8bf3ff8241fe948009c6a190ea1b3aaf9d787c8b6b8a89dd15bade6a60096 SHA512 995e0bc6732c27a8c18a4f8d0db957fbe6b8e777d7e0b92669e03918aeabbade5443429ff5070bf02a5e03f8c873db1e92fa83e5bf63340b10d8653550ee4bd6 +DIST Python-3.16.0a1.tar.xz 35379848 BLAKE2B 2f6e53fe66c6d935366f35d145dfeb6a8345d1c1b293dd8cad96d710a0f6e8317d359b56c40259f037d4189ee32f787ba3c749e838c7825e740ad68407067544 SHA512 7539197c48669ccad6bde38b05dcdc83e669d597364d3c42107f5de054ad3b10e28ae4835720ed9be2b15da9a30a021c66d022ecfc39817f0e54916bbc66e9b7 +DIST Python-3.16.0a1.tar.xz.sigstore 7177 BLAKE2B 66a63ec9e13866929d7e012daa3278a38421ac9ff576ce3cac294ca989f675c976ba184dbbb61497069dbf885421c73843468bf9b8979b6491679f2bd3c77af6 SHA512 4b93bbae073c3ad0d099ac633aaf3a367c7390b32b256377a24578fffc239b20d94629ff074270e55d585b59d6f03ca22e4fd877599ba1066e7cb37ba059d8eb DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61 DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed DIST Python-3.9.25.tar.xz 20183236 BLAKE2B 01c5af78659324e2a596611c11c0fa982f81faf9b401afe1a96399b58321e39c41e46a932e1e4437f3f2bb2d76d8482e852fc66e6f960a4928f7fc99b62dfb7e SHA512 33fd65952cc3ce5df83825aa32a103935815bdd5a016e5fd9896cafb068a3f89b3a6134458a2694e4f0f4f8a9fbe84739b53116264728b32cde0f03ab210cb19 @@ -44,5 +46,6 @@ DIST python-gentoo-patches-3.14.7.tar.xz 10304 BLAKE2B df9214b27caaef53da93e5468 DIST python-gentoo-patches-3.14.8.tar.xz 10300 BLAKE2B d03992cf3aa224c03bdff6bb837879fac6c935265a384170c4139d09a9e3fb246cd7822ae171ed88999d6120512e7f49bd04c1d3f7ccee1967e194e1186ce7b3 SHA512 9d05432b04718ddaa5d09a0fc99d2498078398e94f00470b48f19c1779cc86997917825a1d2ac539e2170d8f0a9ade82a9b8909ae221db395a6f9fdbde3a24f6 DIST python-gentoo-patches-3.15.0.tar.xz 4624 BLAKE2B 844b76e97fe4564613e4a00d02f77b18ef63a1b731ee7112789f9067d973decbcab05aeca2da32945b2c1f03e81705e7b102d4281b43287db948a3483e702f35 SHA512 0b0df753ab876f579e59b351d72b80279562236a1f5b36016eff133e4e3a7bdac7705af53a2f3a8ec4a0836c9357ceb5ea236047e3b12ceedb8ed593267f6cfe DIST python-gentoo-patches-3.15.0b3.tar.xz 3432 BLAKE2B 994e9339e00dfa4b40395e763f25dde4813d791151787028dafcf2e5159c38bbe88d4b56d07fc4c7454a09bd55edfda94b9cb8cf5c0ff0ffe7db4bb1a8eea8b6 SHA512 8c3a8dea43fc42179679b1f6811979dabb4e1c34821b4aecd894d661842df26e7592f5c74787157f36ccddf9ce233994c774fbe8381dc0ccaff3dfcff0c6c572 +DIST python-gentoo-patches-3.16.0a1.tar.xz 3448 BLAKE2B 0ff7f5881799c377292c50f5a75a99364bebcaf3f6df81972350e74093100f697fccd62a42d432432e10cf541816f9268539ebef0f0e9cc40d9cf8f1b1258358 SHA512 169063117fc183642b434bf511677fe68453ef9cbd9b7155acffeee4ec36bd002a50b2adb8e70650993f8144f167269bc17e7f958612bd77ee74b61f8ae8982f DIST python-gentoo-patches-3.8.20_p7.tar.xz 54544 BLAKE2B e31fc9fb5e98b62b0f70165670ec58ed4fa932cfc95d5287c249015a3a372fdbf0d1ba08cb98f63c2dc500700edfd6ffea6db670385d2c86a4fdb92ffb991192 SHA512 a9e7e4976be226931a503af2c986da207d060d4ce436af61f5e8427da513639adbed32bb0061963b83fef275a5de91707ab13b7a9abf3a7472ee0e2c5310eda1 DIST python-gentoo-patches-3.9.25.tar.xz 36604 BLAKE2B 11d35dcbc8979fe37e27a00dfef9683f0bf40514415be416d322f0509109edeb58a2e0b9218cfa3b3326654f5923d165511d203504ca2b52971ad136f8a454d1 SHA512 234bae116b2a5af00506cb76a0b86dfb8cf1f84ee980a358f3642bb717cff4d6f10388b2a07f12118588a174de4d2fd6ad2e3ab24704f9c85f36cb33d51f0c65 diff --git a/dev-lang/python/python-3.16.0_alpha1.ebuild b/dev-lang/python/python-3.16.0_alpha1.ebuild new file mode 100644 index 000000000000..d9b57bb0b7a7 --- /dev/null +++ b/dev-lang/python/python-3.16.0_alpha1.ebuild @@ -0,0 +1,671 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 21 ) +LLVM_OPTIONAL=1 +VERIFY_SIG_METHOD=sigstore +WANT_LIBTOOL="none" + +inherit autotools check-reqs eapi9-ver flag-o-matic linux-info llvm-r2 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV/_alpha/a} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://distfiles.gentoo.org/pub/proj/python/patchsets/${PYVER%t}/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.sigstore + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +if [[ ${PV} != *_rc* ]]; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo + +readline +sqlite +ssl tail-call-interp test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-misc/mime-types + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + sys-apps/util-linux + >=virtual/zlib-1.1.3:= + virtual/libintl + !build? ( app-arch/zstd:= ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + tail-call-interp? ( + || ( + >=sys-devel/gcc-16:* + >=llvm-core/clang-19:* + ) + ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi +PDEPEND=" + ensurepip? ( dev-python/ensurepip-pip ) +" + +# https://www.python.org/downloads/metadata/sigstore/ +VERIFY_SIG_CERT_IDENTITY=savannah@python.org +VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + if use jit; then + ewarn "USE=jit is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead," + ewarn "please consider reporting JIT problems upstream." + fi + + if [[ ${MERGE_TYPE} != buildonly ]] && ver_replacing -lt 3.15.0_beta4; then + ewarn + ewarn "Python 3.15.0b4 has broken its extension ABI. The extensions built" + ewarn "with older versions may crash at runtime or worse after upgrading." + ewarn "A rebuild is recommended after the merge is complete, e.g. using:" + ewarn + ewarn " emerge -1v \$(find /usr/lib/python3.15/site-packages -name '*.cpython-315-*.so')" + ewarn + ewarn "Note that if you enabled both python3_15 and python3_15t, then" + ewarn "the 3.15 rebuild should cover all 3.15t packages already." + ewarn "If you do not wish to perform the rebuild at the time, it is" + ewarn "recommended to abort the upgrade." + ewarn + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r2_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + if use tail-call-interp; then + tc-check-min_ver gcc 16 + tc-check-min_ver clang 19 + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST="${BUILD_LDFLAGS} -fno-lto" + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS="${LDFLAGS_NODIST}" + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + filter-flags -malign-double + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + # PKG_CONFIG needed for cross. + tc-export CXX PKG_CONFIG + + local dbmliborder= + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + # Set baseline test skip flags. + COMMON_TEST_SKIPS=( + # running gdb inside an ebuild as non-root, within sandbox, + # and possibly within a container is unreliable + -x test_gdb + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + --verbose3 + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + + # Test terminates abruptly which corrupts written profile data + # bug #964023 + -x test_pyrepl + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + # PGO sometimes fails randomly + local -x PROFILE_TASK="${profile_task_flags[*]} || true" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --without-lto + --with-system-expat + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + --enable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with tail-call-interp) + $(use_with valgrind) + ) + + if tc-is-lto; then + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev build '_zstd') + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + fi + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi + + # install epython.py as part of stdlib + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + if use pgo ; then + # https://bugs.gentoo.org/660358 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + # https://bugs.gentoo.org/984547 + unset COLUMNS + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # https://bugs.gentoo.org/660358 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + # https://bugs.gentoo.org/984547 + unset COLUMNS + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + local build_dir=$(<pybuilddir.txt) + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Install build-details.json manually because it was randomly removed + # from altinstall in https://github.com/python/cpython/pull/142269. + cp "${build_dir}"/build-details.json "${libdir}"/ || die + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} + +pkg_postinst() { + if ver_replacing -lt 3.15.0_beta4; then + ewarn "Python 3.15.0b4 has broken its extension ABI. The extensions built" + ewarn "with older versions may crash at runtime or worse. To prevent this," + ewarn "please rebuild all extensions using the versoned ABI, e.g. using:" + ewarn + ewarn " emerge -1v \$(find /usr/lib/python3.15/site-packages -name '*.cpython-315-*.so')" + ewarn + ewarn "Note that if you enabled both python3_15 and python3_15t, then" + ewarn "the 3.15 rebuild should cover all 3.15t packages already." + fi +} diff --git a/dev-lang/python/python-3.16.9999.ebuild b/dev-lang/python/python-3.16.9999.ebuild new file mode 100644 index 000000000000..97f7cd5f9fea --- /dev/null +++ b/dev-lang/python/python-3.16.9999.ebuild @@ -0,0 +1,654 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 21 ) +LLVM_OPTIONAL=1 +WANT_LIBTOOL="none" + +inherit autotools check-reqs eapi9-ver flag-o-matic git-r3 linux-info llvm-r2 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs + +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-3.16.0a1" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://distfiles.gentoo.org/pub/proj/python/patchsets/${PYVER%t}/${PATCHSET}.tar.xz +" +EGIT_REPO_URI="https://github.com/python/cpython.git" + +LICENSE="PSF-2" +SLOT="${PYVER}" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo + +readline +sqlite +ssl tail-call-interp test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-misc/mime-types + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + sys-apps/util-linux + >=virtual/zlib-1.1.3:= + virtual/libintl + !build? ( app-arch/zstd:= ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + tail-call-interp? ( + || ( + >=sys-devel/gcc-16:* + >=llvm-core/clang-19:* + ) + ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi +PDEPEND=" + ensurepip? ( dev-python/ensurepip-pip ) +" + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + if use jit; then + ewarn "USE=jit is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead," + ewarn "please consider reporting JIT problems upstream." + fi + + if [[ ${MERGE_TYPE} != buildonly ]] && ver_replacing -lt 3.15.0_beta4; then + ewarn + ewarn "Python 3.15.0b4 has broken its extension ABI. The extensions built" + ewarn "with older versions may crash at runtime or worse after upgrading." + ewarn "A rebuild is recommended after the merge is complete, e.g. using:" + ewarn + ewarn " emerge -1v \$(find /usr/lib/python3.15/site-packages -name '*.cpython-315-*.so')" + ewarn + ewarn "Note that if you enabled both python3_15 and python3_15t, then" + ewarn "the 3.15 rebuild should cover all 3.15t packages already." + ewarn "If you do not wish to perform the rebuild at the time, it is" + ewarn "recommended to abort the upgrade." + ewarn + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r2_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + if use tail-call-interp; then + tc-check-min_ver gcc 16 + tc-check-min_ver clang 19 + fi + fi +} + +src_unpack() { + git-r3_src_unpack + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST="${BUILD_LDFLAGS} -fno-lto" + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS="${LDFLAGS_NODIST}" + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + filter-flags -malign-double + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + # PKG_CONFIG needed for cross. + tc-export CXX PKG_CONFIG + + local dbmliborder= + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + # Set baseline test skip flags. + COMMON_TEST_SKIPS=( + # running gdb inside an ebuild as non-root, within sandbox, + # and possibly within a container is unreliable + -x test_gdb + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + --verbose3 + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + + # Test terminates abruptly which corrupts written profile data + # bug #964023 + -x test_pyrepl + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + # PGO sometimes fails randomly + local -x PROFILE_TASK="${profile_task_flags[*]} || true" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --without-lto + --with-system-expat + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + --enable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with tail-call-interp) + $(use_with valgrind) + ) + + if tc-is-lto; then + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev build '_zstd') + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + fi + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi + + # install epython.py as part of stdlib + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + if use pgo ; then + # https://bugs.gentoo.org/660358 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + # https://bugs.gentoo.org/984547 + unset COLUMNS + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # https://bugs.gentoo.org/660358 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + # https://bugs.gentoo.org/984547 + unset COLUMNS + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + local build_dir=$(<pybuilddir.txt) + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Install build-details.json manually because it was randomly removed + # from altinstall in https://github.com/python/cpython/pull/142269. + cp "${build_dir}"/build-details.json "${libdir}"/ || die + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} + +pkg_postinst() { + if ver_replacing -lt 3.15.0_beta4; then + ewarn "Python 3.15.0b4 has broken its extension ABI. The extensions built" + ewarn "with older versions may crash at runtime or worse. To prevent this," + ewarn "please rebuild all extensions using the versoned ABI, e.g. using:" + ewarn + ewarn " emerge -1v \$(find /usr/lib/python3.15/site-packages -name '*.cpython-315-*.so')" + ewarn + ewarn "Note that if you enabled both python3_15 and python3_15t, then" + ewarn "the 3.15 rebuild should cover all 3.15t packages already." + fi +} diff --git a/dev-lang/rust/rust-1.90.0-r1.ebuild b/dev-lang/rust/rust-1.90.0-r1.ebuild index 4fcce6fa3641..3cbf6f0c5090 100644 --- a/dev-lang/rust/rust-1.90.0-r1.ebuild +++ b/dev-lang/rust/rust-1.90.0-r1.ebuild @@ -117,7 +117,8 @@ BDEPEND="${PYTHON_DEPS} test? ( dev-debug/gdb ) verify-sig? ( sec-keys/openpgp-keys-rust ) mrustc-bootstrap? ( - ~dev-lang/mrustc-${MRUSTC_VERSION} + amd64? ( ~dev-lang/mrustc-${MRUSTC_VERSION} ) + arm64? ( ~dev-lang/mrustc-0.12.0_p20261018 ) dev-build/cmake sys-devel/gcc:* ) diff --git a/dev-lang/spidermonkey/spidermonkey-140.17.0.ebuild b/dev-lang/spidermonkey/spidermonkey-140.17.0.ebuild index 13441e316a7b..a7eaaf67f595 100644 --- a/dev-lang/spidermonkey/spidermonkey-140.17.0.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-140.17.0.ebuild @@ -73,10 +73,10 @@ RESTRICT="!test? ( test )" BDEPEND="${PYTHON_DEPS} $(llvm_gen_dep ' + llvm-core/llvm:${LLVM_SLOT} clang? ( llvm-core/clang:${LLVM_SLOT} llvm-core/lld:${LLVM_SLOT} - llvm-core/llvm:${LLVM_SLOT} ) ') >=dev-util/cbindgen-0.27.0 |
