From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 07 May 2021 09:16:30 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1leuis-0003zi-Mm for lore@lore.pengutronix.de; Fri, 07 May 2021 09:16:30 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1leuis-0002Bo-2T; Fri, 07 May 2021 09:16:30 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1leuiL-0002BM-J0; Fri, 07 May 2021 09:15:57 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1leuiK-0002Jf-V3; Fri, 07 May 2021 09:15:56 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1leuiK-00GdVw-Rd; Fri, 07 May 2021 09:15:56 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 7 May 2021 09:15:53 +0200 Message-Id: <20210507071553.3964996-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <73cafc96-554f-4e33-93ac-79bee71f1101@t2data.com> References: <73cafc96-554f-4e33-93ac-79bee71f1101@t2data.com> MIME-Version: 1.0 Subject: [ptxdist] [PATCH] pkg-config-wrapper: calculate the system paths dynamically as well X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Christian Melki , Michael Olbrich Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Signed-off-by: Michael Olbrich --- Would this work? Or do we need to exclude /usr/lib explicitly as well? Michael scripts/pkg-config-wrapper | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper index d86fa7c683b5..dd786e47b212 100755 --- a/scripts/pkg-config-wrapper +++ b/scripts/pkg-config-wrapper @@ -17,9 +17,11 @@ else fi declare -a libdir system_path system_incpath -libdir=( $(find ${prefix} -maxdepth 3 -type d -name pkgconfig) ) -system_libpath=( "${libdir[@]/%//../../lib}" "${libdir[@]/%//../lib}" "/usr/lib" "/lib" ) -system_incpath=( "${libdir[@]/%//../../include}" "${libdir[@]/%//../include}" "/usr/include" "/include" ) +libdir=( $(find ${prefix} -maxdepth 3 -type d -path */lib*/pkgconfig) ) +lib="$(basename $(dirname ${libdir[0]}))" +libdir+=( "${prefix/%//share/pkgconfig}" ) +system_libpath=( "${libdir[@]/%//../../${lib}}" "/usr/${lib}" "/${lib}" ) +system_incpath=( "${libdir[@]/%//../../include}" "/usr/include" "/include" ) orig_IFS="${IFS}" IFS=":" -- 2.29.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de