git: 45aa2de4b040 - main - sysutils/passwordsafe: switch back to using clang on powerpc*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 25 Apr 2022 14:28:28 UTC
The branch main has been updated by pkubaj:

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

commit 45aa2de4b04085836d30fe525f3556830fd13e44
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-04-25 14:12:54 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-04-25 14:12:54 +0000

    sysutils/passwordsafe: switch back to using clang on powerpc*
---
 sysutils/passwordsafe/Makefile                          | 10 +---------
 sysutils/passwordsafe/files/patch-src_core_ItemData.cpp | 11 +++++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/sysutils/passwordsafe/Makefile b/sysutils/passwordsafe/Makefile
index 7ee3a35c0bdd..ddcf407bd37a 100644
--- a/sysutils/passwordsafe/Makefile
+++ b/sysutils/passwordsafe/Makefile
@@ -19,7 +19,7 @@ BUILD_DEPENDS=	zip:archivers/zip
 
 CONFLICTS=	pwsafe
 
-USES=		gmake pkgconfig xorg
+USES=		compiler:c++11-lang gmake pkgconfig xorg
 USE_GITHUB=	yes
 USE_WX=		3.0+
 USE_XORG=	x11 xtst
@@ -44,14 +44,6 @@ LDFLAGS=	-L${PREFIX}/lib -lqrencode
 
 ALL_TARGET=	unicoderelease
 
-.include <bsd.port.options.mk>
-
-.if (defined(PPC_ABI) && ${PPC_ABI} == ELFv2) || ${ARCH} == powerpc
-USES+=		compiler:gcc-c++11-lib
-.else
-USES+=		compiler:c++11-lang
-.endif
-
 post-patch:
 .	for f in Makefile.freebsd help/Makefile.freebsd src/os/unix/Makefile \
 		src/os/unix/dir.cpp src/ui/wxWidgets/Makefile
diff --git a/sysutils/passwordsafe/files/patch-src_core_ItemData.cpp b/sysutils/passwordsafe/files/patch-src_core_ItemData.cpp
new file mode 100644
index 000000000000..e60bc7f24d0f
--- /dev/null
+++ b/sysutils/passwordsafe/files/patch-src_core_ItemData.cpp
@@ -0,0 +1,11 @@
+--- src/core/ItemData.cpp.orig	2022-04-25 06:47:08 UTC
++++ src/core/ItemData.cpp
+@@ -1940,6 +1940,7 @@ bool CItemData::DeSerializePlainText(const std::vector
+ 
+ #ifdef PWS_BIG_ENDIAN
+-    unsigned char buf[len] = {0};
++    unsigned char buf[len];
++    memset(buf, 0, len*sizeof(char));
+ 
+     switch(type) {
+       case CTIME: