From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 15 Aug 2024 13:58:19 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1seZ7T-009rQT-0g for lore@lore.pengutronix.de; Thu, 15 Aug 2024 13:58:19 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1seZ7S-0003FJ-1I; Thu, 15 Aug 2024 13:58:18 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1seZ6X-0002yD-7w; Thu, 15 Aug 2024 13:57:21 +0200 From: Philipp Zabel To: ptxdist@pengutronix.de Date: Thu, 15 Aug 2024 13:56:15 +0200 Message-Id: <20240815115615.2745801-3-p.zabel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240815115615.2745801-1-p.zabel@pengutronix.de> References: <20240815115615.2745801-1-p.zabel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH 3/3] mesalib: read libgallium version from VERSION file 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: Philipp Zabel 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Use the version from the VERSION file to determine the libgallium file name. Fall back to using MESALIB_VERSION if the sources are not present. When building from git, the VERSION file may contain a version in the form 24.3.0-devel, which is likely different from MESALIB_VERSION. The build system determines the libgallium file name from the VERSION file, so we should do the same. This fixes targetinstall for git builds, e.g. when using local-src. For release tarballs, the VERSION file content and MESALIB_VERSION are identical. Signed-off-by: Philipp Zabel --- rules/mesalib.make | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rules/mesalib.make b/rules/mesalib.make index c62a0802f0a0..ca1fc6b992b8 100644 --- a/rules/mesalib.make +++ b/rules/mesalib.make @@ -267,6 +267,10 @@ $(STATEDIR)/mesalib.compile: # Target-Install # ---------------------------------------------------------------------------- +# read libgallium version from file, fall back to package version +MESALIB_LIBGALLIUM_VERSION := \ + $(if $(wildcard $(MESALIB_DIR)/VERSION),$(file <$(MESALIB_DIR)/VERSION),$(MESALIB_VERSION)) + $(STATEDIR)/mesalib.targetinstall: @$(call targetinfo) @@ -277,7 +281,8 @@ $(STATEDIR)/mesalib.targetinstall: @$(call install_fixup, mesalib,DESCRIPTION,missing) ifneq ($(strip $(MESALIB_DRI_GALLIUM_LIBS-y)),) - @$(call install_copy, mesalib, 0, 0, 0644, -, /usr/lib/libgallium-$(MESALIB_VERSION).so) + @$(call install_copy, mesalib, 0, 0, 0644, -, \ + /usr/lib/libgallium-$(MESALIB_LIBGALLIUM_VERSION).so) ifdef PTXCONF_MESALIB_EGL_X11 @$(call install_copy, mesalib, 0, 0, 0644, -, /usr/lib/dri/libdril_dri.so) -- 2.39.2