Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2020 15:06:58 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r538222 - head/graphics/mesa-devel
Message-ID:  <202006081506.058F6w2j043129@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Jun  8 15:06:58 2020
New Revision: 538222
URL: https://svnweb.freebsd.org/changeset/ports/538222

Log:
  graphics/mesa-devel: hook BINARY_ALIAS into --native-file
  
  Meson probes FreeBSD suffixes[1] for llvm-config but ends up selecting
  the last match instead of the unsuffixed version. Given BINARY_ALIAS
  is not respected this breaks dependency tracking. So, help Meson find
  the correct tool by translating into its own aliasing facility.
  
  [1] https://github.com/mesonbuild/meson/blob/0.54.2/mesonbuild/environment.py#L185-L198

Modified:
  head/graphics/mesa-devel/Makefile   (contents, props changed)

Modified: head/graphics/mesa-devel/Makefile
==============================================================================
--- head/graphics/mesa-devel/Makefile	Mon Jun  8 15:06:52 2020	(r538221)
+++ head/graphics/mesa-devel/Makefile	Mon Jun  8 15:06:58 2020	(r538222)
@@ -56,6 +56,7 @@ MESON_ARGS=	-Dgallium-omx=disabled \
 		-Dgallium-xvmc=disabled \
 		-Dplatforms=${PLATFORMS:ts,} \
 		${PKGNAMESUFFIX:S/^/-Degl-lib-suffix=/} \
+		${BINARY_ALIAS:D--native-file=binary_alias.ini} \
 		${NULL}
 SUB_FILES=	libmap.conf
 SUB_LIST=	PKGNAMESUFFIX=${PKGNAMESUFFIX}
@@ -130,6 +131,15 @@ X11_MESON_OFF=		-Dglx=disabled
 ZSTD_DESC=		Use ZSTD for shader cache
 ZSTD_LIB_DEPENDS=	libzstd.so:archivers/zstd
 ZSTD_MESON_ENABLED=	zstd
+
+post-extract:
+# Work around Meson lookup order e.g., llvm-config
+.if defined(BINARY_ALIAS)
+	@${ECHO_CMD} '[binaries]' >${WRKSRC}/binary_alias.ini
+	@for f in ${BINARY_ALIAS}; do \
+		${ECHO_CMD} "$${f%%=*} = '$${f#*=}'"; \
+	done >>${WRKSRC}/binary_alias.ini
+.endif
 
 post-patch:
 # Extract (snapshot) version from the port instead of empty string



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006081506.058F6w2j043129>