From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AFCF3158042 for ; Tue, 12 Nov 2024 18:22:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 06C2DE07EF; Tue, 12 Nov 2024 18:22:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E581DE07EF for ; Tue, 12 Nov 2024 18:22:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3804E341256 for ; Tue, 12 Nov 2024 18:22:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C91D4AED for ; Tue, 12 Nov 2024 18:22:38 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1731435707.a39e1b86cf935e9015b67af6b4ebef3ae68e40c8.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/dracut/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/dracut/dracut-9999.ebuild X-VCS-Directories: sys-kernel/dracut/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: a39e1b86cf935e9015b67af6b4ebef3ae68e40c8 X-VCS-Branch: master Date: Tue, 12 Nov 2024 18:22:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 188235f4-b07a-471f-aacc-1edebff6488b X-Archives-Hash: 2ca7a39ecd9ad43b4ca507b14372a9fb commit: a39e1b86cf935e9015b67af6b4ebef3ae68e40c8 Author: Mike Gilbert gentoo org> AuthorDate: Tue Nov 12 18:05:29 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Tue Nov 12 18:21:47 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a39e1b86 sys-kernel/dracut: use cargo.eclass Signed-off-by: Mike Gilbert gentoo.org> sys-kernel/dracut/dracut-9999.ebuild | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/sys-kernel/dracut/dracut-9999.ebuild b/sys-kernel/dracut/dracut-9999.ebuild index 81b6b6982597..40da9319cb51 100644 --- a/sys-kernel/dracut/dracut-9999.ebuild +++ b/sys-kernel/dracut/dracut-9999.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 -RUST_OPTIONAL=1 +CARGO_OPTIONAL=1 -inherit flag-o-matic bash-completion-r1 edo optfeature rust systemd toolchain-funcs +inherit cargo flag-o-matic bash-completion-r1 edo optfeature systemd toolchain-funcs if [[ ${PV} == 9999 ]] ; then inherit git-r3 @@ -51,7 +51,6 @@ RDEPEND=" " DEPEND=" >=sys-apps/kmod-23 - dracut-cpio? ( ${RUST_DEPEND} ) elibc_musl? ( sys-libs/fts-standalone ) " @@ -61,6 +60,7 @@ BDEPEND=" >=app-text/docbook-xsl-stylesheets-1.75.2 >=dev-libs/libxslt-1.1.26 virtual/pkgconfig + dracut-cpio? ( ${RUST_DEPEND} ) test? ( net-nds/rpcbind net-fs/nfs-utils @@ -113,7 +113,7 @@ src_configure() { --sysconfdir="${EPREFIX}/etc" --bashcompletiondir="$(get_bashcompdir)" --systemdsystemunitdir="$(systemd_get_systemunitdir)" - $(use_enable dracut-cpio) + --disable-dracut-cpio ) # this emulates what the build system would be doing without us @@ -122,6 +122,19 @@ src_configure() { tc-export CC PKG_CONFIG edo ./configure "${myconf[@]}" + if use dracut-cpio; then + cargo_gen_config + cargo_src_configure + fi +} + +src_compile() { + default + if use dracut-cpio; then + pushd src/dracut-cpio >/dev/null || die + cargo_src_compile + popd >/dev/null || die + fi } src_test() { @@ -149,6 +162,10 @@ src_install() { README.md ) default + if use dracut-cpio; then + exeinto /usr/lib/dracut + doexe "src/dracut-cpio/$(cargo_target_dir)/dracut-cpio" + fi } pkg_preinst() {