From: Michael Tretter <m.tretter@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Michael Tretter <m.tretter@pengutronix.de>
Subject: [ptxdist] [PATCH] pkg-config-wrapper: remove sysroot only from specified variables
Date: Tue, 8 Oct 2019 11:58:24 +0200 [thread overview]
Message-ID: <20191008095824.26923-1-m.tretter@pengutronix.de> (raw)
The PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT variable allows to specify
pkg-config variable that shall be relative to the target rootfs and not
contain the sysroot path. This is important for variables that are used
for writing files to the target rootfs, e.g., systemduserunitdir.
Currently, the sysroot is removed from all pkg-config variables, if
PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT is set, but packages already specify
the name of the variable that must not include the sysroot.
Add a check to remove the sysroot only from variables that are actually
contained in PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
scripts/pkg-config-wrapper | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper
index d9e111d6c..79018c63c 100755
--- a/scripts/pkg-config-wrapper
+++ b/scripts/pkg-config-wrapper
@@ -41,7 +41,7 @@ IFS="${orig_IFS}"
for ((i = 1; i <= ${#}; i++)); do
case "${!i}" in
--variable*)
- found_var=true
+ found_var=${!i#"--variable="}
break
;;
*)
@@ -61,8 +61,8 @@ args=( \
"-e" "s~/lib/pkgconfig/\.\./\.\.~~g" \
)
-if [ -n "${PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT}" -a \
- -n "${found_var}" ]; then
+if [ -n "${found_var}" -a \
+ "${PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT#*${found_var}}" != "${PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT}" ]; then
#
# remove sysroot for variables that return a path
#
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
reply other threads:[~2019-10-08 9:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191008095824.26923-1-m.tretter@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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