summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-11-12 13:05:29 -0500
committerMike Gilbert <floppym@gentoo.org>2024-11-12 13:21:47 -0500
commita39e1b86cf935e9015b67af6b4ebef3ae68e40c8 (patch)
tree24043246062e1e1fe97e4ce0d227bfee47ccfc28 /sys-kernel/dracut
parentdev-db/mariadb: update comment (diff)
downloadgentoo-a39e1b86cf935e9015b67af6b4ebef3ae68e40c8.tar.gz
gentoo-a39e1b86cf935e9015b67af6b4ebef3ae68e40c8.tar.bz2
gentoo-a39e1b86cf935e9015b67af6b4ebef3ae68e40c8.zip
sys-kernel/dracut: use cargo.eclass
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r--sys-kernel/dracut/dracut-9999.ebuild25
1 files 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() {