From: Ola x Nilsson <ola.x.nilsson@axis.com>
To: openembedded-core@lists.openembedded.org
Cc: olani@axis.com
Subject: [PATCH] alsa-utils: Install and delete from the same udev-rules-dir
Date: Thu, 21 Sep 2017 16:56:14 +0200 [thread overview]
Message-ID: <20170921145614.8579-1-olani@axis.com> (raw)
The --with-udev-rules-dir option used with udev is exactly what the
configure script uses, so there is no need for it.
On the other hand, if we do not have an udev.pc file we should tell
alsa-utils where to install the rules so we know where they should be
deleted from.
Signed-off-by: Ola x Nilsson <olani@axis.com>
---
meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
index c8f4b861bd..7fc6c29a61 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
@@ -9,14 +9,17 @@ DEPENDS = "alsa-lib ncurses libsamplerate0"
PACKAGECONFIG ??= "udev"
+udevdir = "${nonarch_base_libdir}/udev"
+
# alsabat can be built also without fftw support (with reduced functionality).
# It would be better to always enable alsabat, but provide an option for
# enabling/disabling fftw. The configure script doesn't support that, however
# (at least in any obvious way), so for now we only support alsabat with fftw
# or no alsabat at all.
PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
-
-PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
+# The udev-rules dir is taken from udev.pc. Set the dir explicitly
+# when udev is not in our DEPENDS.
+PACKAGECONFIG[udev] = ",--with-udev-rules-dir=${udevdir}/rules.d,udev"
PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
@@ -101,9 +104,13 @@ do_install() {
rm ${D}${sbindir}/alsa-info.sh
rm -f ${D}${sbindir}/alsabat-test.sh
- if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
- # This is where alsa-utils will install its rules if we don't tell it anything else.
- rm -rf ${D}${nonarch_base_libdir}/udev
- rmdir --ignore-fail-on-non-empty ${D}${nonarch_base_libdir}
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'udev', d)}" ]; then
+ # This is where alsa-utils installs if there is an udev.pc file
+ udevdir=$(pkg-config --variable=udevdir udev)
+ else
+ # This is where we told alsa-utils to install the rules
+ udevdir=${udevdir}
fi
+ rm -rf ${D}$udevdir
+ rmdir --ignore-fail-on-non-empty ${D}${udevdir%/*}
}
--
2.11.0
next reply other threads:[~2017-09-21 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 14:56 Ola x Nilsson [this message]
2017-09-21 15:54 ` [PATCH] alsa-utils: Install and delete from the same udev-rules-dir Tanu Kaskinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170921145614.8579-1-olani@axis.com \
--to=ola.x.nilsson@axis.com \
--cc=olani@axis.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox