diff options
author | Matt Jolly <kangie@gentoo.org> | 2024-11-04 17:24:14 +1000 |
---|---|---|
committer | Matt Jolly <kangie@gentoo.org> | 2024-11-09 16:25:41 +1000 |
commit | 01ba4dc61965ef7658a24728841c04c9a1ce4871 (patch) | |
tree | a2a6b927779e5990ff87ec4589373d1d89129a63 /net-nds | |
parent | profiles: mask dev-lang/starlark-rust (diff) | |
download | gentoo-01ba4dc61965ef7658a24728841c04c9a1ce4871.tar.gz gentoo-01ba4dc61965ef7658a24728841c04c9a1ce4871.tar.bz2 gentoo-01ba4dc61965ef7658a24728841c04c9a1ce4871.zip |
*/*: update for slotted Rust
Tidyups:
- $(cargo_crate_uris)
- Rust BDEPENDS come from the eclass except in very rare
circumstances (RUST_OPTIONAL=1)
- RUST_M{AX,IN}_VER where required.
- Suboptimal crate separator (`-` -> `@`)
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/39218
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'net-nds')
-rw-r--r-- | net-nds/389-ds-base/389-ds-base-3.0.2-r1.ebuild (renamed from net-nds/389-ds-base/389-ds-base-3.0.2.ebuild) | 9 | ||||
-rw-r--r-- | net-nds/389-ds-base/files/389-ds-base-3.0.2-fix-rust-in-configure.patch | 34 |
2 files changed, 42 insertions, 1 deletions
diff --git a/net-nds/389-ds-base/389-ds-base-3.0.2.ebuild b/net-nds/389-ds-base/389-ds-base-3.0.2-r1.ebuild index 5a5199ac853f..cb81c3d6e77f 100644 --- a/net-nds/389-ds-base/389-ds-base-3.0.2.ebuild +++ b/net-nds/389-ds-base/389-ds-base-3.0.2-r1.ebuild @@ -112,6 +112,8 @@ PYTHON_COMPAT=( python3_{10..12} ) DISTUTILS_SINGLE_IMPL=1 DISTUTILS_USE_PEP517=setuptools +RUST_MAX_VER="1.77.1" + inherit autotools cargo distutils-r1 readme.gentoo-r1 systemd tmpfiles DESCRIPTION="389 Directory Server (core libraries and daemons)" @@ -166,7 +168,6 @@ DEPEND=" BDEPEND=">=dev-build/autoconf-2.69-r5 virtual/pkgconfig - >=virtual/rust-1.70 ${PYTHON_DEPS} $(python_gen_cond_dep ' dev-python/argparse-manpage[${PYTHON_USEDEP}] @@ -202,10 +203,16 @@ RDEPEND="${DEPEND} PATCHES=( "${FILESDIR}/${PN}-db-gentoo.patch" + "${FILESDIR}/${PN}-3.0.2-fix-rust-in-configure.patch" ) distutils_enable_tests pytest +pkg_setup() { + python-single-r1_pkg_setup + rust_pkg_setup +} + src_prepare() { # https://github.com/389ds/389-ds-base/issues/4292 if use !systemd; then diff --git a/net-nds/389-ds-base/files/389-ds-base-3.0.2-fix-rust-in-configure.patch b/net-nds/389-ds-base/files/389-ds-base-3.0.2-fix-rust-in-configure.patch new file mode 100644 index 000000000000..fef1496e52af --- /dev/null +++ b/net-nds/389-ds-base/files/389-ds-base-3.0.2-fix-rust-in-configure.patch @@ -0,0 +1,34 @@ +From 28d4871c5844b41d63a5cbc093b4453c98d5427e Mon Sep 17 00:00:00 2001 +From: Matt Jolly <kangie@gentoo.org> +Date: Thu, 7 Nov 2024 20:08:44 +1000 +Subject: [PATCH] Fix rust in configure + +RUSTC and CARGO are standard variables that are often used to indicate +the desired implementation to build systems. + +Prefix existing usage of these variables with `HAS_` so that this +does not just break +--- a/configure.ac ++++ b/configure.ac +@@ -95,10 +95,10 @@ AS_IF([test "$enable_rust_offline" = yes], + [rust_vendor_sources=""]) + AC_SUBST([rust_vendor_sources]) + if test "$enable_rust_offline" = yes; then +- AC_CHECK_PROG(CARGO, [cargo], [yes], [no]) +- AC_CHECK_PROG(RUSTC, [rustc], [yes], [no]) ++ AC_CHECK_PROG(HAS_CARGO, [cargo], [yes], [no]) ++ AC_CHECK_PROG(HAS_RUSTC, [rustc], [yes], [no]) + +- AS_IF([test "$CARGO" != "yes" -o "$RUSTC" != "yes"], [ ++ AS_IF([test "$HAS_CARGO" != "yes" -o "$HAS_RUSTC" != "yes"], [ + AC_MSG_FAILURE("Rust based plugins cannot be built cargo=$CARGO rustc=$RUSTC") + ]) + fi +@@ -944,4 +944,3 @@ AC_CONFIG_FILES([Makefile rpm/389-ds-base.spec ]) + AC_CONFIG_FILES([.cargo/config]) + + AC_OUTPUT +- +-- +2.47.0 + |