git: 35ae9b658f40 - main - net-mgmt/darkstat: fix build on powerpc64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sun, 07 Nov 2021 12:19:38 UTC
The branch main has been updated by pkubaj:

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

commit 35ae9b658f401874e0b088fc42a3171ab544fd76
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-11-07 12:14:53 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-11-07 12:14:53 +0000

    net-mgmt/darkstat: fix build on powerpc64
    
    LTO is broken on powerpc64:
    cc -flto -pipe -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing static/c-ify.c -o c-ify
    ./c-ify style_css <static/style.css >stylecss.h
    *** Signal 11
---
 net-mgmt/darkstat/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net-mgmt/darkstat/Makefile b/net-mgmt/darkstat/Makefile
index 33ffa06a5055..234ca47aa347 100644
--- a/net-mgmt/darkstat/Makefile
+++ b/net-mgmt/darkstat/Makefile
@@ -21,6 +21,12 @@ PLIST_FILES=	sbin/darkstat man/man8/darkstat.8.gz
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc64
+USES+=		compiler:gcc-c++11-lib
+.endif
+
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}