git: b22e9186a457 - main - net-im/nchat: fix pkg-plist on powerpc / powerpc64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 31 Dec 2025 21:52:55 UTC
The branch main has been updated by pkubaj:

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

commit b22e9186a457f921b49758a83fbc9c9fbfe7bd03
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-12-31 19:04:33 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-12-31 21:52:51 +0000

    net-im/nchat: fix pkg-plist on powerpc / powerpc64
    
    CMake Warning at CMakeLists.txt:104 (message):
      Telegram requires little endian, auto-disabling.
---
 net-im/nchat/Makefile  | 8 ++++++++
 net-im/nchat/pkg-plist | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/net-im/nchat/Makefile b/net-im/nchat/Makefile
index f6882ae82149..305462827fbf 100644
--- a/net-im/nchat/Makefile
+++ b/net-im/nchat/Makefile
@@ -30,6 +30,14 @@ CMAKE_ARGS+=	-DCLIP_X11_WITH_PNG=OFF \
 
 SHEBANG_FILES=	src/compose
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc || ${ARCH} == powerpc64
+PLIST_SUB+=	LITTLE_ENDIAN="@comment "
+.else
+PLIST_SUB+=	LITTLE_ENDIAN=""
+.endif
+
 post-install:
 	(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s libtgchat.so libtgchat)
 
diff --git a/net-im/nchat/pkg-plist b/net-im/nchat/pkg-plist
index 28787105f055..bec48a956960 100644
--- a/net-im/nchat/pkg-plist
+++ b/net-im/nchat/pkg-plist
@@ -1,9 +1,9 @@
 bin/nchat
 lib/libduchat.so
 lib/libncutil.so
-lib/libtdclientshared.so
+%%LITTLE_ENDIAN%%lib/libtdclientshared.so
 lib/libtgchat
-lib/libtgchat.so
+%%LITTLE_ENDIAN%%lib/libtgchat.so
 libexec/nchat/compose
 share/man/man1/nchat.1.gz
 %%DATADIR%%/themes/basic-color/color.conf