commit: a786b26eb4bd7b04fab6b0be90ddd9ca1bf3e2f2
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Dec 8 15:43:33 2025 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Dec 8 16:01:18 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a786b26e
dev-util/maturin: add 1.10.1, 1.10.2
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-util/maturin/Manifest | 4 +
...turin-1.10.1-libressl-openssl-sys-0.9.110.patch | 10 ++
dev-util/maturin/maturin-1.10.1.ebuild | 166 +++++++++++++++++++++
dev-util/maturin/maturin-1.10.2.ebuild | 166 +++++++++++++++++++++
4 files changed, 346 insertions(+)
diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest
index d1702c1..09470f4 100644
--- a/dev-util/maturin/Manifest
+++ b/dev-util/maturin/Manifest
@@ -1,3 +1,7 @@
+DIST maturin-1.10.1-vendor.tar.xz 16231828 BLAKE2B
639f91b569a9286bdfee615c07bfbe73c07db79983833cd85d820ca061732b56282f2474184a4c36870fdde126ac7e05ce788a5c757a64f586b852536e3becd2
SHA512
f76e0a6c2fee9cd243c813c29ce0fe445edec9b6f703151cd59ba6f2cef549fc6812ac89fcdd02b77f8e2830caa4fe5c237f48943bb16fe0368512a9e22a93ae
+DIST maturin-1.10.1.gh.tar.gz 586836 BLAKE2B
56187009b4e240c5fcd56666a7d45cef406bb6e534164197f64427101c18aa38aebbb9f1fc0404b250c8e48030a9cbda748d28616817fda1d4ad4e5a60da7bb9
SHA512
9246d7bfc7992d9365b69096955beb36921105bc4988220b35b74aa6b4aee6fa63d0033377bb4c02e77a61637e1d951a0dc4d3cadef13af50edd6d97f06f2211
+DIST maturin-1.10.2-vendor.tar.xz 16239924 BLAKE2B
6561098c0e9c6d42239a53ed01a59d68967df6c26190ea8e35d207ee4631dca9eda588cac8de2f75c47f86f7866d45604bc19e12625fcb6286b2c75dabfda6f6
SHA512
80a588970b93e0cf9f4bca5aa4541bb7aa080c491285fe39cabc8747f2b43f8e7d6cb6bc0b37f24841181bd12a6ba8fe7d0518d5f2dea0f791f0266fda327bde
+DIST maturin-1.10.2.gh.tar.gz 586416 BLAKE2B
a1aa5edcdc40b96149605b4fbe3672a8f7ec69327b42a96915fd8ba55aa4a03798b59db9d228e8df5be195933613080768ade58ca8d393aae2c123508c9d28a0
SHA512
5b14426d8324e48ccce1979ddc6b71a2055b725d090156a5de5b54c598ed2da282da54e25fe5dfe260ab09f4788f4af6235272e266ee62bd6a690ce5476c758a
DIST maturin-1.9.4-vendor.tar.xz 15870760 BLAKE2B
8ea5a26d618fc2698ecf0a264a81d41a28b0e74602dc6004c6a72788c1b5f7e65e9efbc56e2e2b2418f550055ff4510bdb7d77445472da300a495d31a3e84a11
SHA512
901ff4dd5901ea21f6f0ef6c055e58f3592ef651f95c413669f4fabdc009c55a453247866ab23a4ebf4c0a1b987084eeb9719d0f474ec72587bc0fba964958e2
DIST maturin-1.9.4.gh.tar.gz 564039 BLAKE2B
968c3838ba27c358fca2d00c748ecc0b8a19ca4d0c2da61c6b2df9fb1a6387366bf9ff600a3850e9cc866fe1516e4be468f2eb229030a1d85a023e2d59106d02
SHA512
8fb6dcb1d75f47b41b3541b5084fdf3c64f4264b8f254a2767449963cde2f9f8dbef833273d245e87732ebfc8ff61139ef463b18888f422365361fc8fa966fca
DIST maturin-1.9.5-vendor.tar.xz 15793068 BLAKE2B
bf627f4cd57f8eca78090fbe6372678f1c2c21b69fd5482a2fa883c9d02ac351093278b66dbdf64894137deac6a610106f67b396255a394c5bdf5ef50247afca
SHA512
0cf29ccc3a55f9f66bf0e75243d01ffa1a231c2f2be4e07d0f09cec3174a137aaaffbff23d35e9dc978d45c0c9b4a6dd4d2972d7e4970bef055135e91d973273
diff --git
a/dev-util/maturin/files/maturin-1.10.1-libressl-openssl-sys-0.9.110.patch
b/dev-util/maturin/files/maturin-1.10.1-libressl-openssl-sys-0.9.110.patch
new file mode 100644
index 0000000..ecf2710
--- /dev/null
+++ b/dev-util/maturin/files/maturin-1.10.1-libressl-openssl-sys-0.9.110.patch
@@ -0,0 +1,10 @@
+--- a/build/main.rs.orig
++++ b/build/main.rs
+@@ -434,6 +434,7 @@
+ (4, 1, 0) => ('4', '1', '0'),
+ (4, 1, _) => ('4', '1', 'x'),
+ (4, 2, _) => ('4', '2', 'x'),
++ (_, _, _) => ('x', 'x', 'x'),
+ _ => version_error(),
+ };
+
diff --git a/dev-util/maturin/maturin-1.10.1.ebuild
b/dev-util/maturin/maturin-1.10.1.ebuild
new file mode 100644
index 0000000..f840676
--- /dev/null
+++ b/dev-util/maturin/maturin-1.10.1.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_UPSTREAM_PEP517=standalone
+PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
+RUST_MIN_VER=1.83.0
+inherit cargo distutils-r1 flag-o-matic shell-completion toolchain-funcs
+
+DESCRIPTION="Build and publish crates with pyo3, rust-cpython and cffi
bindings"
+HOMEPAGE="https://www.maturin.rs/"
+SRC_URI="
+ https://github.com/PyO3/maturin/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ https://dev.gentoo.org/~ionen/distfiles/${P}-vendor.tar.xz
+"
+# ^ tarball also includes test-crates' Cargo.lock(s) crates for tests
+
+LICENSE="|| ( Apache-2.0 MIT ) doc? ( OFL-1.1 )"
+LICENSE+="
+ 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT MPL-2.0
+ Unicode-3.0 ZLIB BZIP2
+" # crates
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc +ssl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-arch/xz-utils
+ app-arch/zstd:=
+ ssl? ( dev-libs/openssl:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( >=app-text/mdbook-0.5 )
+ test? (
+ $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]'
'python*')
+ dev-python/boltons[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ dev-vcs/git
+ elibc_musl? ( dev-util/patchelf )
+ )
+"
+
+QA_FLAGS_IGNORED="usr/bin/${PN}"
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" ||
die
+}
+
+src_prepare() {
+ eapply_crate openssl-sys-0.9.110
"${FILESDIR}/${PN}-1.10.1-libressl-openssl-sys-0.9.110.patch"
+
+ distutils-r1_src_prepare
+
+ # we build the Rust executable (just once) via cargo_src_compile
+ sed -i -e '/setuptools_rust/d' -e '/rust_extensions/d' setup.py || die
+
+ if use test; then
+ # used to prevent use of network during tests, and silence pip
+ # if it finds unrelated issues with system packages (bug
#913613)
+ cat > "${T}"/pip.conf <<-EOF || die
+ [global]
+ quiet = 2
+
+ [install]
+ no-index = yes
+ no-dependencies = yes
+ EOF
+
+ # uv does not work easily w/ network-sandbox, force virtualenv
+ sed -i 's/"uv"/"uv-not-found"/' tests/common/mod.rs || die
+
+ # increase timeouts for tests (bug #950332)
+ sed -i '/^#\[timeout/s/secs(60)/secs(300)/' tests/run.rs || die
+
+ # used by *git_sdist_generator tests
+ git init -q || die
+ git config --global user.email "[email protected]" || die
+ git config --global user.name "Larry the Cow" || die
+ git add . || die
+ git commit -qm init || die
+ fi
+}
+
+src_configure() {
+ export OPENSSL_NO_VENDOR=1
+ export ZSTD_SYS_USE_PKG_CONFIG=1
+
+ # https://github.com/rust-lang/stacker/issues/79
+ use s390 && ! is-flagq '-march=*' &&
+ append-cflags $(test-flags-CC -march=z10)
+
+ local myfeatures=(
+ # like release.yml + native-tls for better platform support
than rustls
+ full
+ password-storage
+ $(usev ssl native-tls)
+ )
+
+ cargo_src_configure --no-default-features
+}
+
+python_compile_all() {
+ cargo_src_compile
+
+ use !doc || mdbook build -d "${T}"/html guide || die
+
+ if ! tc-is-cross-compiler; then
+ local maturin=$(cargo_target_dir)/maturin
+ "${maturin}" completions bash > "${T}"/${PN} || die
+ "${maturin}" completions fish > "${T}"/${PN}.fish || die
+ "${maturin}" completions zsh > "${T}"/_${PN} || die
+ else
+ ewarn "shell completion files were skipped due to
cross-compilation"
+ fi
+}
+
+python_test() {
+ local -x MATURIN_TEST_PYTHON=${EPYTHON}
+ local -x PIP_CONFIG_FILE=${T}/pip.conf
+ local -x VIRTUALENV_SYSTEM_SITE_PACKAGES=1
+
+ # need this for (new) python versions not yet recognized by pyo3
+ local -x PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
+
+ local skip=(
+ # picky cli output test that easily benignly fail (bug #937992)
+ --skip cli_tests
+ # avoid need for wasm over a single hello world test
+ --skip integration_wasm_hello_world
+ # fragile depending on rust version, also wants libpypy*-c.so
for pypy
+ --skip pyo3_no_extension_module
+ # unimportant tests that require uv, and not obvious to get it
+ # to work with network-sandbox (not worth the trouble)
+ --skip develop_hello_world::case_2
+ --skip develop_pyo3_ffi_pure::case_2
+ # compliance test using zig requires an old libc to pass (bug
#946967)
+ --skip integration_pyo3_mixed_py_subdir
+ # these currently attempt to install tomli regardless of python
version
+ --skip pep517_default_profile
+ --skip pep517_editable_profile
+ )
+
+ cargo_src_test -- "${skip[@]}"
+}
+
+python_install_all() {
+ dobin "$(cargo_target_dir)"/maturin
+
+ dodoc Changelog.md README.md
+ use doc && dodoc -r "${T}"/html
+
+ if ! tc-is-cross-compiler; then
+ dobashcomp "${T}"/${PN}
+ dofishcomp "${T}"/${PN}.fish
+ dozshcomp "${T}"/_${PN}
+ fi
+}
diff --git a/dev-util/maturin/maturin-1.10.2.ebuild
b/dev-util/maturin/maturin-1.10.2.ebuild
new file mode 100644
index 0000000..237994d
--- /dev/null
+++ b/dev-util/maturin/maturin-1.10.2.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_UPSTREAM_PEP517=standalone
+PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
+RUST_MIN_VER=1.83.0
+inherit cargo distutils-r1 flag-o-matic shell-completion toolchain-funcs
+
+DESCRIPTION="Build and publish crates with pyo3, rust-cpython and cffi
bindings"
+HOMEPAGE="https://www.maturin.rs/"
+SRC_URI="
+ https://github.com/PyO3/maturin/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ https://dev.gentoo.org/~ionen/distfiles/${P}-vendor.tar.xz
+"
+# ^ tarball also includes test-crates' Cargo.lock(s) crates for tests
+
+LICENSE="|| ( Apache-2.0 MIT ) doc? ( OFL-1.1 )"
+LICENSE+="
+ 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT MPL-2.0
+ Unicode-3.0 ZLIB BZIP2
+" # crates
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
+IUSE="doc +ssl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-arch/xz-utils
+ app-arch/zstd:=
+ ssl? ( dev-libs/openssl:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( >=app-text/mdbook-0.5 )
+ test? (
+ $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]'
'python*')
+ dev-python/boltons[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ dev-vcs/git
+ elibc_musl? ( dev-util/patchelf )
+ )
+"
+
+QA_FLAGS_IGNORED="usr/bin/${PN}"
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" ||
die
+}
+
+src_prepare() {
+ eapply_crate openssl-sys-0.9.110
"${FILESDIR}/${PN}-1.10.1-libressl-openssl-sys-0.9.110.patch"
+
+ distutils-r1_src_prepare
+
+ # we build the Rust executable (just once) via cargo_src_compile
+ sed -i -e '/setuptools_rust/d' -e '/rust_extensions/d' setup.py || die
+
+ if use test; then
+ # used to prevent use of network during tests, and silence pip
+ # if it finds unrelated issues with system packages (bug
#913613)
+ cat > "${T}"/pip.conf <<-EOF || die
+ [global]
+ quiet = 2
+
+ [install]
+ no-index = yes
+ no-dependencies = yes
+ EOF
+
+ # uv does not work easily w/ network-sandbox, force virtualenv
+ sed -i 's/"uv"/"uv-not-found"/' tests/common/mod.rs || die
+
+ # increase timeouts for tests (bug #950332)
+ sed -i '/^#\[timeout/s/secs(60)/secs(300)/' tests/run.rs || die
+
+ # used by *git_sdist_generator tests
+ git init -q || die
+ git config --global user.email "[email protected]" || die
+ git config --global user.name "Larry the Cow" || die
+ git add . || die
+ git commit -qm init || die
+ fi
+}
+
+src_configure() {
+ export OPENSSL_NO_VENDOR=1
+ export ZSTD_SYS_USE_PKG_CONFIG=1
+
+ # https://github.com/rust-lang/stacker/issues/79
+ use s390 && ! is-flagq '-march=*' &&
+ append-cflags $(test-flags-CC -march=z10)
+
+ local myfeatures=(
+ # like release.yml + native-tls for better platform support
than rustls
+ full
+ password-storage
+ $(usev ssl native-tls)
+ )
+
+ cargo_src_configure --no-default-features
+}
+
+python_compile_all() {
+ cargo_src_compile
+
+ use !doc || mdbook build -d "${T}"/html guide || die
+
+ if ! tc-is-cross-compiler; then
+ local maturin=$(cargo_target_dir)/maturin
+ "${maturin}" completions bash > "${T}"/${PN} || die
+ "${maturin}" completions fish > "${T}"/${PN}.fish || die
+ "${maturin}" completions zsh > "${T}"/_${PN} || die
+ else
+ ewarn "shell completion files were skipped due to
cross-compilation"
+ fi
+}
+
+python_test() {
+ local -x MATURIN_TEST_PYTHON=${EPYTHON}
+ local -x PIP_CONFIG_FILE=${T}/pip.conf
+ local -x VIRTUALENV_SYSTEM_SITE_PACKAGES=1
+
+ # need this for (new) python versions not yet recognized by pyo3
+ local -x PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
+
+ local skip=(
+ # picky cli output test that easily benignly fail (bug #937992)
+ --skip cli_tests
+ # avoid need for wasm over a single hello world test
+ --skip integration_wasm_hello_world
+ # fragile depending on rust version, also wants libpypy*-c.so
for pypy
+ --skip pyo3_no_extension_module
+ # unimportant tests that require uv, and not obvious to get it
+ # to work with network-sandbox (not worth the trouble)
+ --skip develop_hello_world::case_2
+ --skip develop_pyo3_ffi_pure::case_2
+ # compliance test using zig requires an old libc to pass (bug
#946967)
+ --skip integration_pyo3_mixed_py_subdir
+ # these currently attempt to install tomli regardless of python
version
+ --skip pep517_default_profile
+ --skip pep517_editable_profile
+ )
+
+ cargo_src_test -- "${skip[@]}"
+}
+
+python_install_all() {
+ dobin "$(cargo_target_dir)"/maturin
+
+ dodoc Changelog.md README.md
+ use doc && dodoc -r "${T}"/html
+
+ if ! tc-is-cross-compiler; then
+ dobashcomp "${T}"/${PN}
+ dofishcomp "${T}"/${PN}.fish
+ dozshcomp "${T}"/_${PN}
+ fi
+}