summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2020-06-08 15:06:58 +0000
committerJan Beich <jbeich@FreeBSD.org>2020-06-08 15:06:58 +0000
commitb460e08f936590cd10b51f35bafcab0df1063386 (patch)
tree066b1b0409b12a622d0cad3599a8a65e15c59e42
parentgraphics/mesa-devel: enable NLS support (diff)
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
-rw-r--r--graphics/mesa-devel/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/mesa-devel/Makefile b/graphics/mesa-devel/Makefile
index aced15124ad1..f51ca35e44e7 100644
--- a/graphics/mesa-devel/Makefile
+++ b/graphics/mesa-devel/Makefile
@@ -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}
@@ -131,6 +132,15 @@ 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
@${REINPLACE_CMD} '/MESA_GIT_SHA1/s/""/" (git-${DISTVERSIONSUFFIX:C/.*-g//})"/' \