diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-06-08 13:25:59 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-06-08 13:25:59 -0400 |
commit | 7702b49add12ca5b5f6508bc5416f2a780ade761 (patch) | |
tree | 74663341480d4b835e4372746fe058aae1bc2e13 /sys-apps/systemd-utils | |
parent | virtual/imagemagick-tools: add 1, drop 0-r3 (diff) | |
download | gentoo-7702b49add12ca5b5f6508bc5416f2a780ade761.tar.gz gentoo-7702b49add12ca5b5f6508bc5416f2a780ade761.tar.bz2 gentoo-7702b49add12ca5b5f6508bc5416f2a780ade761.zip |
sys-apps/systemd-utils: fix build on arches without DMI
At least according to systemd upstream.
Closes: https://bugs.gentoo.org/933834
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps/systemd-utils')
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild index 48965c8945a6..ce13e54935e2 100644 --- a/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild @@ -254,6 +254,15 @@ multilib_src_configure() { fi } +have_dmi() { + # see dmi_arches in meson.build + case ${CHOST} in + aarch64*|arm*|ia64*|i?86*|loongarch64*|mips*|x86_64*) + return 0 ;; + esac + return 1 +} + multilib_src_compile() { local targets=() optional_targets=() if multilib_is_native_abi; then @@ -327,7 +336,6 @@ multilib_src_compile() { systemd-hwdb ata_id cdrom_id - dmi_memory_id fido_id iocost mtd_probe @@ -360,6 +368,9 @@ multilib_src_compile() { # Needed for tests rules.d/99-systemd.rules ) + if have_dmi; then + targets+=( dmi_memory_id ) + fi if use test; then targets+=( test-fido-id-desc @@ -475,8 +486,13 @@ multilib_src_install() { dosym ../../bin/udevadm /usr/lib/systemd/systemd-udevd exeinto /usr/lib/udev - set_rpath {ata_id,cdrom_id,dmi_memory_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} - doexe {ata_id,cdrom_id,dmi_memory_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + set_rpath {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + doexe {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + + if have_dmi; then + set_rpath dmi_memory_id + doexe dmi_memory_id + fi rm -f rules.d/99-systemd.rules insinto /usr/lib/udev/rules.d |