From patchwork Fri Aug 10 21:46:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 956483 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41nJc43vRRz9s47 for ; Sat, 11 Aug 2018 07:46:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5CBA188129; Fri, 10 Aug 2018 21:46:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wsdnwtl0PfJI; Fri, 10 Aug 2018 21:46:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C83FE88085; Fri, 10 Aug 2018 21:46:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 757411BFC4A for ; Fri, 10 Aug 2018 21:46:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 72B168714D for ; Fri, 10 Aug 2018 21:46:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5VrJaIZFfB8l for ; Fri, 10 Aug 2018 21:46:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by fraxinus.osuosl.org (Postfix) with ESMTP id D95BA86B89 for ; Fri, 10 Aug 2018 21:46:37 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id 1DE9D20739; Fri, 10 Aug 2018 23:46:35 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.bootlin.com (Postfix) with ESMTPSA id BAEA32069C; Fri, 10 Aug 2018 23:46:34 +0200 (CEST) From: Thomas Petazzoni To: "Arnout Vandecappelle (Essensium/Mind)" , "Yann E. MORIN" , Ricardo Martincoski , Buildroot List Date: Fri, 10 Aug 2018 23:46:32 +0200 Message-Id: <20180810214632.21735-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.4 Subject: [Buildroot] [PATCH] mesa3d-headers: fix logic to generate the dri.pc file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" As noted by Arnout in [1], the logic in mesa3d-headers.mk generates a bogus dri.pc file, which looks like this: prefix=/usr exec_prefix=/usr libdir=/lib includedir=/include dridriverdir=/dri Indeed, the ${...} are expanded as shell variables when the sed command is executed, while the intention is that those ${...} should go in the .pc file. By escaping those using $${...}, we get the expected .pc file: prefix=/usr exec_prefix=/usr libdir=${exec_prefix}/lib includedir=${prefix}/include dridriverdir=${libdir}/dri This was detected by the not yet committed check-package improvement from Ricardo that detects bogus ${...} usage to reference make variables. [1] http://lists.busybox.net/pipermail/buildroot/2018-July/225402.html Signed-off-by: Thomas Petazzoni Acked-by: "Yann E. MORIN" --- package/mesa3d-headers/mesa3d-headers.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk index de8a9dc7cf..fc88f0ed60 100644 --- a/package/mesa3d-headers/mesa3d-headers.mk +++ b/package/mesa3d-headers/mesa3d-headers.mk @@ -35,9 +35,9 @@ ifeq ($(BR2_PACKAGE_XORG7),y) # contains -i. define MESA3D_HEADERS_BUILD_DRI_PC sed -e 's:@\(exec_\)\?prefix@:/usr:' \ - -e 's:@libdir@:${exec_prefix}/lib:' \ - -e 's:@includedir@:${prefix}/include:' \ - -e 's:@DRI_DRIVER_INSTALL_DIR@:${libdir}/dri:' \ + -e 's:@libdir@:$${exec_prefix}/lib:' \ + -e 's:@includedir@:$${prefix}/include:' \ + -e 's:@DRI_DRIVER_INSTALL_DIR@:$${libdir}/dri:' \ -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \ -e 's:@DRI_PC_REQ_PRIV@::' \ $(@D)/src/mesa/drivers/dri/dri.pc.in \