git: fee1186d0a41 - main - devel/libmustache: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 22 Oct 2026 12:15:26 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fee1186d0a41cf94c03f1a46d89b2668e8ce5f14

commit fee1186d0a41cf94c03f1a46d89b2668e8ce5f14
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-20 02:09:52 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-22 12:13:46 +0000

    devel/libmustache: fix build on powerpc64*
    
    Thread sanitizer is not available there, and archived-template support,
    the only user of xxHash, requires a little-endian target.
---
 devel/libmustache/Makefile | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/devel/libmustache/Makefile b/devel/libmustache/Makefile
index daffe853bc49..5e49280e5c51 100644
--- a/devel/libmustache/Makefile
+++ b/devel/libmustache/Makefile
@@ -10,13 +10,10 @@ WWW=		https://github.com/jbboehr/libmustache
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-LIB_DEPENDS=	libxxhash.so:devel/xxhash
-
 USES=		autoreconf compiler:c++17-lang libtool localbase pkgconfig
 
 CONFIGURE_ARGS=	--enable-thread-sanitizer \
 		--with-system-cista=no \
-		--with-system-xxhash=yes \
 		--without-mustache-spec
 GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
@@ -37,6 +34,22 @@ YAML_CONFIGURE_OFF=	--with-yaml=no
 YAML_CONFIGURE_ON=	--with-yaml=yes
 YAML_LIB_DEPENDS=	libyaml.so:textproc/libyaml
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH:Mpowerpc64*}
+# TSan is not supported on FreeBSD/powerpc64*
+CONFIGURE_ARGS+=	--disable-thread-sanitizer
+.endif
+
+.if ${ARCH} == powerpc64
+# archived-template support, the only user of xxHash, requires a little-endian
+# target
+CONFIGURE_ARGS+=	--with-system-xxhash=no
+.else
+LIB_DEPENDS+=	libxxhash.so:devel/xxhash
+CONFIGURE_ARGS+=	--with-system-xxhash=yes
+.endif
+
 post-patch:
 # Clean up bundled libraries
 	@${RM} -r ${WRKSRC}/vendor/xxhash/